Subject: Re: PATCH: init(8) - multiuser under chroot
To: Alan Barrett <apb@cequrux.com>
From: Simon J. Gerraty <sjg@crufty.net>
List: tech-userlevel
Date: 09/03/2005 14:10:56
> a) don't chroot anything.
> b) init never chroots itself, but does run /etc/rc in a chroot,
Unless someone has fixed a bunch of stuff in the kernel, then at least
the part of /etc/rc that handles fsck / and mounting it rw, needs to be
unchrooted. For this purpose I don't run /etc/rc chroot'd, but move the
bulk of the functionality to a separate rc (rc.chroot), then /etc/rc runs
that chroot'd (using the value of $CHROOT passed from init) after
making / writable.
> d) init chroots itself, and then execs /sbin/init inside the
> chroot.
This is a bit like what I do but the chroot is done in the "real" init.
--sjg