I just ran a script I'm working on, and due to a mistake in directories, overwrote most of the default /etc directory files.

I can re-add my user account easily, but most other things are gone such as:

mtab (syn link)

I'm not using any real custom configs, mostly a base Fedora 19 install upgraded last week to Fedora 20 via fedup.

Do I have any options to re-create the default /etc files including my default-from-install fstab?

I haven't shutdown/rebooted since this happened... so my current session is still active, although I can't open any additional terminals without getting the I have no name! user showing up (with no correct env variables); I do have one valid terminal open (if there is some way to write-out it's env variables or something).

Reinstalling is possible as a last resort.

  • Perhaps try extundelete ? extundelete.sourceforge.net – Lawrence Jul 29 '14 at 5:14
  • 4
    I suspect that a reinstall is the only way to have any confidence in the system again. Another possibility is to perform a fresh install onto another server/VM, and either transfer the files, or copy and paste each one. It depends on whether utilities such as scp are still working for you though. – Warwick Jul 29 '14 at 5:18
  • @Warwick ya, i'm going to resort to a reinstall this evening. It's a development laptop so nothing major... more of a PITA than anything. -- the entire thing was caused by a path being wrongly prefixed by / when it should have used the working directory as it's root instead... damn... – SnakeDoc Jul 29 '14 at 18:27

As mentioned by @Warwick -- A clean install is the only sane option at this point. Rebuilding the fstab in particular would be challenging since Fedora uses UUID's for mappings.

Time to backup any data, then re-install.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.