Subject: Re: How to write NetBSD boot blocks to DOS disk?
To: Ken Hornstein <kenh@cmf.nrl.navy.mil>
From: Michael L. VanLoon -- HeadCandy.com <michaelv@HeadCandy.com>
List: port-i386
Date: 03/28/1996 11:40:13
>>Like I said, I have the NetBSD and MS-DOS paritions working on the
>>same disk.  But, I can't boot the NetBSD parition off the EIDE drive.
>>How do I write the NetBSD boot blocks?  When I try "disklable -B ..."
>>it trashes the MS-DOS partition data.  I know others have made this
>>work.  How did you do it?

>Did you try using the NetBSD "fdisk" on this disk and make sure that it
>agrees with the proto label?  Also, you said this is a disklabel proto
>file -  Are you using -R along with -B to read in the proto file?  Is
>the label on the disk?

The disklabel is on the disk, yes.  It's on there, I've rebooted, I've
newfs'd the NetBSD partitions.  I just haven't put the NetBSD boot
blocks on it... this time.  It boots MS-DOS fine.  It access the
partitions under NetBSD fine.  I just can't boot NetBSD from that
drive.

>(I'm wondering about that offset for the MS-DOS parition - usually it's
>32, not 63).

I don't know.  I used DOS fdisk to put the DOS partition on it.  Used
pfdisk to make the NetBSD entry in the DOS partition table.  Used DOS
"fdisk /mbr" to put the DOS boot block back after pfdisk hosed it. :-)
Put DOS on it -- it boots.  Went into NetBSD via my SCSI drives.
Disklabel'd it.  Put the NetBSD partitions on it.  They work, but
don't boot; it still boots DOS correctly.

The time I tried to use NetBSD fdisk it also toasted the DOS
partition.  I may have done something wrong, but I don't think so.

Putting the partitions together is all documented nicely in Dave
Burgess' FAQ.  However, I couldn't find anything in there that
explicitely said "this is how you make a DOS/NetBSD disk bootable from
both operating systems", or even "this is how you write NetBSD
bootblocks without toasting DOS".

-----------------------------------------------------------------------------
  Michael L. VanLoon                                 michaelv@HeadCandy.com
       --<  Free your mind and your machine -- NetBSD free un*x  >--
     NetBSD working ports: 386+PC, Mac 68k, Amiga, HP300, Sun3, Sun4,
                           DEC PMAX (MIPS), DEC Alpha, PC532
     NetBSD ports in progress: VAX, Atari 68k, others...
-----------------------------------------------------------------------------