Walker News

How To Edit fstab System File In Linux Maintenance Mode?

Without remount the root filesystem, it is not possible to edit or change system files when booting Linux into single-user maintenance mode.

As shown in the “silent” screencast (below), RHEL 5.2 cannot boot up properly and force me to enter maintenance mode. As soon as I open /etc/fstab file using vi editor, it shows the file is read-only only, then a W10 warning of changing readonly file, followed by E303 error that says “unable to open swap file for /etc/fstab, recovery impossible”. I can’t save the file changes even using :wq! because of “E212: can’t open file for writing”.



So, how to fix /etc/fstab error if I can’t save changes or corrections made to /etc/fstab file in maintenance mode? Well, the solution is simple. Just remount root filesystem (/) in read-write mode:
mount -o remount,rw /

Then, it is possible to edit or correct /etc/fstab file (or any system files in /etc directory) in Linux maintenance mode.

Custom Search

  1. ef 03-08-11@23:44

    Thanxs it worked

  2. Newbie 11-10-11@01:01

    Thank you !

  3. Professor Hog 12-02-12@23:21

    Spot on! great article, thanks

  4. Neelesh Banthia 22-07-12@21:30

    it’s working…very very thanx..

  5. rhel6 10-10-12@21:42

    thank you :)

  6. mehdi 08-11-12@03:42

    thank you so much

  7. Imran Shaikh 31-12-12@14:52

    I noted in my Linux notes :) thanks for the solution.

  8. evilHead 23-04-13@14:03

    Worked like a charm!
    many thanks.

  9. Abhilash k 17-05-13@11:38

    Hey.. Thank u so much, my server got up…

  10. SrinivasanR 27-05-13@21:26

    Great !!!! it worked perfectly

  11. mohaia 04-06-13@01:27

    Thank you man

  12. Ben 07-06-13@20:11

    Great …thank you

  13. Marcelo 16-08-13@05:24

    thank you very much, you saved me

  14. Ramakrishna 22-08-13@14:36

    Thank you,it works.

  15. Raj 25-08-13@06:17

    Saved me in bad time.. Thanks :)

  16. Chetan 03-09-13@16:12

    Thanks. it worked…… save me from formatting

  17. Mathan T 04-11-13@12:58

    Thank you man

  18. santosh 10-11-13@17:50

    Thanks buddy .. been a great help

  19. Marco Castro 06-12-13@06:28

    Thanksssssss a Lot!

  20. Ahmed Raafat 08-12-13@05:51

    Thanks, been a great help

  21. Krishan 08-01-14@17:11

    Thanks a lot…. !!! :)

  22. polarbee 20-01-14@21:50

    great and simple, thanx a lot…

  23. Ashraf 27-01-14@15:39

    great and simple, thanx a lot…

  24. shigol 28-01-14@13:53

    Thanks a lot!!!!!!!! =)

  25. Maxi 11-04-14@06:57

    Gracias!

  26. Ali 15-04-14@13:46

    Thanks Dear .

  27. Soufiane 20-04-14@18:49

    Thank you so much :) it worked

  28. surya 21-05-14@17:59

    Thanks you

  29. Josh 13-06-14@00:47

    Nice! Thanks.

  30. bipin 16-07-14@17:46

    Thanks, You really saved me.

  31. tejaswi 22-08-14@01:06

    It worked.great help

  32. dale@cray.com 28-08-14@07:35

    Thank you so much!

  33. Jacques 28-10-14@15:37

    Thanks for sharing :)
    it really saved me

  34. Bjron 28-11-14@02:25

    Worked perfectly ! Great post…..

  35. likjjdblue 04-02-15@23:34

    perfectly, it work

  36. linux_admin 23-02-15@23:20

    Spot ON. Thanks bud!!

  37. Dragloon_2015 01-04-15@22:29

    Saved. My. Butt.

    Thanks!

  38. eric 20-05-15@18:12

    Thanks Man

  39. nilesh khetre 03-06-15@12:47

    Thnx bro….

  40. SIVA 15-07-15@17:18

    Effective command, thanks its working fine.

  41. Mahesh Dudhani 03-08-15@15:16

    Thank you so much, it’s worked :)

    Thanks to Walkernews.net

  42. Joseph 20-08-15@21:09

    Many thanks, it worked

  43. i0FHorus 21-08-15@02:56

    You’re the man!!!
    Many Thanks :)

  44. Shehbaz 27-08-15@13:44

    Thanks dude……

  45. Thomas 27-08-15@16:38

    Thanks..it’s taken me hours to fix. thanks to you.

  46. Greg 16-10-15@11:35

    Awesome, thx

  47. Bryan 28-01-16@22:17

    Thanks a bunch. Was really stuck and needed this.

  48. Mamatha 12-04-16@15:09

    vm-nomadicSSDFGA#mount -o remount,rw /
    mount: block device /dev/VolGroup01/LogVol00 is write-protected, mounting read-only ….

    Unable to do so…

  49. Rupali Kadam 17-06-16@14:14

    thank u soooo much..I really stuck here..

  50. Sridhar 25-06-16@19:40

    Thanks for the remount command. It worked well.

  51. LolO 02-10-16@20:31

    Merci, tu viens juste de sauver ma journée !

2016  •  Privacy Policy