From owner-freebsd-current Wed Nov 11 12:36:26 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA29801 for freebsd-current-outgoing; Wed, 11 Nov 1998 12:36:26 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from dingo.cdrom.com (castles249.castles.com [208.214.165.249]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA29793 for ; Wed, 11 Nov 1998 12:36:21 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id MAA04864; Wed, 11 Nov 1998 12:33:50 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Message-Id: <199811112033.MAA04864@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Kevin Street cc: current@FreeBSD.ORG Subject: Re: boot loader problems with mix of wd and da In-reply-to: Your message of "Sat, 31 Oct 1998 14:07:54 EST." <13883.24586.614752.970999@kstreet.interlog.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 11 Nov 1998 12:33:50 -0800 From: Mike Smith Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I have some difficulties using the new boot blocks and loader in some > configurations. I have a backup copy of my root partition on another > drive that causes the loader some problems. > > kernel is aout > disks are wd0, wd1, da0, da1 (removable) > > I boot through Partition Magic's Boot Manager which lives on wd0. > The normal root is on wd1s2a. The backup root is on da0s2a. > I've done (after a Nov 10 make world): > disklabel -B -b /boot/boot1 -s /boot/boot2 wd1 > disklabel -B -b /boot/boot1 -s /boot/boot2 da0 > > The normal boot through wd1 is fine. > > If I want to boot my backup root on da0 then the results vary: > > 1) If I don't have a /boot.config on da0 then it autoboots into /boot/loader, > currdev is set to disk3s2. It finds /boot/boot.conf ok, loads the kernel > but the kernel boot fails with "changing root device to da2s2a". > (there is no da2). This is the same as the old problem that required you to prefix a BIOS unit number offset to the 'sd' in the old loader. You need to explicitly set $rootdev: set rootdev=da0s2a > 2) If I do have a /boot.config on da0 with: > 2:da(0,a)/boot/loader > Then it finds and loads the loader, but currdev is set to disk1s2 so it > can't find /boot/boot.conf or anything else. disk1s2 would actually be the > Boot Manager on wd0. If I manually change currdev to disk3s2, then I can > load the kernel but boot fails as above. This is not the right way to do it; the BIOS unit numbers get all screwed up. > 3) If I interrupt the loading of /boot/loader and instead type in: > 2:da(0,a)kernel > Then everything is fine. The kernel boot succeeds and correctly does > "changing root device to da0s2a". (The kernel is compiled with root on > wd1s2a since that's its normal spot). I suspect this won't work if I > go to an elf kernel since I need to use /boot/loader for elf, right? > > So, why is currdev set differently in case 1 and case 2? Because you've supplied the '2', obviously enough. > Why does /boot/loader confuse the kernel into thinking there's a da2 on > which it might find root? Because you haven't told it not to. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message