LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   how do I recover files from a disk crash (https://www.linuxquestions.org/questions/linux-hardware-18/how-do-i-recover-files-from-a-disk-crash-481302/)

gmorr 09-07-2006 11:05 AM

how do I recover files from a disk crash
 
Greetings. It started out as an error at bootup saying that I had a bad superblock (2.6.17 kernel). However a 2.4.? kernel booted normally!! So I decided to run mke2fs with the -j (ext3) and -S (write superblock but don't touch the inodes, etc) options. It was very late and I was in a hurry and I left off the -S (ouch)!! I saw the mistake immediatly but you know linux - it's faster than superman at his best. I have no root directory!!! However, most of the disk is unchanged and I would like to try to find my config files in /etc, my bind files in /var, my config files in /usr/src/linux and my /root directory. Is there a program that will scan a disk for directory structures and recover them? I have a slackware distribution.

ramram29 09-07-2006 11:20 AM

You may want to repair the bad superblocks with a good one using the fsck command. You'll need to find the inodes of the copies of the superblock first with the dumpe2fs command.

My second choice would be to try TestDisk (http://www.cgsecurity.org/wiki/TestDisk).

gmorr 09-07-2006 11:33 AM

Fortunatly, I had already used dumpe2fs to get the blocksize, etc. (and wrote the info down) and have replaces the superblocks. I still need to recover the directories. Will testdisk do this?

Gary


All times are GMT -5. The time now is 03:26 AM.