Subject: Re: Booting to a device other than /dev/wd0a
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: CJ Kucera <pez@apocalyptech.com>
List: port-i386
Date: 01/13/2003 22:33:11
On Mon, Jan 13, 2003 at 10:53:07PM -0500, der Mouse wrote:
> >    /usr/mdec/installboot /usr/mdec/biosboot_new.sym /dev/rwd0b
> 
> [which didn't install the new bootblocks correctly]
> 
> Does wd0b begin at the beginning of the NetBSD MBR partition?  I think
> it has to for that to work right.

I'm not quite sure what you mean by "MBR partition" here.  My hard
drive is physically partitioned thus:

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

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.
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.

Now here's my understanding of what happens inside installboot:

  1) The installboot command looks at the biosboot.sym (or whatever)
     and splits it up into two parts.
  2) The first part it sticks up in the MBR (very first part of the
     disk), whose sole purpose is to find out where the second part
     is.
  3) It then puts the second part wherever you specified (by the
     second argument there).

When the system boots, that first part is stuck thinking that it
needs to find the second part at wd0a, when it's perfectly capable
of seeing it at wd0b (else I wouldn't be able to boot it by hand).

Obviously the first part of the boot loader got there *somehow...*
I just have to find out how.  One thing that comes to mind right now
is that perhaps it was installed there on one of my earlier attempts
to install NetBSD, before I tried this partitioning scheme, and it
was never actually put in place during what turned out to be the
final install...  Is this possible?  Could the first part of the
bootloader from a different install be loading up the current one?

I suppose the easiest way to find out would be to totally wipe
the hard drive clean (MBR and all) and reinstall from scratch with
my current partitioning scheme.  If the MBR remains wiped, then
we'll know that it never actually worked in the first place.

Regardless, thanks for your help, and I'll stop rambling now.  :P

-CJ

-- 
WOW: Kakistocracy        |  "The ships hung in the sky in much the same
apocalyptech.com/wow     |    way that bricks don't." - Douglas Adams,
pez@apocalyptech.com     |     _The Hitchhiker's Guide To The Galaxy_