I recently found out that one of our servers has lost (probably someone deleted it) the /etc/fstab file, it's a Fedora Core 6.
Is there anything we can do to rebuild the fstab without a copy?
-
This may be considered off-topic for Stack Overflow. You might want to ask about this on Unix.SE or Super User (but search for it there first!).– Eliah KaganCommented Jan 8, 2013 at 3:32
Add a comment
|
1 Answer
If system is still running you can get a copy of fstab from file /proc/mounts.
-
1Note that
/proc/mounts
is not an exact copy of/etc/fstab
as it usually contains more entries and more detailed options.– scaiCommented Nov 30, 2012 at 13:14 -
@user2391 sadly /proc/mounts is empty, and now i can only access this machine in repair mode, it's a VPS, and the error i'm getting is: /bin/cp: cannot create regular file `/etc/sysconfig/network.8175': Disk quota exceeded ERROR: Can't copy file /etc/sysconfig/network VE is unmounted VE start failed . Commented Nov 30, 2012 at 13:53
-
@doterobcn If system was shutdown after losing fstab you will likely have to manually mount root partition, create new fstab, than try and mount disk partitions form /dev and add entries to fstab. Alternatively you can read partition tables using fdisk. You can copy entries for tmpfs, procfs, sysfs, devpts from other fedora machine.– NemanjaCommented Nov 30, 2012 at 14:08
