[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Restoring destroyed partition table
Hello,
Amos Shapira wrote:
> I've just compiled a new kernel and when I tried to reboot it I got
> messages like "can't find ... 03:02". Booting to the Debian rescue
> disk and running fdisk I see that these partitions are simply gone.
> The only one recognized is the Solaris partition. The first two
> entries were simply zero'ed out.
>
> Does anyone know of a way for me to restore the partition entries
> without remembering the exact sizes?
I know you already solved this by reinstalling, but in case others are
interested, here's a solution. I had to find one after a silly incident
involving a new harddisk and 'dd' seized at the wrong end.
The following are two utilities that scan your drive and try to locate
partitions by finding file system signatures.
gpart:
http://www.stud.uni-hannover.de/user/76201/gpart/
fixdisktable:
http://bmrc.berkeley.edu/people/chaffee/fat32.html
(scroll down to "fixdisktable"
gpart worked for my while fixdisktable didn't, but it's probably useful
to have both handy. Both tools require you to do some manual fdisk
fiddling using their output.
It *really* helps to remember at least vaguely what the partition layout
looked like, to sanity-check the results.
I hope you'll find this information totally useless.
Regards,
Eran Tromer