From 5d7a6327b798140557628a4beb43f3c23fe2d2f3 Mon Sep 17 00:00:00 2001 From: beatzaplenty Date: Wed, 22 Jul 2026 03:47:54 +0000 Subject: [PATCH] Allow initrd emergency shell access on baremetal-gui The systemd-based initrd (default here, since this host has a ZFS root) locks the root account by default, so sulogin refuses a shell if something in the initrd fails and it drops to emergency mode -- confirmed live: it just loops re-entering the target instead of prompting, making an initrd-level ZFS import failure impossible to diagnose from the console. Only affects the pre-switch-root initrd shell, not the installed system's own login. --- modules/platforms/baremetal.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/platforms/baremetal.nix b/modules/platforms/baremetal.nix index 081609c..cd305b1 100644 --- a/modules/platforms/baremetal.nix +++ b/modules/platforms/baremetal.nix @@ -25,4 +25,14 @@ enable = true; enable32Bit = true; }; + + # The systemd-based initrd (default here since this host has a ZFS root -- + # see modules/disko/baremetal.nix) locks the root account by default, so + # sulogin refuses to hand over a shell if something in the initrd (e.g. + # the ZFS pool import) fails and it drops to emergency mode -- confirmed + # live: it just loops re-entering the target instead of prompting. This + # only affects the pre-switch-root initrd shell, not the installed + # system's own login, and is worth the tradeoff on a box already reachable + # at the physical console. + boot.initrd.systemd.emergencyAccess = true; }