[Nix-dev] systemd in initrd

Luca Bruno lethalman88 at gmail.com
Sat Aug 30 01:50:35 CEST 2014


You didn't think I gave up, right?

I've created another branch, systemd2 [1] as an attempt to run nixos
stage-2 as initrd service, and pass the ball to systemd on the new root
directly.
So systemd/initrd -> stage 2 as service -> systemctl switch-root -> systemd.

PROBLEM: running nixos/tests/simple.nix reveals huge timeouts waiting for
devices at the end [2]
That breaks the qemu nixos backdoor and everything else. Suggestions on
what could be the cause accepted :)
Also what could be the reason systemd stops printing the cool [ OK ]
messages?

Hint: to run stage 2 in /sysroot I do some bind mounts [3] which may seem
broken but couldn't get to that point otherwise :(

[1] https://github.com/lethalman/nixpkgs/tree/systemd2
[2] http://paste.debian.net/118298/
[3]
https://github.com/lethalman/nixpkgs/blob/systemd2/nixos/modules/system/boot/stage-1.nix#L406


On Tue, Aug 26, 2014 at 10:06 AM, Luca Bruno <lethalman88 at gmail.com> wrote:

> The reply[1] by Poettering suggests that the activation process (stage-2)
> should run as an initrd service, and then the init of stage-2 should be
> directly systemd, in order to run systemd as continuum from stage-1 to
> stage-2.
>
> initrd -> activation service -> switch-root -> systemd
>
> This raises a couple of problems:
> 1) Our stage-2 currently assumes the root has been switched already.
> Perhaps RootDirectory may help to run the activation in the new root.
> 2) In case the initrd is not used (e.g. for containers), we shall still
> provide the current stage-2 script, which might be in common with the
> initrd service (minus the exec systemd at the end of the stage-2).
>
> [1]
> http://lists.freedesktop.org/archives/systemd-devel/2014-August/022514.html
>



-- 
www.debian.org - The Universal Operating System
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20140830/74a2e524/attachment-0001.html 


More information about the nix-dev mailing list