From owner-freebsd-questions@FreeBSD.ORG Sun Sep 28 01:32:01 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9D0E516A4B3 for ; Sun, 28 Sep 2003 01:32:01 -0700 (PDT) Received: from partridge.numericable.net (partridge.numericable.net [80.236.0.152]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5C0CB4400E for ; Sun, 28 Sep 2003 01:32:00 -0700 (PDT) (envelope-from vitalis@numericable.fr) Received: (qmail 14373 invoked from network); 28 Sep 2003 08:31:58 -0000 Received: from unknown (HELO [81.220.77.69]) ([81.220.77.69]) (envelope-sender ) by 0 (qmail-ldap-1.03) with SMTP for ; 28 Sep 2003 08:31:58 -0000 From: Vitalis To: Dan Strick In-Reply-To: <200309280217.h8S2HVgw000393@ice.nodomain> References: <200309280217.h8S2HVgw000393@ice.nodomain> Content-Type: text/plain Message-Id: <1064737917.589.1.camel@sankukai.ice-age.org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4 Date: Sun, 28 Sep 2003 10:31:57 +0200 Content-Transfer-Encoding: 7bit cc: dan@ice.nodomain cc: questions Subject: Re: MBR problem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2003 08:32:01 -0000 On Sun, 2003-09-28 at 04:17, Dan Strick wrote: > On Sat, 27 Sep 2003, vitalis@numericable.fr wrote: > > There are 2 partitions on my hard drive, one for FreeBSD and the other > > one for XP. I had to reinstall Windows and of course it blew the MBR up. > > I've reinstalled FreeBSD's boot manager with: > > boot0cfg -B ad0 > > > > Now when I boot, the manager lists the 2 OS, but when I choose to boot > > FreeBSD, nothing happens. > > > > Any idea? > > > > #FreeBSD 5.1-CURRENT > > > > bash-2.05b# fdisk ad0 > > ******* Working on device /dev/ad0 ******* > > parameters extracted from in-core disklabel are: > > cylinders=232581 heads=16 sectors/track=63 (1008 blks/cyl) > > > > Figures below won't work with BIOS for partitions not in cyl 1 > > parameters to be used for BIOS calculations are: > > cylinders=232581 heads=16 sectors/track=63 (1008 blks/cyl) > > > > Media sector size is 512 > > Warning: BIOS sector numbering starts with sector 1 > > Information from DOS bootblock is: > > The data for partition 1 is: > > sysid 7 (0x07),(OS/2 HPFS, NTFS, QNX-2 (16 bit) or Advanced UNIX) > > start 63, size 117210177 (57231 Meg), flag 0 > > beg: cyl 0/ head 1/ sector 1; > > end: cyl 1023/ head 254/ sector 63 > > The data for partition 2 is: > > sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) > > start 117210240, size 117226305 (57239 Meg), flag 80 (active) > > beg: cyl 1023/ head 0/ sector 1; > > end: cyl 1023/ head 254/ sector 63 > > I don't see any smoking guns. I know the basic concept, booting via > an MBR installed with boot0cfg on a FreeBSD 5.1 system with XP in the > first slice works, works. I did it just a couple of days ago. > > I do see a potential problem. The boot0 MBR will by default use the > legacy CHS int-13 BIOS services, even if the "extended" services are > available. (At least this is how I read the source code. This is > contrary to at least some of the boot0/boot0cfg documentation.) > > Your XP slice is just a teensy bit larger than 1024*255*63 sectors long, > pushing the bootstrap program in your FreeBSD slice just beyond the point > at which it could be successfully loaded with a legacy int-13 disk read. > > If possible, do "boot0cfg -v ad0" and see if the "packet" option is set. > If not, see if setting it with "boot0cfg -v -o packet ad0" fixes your > problem. I expect that you are using a modern motherboard whose BIOS > implements the modern "EDDS" int-13 disk functions, perhaps the Asus > P4P800 you just mentioned in a previous posting to freebsd-questions. > > Caveat: I have not yet tried the boot0cfg packet option and don't > know for sure that it works. I also wonder how the boot0 program worked > for you before you installed XP. I gather that it did and that suggests > your problem is something else. Still, it is worth a try. > > Dan Strick > strick@covad.net > Hi Dan! You were right, it works now with the 'packet' option. Thanks a lot!