From owner-freebsd-current Thu Feb 27 10:52:59 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6A62C37B401 for ; Thu, 27 Feb 2003 10:52:54 -0800 (PST) Received: from kestrel.alerce.com (kestrel.alerce.com [209.182.219.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 18DA243F85 for ; Thu, 27 Feb 2003 10:52:53 -0800 (PST) (envelope-from hartzell@rosebud.alerce.com) Received: from rosebud.alerce.com (rosebud.lbl.gov [131.243.193.115]) by kestrel.alerce.com (8.12.4/8.12.4) with ESMTP id h1RIqgk6080093 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Thu, 27 Feb 2003 10:52:43 -0800 (PST) (envelope-from hartzell@rosebud.alerce.com) X-Authentication-Warning: kestrel.alerce.com: Host rosebud.lbl.gov [131.243.193.115] claimed to be rosebud.alerce.com Received: from rosebud.alerce.com (rosebud.alerce.com [127.0.0.1]) by rosebud.alerce.com (8.12.7/8.12.7) with ESMTP id h1RIqsMn005071 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Thu, 27 Feb 2003 10:52:55 -0800 (PST) (envelope-from hartzell@rosebud.alerce.com) Received: (from hartzell@localhost) by rosebud.alerce.com (8.12.7/8.12.6/Submit) id h1RIqqm7005067; Thu, 27 Feb 2003 10:52:52 -0800 (PST) From: George Hartzell MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15966.24193.851791.257033@rosebud.alerce.com> Date: Thu, 27 Feb 2003 10:52:49 -0800 To: "Andrew Boothman" Cc: "Darryl Okahata" , Subject: Re: "NTLDR missing" after 5-RELEASE install In-Reply-To: <001d01c2ddf9$e71bcff0$0400a8c0@spatula> References: <200302262325.PAA11580@mina.soco.agilent.com> <001d01c2ddf9$e71bcff0$0400a8c0@spatula> X-Mailer: VM 7.07 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid Reply-To: hartzell@kestrel.alerce.com (George Hartzell) Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Andrew Boothman writes: > [...] > OK Guys, I think I'm still a little confused here. > > I've just had a few botched installs of GRUB so I think I need a little more > direction, if you could :) > > I've got GRUB on a floppy and it boots fine. If I type : > rootnoverify (hd0,0) > makeactive > chainloader +1 > boot > > I get Win2k booted no problem! > > So, following the instructions in the Grub Manual, I typed > root(fd0) > setup(hd0) > > I remove the floppy from the drive and reboot > > On boot I get "Loading GRUB... Please Wait..." but after that I get "GRUB > Error 17" which according to the manual means that GRUB doesn't know how to > load the selected partition. Even though when I boot from the floppy it > starts no problem and I can type commands to get it to boot Win2k.... That told it to install GRUB into the beginning of (hd0) [e.g. the Master Boot record], but configured it to use (fd0) as the root of the place to find stuff. Since the floppy wasn't in when you booted, it didn't do anything useful. There are some grub things that need to be on the disk that you give the "root" designation too, e.g. "stage1", etc... I don't know how/where to install those files into an NTFS partition, I assume that GRUB can read NTFS filesystems, and you could tuck them there, but I don't know for sure. Here's what I'd do. Get yourself booted into freebsd any way that you can. PRINT OUT THE INFORMATION ABOUT YOUR BIOS PARTITION TABLE AND YOUR FREEBSD DISKLABEL, AND SAVE IT. "fdisk -s" and "disklabel -r diskname" are your friends!!!! Build grub from the ports tree and install it. It installs all of the juicy bits into some directory in /usr/local/share/grub/i386-freebsd/..., which doesn't seem to be a place where grub can find it. I make a directory called /boot/grub and copy all of them there. Start grub (e.g. boot from your grub floppy). Under the 5.0 systems, GEOM is picky about letting you doink with disks that you have mounted, so you either need the "let me shoot myself in the foot sysctl patch (ftp://ftp.jurai.net/users/winter/patches/geom-foot.patch) or boot from something else (e.g. floppy, live cdrom, ...) Make sure that grub can see it's various interesting bits: grub> find /boot/grub/stage1 and it should say: (hd0,1,a) assuming that you have Something Else (e.g. windows) in the first primary BIOS partition/slice, a set of FreeBSD slices in the second primary BIOS partition/slice, and the /boot/grub stuff is in the first ("a") BSD_DISKLABEL/slice. If you have the grub bits living in a Linux filesystem in the third primary BIOS partition, it'd say (hd0,2). If you had them in a Linux filesystem living in the first extended partition, it'd say (hd0,4), etc.... That's the drive that you want to declare as your root, which just configures the low level grub code that "setup" installs so that it knows where to look for it's various useful bits. e.g. grub> root (hd0,1,a) Then you need to install grub onto somewhere where the computer will trip over it and boot it. One possibility is to install it into the master boot record, which would be: grub> setup (hd0) Here you boot process would be power on->bios->load the MBR which is really GRUB->grub loads its stage1,... Or you could leave a "normal" MBR at the beginning of the disk and install GRUB into the beginning of the FreeBSD BIOS partition (assuming that FreeBSD is in the second primary parition): grub> setup (hd0,1) If that's all that you do, thing's won't quite boot. You'll need to also mark that partition active, so that the stock MBR code will jump to it. I always do that by getting to this point, booting by hook or by crook (e.g. a grub boot floppy, a bootable freebsd CD, a bootable linux CD) and using some utility (e.g. partition magic from windows, fdisk from windows, fdisk from freebsd, fdisk or cfdisk from linux) to mark the partition active. I prefer partition magic because I believe that it has the most robust partition table integrity checks, but whatever you trust.... Now, your boot process will look like: power on->bios->"real" MBR which jumps to the active parition -> (next line) ... -> GRUB at the beginning of active partition -> GRUB stage1,... When grub get's up and running, it'll look for a file called menu.lst (unless you override the name when you "setup") which contains the info for the boot menu. Here's mine (notice that there are a bunch of mutually exclusive things that I've tucked into the 3rd BIOS partition at various times and I just keep the info around for reference. As long as I don't actually choose any of the "wrong" selections, there's no trouble. default=0 timeout=10 title FreeBSD 4.7 root (hd0,1,a) kernel /boot/loader title FreeBSD 5.0 root (hd0,2,a) kernel /boot/loader title Redhat Linux 8.0 root (hd0,2) kernel /boot/vmlinuz-2.4.18-14 ro root=/dev/hda3 initrd /boot/initrd-2.4.18-14.img title Redhat Linux 8.0 (hires) root (hd0,2) kernel /boot/vmlinuz-2.4.18-14 ro root=/dev/hda3 vga=791 initrd /boot/initrd-2.4.18-14.img title Windows 2000 rootnoverify (hd0,0) chainloader +1 > I then used "fdisk /mbr" on a Windows 98 boot disk to remove GRUB and get me > back to a normal Win2k boot. But that doesn't help me get FreeBSD dual > booting..... > > Can you offer any insight into how to make this work? I remember using GRUB > before and being very happy with it, but it was installed for me by > RedHat.... *REMEMBER* run an "fdisk -s" and print out the output run and "disklabel -r ad0" (or whatever device) and print out the info. BEFORE you start playing around!!!! g. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message