fstab

I lost fstab.
how can i edit fstab. i alllrady tryed single mode,, resuce mode, aslo try chmod and umask all command but can not work.. all say fstab is readonly file.
during bootin sya's press ctr+d or enter password to recover..
then if i use vi /etc/fstab then i can not edit it..

This e-mail and the information it contains are confidential and may be
privileged. If you have received this e-mail in error please notify us
immediately. You should not copy it for any purpose, or disclose its
contents to any other person.

Hi
if you con mount (/) file system by rescue CD
you can create very simple fstab file under /etc
the below is my laptop fstab(very simple)
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/hda2

Boot your system using the DVD and select rescue mode.
Then you would do a chroot command to switch kernels
at that point as root you will have rw mode to fstab.
Alternatively, boot a live cd and mount the hard disk in rw mode.
find the /etc directory and edit fstab.
In future always create a fstab.orig before modifying the fstab. That provides a recovery for you

You can always change the permission of the file, first check the file
is already there.
[root@server]# ls -la /etc/fstab
-rw-r--r-- 1 root root 1023 Sep 29 10:56 /etc/fstab
If necessary use chmod command to change the permission of the file.
Usually "vi" can edit the file.
Regards,
Chandra
www.linuxsurf.comwww.linuxuniversal.com

If you can boot the linux operating system normally, check the permissions of the /etc/fstab file. Better if you log in with root or su - root after logging in as a normal user. Then check the permissions of the file, ownership of file. The file should be owned by root user. After that try to edit the file. If you are not able to boot, get in to rescue mode.If there are any problems mounting the file system, check the file system using e2fsck -y device, eg. e2fsck -y /dev/hda1. Once the e2fsck complete, mount the file system manually & check whether you are able to edit the /etc/fstab file.
-Vaibhav

Copyright 1998-2015 Ziff Davis, LLC (Toolbox.com). All rights reserved. All product names are trademarks of their respective companies. Toolbox.com is not
affiliated with or endorsed by any company listed at this site.