Results 1 to 7 of 7
Hi,
I comment out some vol group in fstab accidentally.
But I cannot edit /remove it back by using vi /etc/fstab again in init 1 and init 6 .
The ...
- 02-24-2010 #1Just Joined!
- Join Date
- Aug 2009
- Posts
- 44
edit/write the /etc/fstab file
Hi,
I comment out some vol group in fstab accidentally.
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
Please advice ....
I paste the console screen in here .
- 02-24-2010 #2Just Joined!
- Join Date
- Feb 2010
- Posts
- 5
Try chattr first. It should give an error message saying that the file is immutable when you try to save it. This is the default in RHEL, i believe.
- 02-24-2010 #3Just Joined!
- Join Date
- Feb 2010
- Posts
- 1
As the system goes in maintenace mode so the file system is in read only mode .So you first mount / parttioin in read-write mode.You can do this by using following command
# mount -o remount,rw /
now your / partiton is in read-write mode
open your /etc/fstab file and correct it and save it then restart your system.
Mike Orton
Server AdminLast edited by devils casper; 02-25-2010 at 12:32 AM. Reason: removed spam link
- 02-24-2010 #4
So you commented it out it out in fstab and can't get it back?
Un-comment it, would be first thought.
I wasn't really clear on the rest of your post...
What's the issue?Jay
New users, read this first.
New Member FAQ
Registered Linux User #463940
I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.
- 02-24-2010 #5
Mike_Linux has you on the right track. If it won't remount as rw in maintenance mode, though, try booting rescue mode from your install CD/DVD. At the Boot: prompt,
linux rescue
Accept its offer to mount your system read/write, then "cd /mnt/sysimage/etc" and vi your fstab.
- 02-25-2010 #6
I agree with jayd512. chuikingman, could you please provide more details?
Also, doesn't RedHat have sudo or su?.. One would usually do
orCode:sudo vi /etc/fstab
to edit fstab on other distros.Code:su -c 'vi /etc/fstab'
If you cannot boot into your system, then you could try a LiveCD and change fstab from there. The answers may become better if you provide more information
- 02-25-2010 #7
My inference from the OP's description and screenshots is that he's in maintenance mode as root, but that the filesystem is mounted readonly. Clearly he knew how to edit the fstab file as root to get the spurious "#" in front of the root filesystem line. I don't think sudo/su is the issue.
Further feedback from the OP could prove me wrong, but could also result in one or more of us helping him further with whatever the issue is.


Reply With Quote