Tech Support > Operating Systems > Linux / Variants > HELP, DELETED /ETC/FSTAB
HELP, DELETED /ETC/FSTAB
Posted by Mark London on January 25th, 2004


Help! I was setting up a linux box on redhat, and accidently blew away a bunch
of files in /etc, including /etc/fstab. Do I have to start rebuilding from
scratch, or is there a way to recover /etc/fstab? Thanks!

Posted by Tony Curtis on January 25th, 2004


Restore from your backups.

hth
t

Posted by Keith Keller on January 25th, 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2004-01-25, Mark London <mrl@psfc.mit.edu> wrote:
If you haven't rebooted yet, try the mount command and start
reconstructing your fstab from scratch. If you have rebooted, boot from
CD/floppy, mount your partitions, see what they are, and reconstruct it
that way.

- --keith

- --
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFAE0eWhVcNCxZ5ID8RAvs+AKCa+blNoYgKkZEYkYOlX/JLeixiiACfSyv6
nJ+X12QcRI0qBk6ibC1QlWc=
=Ke2O
-----END PGP SIGNATURE-----

Posted by Alan Connor on January 25th, 2004


On 25 JAN 2004 04:12:09 GMT, Mark London <mrl@psfc.mit.edu> wrote:
Run cfdisk to get the partition info and create a new one. They aren't that
hard.

Man fstab and mount......Find an example to guide you.

(from a Debian box):

$ less /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump>
<pass>
/dev/hda2 / ext2 defaults,errors=remount-ro 0
1
/dev/hda5 none swap sw 0 0
proc /proc proc defaults 0
0
/dev/fd0 /floppy auto defaults,user,noauto 0
0
/dev/cdrom /cdrom auto defaults,user,noauto 0
0
/dev/hda1 /boot ext2 defaults 0 2
/dev/hda7 /var ext2 defaults 0 2
/dev/hda9 /usr ext2 defaults 0 2
/dev/hda6 /home ext2 defaults 0 2
/dev/hda8 /temp ext2 defaults 0 2
/dev/hda10 /doc ext2 defaults 0 2
/dev/hda11 /basic ext2 defaults 0 2




(watch the wrapped lines above :-)


AC


Posted by Lew Pitcher on January 26th, 2004


Mark London wrote:
If your system is still running, you can rebuild your /etc/fstab by copying
/etc/mtab. You will have to add your swap definition and any currently unmounted
filesystems to the new /etc/fstab, but what's there will be a good start.

--
Lew Pitcher

Master Codewright and JOAT-in-training
Registered Linux User #112576 (http://counter.li.org/)
Slackware - Because I know what I'm doing.


Posted by Steve Holdoway on January 26th, 2004


On 25 JAN 2004 04:12:09 GMT, mrl@psfc.mit.edu (Mark London) wrote:

I know this isn't any help at all, but there used to be a switch for
mount that printed the mount table in /etc/fstab format. Could have
been quite useful at this point (:

Maybe it should migrate from system V over to linux rsn ???


Steve

Posted by Garry Knight on January 26th, 2004


Steve Holdoway wrote:

'cat /etc/mtab'

--
Garry Knight
garryknight<at>gmx.net ICQ 126351135
Linux registered user 182025


Similar Posts