This has been a hellishly busy & stressful week for various reasons, but today I made my situation a whole lot worse:
root@steve:~# root@steve:~# cd /etc root@steve:/etc# find . -name '*' -delete
I got the system back to minimum functionality by re-creating /etc/hostname, /etc/resolv.conf, and restoring backups of passwd, group, and shadow.
Unfortunately attempting to restore things further soon hit a roadblock so I copied /etc/* from a similar machine and patched up hostnames, etc. Unfortunately things like GDM were missing initscripts so the system failed to give me a good workable base.
What is the preferred way to recover from missing files anyway?
Try this:rm /etc/init.d/ssh
The naive attempt at recovery is this:apt-get install openssh-server --reinstall
But that doesn't restore the file. I'd be curious to know how I should restore it?
The emacs alternative, and all the symlinks from /etc/alternatives generally were missing, and on the whole it was a broken mess. I could start but gdm failed to give me a login due to dbus/random errors.
In the end I archived /home/steve to another box and planned a reimage. (I've currently installed the base system via a PXE-boot, and am installing the X, Emacs, Firefox stuff)
The good news is I've lost no data. The great news is that the installer recognised my LVM setup, and allowed me to re-mount /home without losing the data, or needing to touch the temporary-off-site backup.
In other news tomorrow we have a magical time:
- Time 12:34:56 07/08/09
I will try to ensure I'm drinking alcohol that very second.
Tags: fuckups, machines:steve, reinstallation, stress 3 comments