Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Oct 2003 15:17:58 -0400 (EDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Dan Strick <strick@covad.net>
Cc:        dan@ice.nodomain
Subject:   RE: boot0/1 problems
Message-ID:  <XFMail.20031022151758.jhb@FreeBSD.org>
In-Reply-To: <200310221113.h9MBDhhw001428@ice.nodomain>

next in thread | previous in thread | raw e-mail | index | archive | help

On 22-Oct-2003 Dan Strick wrote:
> I seem to have stubbed my toe on another nasty little bootstrap problem.
> My Gigabyte motherboard AWARD BIOS passes the wrong drive number in the
> %dl register when it invokes the MBR bootstrap program, boot0.
> This forces me to configure the MBR bootstrap with the setdrv option.
> The noupdate option must also be set because otherwise I risk writing
> the MBR partition table back to the wrong disk and that would be a major
> disaster.
> 
> Here is the problem: the boot1 program depends on the boot0 program
> setting the active partition flag in the MBR partition table.  This
> doesn't happen if the boot0 noupdate option is set.
> 
> The boot1 program always boots the active FreeBSD slice (or the first
> FreeBSD slice if there is no active FreeBSD slice).
> If you have multiple FreeBSD slices on a disk whose boot0 program is
> configured with the noupdate option, YOU CAN ONLY BOOT ONE OF THE
> SLICES.
> 
> I have release 4.9-RCx and 5.1 slices on the same disk.  If the 5.1
> slice is active, the system wedges hard if I attempt to boot the
> 4.9-RCx slice.  If the 4.9-RCx slice is active, the system resets
> if I attempt to boot the 5.1 slice.
> 
> This really sucks.
> 
> Can someone who knows how the bootx programs are supposed to work
> verify that my understanding of the problem is probably correct?

Yes, it is correct.

> Can someone suggest a workaround?

You can change the device you load the kernel from by changing the
'cuurdev' variable.  Thus, if you do 'set currdev=disk1s2a' you can
switch from the first slice to the second.  You can set the device to
mount your root filesystem from by using
'set vfs.root.mountfrom="ufs:/dev/ad0s2a"'.  You might be able to use
the beastie menu in current and hack it to add a menu item for booting
your 4.x slice and then always boot into the current loader and pick
4.x from the menu.

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20031022151758.jhb>