Subject: Re: Booting to a device other than /dev/wd0a
To: CJ Kucera <pez@apocalyptech.com>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-i386
Date: 01/13/2003 23:56:30
>>>    /usr/mdec/installboot /usr/mdec/biosboot_new.sym /dev/rwd0b
>> Does wd0b begin at the beginning of the NetBSD MBR partition?
> I'm not quite sure what you mean by "MBR partition" here.

I mean the partitioning information stored in the master boot record.
The partition table fdisk deals with.

>   * One big partition spanning the whole drive.
>     * Inside that parition, the NetBSD disklabel looks like so:
>       * wd0a - swap
>       * wd0b - ffs, mounted on /

If they're in that order, then wd0b isn't at the beginning of the
NetBSD MBR partition.  (If wd0a is, I expect you to have problems as
soon as the machine swaps, because I think it will swap on top of the
NetBSD disklabel.  FFS filesystems carefully avoid touching the first
8K of their partitions, originally I think to avoid stomping on
bootblocks, but today for the sake of disklabels too - that's why it's
OK to have an FFS partition begin at the beginning of the NetBSD MBR
partition.)

> As far as I can tell, this is perfectly legal, because when I type
> "hd0b:netbsd" at the boot prompt, the system comes up beautifully.

I would guess you ahve enough RAM that it's never needed to swap. :-)

> wd0a, for the record, starts at sector 63, not the very start of the
> disk, and I had thought that was the case because the MBR resides in
> that initial gap.  I could be wrong about that, though.

That matches my understanding too.  But the NetBSD disklabel lives at
the beginning of the NetBSD MBR partition (AIUI), which here is the
beginning of wd0a.  That's also where (again, AIUI) you have to put the
bootblocks - except you're putting them at the beginning of wd0b, which
isn't the beginning of the NetBSD MBR partition.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B