When I tried to run
fsck on Ubuntu 18.04 recovery-mode I got the following message.
Can anyone tell me why?
/lib/recocery-mode/recovery-menu: line 80: /etc/default/rcS: No such file or directory fsck from util-linux 2.31.1 /dev/sda4 is mounted e2fsck: Cannot continue, aborting.
The error is telling you that you cannot use
e2fsck while the target file system is mounted. You must unmount the file system first using
umount /dev/sda4. If you’re currently booted into a system that has that volume mounted it’s likely that you cannot unmount it. You should probably use a USB stick and run
e2fsck from that.
You don’t say what command you’re using, so do it this way…
To check the file system on your Ubuntu partition…
- boot to the GRUB menu
- choose Advanced Options
- choose Recovery mode
- choose Root access
- at the # prompt, type
sudo fsck -f /
- repeat the
fsckcommand if there were errors
If for some reason you can’t do the above…
- boot to a Ubuntu Live DVD/USB
gpartedand determine which /dev/sdaX is your Ubuntu EXT4 partition
- open a
sudo fsck -f /dev/sda4# replacing 4 with the number you found earlier
- repeat the fsck command if there were errors