Emergency

Madison Kelly linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Tue Jan 25 00:48:01 UTC 2005


Jason Shein wrote:
> I just got in the door, late on this thread.
> 
> here's my 2 cents.
> 
> I came across this howto a while ago, and it has helped me out of a pinch.
> 
> First, if you have a spare hard drive, make a copy of the data on the
> bad disk (or better yet two) in case the hardware will die, and work on
> the copy.
> 
> Then do:
> 
> # /sbin/mke2fs -n /dev/hda5 -b [blocksize]
> Be sure to use the right block size here!

I just finished making a 'dd' copy and putting it on a second drive, so 
the original is as safe as it can be.

Would the new 'mkfs.ext3' not use the exact same backup superblocks, by 
the way?

> You will see output including:
> 
> Superblock backups stored on blocks:
>         8193, 24577, 40961, 57345, 73729
> These are the locations of the superblocks.
> 
> Pass these one by one to:
> 
> e2fsck -b [backup superblock location] -y /dev/hda5
> 
> [read up on "man e2fsck"]

Doing that now...

> If one of these superblocks are OK, e2fsck will start recovering all
> possible data (the -y switch means "yes to all"; otherwise you get
> thousands of prompts).
> 
> All the possible files will be dumped into the /lost+found directory.
> - From there, you should be able to do something like:
> 
> find /lost+found/* -name [some directory you are sure of the location of]
> 
> i.e.
> find /long+found/* -name jason
> allowed me to find my home directory.
> 
> the /lost+found directory basicly contains many hard links to the same
> files.
> 
> You should be able to find your /home, /var, /etc, or whatever other
> directories you have on the drive and move them back to their respective
> spot.
> 
> Be careful - many files may be corrupt without warning.
> 
> 
> Using this technique, I was able to recover an ext3 partition after
> deleting it, resizing the partition, reformatting as reiserfs, and using
> it for two days.  About 70% of the files got recovered, but it obviously
> depends on the damage done.
> 
> good luck.

Will it use the '/lost+found' on the same partition? I take it I don't 
need to worry about running out of space because the links are hard links?

Thank you very much!! I'll report my luck or lack there of...

Madison


-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Madison Kelly (Digimer)
TLE-BU, The Linux Experience; Back Up
http://tle-bu.thelinuxexperience.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list