114

I have messed up my sudoers file and I want to change the permission on it.

When I login in recovery mode, I cannot run the command chmod as it is read-only option.

I tried mount -o remount,rw / in recovery mode. Didn't work for me:

Err : Ext4-fs remount. Opts errors=remount-ro 

How can I boot into recovery mode and with read-write option?

Braiam
  • 67,791
  • 32
  • 179
  • 269
bale
  • 1,141

3 Answers3

197

I did some web searching on "Recover Mode Read Only" and came across this post on LinuxQuestions.org website.

  1. Shutdown the computer
  2. Boot into Recovery Mode --After BIOS load, hold down Shift key to access the grub menu --Once in grub menu, select the entry ending in "(recovery mode)"
  3. From the next menu selected option to enter Root Session
  4. At the root session, execute command mount -o rw,remount / to remount the filesystem as read-write
twister_void
  • 5,924
21

Since the answer is a bit old and did not work for me, I share with you my solution. I mistyped an option in fstab for the / directory (very bad, I know).

In order to mount in recovery mode with read write option the mentioned solutions did not work for me.

I simply chose the kernel with recovery mode option and pressed e to modify the boot parameter from ro to rw.

Ely
  • 459
19

I always use following way to change into read/write mode

  • Login in Safe Mode
  • From the Menu just go to Grub option, it will give a message like Updating grub will mount your system in read/write mode. Just chose yes to mount your system in read/write mode. It will update your grub and will exit from Grub menu.
  • Finally login as root, your system will be in read/write mode.
  • You can also chose dpkg option from the menu to change file system to read/write mode.

It always worked for me. It helps when you don't remember the command to change into read/write mode.

Just give it a try..

Saurav Kumar
  • 14,916