FreeSBIE + FreeBSD on the same CD/DVD?

Dario Freni saturnero at
Wed May 17 23:32:42 CEST 2006

Oliver Fromme wrote:
> Hi,
> I'm sorry if this has been asked before, but I haven't
> found it in the online FAQ document.

Hi, sorry about the late response. I came back yesterday from Canada and
today was a busy day.

> I would like to put FreeSBIE and the "official" FreeBSD
> distribution (i.e. install and fixit) on the same DVD,
> so that both of them can be booted alternatively.
> I'm aware of a few problems that are involved, and I
> think those can be solved.  But before I'm spending a
> lot of time and efforts, I would like to hear if anybody
> else has tried that before, and if there are any other
> problems to be expected which I'm not aware of yet.

AFAIK, no.

> First, a boot manager is required.  I've tried several
> ones including GRUB and GAG, but none of them was able
> to chainload eltorito boot loaders from ISO9660 images.
> So I had to write my own one, which works well.  It has
> already been used for a DVD that includes all four BSD
> systems (Free, Net, Open, DF).  If you're interested,
> here are some docs:
> There's also a (hypothetical) boot script for a mixed
> FreeBSD + FreeSBIE disc (as explained above), but it's
> just theory so far.  :-)

This is very cool!

> (Of course, a different approach would be to boot both
> systems from the same /boot/beastie.4th menu, but that
> would be more difficult, not easy to maintain, and less
> flexible.  Also, I don't want FreeSBIE to be only a
> menu entry in the FreeBSD boot loader.  I would rather
> prefer both to be on an equal footing and independent
> from each others boot infrastructure.)


> The second problem is that both FreeBSD + FreeSBIE use
> the /boot directory for the whole boot infrastructure.
> However, I think it should be possible to hack the
> sources so that either of the two uses a different
> directory name, so there's no collision.  (I have not
> tried that yet, but I think it shouldn't be too
> difficult.)
> The third problem is that both the FreeBSD "fixit" stuff
> and FreeSBIE use a complete base system layout on the
> CD (or DVD), i.e. /usr, /bin etc.   That might be more
> difficult to solve.
> In the past I had the same problem when I put DragonFly
> BSD and FreeBSD on the same CD, because DragonFly also
> uses a life file system.  I solved that problem py patching
> /sbin/init of dragonfly, so it does a chroot(2) into a
> subdirectory of the CD.  So the whole DragonFly life file
> system runs from a subdirectory (called /dragonfly), so
> there is no collision with the FreeBSD fixit stuff.
> (That patch now is even officially integrated in the
> DragonFly source repository.  The chroot directory can
> be enabled and selected by the loader script, using a
> kenv(2) variable.)
> Now I wonder if the same approach would work for FreeSBIE?

Is that patch backportable to FreeBSD? This *could* be working also for
FreeBSD. The only missing stuff that I can imagine is the devfs, which
should also be mounted under the chroot.

> Also, are there any other problems that I'm going to face?
> In particular, FreeSBIE seems to perform various mounts
> itself from its start scripts.  Any chroot subdirectory
> would have to be taken into account there, too, which may
> be difficult.  I'm currently unsure how to proceed here.

This should not be a problem under the chroot, assuming devfs is mounted.

> Any hints, ideas and suggestions are greatly appreciated.

Have you considered hacking the FreeBSD sysinstall? The FreeBSD
sysinstall is launched instead of /sbin/init when the mfsroot is mounted
during the bootup. So it can be trivial to set/unset the mfsroot
variable (normally located in loader.conf) from the 4th program or even
as kenv.

The only part that need investigation should be mounting the FreeBSD
install relative path under /mnt (I'm assuming this is the path where CD
device is mounted when installing from CD) instead of the entire cd
image. This is in theory easily doable mounting the CD device under
/tmp/something and then mount /tmp/something/FreeBSD-install under /mnt
with nullfs (or, worse, doing a symlink on the fly, possible in the mfs

Do you consider this easier to do?

Dario Freni (saturnero at
FreeSBIE developer (
GPG Public key at

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 186 bytes
Desc: OpenPGP digital signature
Url :

More information about the FreeSBIE mailing list