From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 22 12:26:08 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4416D16A4B3 for ; Wed, 22 Oct 2003 12:26:08 -0700 (PDT) Received: from mail.speakeasy.net (mail6.speakeasy.net [216.254.0.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1747D43FBF for ; Wed, 22 Oct 2003 12:26:07 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 14188 invoked from network); 22 Oct 2003 19:17:49 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 22 Oct 2003 19:17:49 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.9/8.12.9) with ESMTP id h9MJHjce093662; Wed, 22 Oct 2003 15:17:46 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200310221113.h9MBDhhw001428@ice.nodomain> Date: Wed, 22 Oct 2003 15:17:58 -0400 (EDT) From: John Baldwin To: Dan Strick X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: hackers@freebsd.org cc: dan@ice.nodomain Subject: RE: boot0/1 problems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Oct 2003 19:26:08 -0000 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 <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/