Recovering Damaged Partition Table

Evan Dower evantd at hotmail.com
Sun Feb 15 18:45:44 PST 2004


So, the other day I was ripping some CDs...

Upon restart, there was a message that ad0 had an unrecoverable error (media 
changed). It's a hard disk. I didn't notice any gnomes breaking into my 
computer and changing it on me. No matter. It won't boot. I installed 
FreeBSD on an empty partition of another disk, which is how I got to where I 
am now. Naturally, I have no backups.

My plan is to reconstruct the partition table and then all should be fine. 
I've determined that my files seem to be in tact using 'strings /dev/ad0 | 
less'. It even looks like part of the partition table remains.

% fdisk ad0
******* Working on device /dev/ad0 *******
parameters extracted from in-core disklabel are:
cylinders=59598 heads=16 sectors/track=63 (1008 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=59598 heads=16 sectors/track=63 (1008 blks/cyl)

fdisk: invalid fdisk partition table found
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
<UNUSED>
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 63, size 60074721 (29333 Meg), flag 80 (active)
        beg: cyl 0/ head 1/ sector 1;
        end: cyl 205/ head 15/ sector 63

First, are there any tools that can look at the disk and guess what the 
partition table should look like? Failing that, I figure I can take a look 
at the disk where I think the partition edges were and look for some sort of 
cues to tell me what the partition boundaries ought to be. Can you all help 
me with this / guide me through it?

Thanks very much for your time,
--
Evan Dower
Undergraduate, Computer Science
University of Washington
Public key: http://students.washington.edu/evantd/pgp-pub-key.txt
Key fingerprint = D321 FA24 4BDA F82D 53A9  5B27 7D15 5A4F 033F 887D

_________________________________________________________________
Keep up with high-tech trends here at "Hook'd on Technology." 
http://special.msn.com/msnbc/hookedontech.armx



More information about the freebsd-questions mailing list