My cat walked over my keyboard and pressed "magical" SysRq u, doing an Emergency Remount R/O. How do I reverse this?
On How do I remount a filesystem as read/write?, SirCharlo claims
The correct syntax is:
sudo mount -o remount,rw /partition/identifier /mount/point
but that just yields another error,
mount: you must specify the filesystem type
and if I supply it, e.g.,
$ sudo mount -t ext4 -o remount,rw /dev/sda7 /
I'm back at the error message the OP reported,
mount: / not mounted or bad option
That diagnostic begs the question, which? Not mounted, or bad option? The exit status is 32, and man mount
provides this key:
mount has the following return codes (the bits can be ORed):
0 success
1 incorrect invocation or permissions
2 system error (out of memory, cannot fork, no more loop devices)
4 internal mount bug
8 user interrupt
16 problems writing or locking /etc/mtab
32 mount failure
64 some mount succeeded
OK, looks like a mount failure. ;-)
What can I do about it?
BTW, in response to Alkthree's question "How do I remount", SirCharlo also suggest not a remount but umount followed by mount. Why?
mount -o remount,rw /
, that program (/bin/mount
) figures out the partition identifier by itself, and attempts the system callmount("/dev/sda7", "/", 0x19f6590, MS_MGC_VAL|MS_REMOUNT, "errors=remount-ro")
, which returns-1 EINVAL (Invalid argument)
, and then it printsmount: / not mounted or bad option
.mount: warning: /etc/mtab is not writable (e.g. read-only filesystem). It's possible that information reported by mount(8) is not up to date. For actual information about system mount points check the /proc/mounts file.
/dev/sda7 on / type ext4 (rw,errors=remount-ro,commit=0)
. In contrast, the up-to-date /proc/mounts has two,rootfs / rootfs rw 0 0
and/dev/disk/by-uuid/3a1bce3b-90fa-423f-9bee-69874fd7a9c1 / ext4 ro,relatime,errors=remount-ro,data=ordered 0 0
/var/log/syslog
anddmesg
for anything file system related, especially for the moment when the filesystem was remounted, and anything related to/dev/sda7
. Runtail -f /var/log/syslog
, and try to run themount -o remount,rw /
again, also try to press again the Alt+SysRq+u — and see if there would be any prints.