Author Topic: Can't do a manual fsck on root system [SOLVED]  (Read 1079 times)

0 Members and 1 Guest are viewing this topic.

Offline Keith

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1489
  • Karma: 20
  • Gender: Male
  • Linux Novice
    • View Profile
    • Awards
Can't do a manual fsck on root system [SOLVED]
« on: September 21, 2021, 04:15:19 pm »
Lenovo B50-10 running Ubuntu 18.04

A mate sent me his Lenovo laptop to fix as it wouldn't boot and indicated a manual fsck was necessary. 
It boots straight into the GRUB screen (without pressing the Shift key).  I selected "Advanced options for Ubuntu" and then selected "Recovery Mode" expecting to see another screen with a recovery mode menu so I could choose manual fsck, but it did an auto-fsck on /dev/sda2 and outputted two pages of stuff, exiting with Code 4 (which is just "File system errors left uncorrected"). 

Then followed the advice to run a manual fsck without the -a or -p options, finishing with "File system check of root file system failed.  Requires a manual fsck."

That it is performing fsck automatically at boot is making things difficult so I checked that the boot order is USB first then booted with an Ubuntu 20.04 USB in place with a view to running fsck from that - but this was ignored and it went into the usual routine. 

I found the GRUB command line screen (typing c at one point) but none of the commands I could think of were recognised. 

Any ideas, anyone? 

EDIT 1:  Discovered that Legacy Boot was not enabled!  I can now boot from a USB and will be able to back up files before messing with the system.
« Last Edit: September 21, 2021, 09:47:23 pm by Keith »

Offline SeZo

  • Hero Member
  • *****
  • Posts: 1864
  • Karma: 145
  • Gender: Male
    • View Profile
    • Awards
Re: Can't do a manual fsck on root system
« Reply #1 on: September 21, 2021, 08:54:03 pm »
run fsck from a Live-CD/Live-USB
Identify partitions

Code: [Select]
sudo fdisk -l

Make sure they are unmounted:
Code: [Select]

Code: [Select]
for n in /dev/sda* ; do umount $n ; done

then run fsck on them (substitute X to suit):

Code: [Select]
fsck /dev/sdaX

or fix an hard drive related issue called bad blocks you may have (this will take a long time).

Code: [Select]
fsck -cy /dev/sdaX
or
Code: [Select]
fsck -C0 -p -f -v /dev/sdaX

The Linux Community Forum

Re: Can't do a manual fsck on root system
« Reply #1 on: September 21, 2021, 08:54:03 pm »

Offline Keith

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1489
  • Karma: 20
  • Gender: Male
  • Linux Novice
    • View Profile
    • Awards
Re: Can't do a manual fsck on root system
« Reply #2 on: September 21, 2021, 09:47:00 pm »
Many thanks Sezo - that worked perfectly. 

Keith

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal