coreos/rocket — pull request #149 by vcaputo (2014-12-02 02:03:15+00:00)
Title: stage1: lessen systemd-nspawn dependency on host runtime

* Introduces "/fakesdboot.so" shim for intercepting lstat of
"/run/systemd/system" in stage1 rootfs
* LD_PRELOAD=fakesdboot.so in stage1 systemd-nspawn execution
* LD_LIBRARY_PATH=usr/lib of stage1 so we use stage1 libs
* explicitly use stage1 ld-linux interpreter in executing
systemd-nspawn

It would be tidier to just chroot into stage1's rootfs before
executing /init, but then we'd need to wrangle the bind mount
source paths into the chroot beforehand.

I'm leaning towards just rolling the systemd-nspawn
functionality we actually desire into the statically-linked
/init and remove systemd-nspawn from the bootstrap altogether as
the next step.