Hi all,
To get started I'll give you the scenario. My friend completly buggered his drive. He was using partition magic I believe just to resize a couple partitions and somehow he managled his partition table. I told him I could try using my box to check out the problem. I'm running Fedora Core 2, with kernel 2.6.10-1.771_FC2.
I used fdisk to take a look at the problem and this is what I saw:
Code:
[root@localhost gpart]# fdisk -l /dev/hdb
Disk /dev/hdb: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 ? 13578 119522 850995205 72 Unknown
Partition 1 does not end on cylinder boundary.
/dev/hdb2 ? 45382 79243 271987362 74 Unknown
Partition 2 does not end on cylinder boundary.
/dev/hdb3 ? 10499 10499 0 65 Novell Netware 386
Partition 3 does not end on cylinder boundary.
/dev/hdb4 167628 167631 25817+ 0 Empty
Partition 4 does not end on cylinder boundary.
Partition table entries are not in disk order
Now right off the bat you can see the cylinders are overlapping. Also there is a missing partition, there should be five. But the reported physical geometry 24792 cylinders, 255 heads, 63 sectors/track is correct and it's reporting the proper size so the BIOS is reading it correctly I presume.
I then did a scan with gpart to see if it could guess as to what the partition table should look like. This is what I got:
Code:
[root@localhost gpart]# ./gpart /dev/hdb
Begin scan...
Possible extended partition at offset(7mb)
Possible partition(Windows NT/W2K FS), size(153958mb), offset(7mb)
Possible partition(Linux swap), size(502mb), offset(153966mb)
Possible partition(Windows NT/W2K FS), size(40005mb), offset(154468mb)
End scan.
Checking partitions...
Partition(OS/2 HPFS, NTFS, QNX or Advanced UNIX): logical
Partition(Linux swap or Solaris/x86): logical
Partition(OS/2 HPFS, NTFS, QNX or Advanced UNIX): logical
Ok.
Guessed primary partition table:
Primary partition(1)
type: 015(0x0F)(Extended DOS, LBA)
size: 194466mb #s(398267415) s(16065-398283479)
chs: (1/0/1)-(1023/254/63)d (1/0/1)-(24791/254/63)r
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
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
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
I've never really used gpart other than to look at the partition table, and I'm a little wary of writing the table without being sure of what I'm doing.
Now I must say that wiping the drive isn't really an option. My friend has years of tax information on the drive which he hasn't backed up
, so if possible I'd like to be able to restore this drive to its old self, or atleast so I can mount the partitions on my box and get the data off.
Thanks for reading this and if there's any info I've left out let me know and I'll get it up on here.