[comp.unix.wizards] rm woes

trb@ima.ISC.COM (Andrew Tannenbaum) (11/18/87)

Application notes on the echo editor and the uuencode compiler:

Once upon a time, I was logged into a machine which had /tmp in the /
partition, which was full.  I decided to run CCA (I think) emacs dired
on /tmp, logged in as root, so I could clean up.  When it came to a
directory, it would print "recursively delete subdirectory?" and you
would confirm.  Anyway, as I was root, .. was a link to /.  I was
getting "disk full" messages from the kernel every second, so the
screen was out of sync when it asked me whether I wanted .. deleted
recursively (which, of course, I wasn't expecting) and I told it to go
ahead.

In a few minutes, I was getting streams of "/bin/rm: not found"
messages.  I finally figured it out (horror), and managed to stop
dired.  /, /bin, /dev, and /etc, were gone, except for texts that were
busy when unlinked.  This machine was only bootable off the root of this
one hard disk.  So much was gone that the only way we could reboot was
to take a copy of /boot on a working machine, uuencode it there, type
the uuencoded ASCII text into a file on the broken machine using echo
(or something), and uudecode it.  (uu??code were in /usr/lib/uucp or
something).  We had enough stuff to come back (like a kernel in a
system build directory.)

This all worked, and we managed to reboot ourselves.  I think we could
have laced another hard disk into the system or reloaded from scratch,
but as software hackers we would have lost major style points for
that.  And of course, this was just a gateway machine (-;), no one
really owned it and it was set up quite differently from a standard
system configuration, so we didn't want to trash the remains with a
reload from scratch.

I don't think I have to enumerate the lessons I learned from this
experience.

Sometimes I wonder how many uucp administrators have trashed their
/usr/lib/uucp/L.sys files without backup.  (Backup?  We only backup
user files, we can get the rest from the release tapes!)  You would
have to call all your uucp neighbors (possibly tens or hundreds) and
ask them to reset their passwords.  You'd have to parade your guilt
before all your fellow uucp administrators.  Oof.

	Andrew Tannenbaum   Interactive   Boston, MA   +1 617 247 1155