| 1.3 |
| 18-Apr-2006 |
salo | Add support for running multi-user in a chroot() environment.
How it works:
- after successful execution of /etc/rc, check the value of "init.root" sysctl node, if it's different than "/", chroot() into its value and run /etc/rc inside the chroot(),
- in single-user, return back to the original / file system.
Allows running with / file system on e.g., cgd(4), vnd(4) or ccd(4) volumes.
Idea first discussed with Matt Thomas, implemented by Jachym Holecek <freza (at) liberouter.org> with some nitpicks by me. Successfully used by me for almost a year with / on a cgd(4) volume (for more information about the setup check ftp://ftp.NetBSD.org/pub/NetBSD/misc/salo/init-chroot/ ).
|