Comment Out Some Vol Group In Fstab Accidentally

edit/write the /etc/fstab file 

I comment out some vol group in fstab accidentally.
I also comment the swap space in /etc/fstab 
But I cannot edit /remove it back by using vi /etc/fstab again in init 1 and init 6 .
The file system /etc/fstab is read -only . I cannot chmod .....
What can I do in order to recover it?

Solution:

Manually remount the appropriate filesystem as read-write. An example from man mount:

Code:

mount -o remount,rw /dev/foo /dir

or

Reboot the system, and pass this as an additional kernel parameter 
(attention: at this point an english keyboard layout is in effect) 

Code:

init=/bin/sh

When you've booted to an console, enter this: 

Code:

mount / -oremount,rw
vi /etc/fstab
# after editing, just to be sure
sync

Revert your changes, and reboot the system using either 'reboot' or by doing a cold reboot. 

Note: 'shutdown' won't work at this point.

Have a Linux Problem
Linux Forum - Do you have a Linux Question?

Linux Books
Linux Certification, System Administration, Programming, Networking Books

Linux Home: Linux System Administration Hints and Tips

(c) www.gotothings.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
All product names are trademarks of their respective companies.
The site www.gotothings.com is in no way affiliated with or endorsed by any company listed at this site.
Any unauthorised copying or mirroring is prohibited.