[vox] Stupid User Tricks

Peter Jay Salzman vox@lists.lugod.org
Tue, 13 May 2003 15:32:04 -0700


   before doing anything, unmount the drives and shut the computer off.



richard,

i'm supremely stressed to tears today, so i've been dumping most of my
vox traffic without reading it.  something made me read this (you
should've used a more descriptive subject.  i'm not sure what made me
read this email).

i did the same thing about 3 years ago, and was able to recover all my
data.  i can't remember what i did, but i think gpm segfaulted and left
a core in /, so i typed "rm -rf / core" instead of "rm -rf /core".  i'm
responding in sympathy, because i know that kind of pain.  today is not
a good day for me.  clearly, it's not a good day for you either.


   before doing anything, unmount the drives and shut the computer off.


if you're using ext2 or ext3, you're in luck.  if you're using reiser,
supposedly, you can get your data back two ways, but neither worked for
me.

if you're using ext2 of ext3, read the undelete howto.  it's become much
more detailed since i deleted / on my system, so at least that's lucky.

i'd offer to help, but i'm completely snowed under.

however, i may have some scripts from then that i wrote to help:

1. undelete all the files that were deleted
2. sort through the *millions* of files that no longer have their
   filenames.

a knowledge of vim would be really useful.

i used the hack and slash method.  i deleted anything that was binary,
and wrote a perl script to sift through the nonbinary stuff to delete
text files i don't care about, like tex font metric crap.

then the perl program took what was left, ran less and let me use single
keystrokes to either delete the file or save it to a special "save"
directory.

the key here is to unmount your hard drives right now and don't write to
them until after you've run debugfs.

if i had more time, i'd offer to go over there and do it for you.  maybe
someone on the list would be kind enough.

pete




On Tue 13 May 03,  3:02 PM, Richard Crawford <rscrawford@mossroot.com> opined:
> It's the one thing that's always listed in just about every "Beginner's
> Guide to Unix" book in the section on the Root account:  "BE VERY CAREFUL
> WHEN IN ROOT!  Imagine what would happen if you were the root user and
> just happened to type 'rm -rf *' from the / directory."
> 
> Well, hell.  Guess what I did today?
> 
> In my own defense, I didn't actually know I was in /.  I apparently
> followed a strange symbolic link that the previous employee at this desk
> had set up, and thinking I was in the /usr/files/blah directory, I started
> deleting.  As soon as I saw what I was doing, I clicked ^C immediately,
> but the damage was done.  I can no longer telnet into the computer or do
> anything to it.  And I happened to be logged in as root because I'd been
> messing with Apache config files just prior to this and hadn't gotten
> around to switching back.
> 
> Oy.  I wonder if I'll have this job tomorrow?
> 
> 
> -- 
> Slainte,
> Richard S. Crawford
> AIM: Buffalo2K / Y!: rscrawford / ICQ: 11640404
> http://www.mossroot.com http://www.stonegoose.com
> "It is only with our heart that we can see clearly.  What is essential is
> invisible to the eye."  --Antoine de Saint Exupery
> 
> 
> 
> _______________________________________________
> vox mailing list
> vox@lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox

-- 
GPG Instructions: http://www.dirac.org/linux/gpg
GPG Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D