DragonFly BSD
DragonFly users List (threaded) for 2004-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Making a bootable multi-OS DVD with bootmanager

From: Oliver Fromme <olli@xxxxxxxxxxxxxxxxxx>
Date: 17 Nov 2004 15:19:37 GMT

Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx> wrote:
 > On Mon, Nov 15, 2004 at 01:06:18PM +0000, Oliver Fromme wrote:
 > > Is there a way to let the DragonFly install CD perform a
 > > chroot() very early in the game, possibly even before the
 > > kernel spawns the init process?  That would be extremely
 > > helpful, because I could put all of the DragonFly related
 > > files into a subdirectory on the DVD and let it chroot()
 > > into that directory, without colliding with anything else
 > > on the DVD.
 > I don't think I want to hack the kernel for this, but
 > teaching init to do a chroot early should be easy. The biggest
 > problem is that IIRC you can't create devices from within a
 > chroot, which means changes to the installer. Or a hack
 > in the boot kernel to allow this :)

I'm pretty sure that mknod works fine in a chroot
(not in a jail, though).  So that shouldn't be a

Hm.  Thinking about it, it should be really easy:
Patch init to optionally perform a chroot() at the
very beginning (this could be selectable with a
sysctl variable that can be set by the loader).
Then you can simply set that sysctl in loader.conf,
set init_path to /dragonfly/sbin/init (or whatever
the chroot is), and everything should run from that
chroot, making it possible to share the FS with
different operating systems (or different versions
of the same OS).  Clean and simple solution.  Or
did I overlook anything?

When (and if) I get a bit of free time, I might give
it a try to make that patch to init myself.  However,
it's too late for this particular DVD that I'm pre-
paring right now.

Thanks for the input and suggestions, Joerg!  This
is all very interesting.

Best regards

Oliver Fromme, Konrad-Celtis-Str. 72, 81369 Munich, Germany

``All that we see or seem is just a dream within a dream.''
(E. A. Poe)

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]