trying to recover deleted /etc/fstab
hi ,
I have deleted /etc/fstab file in RHEL5 tried to boot the system in single user mode and emergency mode unable to edit the file and the file is missing , cannot create it, as i am loggged in as read only mode , tried to run mount -o remount,rw /dev/sda but issue is not resolved please suggest |
/dev/sda is the entire disk. Do you know the specific partition that is / ?
Adam |
Have you got a live CD you can boo the system with? If not, I would suggest you get a copy of Knoppix. It will boot most systems. The partitions on the drives will show up as icons on the desktop. They can be mounted, at first that will be read only mode. You can change that to read write mode.
Then you can create a new fstab file to get you started. You can create entries like this... Quote:
A live bootable CD should save your system. |
thanks for the replies
my boot partition is on sda3 and i do not have the live cd i wanted to edit the fstab file while logging on to single user mode is this possible , without a cd . |
you need permissions; try sudo
|
i am already running as root by using su -
|
Quote:
Can't you create an /etc/fstab? Tell us how you've tried |
yes iam on the same distro
first i tried to edit /etc/fstab in single user mode it denied doing coz of read only mode then i tried to run mount -o remount,rw / it give me the following error warning : can't open /etc/fstab : No such file or directory mount: can't find / in /etc/fstab or /etc/mtab i am running these commands after running su - |
first be root by su root , then create an /etc/fstab file
|
i am already root
|
did you try to create an /etc/fstab ?
This is an example of fstab, edit it Code:
/dev/hda2 / ext2 defaults 1 1 |
Try remounting the root drive as read/write instead of read only.
|
thaty is what i am trying to do , iam trying to mount rw , passed the arguments from kernel ,
still not sucessfull jerry i have already run te commands but unable to edit the file |
What command did you run, and what was the response? It would probably be this one:
Code:
mount -n -o remount,rw / |
still
warning : can't open /etc/fstab : No such file or directory mount: can't find / in /etc/fstab or /etc/mtab |
All times are GMT -5. The time now is 10:19 PM. |