I deleted my /etc !!!!!

Everything about it! Heard the news? What! is Ubuntu bankrupt? Has Mandriva started marketing? Have you taken a sky diving course?
We just need to know! No flaming! And we hate spammers -Get it?

Moderators: b1o, jkerr82508

User avatar
viking60
Über-Berserk
Posts: 9271
Joined: 14 Mar 2010, 16:34

I deleted my /etc !!!!!

Postby viking60 » 27 Oct 2016, 13:19

Well as you all know backups are for chickens....but yesterday I manged to remove my /etc :!: :!: :!:
Image
Yes I know-- how is it even possible to be that stupid...so here we go;

I had an old backup on my USB drive.
This drive had a backup from my old Arch server and contained the directories /etc and /home

Since I have replaced that server with a Centos server I thought I'd delete those directories....

So cd into the USB drive and did a

Code: Select all

 rm -R /etc
and that of course did not remove the etc directory on the USB drive but the /etc on my main box :oops:

Stupid stupid stupid :f

So suddenly my user was completely gone root was gone and those users were gone even if I chrooted into it with my Viking Rescue system.

:wall:

Yeah that is bad :C but I was able to download and burn a Manjaro iso with SystemrRescueCD from our eminent rescue system and burn it to a DVD,

I started the Calamares installer and partitioned manually and had the option to keep the old data so I kept /home as is and also chose "keep" on /

That should replace my missing /etc.

I configured my user with the same data and password as before and was able to boot into my environment.

Every config file is there ('cept those in /etc of course) but I need to reinstall all missing programs.

Let this be a lesson to you :T :-D

I also have this script that backs up my /home on a daliy basis and in there I have pkglist.txt file that contains all installed packages:

I created it like this:

Code: Select all

pacman -Qqe | grep -vx "$(pacman -Qqm)" > /path/to/chosen/directory/pkglist.txt

I restored it with:

Code: Select all

sudo xargs -a </pat/to>/pkglist.txt pacman -S --needed

That should pretty much save my bacon.....depending on how old that file is....
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

Return to “The Lounge”