Unable to restore /etc/fstab
HI Team,
I'm facing a problem in restoring my /etc/fstab file in the server i have a backup in /etc/fstab. bak but when i try to boot the server in emergency mode and give the command cat /etc/fstab.bak > /etc/fstab it says read only file. I'm not able to restore it i tired even remounting the filesystem using the command mount -o remount,rw / It says /etc/fstab not found.. can any 1 help me out with this.??? thanks in advance!!!!!!! |
Hi there,
Could you try: Code:
mount -n -o remount,rw / Code:
mount -n -o remount -t ext2 /dev/sda1 / The important thing being the "-n" option. |
hi...i tried the command suggested by you but there is no success
the following message is getting displayed waring cannot open file no file or directory |
Hi,
If (re)mounting doesn't work for you: Boot from a liveCD and fix the problem that way. - boot from liveCD - mount partition that holds /etc/fstab.bak - copy /etc/fstab.bak to /etc/fstab - reboot (do eject the liveCD :) ). Hope this helps. |
If you have a livecd, then I'd go with that option. Just remember that it's the "etc/fstab" on the mounted drive you'll be replacing, not /etc/fstab (which will be the one on the livecd itself).
If not, repost and we'll try something else. The second command I gave you shouldn't have looked for an fstab so I'm not sure why it didn't work. Are the partition names correct? |
thanks!!!
Hi mate the second command has worked successfully...thanks
|
fstab
We have had to use the liveCD method before in situations like this and it's worked perfectly. Quite a lifesaver.
|
All times are GMT -5. The time now is 09:55 PM. |