What's new

Lost my Partiton Table...HELP!

pj64er

PJ64 Lubba
After testing a CD drive, my table was wiped...totally. No idea how. No fdisk utility can pick up any traces of it (tried MS-DOS fdisk, DR-DOS fdisk, and linux cfdisk, as well as simple df'ing). Fortunately, with the FindPart program, I was able to pick out what it might have looked like. Before I go on, heres the output:

Code:
Findpart, version 4.38.
Copyright Svend Olaf Mikkelsen, 2004.
 
Searches for partitions type 01, 04, 06, 07, 0B, 0C, 0E, 82, 83,
plus Fdisk F6 and Lilo sectors. Information based on bootsectors
is marked B. If the disk is larger than supported by BIOS, the
supported part of the disk is examined. Disks are numbered from 1.
 
OS:  DOS 6.00    Reiser     All
 
Disk: 1   Cylinders: 14946   Heads: 255   Sectors: 63   MB: 117240
 
--PCyl N ID -----Rel -----Num ---MB --Start CHS- ---End CHS-- BS  CHS
     0 - 07       63 10249407  5004     0   1  1   637 254 63 B    OK
     0 - 83 10249470 10249470  5004   638   0  1  1275 254 63 B5 R OK
  1276 1 07       63 61432497 29996  1276#  1  1  5099*254 63 OK   OK
  1276 2 05 61432560  9767520  4769  5100#  0  1  5707*254 63 1276 OK
  1276 - 07       63 61432497 29996  1276   1  1  5099 254 63 B    OK
     Fdisk F6 sector                 1309   0  1
  5100 1 83       63  9767457  4769  5100#  1  1  5707*254 63 OK R OK
  5100 2 05 71200080 10715355  5232  5708#  0  1  6374*254 63 1276 OK
  5100 - 83       63  9767457  4769  5100   1  1  5707 254 63 B0 R OK
  5404 1 83       63 15599052  7616  5404#  1  1  6374*254 63 OK R OK
  5404 2 05 81915435  9157050  4471  6375#  0  1  6944*254 63 1276 OK
  5404 - 83       63 15599052  7616  5404   1  1  6374 254 63 B0 R OK
  5708 1 83       63 10715292  5232  5708#  1  1  6374*254 63 OK R OK
  5708 2 05 81915435  9157050  4471  6375#  0  1  6944*254 63 1276 OK
  5708 - 83       63 10715292  5232  5708   1  1  6374 254 63 B0 R OK
  5522 - 07       63  8273412  4039  5522   1  1  6036 254 63 BU   OK
  6037 1 3C       63 73657962 35965  6037*  1  1 10621*254 63      OK
  6037 2 05150143490  2120580  1035 10622*  0  1 10753*254 63 1276 OK
  6037 - 07       63 68211927 33306  6037   1  1 10282 254 63 B    OK
  1276 - 07       63 81915372 39997  1276   1  1  6374 254 63 BU   OK
  6375 1 0B       63  9156987  4471  6375#  1  1  6944*254 63 OK   OK
  6375 2 05 91072485 20611395 10064  6945#  0  1  8227*254 63 1276 OK
  6375 - 0B       63  9156987  4471  6375   1  1  6944 254 63 B    OK
     0 - 0B102414438  9156987  4471  6375   1  1  6944 254 63 BU   OK
  6945 1 0B       63 20611332 10064  6945#  1  1  8227*254 63 R0   OK
  6945 2 05111683880 68211990 33306  8228#  0  1 12473*254 63 1276 OK
     0 - 0B111571488 20611332 10064  6945   1  1  8227 254 63 B    OK
  7964 1 3C       63 61175457 29870  7964*  1  1 11771*254 63      OK
  7964 2 05168618240  2088450  1019 11772*  0  1 11901*254 63 1276 OK
  7964 - 07       63 59070942 28843  7964   1  1 11640 254 63 B    OK
  8095 1 3C       63 61207587 29886  8095*  1  1 11904*254 63      OK
  8095 2 05170754885  2088450  1019 11905*  0  1 12034*254 63 1276 OK
  8095 - 07       63 59070942 28843  8095   1  1 11771 254 63 B    OK
  8228 1 07       63 68211927 33306  8228#  1  1 12473*254 63 OK   OK
  8228 2 05179895870  2088450  1019 12474#  0  1 12603*254 63 1276 OK
  8228 - 07       63 68211927 33306  8228   1  1 12473 254 63 B    OK
 12035 1 3C       63 10538577  5145 12035*  1  1 12690*254 63      OK
 12474 1 06       63  2088387  1019 12474#  1  1 12603*254 63 OK   OK
 12474 2 05181984320  1397655   682 12604#  0  1 12690*254 63 1276 OK
 12474 - 06       63  2088387  1019 12474   1  1 12603 254 63 B    OK
 12604 1 82       63  1397592   682 12604#  1  1 12690*254 63      OK
 
------FAT CHS -Size Cl --Root -Good -Rep. Maybe --Bad YY-MM-DD DataMB
     0   1 32   Second FAT not found.
     0   1 52   Second FAT not found.
   115   0  2   Second FAT not found.
  3661   0  2   Second FAT not found.
  5518   0 43   Second FAT not found.
  6375   1 33  8928  4     20  8928     0     0     0 04-02-25   3353
  6945   1 33 10056  8      2 10056     0     0     0 04-02-26   3019
 12474   1  2   147 32    528   147     0     0     0 04-02-24    776
 
Partitions according to partition tables on first harddisk:
 
    No signature CHS: 0 0 1

So far, short of a small test to make sure I still have data in there (I do, I can still run Slackware off my second partition, the Windows XP on the first partion was hosed tho), I havent really touched the harddrive, so most of my stuff should be intact. Im hoping to reconstruct my partition table using this stuff and sfdisk. Can anybody help me with sorting this stuff out? I admit, this is nearly as complicated as it gets...I had 10 or so partitons on it (2 primary in the beginning of the drive, the rest is logical and on the same extended partiton), as well as some unpartitioned space after it.

This is how you guys can help:
-If you are unfamiliar with the sfdisk command but know your partition stuff, can you tell me the beginning, size, and type of all my partitons? If the given data is insufficient, I can draw a diagram of what I remember my harddrive to be like (Its vague and has not exact numbers).

-If you know your sfdisk and dont wanna sort this out, can you tell me how Im supposed to work with extended partitons and logical partitions in sfdisk?

-If you dont know anything related to this, and have a running linux machine, can you run 'sfdisk -d /dev/<your harddisk>' and tell me the output of it, and your harddrive configuration?

-If you are familiar with this, for the love of all that is holy, SAVE ME!


Also, if you have any nuggets of info you think will help, please post!
 
Last edited:

Slougi

New member
OK, first off: don't panic. Do nothing to that drive. I had a similar problem a while ago - I managed to add a fifth primary partition. I managed to back up everything from that drive though. Just give me a sec to find the tool I used.
 
OP
pj64er

pj64er

PJ64 Lubba
Partitions are basically set up like this (starting from beginning):

- NTFS
- ReiserFS
Start Extended Partition
- NTFS
- ReiserFS
- ReiserFS
- an NTFS and 2 Fat32 partitions, I forgot the order of these
- Fat 16
- Linux Swap
End Extended Partition
- Unpartitioned Space

The last two serve as my swap partitions, they were placed in the end because I was ready to replace them with partitions in another harddrive.



Ill give the Parted a shot...I already tried gpart. It was able to guess some partitions before (forgot to jot down the stats :mad: ), but when I try to run it now, it gives a segmentation fault. Any idea on that?
 
OP
pj64er

pj64er

PJ64 Lubba
Assuming that only my Partition table's been b0rked, all I have to restore is the pointers to the two Primary partitions, and the pointer to the Extended partition, right? The extended partition is supposed to take care of the logical partitions inside it in another place in the drive, right?
 
OP
pj64er

pj64er

PJ64 Lubba
Great. But if I use the *fdisks, do they overwrite the links in the logical partitions if I do not specify any logical partitons? In other word, if I decide to insert only the two primary and the extended partition entries to my new table, would it flush out the logical partition links?

At the moment, I cant imagine how this could happen, but Id hate to get into deeper shit.

edit: its just hard to imagine that it would all link up when I just pop in the extended partition entry.
 
Last edited:

Slougi

New member
It might overwrite it, I am not quite sure. IIRC it is basically like a linked list - one partition table in the extended partition points to the next. So it propably won't work - the first entry would not correctly point to the next, etc.
 
OP
pj64er

pj64er

PJ64 Lubba
I gotta say, THANK YOU, SLOUGI. I was able to recover every partition (afaik for now...) except for the first one. That only contained Windows XP anyway, so a full recovery is a windows reinstall away :).

All I basically did is put the entries of my primary partitions and the extended partition in the partition table. I figured out the size and start of the two primaries by comparing the output from gpart and findpart. and I guessed where the extended would be (I just stuck in the next sector for its beginning, and gave it an arbitary large number as the size. sfdisk correct the size in an error message). After I inserted that into the table, a quick cfdisk showed that ALL the logical partitions linked up properly. So it IS just a linked list after all. Since the damage to my hard drive is restricted to the beginning of the drive, all I had to fix is the 'head' of the list. So if anyone ever has to recover their partition table, they would only have to write 4 entries at most.

Once again, thank you Slougi, and thank god I had a bootable linux around :)
 

Top