Power Supply Nuked 0th Sector
From: Dave Jarvis (spam_at_spam.com)
Date: 06/22/04
- Previous message: William Park: "Re: Scripting-language for interacting with World Wide Web?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 22 Jun 2004 07:53:01 GMT
Hello!
My power supply failed Friday night, while I was sound asleep. I woke
up to find that sector 0 had become unreadable. After buying a new
drive (hda) and power supply, I managed to make a copy of everything on
the original drive (hdc), except sector 0:
1) Create a 4096 byte file filled with 0s (called hdc.img)
2) dd if=/dev/hdc bs=4096 skip=1 >> hdc.img
3) testdisk hdc.img
TestDisk, to my relief, was able to write the new MBR to my hdc.img
file, and detect the partitions:
Partition Start End Size
* Linux 0 1 1 1912 254 63 30732282
P Linux Swap 1913 0 1 1977 254 63 1044225
P Linux 1978 0 1 4997 254 63 48516300 [/home]
I'm trying to run e2fsck to repair the damage done to [/home]. I've
already snagged all the e-mail addresses (which was the most important
part), but there are some original digital photos from my trips around
Europe and Japan that I would like to try and retrieve. Everything else
was backed up (or can readily be recreated).
So ... do you know how I can mount the partition within the file to a
local loopback device so that I can run e2fsck and then try to get files
extracted?
I've tried:
$ e2fsck -b 1978 hdc.img
e2fsck: Bad magic number in super-block while trying to open hdc.img
$ mount -t ext2 -o loop,sb=1978 hdc.img hdc
mount: wrong fs type, bad option, bad superblock on /dev/loop0, etc.
$ mount -t ext3 -o loop,sb=1978 hdc.img hdc
mount: wrong fs type, bad option, bad superblock on /dev/loop0, etc.
But it cannot find the superblock in either case. If I recall
correctly, it was a journalized ext3 file system.
Any tips you can give me would be really appreciated!
Many thanks in advance,
Dave Jarvis
e-mail: \dave/ \ @ / \joot.com/
---------------------[ testdisk.log ]-------------------
Tue Jun 22 00:42:39 2004
TestDisk command line : /debug /log hdc.img
TestDisk 5.3, Data Recovery Utility, May 2004
Christophe GRENIER <grenier@cgsecurity.org>
http://web.cgsecurity.org
Linux version
Using locale 'en_US'.
file_read(4,1,buffer,80324999(4999/254/63)) read err Truncated file
(ret!=nbr_sector*SECTOR_SIZE)
file_read(6,1,buffer,160087724(9964/254/63)) seek err Invalid argument
file_read(7,1,buffer,80294255(79656/15/63)) seek err Invalid argument
Hard disk list
Disk hdc.img - CHS 4999 255 63 - 39213 MB
Disk /dev/hda - CHS 9964 255 63 - 78159 MB
Disk /dev/hdc - CHS 79656 16 63 - 39205 MB
Analyse Disk hdc.img - CHS 4999 255 63 - 39213 MB
Geometry from MBR: head=255 sector=63
ReiserFS Marker at 0/1/1
get_geometry_from_list_part_aux head=255 nbr=3
Current partitions:
1 * Linux 0 1 1 1912 254 63 30732282
2 P Linux Swap 1913 0 1 1977 254 63 1044225
3 P Linux 1978 0 1 4997 254 63 48516300 [/home]
search_part()
Disk hdc.img - CHS 4999 255 63 - 39213 MB
ReiserFS Marker at 0/1/1
recover_rfs
block_count=3841535
block_size=4096
D Linux 0 1 1 1912 254 61 30732280
ReiserFS 2
D Linux Swap 1913 0 1 1977 254 46 1044208
recover_EXT2: s_block_group_nr=0/185, s_mnt_count=7/-1,
s_blocks_per_group=32768
recover_EXT2: boot_sector=0, s_blocksize=4096
recover_EXT2: s_blocks_count 6064537
recover_EXT2: part_size 48516296
D Linux 1978 0 1 4997 254 59 48516296 [/home]
EXT3 Sparse superblock Recover
get_geometry_from_list_part_aux head=255 nbr=3
Results
* Linux 0 1 1 1912 254 63 30732282
ReiserFS 2
P Linux Swap 1913 0 1 1977 254 63 1044225
P Linux 1978 0 1 4997 254 63 48516300 [/home]
EXT3 Sparse superblock Recover
P Linux 1978 0 1 4997 254 63 48516300 [/home]
EXT3 Sparse superblock Recover
dir_partition inode=2
P Linux 1978 0 1 4997 254 63 48516300 [/home]
EXT3 Sparse superblock Recover
Directory /
2 drwxr-xr-x 0 0 4096 2-Mar-2004 20:19 .
2 drwxr-xr-x 0 0 4096 2-Mar-2004 20:19 ..
11 drwx------ 0 0 4096 23-Feb-2004 11:18 lost+found
32641 drwxr-xr-x 500 500 4096 19-Jun-2004 00:46 dave
1779018 -rw-r--r-- 500 500 22057 30-Aug-2002 10:11 database
2937706 ?--------- 0 0 0 projects
2431681 drwxr-xr-x 500 500 0 20-Mar-2004 17:36 web
2431716 -rw-r--r-- 500 500 0 21-Feb-2004 11:41 alias
dir_partition inode=32641
P Linux 1978 0 1 4997 254 63 48516300 [/home]
EXT3 Sparse superblock Recover
Directory /dave
... etc.
- Previous message: William Park: "Re: Scripting-language for interacting with World Wide Web?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|