From 4586810487f8579959f5df575e404226e6d1ab87 Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Tue, 22 Sep 2020 15:33:21 -0700 Subject: [PATCH] nixos/stage-1: set up /dev/fd Otherwise, stage-2-init.sh will complain about not having access to /dev/fd/62 as of systemd v246. On IRC, flokli said: 15:14 cole-h: hmmm... I could imagine some of the setup inside /dev has been moved into other parts of systemd 15:14 And given we run systemd much later (outside initramfs only) it doesn't work properly here 15:17 We probably don't invoke udev correctly --- nixos/modules/system/boot/stage-1-init.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/system/boot/stage-1-init.sh b/nixos/modules/system/boot/stage-1-init.sh index 0c1be71cf53..f7c2940049e 100644 --- a/nixos/modules/system/boot/stage-1-init.sh +++ b/nixos/modules/system/boot/stage-1-init.sh @@ -218,6 +218,7 @@ done # Create device nodes in /dev. @preDeviceCommands@ echo "running udev..." +ln -sfn /proc/self/fd /dev/fd mkdir -p /etc/systemd ln -sfn @linkUnits@ /etc/systemd/network mkdir -p /etc/udev