Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to recover the ext4 partition table of a 2TB disk, where I have 900.000 files. I have cloned the original HD and now I am working on the cloned HD. And I am running Parted Magic Live CD.

With testdisk I got what it looks like the original deleted partition:

Disk /dev/sdd - 2000 GB / 1863 GiB - CHS 243201 255 63
Partition Start End Size in sectors
>P Linux 0 1 1 243200 254 61 3907024000 [Duo]

Anybody can help me to read this numbers? As far as I know, I can use this data with the mount command and, if everything goes right, have access to the files in order to start a file transfer, can't I?

According to this man page, I can use data extracted from testdisk to help me fix the partition: http://www.cgsecurity.org/wiki/Advanced_Find_ext2_ext3_Backup_SuperBlock

It says:

"Now using the value given by TestDisk, you can use fsck to repair your ext2/ext3 filesystem. I.E. if TestDisk has found a superblock at block number 24577 and a blocksize of 1024 bytes, run:"

# fsck.ext3 -b 24577 -B 1024 /dev/hda1

But I don't know how exactly.

By the way, here it goes some more useful data from gpart:

# gpart -gv /dev/sdd

dev(/dev/sdd) mss(512)
Primary partition(1)
   type: 131(0x83)(Linux ext2 filesystem)
   size: 1907726mb #s(3907024000) s(63-3907024062)
   chs:  (0/1/1)-(1023/254/63)d (0/0/0)-(0/0/0)r
   hex:  00 01 01 00 83 FE FF FF 3F 00 00 00 80 74 E0 E8

Primary partition(2)
   type: 000(0x00)(unused)
   size: 0mb #s(0) s(0-0)
   chs:  (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r
   hex:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Primary partition(3)
   type: 000(0x00)(unused)
   size: 0mb #s(0) s(0-0)
   chs:  (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r
   hex:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Primary partition(4)
   type: 000(0x00)(unused)
   size: 0mb #s(0) s(0-0)
   chs:  (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r
   hex:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Begin scan...
Possible partition(Linux ext2), size(1734848mb), offset(2mb)
   type: 131(0x83)(Linux ext2 filesystem)
   size: 1734848mb #s(3552968704) s(4096-3552972799)
   chs:  (1023/255/0)-(1023/255/0)d (0/0/0)-(0/0/0)r
   hex:  00 FF C0 FF 83 FF C0 FF 00 10 00 00 00 00 C6 D3

According to this post (http://www.linux.com/archive/feed/57748) I can use this information to help me:

"This time I got something useful. The s(63-117258434) part shows the starting sector, which is 63. A sector is 512 bytes, so the exact starting offset of the partition is 32256. So to mount this partition, just issue:"

mount -o loop,ro,offset=32256 /storage/image/diskofperson.dd /mnt/recovery

"And voilá, access to the filesystem has been obtained."

/storage/image/jdiskofperson.dd on /mnt/recovery type vfat (ro,loop=/dev/loop0,offset=32256)

Well, any help would be great.

Thanks.

share|improve this question
    
Why not just let gpart re-partition the disk? I thought that was one of its options. –  Slartibartfast Jul 8 '11 at 1:55
    
Well, in fact, I am searching for another way of doing this. I am looking for the way of the hacker... :-) –  Roger Jul 8 '11 at 2:02
    
The Way of the Master involves editing your disc with a hex editor and poking individual bytes in partition table entries. –  JdeBP Jul 8 '11 at 7:45
    
Well, maybe I am a so much newer jedi and all I wish now is to learn how to use mount or fdisk to rehabilitate my disk... –  Roger Jul 8 '11 at 8:36
    
Please do not cross-post on multiple sites. –  nhinkle Jul 8 '11 at 17:57
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.