[systemd-devel] [HEADS-UP] systemd and Storage Daemons for the Root File System
Kay Sievers
kay.sievers at vrfy.org
Wed Jan 11 07:39:48 PST 2012
On Wed, Jan 11, 2012 at 16:04, Jan Engelhardt <jengelh at medozas.de> wrote:
> Therefore you can detect which programs where started inside the rootfs
> vfsmount. That information can then influence killing decisions as
> needed.
>
> Now, Kay Sievers claims (on IRC) pivot_root is "10 years ago stuff" and
> points to util-linux's switchroot function for how things are supposedly
> to be done today. But, as we look at
> http://git.kernel.org/?p=utils/util-linux/util-linux.git;a=blob;f=sys-utils/switch_root.c;hb=HEAD#l150
> what can really be seen there is that the new root (/dev/sda3 in my
> previous commands example) is just mounted atop the rootfs-type
> vfsmount, thereby concealing it.
> (That is not a replacement for what pivot_root does, really.)
As far as I understand, the kernels own initial namespace, the
initramfs where the cpio image is extracted to at bootup or the root=
device is mounted to by the kernel, can not be replaced by
pivot_root(), then same way it can not be umounted.
For that reason, pivot_root during bootup is still 10 years old
material, from the time we used initrd, which can be pivot_root()ed. I
don't think any of the stuff above does matter here, it just can not
be used.
Kay
More information about the systemd-devel
mailing list