When booting I get into the grub menu, choose recovery mode, select fsck, yes However error saying root partition is already mounted. I thought this method was designed to allow this before the root partition is mounted.
2 Answers
In older versions of Ubuntu, fsck used to work from the Recovery Mode. However, later versions of Ubuntu leave the primary HDD/SSD mounted, so fsck no longer works.
Let's check/repair your filesystem...
- boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode
- open a
terminalwindow by pressing Ctrl+Alt+T - type
sudo fdisk -l - identify the /dev/sdXX device name for your "Linux Filesystem"
- type
sudo fsck -f /dev/sdXX, replacingsdXXwith the number you found earlier - repeat the
fsckcommand if there were errors - type
reboot
Note: for Ubuntu Live, use Ubuntu Desktop, not Ubuntu Server (even if your environment is Ubuntu Server).
- 73,649
Since posting the question I found 2 solutions on the net.
1.Force a fsck on each boot for an EXT4, EXT3 or EXT2 filesystem using: sudo tune2fs -c 1 /dev/sdXY eg sda3
2.This command uses Nano command line text editor to open /etc/default/grub so you can edit it: sudo nano /etc/default/grub
To force a fsck each time the computer boots, you'll need to add fsck.mode=force to GRUB_CMDLINE_LINUX_DEFAULT, at the end of the line but before the last quote (").
Example: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash fsck.mode=force"
After you've finished editing /etc/default/grub, update your Grub2 configuration: sudo update-grub
- 99