[ltp] Partition table seems corrupted -- I may have irrerversible damage... please read

jcms linux-thinkpad@linux-thinkpad.org
Sun, 26 Dec 2004 11:31:43 -0500 (GMT-05:00)


  I looked at the specs for the travelstart IC25T048ATDA05-0:

  cylinders: 0x3fff = 16383
  heads: 0x10 = 16
   sectors/track: 6

  Based on that I changed the disk using cfdisk which nows shows: 

Heads: 16   Sectors per Track: 63   Cylinders: 93015

   I re-created the partition I'm interested on /dev/hdb2 without reformating it using yast2.
 
   Now fdisk shows the correct values ( I guess ) for that partition:

# fdisk -l /dev/hdb

Disk /dev/hdb: 48.0 GB, 48004669440 bytes
16 heads, 63 sectors/track, 93015 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
                                                                                                                   
   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               1        1935      975208+  82  Linux swap / Solaris
/dev/hdb2            1945       28991    13631152+  83  Linux
Partition 2 does not end on cylinder boundary.

But I still cannot mount it. 

   Have a lost the data on /dev/hdb2 ?

   Please, help. 

   J.C.


-----Original Message-----
From: Tino Keitel <tino.keitel@gmx.de>
Sent: Dec 24, 2004 3:43 PM
To: linux-thinkpad@linux-thinkpad.org
Subject: Re: [ltp] Partition table seems corrupted

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
-- 
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad