3

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?

CC BY-SA 3.0
1

1 Answer 1

3

If system is still running you can get a copy of fstab from file /proc/mounts.

CC BY-SA 3.0
3
  • 1
    Note that /proc/mounts is not an exact copy of /etc/fstab as it usually contains more entries and more detailed options.
    – scai
    Commented 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 .
    – doterobcn
    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.
    – Nemanja
    Commented Nov 30, 2012 at 14:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.