[ltp] Partition table seems corrupted

Tino Keitel linux-thinkpad@linux-thinkpad.org
Fri, 24 Dec 2004 21:43:37 +0100


On Fri, Dec 24, 2004 at 11:17:18 -0500, jcms wrote:

[...]

> Here is the output of "sfdisk -l /dev/hdb":
> 
> Disk /dev/hdb: 93015 cylinders, 16 heads, 63 sectors/track
> Warning: The partition table looks like it was made
>   for C/H/S=*/240/63 (instead of 93015/16/63).

IMHO this is the reason for your problem. Something set a strage
geometry with only 16 heads instead of 240, which results in a very
high cylinder number (93015) which can not be handled by the BIOS and
maybe some disk partitioning tools.

As you can see, sfdisk is clever enough to use the correct geometry,
but I think the BIOS isnt.

> For this listing I'll assume that geometry.
> Units = cylinders of 7741440 bytes, blocks of 1024 bytes, counting from 0
>                                                                                                                                               
>    Device Boot Start     End   #cyls    #blocks   Id  System
> /dev/hdb1          0+    128     129-    975208+  82  Linux swap / Solaris
> /dev/hdb2   *    129    1932    1804   13638240   83  Linux
> /dev/hdb3       1933    3100    1168    8830080    f  W95 Ext'd (LBA)
> /dev/hdb4       3101    3655     555    4195800   83  Linux
> /dev/hdb5       1933+   2210     278-   2101648+  83  Linux
> /dev/hdb6       2211+   2280      70-    529168+  83  Linux
> /dev/hdb7       2281+   3100     820-   6199168+  83  Linux
> 
> The partitions seem to be still there but I still cannot mount
> /dev/hdb2, /dev/hdb5 & /dev/hdb7.
> 
> ---------------------------------------------------------------------------------------------------
> 
>    This is what I copied from running yast2:
> 
>                            Start Cylinder   End Cylinder
> /dev/hdb                                0          93014 
> /dev/hdb1   0x82 Swap                   0           1934 
> /dev/hdb2   0x83 Linux Native        1935          28994
> /dev/hdb3        Extended           28995          46514
> /dev/hdb5   0x83                    28995          33164
> /dev/hdb6   0x83                    33165          34214
> /dev/hdb7   0x83                    34214          46514
> /dev/hdb4   0x83                    46515          54839 
> 
> ---------------------------------------------------------------------------------------------------
> 
>    I have tried testdisk from ttp://www.cgsecurity.org/index.html and it shows that the partitions have been deleted. 
>    I did not try to fix it using it ( I'm still a little confused about what partition type to set for each one of them ).
> 
> ---------------------------------------------------------------------------------------------------
> 
>    How can I re-write the partition and not loose the data on the old drive ? May be fdisk and if yes how ? Please, be explicity as much as possible, I don't have a backup of the files not transfered to the new disk.

This sould work with fdisk.

Regards,
Tino