Date: Sat, 21 Jul 2001 12:54:10 -0700 (PDT) From: John Polstra <jdp@polstra.com> To: hackers@freebsd.org Subject: Re: dual booting -stable & -current Message-ID: <200107211954.f6LJsAk34902@vashon.polstra.com> In-Reply-To: <20010720210609.A53370@dragon.nuxi.com> References: <20010720183229.A9022@freebie.xs4all.nl> <20010720210609.A53370@dragon.nuxi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <20010720210609.A53370@dragon.nuxi.com>, David O'Brien <freebsd-hackers@FreeBSD.ORG> 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 jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107211954.f6LJsAk34902>