Ubuntu – Unable to mount filesystem as read-write in recovery mode

read-onlyrecovery-mode

I deleted two unused user accounts. Now I am unable to login even into my own account.
I rebooted in recovery mode in the root shell and tried to restore the back-up of /etc/passwd. However, the filesystem is read-only!

I can only access root shell via recovery.

Can you help me?

Best Answer

If I am not wrong, the filesystem is mounted read-only by default in Recovery mode. To mount it as read-write, go the recovery mode and choose root. Now type the following command:

mount -o rw,remount /

Note the spaces, you'll get an error if you ignore the spaces, or add extra ones too. And then you can copy as you tried earlier.