[Nix-dev] systemd in initrd

Luca Bruno lethalman88 at gmail.com
Fri Sep 12 02:16:24 CEST 2014


Some more progress.

Mounts are now autogenerated as .mount in the initrd. This allows for fine
grained dependencies and thus parallelism. In addition, "auto" file systems
are being automatically probed with blkid like the old stage-1.sh did,
except also in parallel.
Probing involves creating a /run/systemd/system/foo.mount.d/fsprobe.conf
override with Type= [1]. After all probes have completed, systemd is
reloaded to read the new .mount Type and "auto" file systems can be mounted.

I've added additional fileSystems options: mountBefore and mountAfter, to
specify before and after mountpoints. It's also possible to specify
services with fileSystems.<mountpoint>.systemdConfig, not usually needed
though.
An example of mountAfter usage can be found here[2].

After those big changes, the simple installer seems to run fine.

Next step is to port crypto devices.

Best regards,

[1]
https://github.com/lethalman/nixpkgs/blob/systemd/nixos/modules/system/boot/systemd-fsprobe.sh
[2]
https://github.com/lethalman/nixpkgs/blob/systemd/nixos/modules/installer/cd-dvd/iso-image.nix#L197
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20140912/0b0f21ed/attachment.html 


More information about the nix-dev mailing list