Posted by: kezhong | July 11, 2009

Solving an unbootable problem caused by modifying fstab

When I did the RAID 10 test, I didn’t add the “UUID” information into /etc/mdadm.conf file initially. After I reboot the system, it was unable to boot.

I inputted the password and entered the maintenance mode. I tried to delete the line I had added from the /etc/fstab file, but the file is in real-only mode and I could not to modify it.  After searched the solution in the internet, I did the following four steps. The problem had been solved.

1. Check the filesystems.
(Repair filesystem) 1 # fsck –a
… …
fsck.ext4: No such file or directory while trying to open /dev/datavg/datalv
… … 

2. Remount the root file system and make it writable.
(Repair filesystem) 2 # mount –o remount,rw /
EXT4 FS on dm-0, internal journal on dm-0:8 

3. Edit the /etc/fstab file, delete the line I had added, save and quit.
(Repair filesystem) 3 # vi /etc/fstab 

4. Reboot the system.
(Repair filesystem) 4 # reboot




    • Did you do the first step(check file system)?

  2. tried it but it doesnt allow the remounting ….

  3. As it couldnt able to find the editng file…

  4. Worked like a charm! Thanks a lot!

  5. It helped me to remount the / file system.

    Thanks a lot !!!

  6. Very smart solution sweet kiss for you

  7. not sure what to do…now when i rebooted i get this message

    error: unknown filesystem
    grub rescue> _

    now what?

  8. Thanks, It worked for me.

  9. the system we’re installing can’t boot up, until we read this post… thank you…

  10. man, u r a life-saver! i was doing some test on cryptsetup and all the suddent the CentOS 6.2 is not booting again… with your simple steps, I was able to edit the fstab and comment out the bad device and it’s booting again. Thanks so much!!! =)

    • same pinch :D i’m also doing testing on cryptsetup & faced the same problem!!

  11. yes it’s working good thanks

  12. good article

  13. thanks it worked for me…………… excellent answer..
    But when I m trying to mount .img file its saying “operation not permitted”
    even when i am trying to assign full permission to .img file its saying
    “chmod: changing permissions of `/home/test1.img’: Operation not permitted”

  14. Thanks, it worked for me.

  15. Thanks you just saved me from a very very late night

  16. This helped me to solve an hour of search … thank you so much

  17. Thank you Kezhong! It worked perfectly. Many other sites produced relatively unsatisfactory results.

  18. Nice.
    I edited fstab trying to mount an external drive, mucked it up, and couldn’t repair. This did the trick for me, thank you!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


%d bloggers like this: