aboutsummaryrefslogtreecommitdiffstats
path: root/default.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-16 02:30:13 +0000
committertv <tv@krebsco.de>2026-11-16 02:30:13 +0000
commitc9fecb18349804f463c24b6dc1fa6bf5c51dd341 (patch)
tree7562d0dcb9f7361ac0440e651fa4d7102fd8c5c3 /default.nix
parentc572066f87d0eda6e236373a451d15b24365b666 (diff)
disable systemd's mount rate limit
systemd processes at most 5 mount events per second (see src/core/mount.c). Booting from a tmpfs root with an erofs store and an overlay /etc exceeds that, and each time the next mount waits for the next one-second window. The boot journal shows three such stalls, two of them exactly one second apart: [0.789652] Finished Virtual Console Setup. [1.588264] Mounting /sysroot... [1.675477] initrd-parse-etc.service: Triggering OnSuccess= dependencies. [2.588523] Mounting /run/nixos-etc-metadata... [3.799810] Finished Virtual Console Setup. [4.446154] Mounting /run/wrappers... The limit can be overridden via PID 1's environment, which the kernel populates from unrecognized command line parameters. A burst of 0 disables it. systemd passes its original environment on when switching root, so this covers the initrd and stage 2.
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/default.nix b/default.nix
index 043c874..a05c0cb 100644
--- a/default.nix
+++ b/default.nix
@@ -20,6 +20,9 @@ let
boot.kernelParams = [
"console=ttyS0" "reboot=k" "panic=1"
"8250.nr_uarts=1" # only ttyS0 exists (stops 0x2f8/0x3e8/0x2e8 probing)
+ # Passed to (initrd and stage 2) systemd's environment. Disables the
+ # rate limit of 5 mount events per second, which stalls the boot.
+ "SYSTEMD_DEFAULT_MOUNT_RATE_LIMIT_BURST=0"
];
fileSystems."/" = {