I managed to accidentally rm -r the wrong etc file in Ubuntu 14.0.4 Desktop. I also decided I would set up encryption on my home folder (Another mistake).

Is there any way for me to restore the folder? Currently I have a bootable flash with Linux Mint 10 on it (Ubuntu bootables would not work no matter how many different ways I tried, They all gave me a boot error and moved straight on to the Ubuntu grub2 screens, which I tried to then select the kernel and boot into Ubuntu - This produced the EFI error that I am no longer interested in figuring out)

TL;DR So my main question is: Am I able to copy over a new etc folder to the root directory through Mint and then try and boot? If so which files do I need to be able to boot without a kernel panic? All I want to be able to do is back up my encrypted files and then I will do a clean format.

  • Why don't you just copy the encrypted files to the flash if you are planning to do a clean format?
    – Anthon
    Sep 18, 2014 at 17:42
  • Will that work? I have tried to mount them using the ecryptfs-mount-private command and thats throwing "ERROR: Encrypted private directory is not setup properly"
    – DeanMWake
    Sep 18, 2014 at 17:46
  • I am not sure what kind of encryption you are using. I have used an encrypted home directory under LUKS for many years and have been able to mount that from a rescue CD (after looking up the commands, as I always forget them).
    – Anthon
    Sep 18, 2014 at 17:54
  • @MethodMan If your encrypted home directory won't mount from the recovery disk, that sounds like a good question to ask.
    – derobert
    Sep 18, 2014 at 18:35

1 Answer 1


In Linux based systems it is nearly impossible to restore files once deleted. What you should do in this case is to retrieve the broken directory from your saved backups. You are making periodic backups right? Otherwise, depending on which directory you removed you might have to either identify and reinstall a bunch of packages or do a total system reinstall.

  • I literally just installed it yesterday. Im just trying to save myself some time by backing up all the downloads I did over night. Java, my IDE, graphics drivers, Package updates... Sigh I guess Im just being lazy but with a 1mb internet connection its hell downloading all of this again.
    – DeanMWake
    Sep 18, 2014 at 17:48

Not the answer you're looking for? Browse other questions tagged .