0

my /etc got deleted, and now I am unable to boot the system and receive a kernel panic error.

I am on Ubuntu 14.04 and tried using usb to copy the /etc folder over onto the mounted file system, but I was still getting kernel panic on boot. I am also not able to find a way to upgrade to 16.04 without losing all my data. I was thinking by doing an upgrade, I could recover the /etc folder. Is there any other way to do this, or should I just redo everything?

  • 1
    Get a backup, then reinstall. – Ravexina Jul 13 '17 at 14:54
  • It's unclear (at least to me) exactly what commands you used and the output you received. Please [edit] these important details into your post. Thank you for helping us help you! On a related note, directories should not "get mysteriously deleted" You may wish to check SMART status as your drive may be in the process of failing. – Elder Geek Jul 13 '17 at 14:56
  • As you're a reputation 1 user: If an answer helped you, don't forget to click the grey ☑ at the left of the text, which means "yes, this answer is valid"! – Hannu Jul 13 '17 at 17:16

1 Answers1

0

For what it is worth;

Unless you have a backup, there is no easy way to "restore" what should be in any specific place on the system disc.
As the OS is installed a number of tasks get done, among others installation of a multitude of software packages - where each of them set up the specific requirements for itself.

Without a backup your best option is to:

  1. Boot using a live disk/usb (the install-ubuntu USB!)
  2. Mount a spare disk.
  3. Copy your important files over to the spare disk.
  4. Re-install.

"Important files" might include your $HOME/.config/ dir to begin with, and maybe some other ".name/" dirs and files in your home dir - if not all.

After reinstalling I would look through those files for hints on settings.

NOTE: I would NOT replace the installed settings files, but check for differences only, then re-create the important settings with the related re-installed application - as a first choice.
Blindly replacing files has a tendency to wreak havoc in the worst case.

That in contrast to pure data files that you have created by other means, e.g. jpg, mp3, doc -files and similar.

Hannu
  • 5,374
  • 1
  • 23
  • 40