Subject: Re: BIOS partitions, MBR, and bootstraps, oh my...
To: David Laight <david@l8s.co.uk>
From: Joel Baker <lucifer@lightbearer.com>
List: netbsd-help
Date: 08/28/2002 19:25:08
On Wed, Aug 28, 2002 at 10:12:42PM +0100, David Laight wrote:
> > New installation on an ABIT BP-6 dual Celeron MB, both slots with Intel
> > Celeron 400s, upgraded to the lastest official BIOS (version RU) to get
> > support for extended INT13.
> 
> Hopefully this works - since you WILL be using it later...

Wasn't a lot of choice. If it doesn't work, the next stop for the board
would be the round file, since I have no drives that *don't* require INT13
support at this point, and buying one would be... silly, when I can buy a
vastly faster MB/CPU pair for not much more than a drive would cost...

> > Secondary/Master.
> > 
> > Two BIOS partitions (0 and 1), both id 169 (NetBSD). fdisk sees these and
> > displays them just fine.
> 
> You won't be able to boot the second - unless you get all my
> changes to the boot code...

Hmmm. Bleah. Sounds like it may be simpler to reinstall and use multiple
disklabel partitions instead of BIOS partitions; I could still boot off
of the other partition (which is the eventual goal - a standalone boot
of Debian/NetBSD - don't shoot me, please).

> > Partition 0 is 10g, set active, and has a disklabel and NetBSD filesystems
> > (a = /, b = 512M swap, c&d standard, no others)
> > 
> > Partition 1 has not yet been set up in any way, other than it's existance
> > in the BIOS partition table, and has the other ~30g of the drive.
> > 
> > fdisk -i -c /usr/mdec/mbr_bootsel (configured to boot partition 0 after
> > 10 seconds, has an named option for partition 1 as well)
> 
> Ok the presence of the the entry for partition 1 beyong 8Gb will
> have made fdisk set the flag that causes the mbr_bootsel code
> to use the int 13 entensions to do LBA reads.
> (You can't clear this flag using the standard fdisk)

Noted.

> > Base install 1.5.1, upgraded to CVS branch netbsd-1-6, complete rebuild
> > and install of kernel and userland according to "Tracking NetBSD-current".
> 
> Did the 1.5.1 version ever boot?

No, it had the exact same set of circumstances.

> > /usr/mdec/installboot /usr/mdec/biosboot.sym /dev/rwd0a
> > 
> > Upon reboot, the boot selector runs, expires the 10 second timer, and at
> > that point prints a "3" on the next line, then hangs.
> 
> NOOS - ie the sector read didn't end 0x55aa.

Noted.

> > Booting from the install CD, interrupting the auto-boot, and entering
> > "boot wd0a:/netbsd" works just fine, for both the old and new kernels
> 
> That only requires the filesystem to be present, not any of the
> boot code.

This is what I thought, yes.

> I'd double check that the first sector of the netbsd partition
> contains the boot code.
> 
> Note that the root filesystem (or rather the one passed to
> installboot that contain /boot) must be at the start of the
> bios partition.

It was; wd0a, first partition on the BIOS partition; the only thing
ahead of it was the standard 63-sector first track reservation for boot
code.

> With a few code tweaks you can get the mbr_bootsel code to
> select a different boot partition and hence root partition...

Will look into this. I'm thinking the sanest thing to do (since I have only
a few hours invested right now) is to start over and do it all as partition
0 (or even full-disk), and disklabel partitions... / on a at 10g, swap on b
at 512M, and, /debian or whatever I call it as e...

(As noted, the eventual intent is to be able to do 'boot wd0e:/netbsd' and
have it come up without ever touching 'Native' NetBSD - but to get there
will require quite a lot of work, yet)
-- 
***************************************************************************
Joel Baker                           System Administrator - lightbearer.com
lucifer@lightbearer.com              http://users.lightbearer.com/lucifer/