Skip to contentSkip to conversation

Emergency: Is there a way to fix a partition table

DISCUSSION Dark Shadow 4 participants 6 messages Sep 27, 2004 – Sep 28, 2004

lore
Share & tools
lore
#0 lore raw

I don't have a backup of the partition table and was wondering if there was a way to auto scan and have it come up with one. It had 2 partitions both reiserfs v3 and fully functioning Linux installs

I have made a dd image of the entire drive to work with

This is very important that I get it fixed since even though I have a day old backup I got a couple files I really don't want to lose (9gb of tv capturecard captures)and I need the system fully functioning in a day

current output of table from fdisk

Command (m for help): p

Disk /dev/hda: 40.0 GB, 40020664320 bytes
240 heads, 63 sectors/track, 5169 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   ?       21975      164058  1074152739    0  Empty

Partition 1 does not end on cylinder boundary.
/dev/hda2 ? 168574 9274 943175203 be Solaris boot
Partition 2 does not end on cylinder boundary.
/dev/hda3 ? 201952 44474 956950144 0 Empty
Partition 3 does not end on cylinder boundary.
/dev/hda4 ? 1 1 0 4f QNX4.x 3rd part
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order

#1 lore raw
Quoted 11 lines · Dark Shadow

I don't have a backup of the partition table and was wondering if there was a way to auto scan and have it come up with one. It had 2 partitions both reiserfs v3 and fully functioning Linux installs

I have made a dd image of the entire drive to work with

This is very important that I get it fixed since even though I have a day old backup I got a couple files I really don't want to lose (9gb of tv capturecard captures)and I need the system fully functioning in a day

http://packages.debian.org/unstable/admin/gpart

This program has worked for me in the past.

--
Sonny Rao

#2 lore raw
Quoted 13 lines · Sonny Rao
Quoted 11 lines · Dark Shadow

I don't have a backup of the partition table and was wondering if there was a way to auto scan and have it come up with one. It had 2 partitions both reiserfs v3 and fully functioning Linux installs

I have made a dd image of the entire drive to work with

This is very important that I get it fixed since even though I have a day old backup I got a couple files I really don't want to lose (9gb of tv capturecard captures)and I need the system fully functioning in a day

Quoted 7 lines

http://packages.debian.org/unstable/admin/gpart

This program has worked for me in the past.

--
Sonny Rao

Well using gpart to scan comes up with it guess as all unused I tried having it scan the backup that lilo makes but it was a really old version as in the file was dated 2002-04-18 which since I started setting up that lfs install 2002-04-17 would of been created on first install of lilo and has not been updated over time

#3 lore raw
Quoted 22 lines · Dark Shadow
Quoted 13 lines · Sonny Rao
Quoted 11 lines · Dark Shadow

I don't have a backup of the partition table and was wondering if there was a way to auto scan and have it come up with one. It had 2 partitions both reiserfs v3 and fully functioning Linux installs

I have made a dd image of the entire drive to work with

This is very important that I get it fixed since even though I have a day old backup I got a couple files I really don't want to lose (9gb of tv capturecard captures)and I need the system fully functioning in a day

Quoted 7 lines

http://packages.debian.org/unstable/admin/gpart

This program has worked for me in the past.

--
Sonny Rao

Quoted 5 lines

Well using gpart to scan comes up with it guess as all unused I tried having it scan the backup that lilo makes but it was a really old version as in the file was dated 2002-04-18 which since I started setting up that lfs install 2002-04-17 would of been created on first install of lilo and has not been updated over time

That's interesting, it seemed to work almost too well for me last time I tried it, in that it found other filesystems (i.e. in a file, loopback, vmware, etc) that weren't occuping a "real" dos partition. So, that seems to indicate gpart doesn't know the proper signature for your filesystems.

Another, rather brute force attempt would be to guess the sizes and just try to mount up the filesystems read-only. Basically, if you get the start point of the partition right, it should mount up at least. Then you can go back and find the end :)

Sonny

#4 lore raw
In reply to Dark Shadow
Quoted 10 lines · Dark Shadow

I don't have a backup of the partition table and was wondering if there was a way to auto scan and have it come up with one. It had 2 partitions both reiserfs v3 and fully functioning Linux installs

I have made a dd image of the entire drive to work with

This is very important that I get it fixed since even though I have a day old backup I got a couple files I really don't want to lose (9gb of tv capturecard captures)and I need the system fully functioning in a day

Have you rebooted the system since you lost/overwrote the tables? A common cause of this problem is to zero out the partition table by accident. If you don't reboot, they are still in kernel ram and can be retrieved.

-chris

#5 lore raw
In reply to Dark Shadow
Quoted 30 lines · Dark Shadow

I don't have a backup of the partition table and was wondering if there was a way to auto scan and have it come up with one. It had 2 partitions both reiserfs v3 and fully functioning Linux installs

I have made a dd image of the entire drive to work with

This is very important that I get it fixed since even though I have a day old backup I got a couple files I really don't want to lose (9gb of tv capturecard captures)and I need the system fully functioning in a day

current output of table from fdisk

Command (m for help): p

Disk /dev/hda: 40.0 GB, 40020664320 bytes
240 heads, 63 sectors/track, 5169 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   ?       21975      164058  1074152739    0  Empty

Partition 1 does not end on cylinder boundary.
/dev/hda2 ? 168574 9274 943175203 be Solaris boot
Partition 2 does not end on cylinder boundary.
/dev/hda3 ? 201952 44474 956950144 0 Empty
Partition 3 does not end on cylinder boundary.
/dev/hda4 ? 1 1 0 4f QNX4.x 3rd part
Partition 4 does not end on cylinder boundary.

Quoted 2 lines

Partition table entries are not in disk order

About a year ago I trashed my partition table.
I used a program called testdisk that searched the disk and reconstructed a new one for me. Check out the following link.

http://www.cgsecurity.org/index.html?testdisk.html