[ltp] Partition table seems corrupted

jcms linux-thinkpad@linux-thinkpad.org
Fri, 24 Dec 2004 11:17:18 -0500 (GMT-05:00)


   I have two hds lets' called the old and new. I have installed SuSE Professional 9.2 on the new hard drive, now in the internal bay (hda) on my Thinkpad A30P and it works fine. I was able to swap hard drives back and forth and mount the partitions of the old hard drive (on the external bay - hdb) to mount points in the new disk with no problems. I've been doing this for a while until I migrate everything from the old disk to the new disk, i.e., mostly using the old hard drive in the internal bay and some times using the new hard drive in the internal bay with the old one in the external bay.

   Something happened when I was using the old hard drive and then I was not able to boot from it anymore. I then swapped the disks and tried to mount the partitions in old disk as usual so I can copy the contents in the filesystem on /dev/hdb2 but I keep getting the "mount: wrong fs type, bad option, bad superblock on /dev/hdbX, or too many mounted file systems". 

---------------------------------------------------------------------------------------------------
Here is the relevant entries in my /etc/fstab

/dev/hdb2            /media/old.hd        reiserfs   noauto,user,sync      0 0
/dev/hdb5            /media/old.hd.home   ext3       noauto,user,sync      0 0
/dev/hdb7            /media/old.hd.tmp    ext3       noauto,user,sync      0 0

---------------------------------------------------------------------------------------------------

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).
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.

   Any help on this matter is greatly appreciated. 

   J.C.