From a333f7212e4a079a5c6d26bfcb7c933e02ce01b1 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sat, 3 Nov 2012 05:41:46 +0100 Subject: systemd: Fail if kernel features are missing. This has rendered my system unbootable, because I forgot to enable AUTOFS4 in my custom kernel. In addition to AUTOFS4, this includes (hopefully) all other kernel features needed by systemd, as listed in the README: REQUIREMENTS: Linux kernel >= 2.6.39 with devtmpfs with cgroups (but it's OK to disable all controllers) optional but strongly recommended: autofs4, ipv6 Autofs4 is not a requirement here, but in our case it turns out that the system is not able to boot properly with a LUKS-enabled system (or at least not on _my_ system). Signed-off-by: aszlig --- modules/system/boot/systemd.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/system') diff --git a/modules/system/boot/systemd.nix b/modules/system/boot/systemd.nix index 340a6d80c1c..e76d35fa9f2 100644 --- a/modules/system/boot/systemd.nix +++ b/modules/system/boot/systemd.nix @@ -453,6 +453,8 @@ in // mapAttrs' (n: v: nameValuePair "${n}.service" (serviceToUnit n v)) cfg.services // mapAttrs' (n: v: nameValuePair "${n}.socket" (socketToUnit n v)) cfg.sockets; + system.requiredKernelConfig = map config.lib.kernelConfig.isEnabled [ + "CGROUPS" "AUTOFS4_FS" "DEVTMPFS" + ]; }; - } -- cgit 1.4.1