DragonFly kernel List (threaded) for 2013-03
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: DragonFly 3.4 release planning
Here's a solution that I think I could live with, tell me what
you guys think:
We leverage the distinction between our boot and root mounts. As people
know, most DFly installations have a separate UFS /boot partition.
We would make /bin and /sbin dynamic, but for single-user-mode booting
the system would have a /boot/rescue directory tree, build appropriate
infrastructure under it using tmpfs mounts, and chroot into that.
Thus we would have a statically-built /boot/rescue/bin, /boot/rescue/sbin,
minimal infrastructure in /boot/rescue/etc, and a tmpfs mount for
/boot/rescue/etc (copy-over), /boot/rescue/var, /boot/rescue/tmp, and
/boot/rescue/var/tmp. Plus /boot/rescue/boot would be a null-mount
from the original /boot to keep that accessible.
--
In terms of handling this environment, if a 's'ingle user boot is
requested the kernel would mount /boot and chroot into /boot/rescue
and exec /sbin/init from the chroot instead of mounting the normal
root and execing /sbin/init from the normal root.
/boot/rescue/etc/rc would then handle building and chrooting into
the single-user environment.
--
The work involved would be fairly straight-forward I think. We would
adjust buildworld to build most of /sbin and /bin dynamic, and we
would adjust the build code in /usr/src/sys/boot to build the
/boot/rescue stuff (including a static bin and sbin for it) along with
the other /boot stuff that it already does.
The only real coding would be the kernel root mount, to make it mount
the /boot partition instead of the root partition. It could modify
the root path from 'd' and 'a' for that purpose and issue the chroot,
plus accept an appropriate tunable to allow the /boot partition to be
specified... not difficult at all.
We might still want a few things in the normal /sbin and/or /bin to be
statically built for performance purposes, but that could be discussed
later. 'resident' could probably be used to make those things perform
anyway. We might still need the normal /sbin/init to be statically built
as well, not sure.
-Matt
Matthew Dillon
<dillon@backplane.com>
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]