Subject: Re: Two NetBSDs on one (i386) drive
To: Robert Elz <kre@munnari.OZ.AU>
From: Christopher Vance <email@example.com>
Date: 12/20/2001 17:45:28
On Wed, Dec 19, 2001 at 07:45:05PM +0700, Robert Elz wrote:
: I'd like to be able to have two distinct NetBSD setups on one i386
FreeBSD allows this now, changing quite some time ago from wd<n>[a-h]
to wd<n>s<m>[a-h] (and then to ad<n>s<m>[a-h]). It's quite possible
to distinguish ad0s2a from ad0s4a. (Only FreeBSD slices use [a-h], so
MS Windows might be on ad0s9, or some such.) FreeBSD has a separate
disklabel in each slice, and only use sector offsets relative to their
I guess FreeBSD's concentration on x86 allows such an incompatible
change, while other *BSDs remain more cautious to retain consistency
with other architectures.
: If there is prior art, from some other boot system, in how to pass this
: info through, then it would be good to copy it of course - that way people
: who use that other boot system instead of NetBSD's mbr code would win as well.
I'm not sure whether FreeBSD's use of multistage booting is partly due
to running out of space in the boot sector, such as this change may
have contributed to, or whether it was purely from a desire to add
functionality like module preloading, etc. Most of the extra smarts
are in /boot/loader.
You can still boot a kernel directly from earlier boot stages instead
of going through /boot/loader, but I'm not sure whether you lose the
ability to choose slices. (I'm at work, using L*x rather than *BSD,
and can't check right now.)
Note, I'm not suggesting NetBSD follow FreeBSD down this path, merely
attempting to answer kre's question above. I'd like kre's requested
flexibility, but I'm not suggesting FreeBSD's answer is best, or even
I'm about to install all three BSDs onto a big disk, and want to be
able to create a bunch of additional slices when I first partition the
disk, without necessarily choosing up front which OS gets how many.
(I guess NetBSD uses one disklabel for the whole physical disk, like
OpenBSD - I hadn't actually thought about that before, as my current
NetBSD machine does nothing but NetBSD, anyway.) I guess I just
change the fstype in the existing disklabel, run newfs, change fstab,
and maybe update some other OSs' disklabels to match.
It seems mbrlabel can read information about slices in the "extended
partition". Does NetBSD's fdisk allow creation and modification of
these slices, or do I just use L*x or another *BSD for this? (The
online man page for fdisk in -current doesn't seem to say anything