From owner-freebsd-hardware@FreeBSD.ORG Mon Sep 29 13:04:22 2003 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0317D16A4BF for ; Mon, 29 Sep 2003 13:04:22 -0700 (PDT) Received: from mail.speakeasy.net (mail14.speakeasy.net [216.254.0.214]) by mx1.FreeBSD.org (Postfix) with ESMTP id 883624402A for ; Mon, 29 Sep 2003 13:04:18 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 7916 invoked from network); 29 Sep 2003 20:04:17 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 29 Sep 2003 20:04:17 -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 h8TK4D6Y053839; Mon, 29 Sep 2003 16:04:14 -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: <200309270624.h8R6OBjS000841@ice.nodomain> Date: Mon, 29 Sep 2003 16:04:19 -0400 (EDT) From: John Baldwin To: Dan Strick X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: dan@ice.nodomain cc: freebsd-hardware@freebsd.org Subject: RE: bad BIOS confuses boot0 X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2003 20:04:22 -0000 On 27-Sep-2003 Dan Strick wrote: > The AWARD BIOS on my Gigabyte 8KNXP motherboard has been giving me > a hard time for several weeks. Tonight I got around to instrumenting > a copy of /usr/src/sys/boot/i386/boot0/boot0.s and verified my > suspicion. > > The AWARD BIOS loads the MBR from the first drive in the BIOS drive > list, drive code 0x80, but passes the value 0x81 to the bootstrap > program through the %dl register. > > This has a couple of consequences: > > 1) The boot0 program lists the partition on the first drive but > boots the selected partition from the second drive, and > > 2) The boot0 program may overwrite the MBR on the second drive > with a copy of the MBR from the first drive. > > My workaround was to do: > > boot0cfg -Bv -d 0x80 -o setdrv,noupdate ad0 > > The noupdate option is intended to prevent a major disaster if > this drive should ever be assigned a different number by the BIOS. > > I don't like this workaround. It is clumsy and restrictive. > The drive configuration on my PC is in a state of flux. > > Has anyone noticed such antisocial BIOS behavior in the past? > > Is there actually a standard for passing the BIOS drive number through > the %dl register? Do I have grounds for *demanding* that the motherboard > manufacturer get the BIOS fixed? I don't think there is an actual standard for BIOS booting off a hard disk. The defacto standard is to indeed pass in the BIOS device number in %dl, so you likely can complain to your BIOS vendor. It's amazing Windows boots off the thing. Windows may hardcode 0x80 though as a workaround. The boot0cfg -d option exists to workaround this type of bug, so you are using the best workaround available. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/