Subject: lost partition table - help request
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: John C. Hayward <johnh@david.wheaton.edu>
List: current-users
Date: 03/14/1994 23:28:09
Dear NetBSDers,
   inadvertently, someone wiped out the partition table for one of our NetBSD
systems with IDE drive.  The configuration we have is about 60MB for Dos
followed by 184MB for NetBSD.  I have tried to rebuild the partition table
on the boot block taking guesses at where the partition should start.  I 
though I had set it up on a cylinder boundary.  When I try the three boundaries
which should be closest to I get "no operating system error" if I try to boot
off the hard disk and "no disk label" (for at least 2 of the 3) when I boot
off a floppy and attempt to mount the hard disk.

   Can someone give me some overview on what the disk label looks like.  
What I have in mind is to write a small program to scan a portion of the 
disk (wd0d) looking for where labels might be.  Once I find the label then
point the partition table to the correct spot and see if my disk comes back.

   I have limited knowledge of what the partition table looks like:
Here is what I think it looks like

Offset Meaning
0 - active flag 80-> active partition
1 - ?
2 - ?
3 - ?
4 - type flag A5 -> NetBSD partition (or at least non dos)
5 - ?
6 - ?
7 - ?
8-B - start sector number (8 = LSB)
C-F - length of sector (C = LSB)

Are the values in 1-3 or 5-7 critical for booting of the system?

While nothing of earth shaking importance is on the disk, it would be 
interesting to expand my understanding of the layout of the disk and 
would save me some time.

Any help would be appreciated.

johnh...

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