Thursday, October 17, 2013

Bypass read only permission in ubuntu recovery mode

While I was doing some experiments, I changed the "fstab" file in "etc" folder in ubuntu file system. That file is normally read only and it is related to the mounting process of partitions of the disks. I changed the read only status of a partition to read+write permission status. Consider that when you change that file DON'T restart computer without re-changing that file. But unfortunately I forgot the thing that I changed that file and after some other work, I restarted my computer.:(

So I couldn't boot my Ubuntu because of the misbehavior of the permissions of the partitions. So the simplest solution which comes in to my mind is to change the fstab file again to its original status. So I tried the recover mode. But later I figured that I can't change that file even in the root user because of the read only status of that file. Previously I changed that permission with some GUI method. So I couldn't use it with the terminal.

So I worked around with the recovery mode and found that we can edit the GRUB commands. For that you have to press "e" at the grub menu. Then it will display the grub commands. At that command list you'll be able to find "ro" in lower command. Change that to "rw". Then press F10 to boot using this changes. Then it will load the recover terminal. Now you can edit any read only file using vi editor. If you are not familiar with vi command refer some online tutorials.:)

No comments:

Post a Comment