[klibc] [PATCH 6/8] switch_root: Fix single file mounts
Karel Zak
kzak at redhat.com
Tue Aug 2 01:41:15 PDT 2011
On Mon, Aug 01, 2011 at 01:38:38PM -0700, H. Peter Anvin wrote:
> > The other open question is the move mounting of /dev, /proc, /sys to
> > /newroot (with an Google bug in their rc scripts not handling this case).
> > switch_root in util-linux does it.
>
> OK, now you actually have *three* ways to handle directories in the old
> root: move them, unmount them, or ignore them! I really dislike having
You have full control on the mountpoints in your initramfs before you
call the switch_root utility. You can move, umount or whatever.
IMHO the most important switch_root functionality is the move to the
newroot and old root clean up. I can imagine switch_root
implementation without the mount-move of the /dev, /proc and /sys
directories at all.
> a hardcoded list of what to treat how; at least one that the user can't
> override.
For long time we have in util-linux TODO list:
- move all mountpoints to the newroot (there are hardcoded /proc /sys and /dev paths now)
- add --dont-move[=<list of dirs>] options
but I haven't found motivation and time to implement it ... nobody
asked for the features :-)
Karel
--
Karel Zak <kzak at redhat.com>
http://karelzak.blogspot.com
More information about the klibc
mailing list