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

hi,

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):
>=20
>   * In multi-user boot, /etc/rc is run and waited for as usual.
>=20
>     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.]
>=20
>   * 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>
>=20
> 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?


regards,

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

--C7wSVvjdhopu+7bZ
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iD8DBQFCiRqtiwjDDlS8cmMRAmsVAJ0eVhqGsRVgwyQyS5kuYiDFuLs89ACeLfIR
Qi++2urydx8lpDbJNqT13Dk=
=BFBk
-----END PGP SIGNATURE-----

--C7wSVvjdhopu+7bZ--