Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Dec 2001 21:37:27 -0600
From:      "Mike Meyer" <mwm-dated-1009424247.066d87@mired.org>
To:        hawkeyd@visi.com
Cc:        questions@freebsd.org
Subject:   Re: Two FreeBSD slices on one HDD?
Message-ID:  <15395.65527.65231.234995@guru.mired.org>
In-Reply-To: <20011221172839.A8809@sheol.localdomain>
References:  <86914604@toto.iv> <15395.40219.395530.155752@guru.mired.org> <20011221172839.A8809@sheol.localdomain>

next in thread | previous in thread | raw e-mail | index | archive | help
D J Hawkey Jr <hawkeyd@visi.com> types:
> On Dec 21, at 02:35 PM, Mike Meyer wrote:
> > I can't answer that. I built my two-BSD hd from sources and installed
> > that way.
> Please elaborate. You had to 'newfs' the partitions, right? Then, what,
> copy the sources into the /usr mountpoint, and build the OS? With what
> development tools; it's a new slice??
> 
> Oh! Wait. You installed the second OS while running the existing OS,
> right? I don't think I wanna go that route if I don't have to.

Exactly. I had a running -stable system, took a second slice, labeled
and newfsed it, then cvsup'ed -current sources onto what would
eventually be /usr/src. Build and install that with DESTDIR set to
/mnt. There was one last bit to do to install /boot/loader, but that
was pretty much it.

> > > Then, will, bootEZ will see both FreeBSD partitions, and allow booting
> > > either? This I haven't found an answer to.
> > It should see them both, but it will label them both as "FreeBSD". I
> > installed Grub so I could label them as "FreeBSD Current" and "FreeBSD
> > Stable".
> That's fine; vague is better. I plan on using this strategy to do major
> upgrades into the future, so the labels would change again, and again...

Changing them with Grub is trivial. You just edit /boot/grub/menu.lst.

> But that raises another question: Do I keep the existing boot loader
> in place, or do I add it [again] with the new OS? It pro'lly doesn't
> matter either way, does it?

It probably doesn't matter. Installing the new one will get a newer
version, assuming they aren't identical.

> > > > Furthermore, can either then mount the other slices' partitions?
> > > I cannot see why not, unless trying to write to ad0s1 from ad0s2 screws
> > > up due to ad0s1 having DIRPREFS and ad0s2 not? Anyone?
> > No problems at all. You can even have them both use the same swap
> > partition to save a little space.
> Can it be done retroactively? I plan to upgrade the RAM when I install
> the new OS. The swap partition for the current OS will then be "too
> small"; is it as simple as changing the swap device in the current OS's
> /etc/fstab, ads02b, to the new OS's swap device, ad0s1b, and reboot?

Yup, that would work. I think I actually edited the /etc/fstab for
-current while running -stable, but that's neither here nor there.

> Then, can I reclaim ad0s2b (the current swap) by simply changing it's
> label to ad0s2SOMETHING with 'disklabel', and 'newfs' it?

Actually, you edit ad0s2's label with disklabel, but yeah, that's
it. If swap immediately follows root, you can add it to your root
partition - making it start at the same point but be larger - then use
"growfs" to add the new space in the partition to the file system.

	<mike
--
Mike Meyer <mwm@mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15395.65527.65231.234995>