From owner-freebsd-questions@FreeBSD.ORG Thu Sep 4 01:16:45 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 F3DBF16A4BF for ; Thu, 4 Sep 2003 01:16:44 -0700 (PDT) Received: from oahu.WURLDLINK.NET (oahu.wurldlink.net [66.193.144.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id B6F6843FA3 for ; Thu, 4 Sep 2003 01:16:43 -0700 (PDT) (envelope-from vince@oahu.WURLDLINK.NET) Received: from oahu.WURLDLINK.NET (vince@localhost.WURLDLINK.NET [127.0.0.1]) by oahu.WURLDLINK.NET (8.12.9/8.12.9) with ESMTP id h848EcOt058695; Wed, 3 Sep 2003 22:14:39 -1000 (HST) Received: from localhost (vince@localhost)h848Eb3O058691; Wed, 3 Sep 2003 22:14:37 -1000 (HST) Date: Wed, 3 Sep 2003 22:14:37 -1000 (HST) From: Vincent Poy To: Mark In-Reply-To: <200309040228.H842SD2K095284@asarian-host.net> Message-ID: <20030903221005.A64375-100000@oahu.WURLDLINK.NET> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: questions@freebsd.org cc: Ruben de Groot cc: Joshua Oreman Subject: Re: Ghost for FreeBSD 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: Thu, 04 Sep 2003 08:16:45 -0000 On Thu, 4 Sep 2003, Mark wrote: > ----- Original Message ----- > From: "Vincent Poy" > To: "Ruben de Groot" > Cc: ; "Joshua Oreman" > Sent: Wednesday, September 03, 2003 11:21 PM > Subject: Re: Ghost for FreeBSD > > > On Wed, 3 Sep 2003, Ruben de Groot wrote: > > > > > On Wed, Sep 03, 2003 at 07:58:35AM -0700, Joshua Oreman typed: > > > > > > > > > > > > > > Ok; what you have done is made a dump on the root mirror device; > > > > > great! But how do I now tell FreeBSD to use that "restored" > > > > > partition as /? Edit /etc/fstab to effect the change for the next > > > > > boot? I have a nagging suspicion it will then still boot off the old > > > > > / slice. > > > > > > > > Ah, that's right. You have to edit /etc/fstab *AND* tell the kernel. > > > > I'm not sure exactly what you need to do to boot from a different root > > > > device; maybe someone will fille me in? > > > > > > You'll have to edit /etc/fstab on the mirror root partition. Then you'll > > > have to tell the BIOS to boot disk1 instead of disk0. If your BIOS > > > doesn't support this, you're out of luck. You'll have to switch cables > > > then. If it does, no kernel changes necessary. > > > > > > Ruben > > > > Never thought about the BIOS but if he installed the FreeBSD Boot > > Manager on both drives, then all he has to do to boot the second drive is > > he has to hit the key to select the second drive when the Boot Manager > > shows up prior to FreeBSD booting. The switching cables or even replacing > > the original drive with the second drive is really only if the main drive > > dies or if you wanted to use a different drive like greater capacity, > > faster, etc or you didn't like the brandname of the drive for some reason. > > > Thanks, Vincent. > > But what if I just made a boo-boo on the root partition? My quandary has > always been that I know of no way to restore the / slice on the existing > disk-set (RAID-1). I can boot off the CD, but then I am still stuck on the > same / slice. Although I have not yet messed up / to the point of having to > do a full restore, this might well be needed at some point (an extended > power-outage, for instance, ruining the file-system). Well, if you made a error on the root partition, this assumes you did not mirror your errors to the backup drive... Then all you have to do is boot using the backup drive from the Boot Manager. > Would it work if I mounted a "spare" partition, on the same array, restore > the root partition therein, and then edited /etc/fstab accordingly? It seems > to me, though, that the kernel cannot possibly use /etc/fstab to determine > what device the root partition will be, as /etc/fstab is itself on that > root-partition. So, I then take it the MBR supplies the entry-point for > FreeBSD to boot from (which will be considered the root partition), so that > booting of a "spare" slice would require an edit in the MBR (which I am not > too keen on doing, btw). No, you would not have to mount it. Assuming you had the FreeBSD Boot Manager on the drives... it will show the prompt like: F1 FreeBSD - this is your primary HDD F2 FreeBSD - this is your secondary HDD Fn FreeBSD - other HDD's If you don't press anything or hit F1, then it'll just boot your primary HDD /kernel If you hit F2, then it will boot /kernel from the second HDD and read /etc/fstab which is on the second drive as well. It doesn't go back to the first drive because you're not using the kernel from the first drive at all. The first drive won't even be visible until you mount it since your /, /usr, /var will all be from the second HDD now. That was the reason I told you to edit the /etc/fstab for the second HDD which is really /mnt/root/etc/fstab when you are booting off the first HDD. When you boot off the second HD, the first drive is really not even used til you mount it. Cheers, Vince - vince@WURLDLINK.NET - Vice President ________ __ ____ Unix Networking Operations - FreeBSD-Real Unix for Free / / / / | / |[__ ] WurldLink Corporation / / / / | / | __] ] San Francisco - Honolulu - Hong Kong / / / / / |/ / | __] ] HongKong Stars/Gravis UltraSound Mailing Lists Admin /_/_/_/_/|___/|_|[____] Almighty1@IRC - oahu.DAL.NET Hawaii's DALnet IRC Network Server Admin