In article <[EMAIL PROTECTED]>,
David O'Brien <[EMAIL PROTECTED]> wrote:
> On Fri, Jul 20, 2001 at 06:32:29PM +0200, Wilko Bulte wrote:
> > I'm probably completely dim today so please bear with me :/
> > Thing is I want to setup a dual-boot box, running -stable & -current.
> > This box, a P2/266 has a 30G IDE disk.
> >
> > What I did is create
> > ad0s1 -> 256MB -> holds root for -stable
> > ad0s2 -> 256MB -> was supposed to hold root for -current
> > ad0s3 -> roughly 14G holds tmp,var,usr,usr/obj for -stable
> > ad0s4 -> ditto for -current
>
> You are getting bit by the "root" aliasing code (IIRC this is the right
> way to describe the problem). This makes it impossible to install
> multiple copies of FreeBSD on a single disk w/o hacking around the
> system. :-(
>
> The way to do this, is 1st install -stable.
> Create all four slices in the disk slice editor. In the label editor, do
> your normal thing, but don't bother doing anything with ad0s2. Continue
> with install as usual.
>
> Boot again from CDROM or floppies and enter the slice editor. Change the
> partition type of ad0s1 from 165 (FreeBSD FFS) to something else. Write
> this change to disk and exit from sysinstall.
[...]
The other way to do it is to install both -current and -stable on
the same slice, but in different partitions within the slice. That
works even on the Alpha, which doesn't have slices. For example, my
dual-boot Alpha is set up like this:
da0a / and /usr and /var for -current
da0b swap for both -current and -stable
da0e /a (user files) for both -current and -stable
da0f / and /usr and /var for -stable
da0g /c (user files) for both -current and -stable
By default this boots into -current. If I want to boot stable, I
press a key while the loader's spinner is spinning, and then type:
unload
set currdev="disk0f"
set module_path="/modules"
boot /kernel
Of course if you want to boot into -stable by default, you can put
this into your /boot/loader.conf file:
currdev="disk0f"
bootfile="/kernel"
module_path="/modules"
Note, this stuff should go into -current's /boot/loader.conf, because
current's loader is used even when booting -stable. You should make
sure you arrange things so that the "a" partition holds -current's
root filesystem rather than -stable's. The theory here is that
-current's loader is more likely to be able to load -stable than vice
versa. (This may not matter as much on the i386, but it seems to be
important on the Alpha.)
(If it seems like I have some minor details wrong in the above, I
probably do. Things have been changing fast in -current.)
Then you just have to set up your /etc/fstab files right for each
system. In my case, -current's looks like this (irrelevant lines
omitted):
/dev/da0b none swap sw 0 0
/dev/da0a / ufs rw 1 1
/dev/da0f /stable ufs rw 2 2
/dev/da0e /a ufs rw 2 2
/dev/da0g /c ufs rw 2 2
and -stable's looks like this:
/dev/da0b none swap sw 0 0
/dev/da0f / ufs rw 1 1
/dev/da0a /current ufs rw 2 2
/dev/da0e /a ufs rw 2 2
/dev/da0g /c ufs rw 2 2
In each case the other system's root filesystem is mounted as
"/stable" or "/current" so you can tweak one system from the other.
This is particularly handy on the Alpha, where -current periodically
falls on its spear and makes a bloody mess.
John
--
John Polstra [EMAIL PROTECTED]
John D. Polstra & Co., Inc. Seattle, Washington USA
"Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message