Ghost for FreeBSD

Vincent Poy vince at oahu.WURLDLINK.NET
Thu Sep 4 01:16:45 PDT 2003


On Thu, 4 Sep 2003, Mark wrote:

> ----- Original Message -----
> From: "Vincent Poy" <vince at oahu.WURLDLINK.NET>
> To: "Ruben de Groot" <mail23 at bzerk.org>
> Cc: <questions at freebsd.org>; "Joshua Oreman" <oremanj at www.get-linux.org>
> 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:
> > >
> > > <SNIP>
> > >
> > > > > 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 at 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 at IRC - oahu.DAL.NET Hawaii's DALnet IRC Network Server Admin




More information about the freebsd-questions mailing list