From owner-freebsd-questions@FreeBSD.ORG Sat Sep 27 19:19:18 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 BA75316A4B3 for ; Sat, 27 Sep 2003 19:19:18 -0700 (PDT) Received: from smtp.covadmail.net (mx04.covadmail.net [63.65.120.64]) by mx1.FreeBSD.org (Postfix) with SMTP id A529243FDF for ; Sat, 27 Sep 2003 19:19:17 -0700 (PDT) (envelope-from strick@covad.net) Received: (covad.net 23399 invoked from network); 28 Sep 2003 02:19:12 -0000 Received: from unknown (HELO ice.nodomain) (68.164.192.232) by sun-qmail17 with SMTP; 28 Sep 2003 02:19:12 -0000 Received: from ice.nodomain (localhost [127.0.0.1]) by ice.nodomain (8.12.8p1/8.12.8) with ESMTP id h8S2Hp0S000394; Sat, 27 Sep 2003 19:18:12 -0700 (PDT) (envelope-from dan@ice.nodomain) Received: (from dan@localhost) by ice.nodomain (8.12.8p1/8.12.8/Submit) id h8S2HVgw000393; Sat, 27 Sep 2003 19:17:31 -0700 (PDT) Date: Sat, 27 Sep 2003 19:17:31 -0700 (PDT) From: Dan Strick Message-Id: <200309280217.h8S2HVgw000393@ice.nodomain> To: freebsd-questions@freebsd.org cc: vitalis@numericable.fr cc: dan@ice.nodomain 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 02:19:18 -0000 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