[Solved] Mount of root filesystem failed – Ubuntu

I `dist-upgrade` my system yesterday. And there were few issues with locale package with my terminal. I manually edited the file `/etc/default/locale` and in hasty copy pasted the few codes found online at (http://askubuntu.com/questions/33025/locale-settings-are-not-right-how-can-i-reset-them). I then saved and restarted my laptop to see the changes. Bang ! I began to receive the error.

Mount of root filesystem failed.
A maintenance shell will now be started.
CONTROL-D will terminate this shell and reboot the system.
Give root password for maintenance
(or type CONTROL-D to continue):

I tried to recover with system recovery option but then I got the following error message.
Highlighted in red.

Recovery Menu (filesystem state:read-only)
resume Resume normal boot

Recovery Menu (filesystem state:read-only)

I then first ran the system scan on my linux partition.

# fdisk -l

List all the partition and clearly shows that /dev/sda7 is the Linux partition.
Output of fdisk -l

# e2fsck -C0 -p -f -v /dev/sda7

Since, I guessed the problem might have been caused due to corrupt locale file, I wanted to fix that first to see if that solves the problem and it did finally. I first mounted the root partition, so that it is no longer readonly.

# mount -ro remount,rw /
# vi /etc/default/locale

The first command remounts the root linux partition as read/write so that I can make changes to the files. I then opened the /etc/default/locale in vi and added the missing tag. Saved the file and then restarted the computer.

# reboot

Note: All of the above commands are carried out as root so you have to be very careful before running any unknown commands at this point, you might delete the system files and make the situation more worse. I won’t be responsible if anything happens to your computer after you run the above commands.

After success restart I got my laptop normal. Hope this helps you.

Samundra Shrestha

Fullstack Developer, Senior Software Engineer

Leave a Reply

Your email address will not be published. Required fields are marked *