M BUZZ CRAZE NEWS
// general

Booting into read-only file system

By David Jones

I updated Ubuntu Desktop(although I'm using it as a server) from 14.04 to 16.04 on ssh. After completion and rebooting, it boots into read-only file system.

root@Server:/# touch a
touch: cannot touch 'a': Read-only file system

I tried mount -o remount,rw /, but the output is mount: can't find UUID=/dev/sda1. I think UUID is somehow changed to /dev/sda1. This is the contents of /etc/fstab.

root@Server:/# cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=/dev/sda1 / ext4 errors=remount-ro 0 1
# UUID=643d9cab-177e-4eee-a52f-224ebf0bc405 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=481bc70a-eb80-4040-93a1-696c46faa638 none swap sw 0 0

I think I should comment the line UUID=/dev/sda1 and uncomment the line UUID=643d9cab-... right below, but because the root file system was mounted as read-only, I couldn't. I don't know if this would help, but here's a part of kernel message.

root@KrootServer:/# dmesg|grep mount
[ 1.794106] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[ 5.675605] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[ 19.677056] cgroup: new mount options do not match the existing superblock, will be ignored

So how do I fix this problem? I'm trying to fix the problem on ssh, so let me know if I need to physically access the machine.

[+] result of sudo blkid

ian0371@Server:~$ sudo blkid
/dev/sda1: UUID="643d9cab-177e-4eee-a52f-224ebf0bc405" TYPE="ext4" PARTUUID="0000e118-01"
/dev/sda5: UUID="481bc70a-eb80-4040-93a1-696c46faa638" TYPE="swap" PARTUUID="0000e118-05"`
3

3 Answers

I had the same problem when booting into a copied root filesystem (I forgot to adjust UUID values in /etc/fstab). It turns out mount -o remount still looks in /etc/fstab if you don't specify a device. It worked when manually specifying a device:

mount -o remount,rw /dev/sda1 /

Now lets try this fix:

  1. Boot into recovery mode
  2. Select root from recovery menu.
  3. Mount file system with:

    mount -o remount,rw /
  4. Using vim or nano change your /etc/fstab like so:

    #UUID=/dev/sda1 / ext4 errors=remount-ro 0 1
    UUID=643d9cab-177e-4eee-a52f-224ebf0bc405 / ext4 errors=remount-ro 0 1
  5. Then exit and select resume from recovery menu, that should fix your issue.

3

There is something wrong in your /etc/fstab.

UUID=/dev/sda1 / ext4 errors=remount-ro 0 1
# UUID=643d9cab-177e-4eee-a52f-224ebf0bc405 / ext4 errors=remount-ro 0 

THe first line is wrong, /dev/sda1 isn't a uuid. The second line looks like the correct one. Put a # in front of the first line, and remove it on the line below.

You can verify the UUID by blkid /dev/sda1 .. if it differs, change the one in /etc/fstab so that it matches.

OR you can remove the UUID= in front of /dev/sda1

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy