From owner-freebsd-questions@FreeBSD.ORG Tue May 20 23:41:15 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 3334D37B401 for ; Tue, 20 May 2003 23:41:15 -0700 (PDT) Received: from pd5mo3so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C30043F85 for ; Tue, 20 May 2003 23:41:14 -0700 (PDT) (envelope-from cpressey@catseye.mb.ca) Received: from pd4mr3so.prod.shaw.ca (pd4mr3so-qfe3.prod.shaw.ca [10.0.141.214]) by l-daemon (iPlanet Messaging Server 5.2 HotFix 1.14 (built Mar 18 2003)) with ESMTP id <0HF800BE058P5J@l-daemon> for freebsd-questions@freebsd.org; Wed, 21 May 2003 00:41:13 -0600 (MDT) Received: from pn2ml8so.prod.shaw.ca (pn2ml8so-qfe0.prod.shaw.ca [10.0.121.152]) by l-daemon (iPlanet Messaging Server 5.2 HotFix 1.14 (built Mar 18 2003)) with ESMTP id <0HF8004FF58PNK@l-daemon> for freebsd-questions@freebsd.org; Wed, 21 May 2003 00:41:13 -0600 (MDT) Received: from www.kallisti.ca (h24-70-180-74.wp.shawcable.net [24.70.180.74]) 2003))freebsd-questions@freebsd.org; Wed, 21 May 2003 00:41:13 -0600 (MDT) Date: Wed, 21 May 2003 01:42:13 -0500 From: Chris Pressey In-reply-to: <20030514093825.GB64005@happy-idiot-talk.infracaninophile.co.uk> To: freebsd-questions@freebsd.org Message-id: <20030521014213.7600e2f1.cpressey@catseye.mb.ca> Organization: Cat's Eye Technologies - http://www.catseye.mb.ca/ MIME-version: 1.0 X-Mailer: Sylpheed version 0.9.0 (GTK+ 1.2.10; i386-portbld-freebsd4.8) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT References: <1052896702.3300.17.camel@arlette.love.dad> <20030514093825.GB64005@happy-idiot-talk.infracaninophile.co.uk> Subject: Re: About my 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: Wed, 21 May 2003 06:41:15 -0000 On Wed, 14 May 2003 10:38:25 +0100 Matthew Seaman wrote: > On Wed, May 14, 2003 at 02:18:22AM -0500, Teilhard Knight wrote: > > [...] > > I have compiled my kernel. Everything seems to be all right, > > except that on boot it cannot mount root. > > > > It displays: "mounting root from ufs:ad2s2a", and a failure message. > > [...] > > The HD where FreeBSD is installed is ad2 in my previous kernel and > > in this new one it is ad1. I have now found out that this is the > > source of the problem. I checked the partition table, and the slices > > are called ad2s2a ---> ad2s2g. If this is the case, no way I can > > mount root on a disk called ad1 with those slices. > > > > So, I'll pose a different question. Do you know of a possible way I > > can make my new kernel to spot my HD as ad2? To me this is the only > > solution possible. > > Hmmm... It's not impossible to recover from the situation you're in > without having to do anything unaesthetic, like re-installing. It is, > however, fairly tricky and requires use of some quite unfriendly > commands. > > Your aim is simply to edit /etc/fstab and change all references to ad2 > over to ad1. Since the fstab is not correct for your current machine, > you can't boot to multiuser mode. You can, however, boot to single > user mode with the root partition you tell the kernel as above. After > power-on, interrupt the 10 second count down, and at the boot loader > prompt type: > > set root_disk_unit=1 > boot /kernel -s > > This should get you to the single user prompt, but with the root > partition mounted read-only. Hello, Today I found myself in a similar position to Mr. Teilhard, and tried following this advice... I installed FreeBSD 4.8RC2 on one computer on an IDE hard drive which was hooked up as the primary slave (ad1) and later moved that hard drive to another computer, hooking it up as the secondary slave (ad3) there. When booting from that drive on the second computer, I got the same failure message "cannot mount root from ad1s1a". I tried specifying "ufs:/dev/ad3s1a" but it would only return error code 6 (iirc). So, I tried following what I thought would be the logical variation on Mr. Seaman's advice. I interrupted the boot process and typed: set root_disk_unit=3 boot -s To no avail. Still tried to mount root from ad1s1a. Same error. Googling for 'root_disk_unit' I got the impression that it might not really be necessary under 4.x and that 'set rootdev=disk2s1a' might be in order. (The boot sequence informed me that the drive I was trying to boot off of was indeed seen as disk2 by the BIOS.) I tried it, and several combinations of both rootdev and root_disk_unit, with no luck. (btw, the kernel was GENERIC with the only change being that lnc0 was commented out (for some reason probing that NIC caused the boot sequence to go haywire, and I didn't really need it in this case)) Eventually I gave up, unplugged the primary slave (a CDROM,) plugged the hard drive in as the primary slave, booted off of it, used ee to change all occurances of ad1xxx to ad3xxx in /etc/fstab, shut down the machine, moved the hard drive back to the secondary slave, put the CDROM back in, and, of course, it booted up just peachy. But I may have to do something very much like this again in the near future and I might not have the luxury of monkeying with the other devices next time. So I'd like to know if I've misinterpreted Mr. Seaman's instructions, or if there is some subtle magic implied in them that I'm not picking up on, or what, because they simply didn't seem to work for me. TIA -Chris