Subject: Re: PATCH: init(8) - multiuser under chroot
To: Jachym Holecek <>
From: Lubomir Sedlacik <>
List: tech-userlevel
Date: 05/17/2005 00:11:57
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable


On Sun, May 15, 2005 at 11:32:51PM +0200, Jachym Holecek wrote:
> The patch below implements this by having init(8) create and watch the
> "init.root" sysctl node (more details follow in the init.8 part of
> diff):
>   * In multi-user boot, /etc/rc is run and waited for as usual.
>     If value of the "init.root" sysctl node is not equal to "/" after
>     that, /etc/rc will be run inside a chroot(2) indicated by sysctl.
>     [That is: we'll run ${init.root}/etc/rc under chroot.]
>   * Set up ttys as specified in ttys(5). If we did a successful chroot
>     during multi-user boot, each getty(8) process will be run in the same
>     chroot(2) path as /etc/rc did (that is, the value of ``init.root''
>     sysctl is not re-read).
> <snip>
> Lubomir Sedlacik suggested the approach and has been testing the
> implementation for two or three weeks now.

it was actually Matt Thomas who suggested this way of attacking the
problem.  i discussed it further with him later and this was the result
of simplifying his original proposal (which involved three sysctls).

> What do people think?

well, i am obviously biased since it works very well for me and i am
now able to have / file system on cgd(4).  i plan to document my setup
and provide build scripts for the initial md(4) for those interested.

what do others think?  is this feature worth having in the base system?


-- Lubomir Sedlacik <salo@{NetBSD,Xtrmntr,silcnet}.org>   --

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.2.6 (NetBSD)