From c9fecb18349804f463c24b6dc1fa6bf5c51dd341 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 16 Nov 2026 02:30:13 +0000 Subject: 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. --- default.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'default.nix') 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."/" = { -- cgit v1.3.1