I’m trying to setup a silent boot sequence: I want to go straight from systemd-boot prompt to a login prompt with no intervening text.
Here’s are the relevant lines of /etc/nixos/configuration.nix
:
{
# ...
# Configure booting.
boot = {
# Stay up-to-date on the kernel.
kernelPackages = pkgs.linuxPackages_latest;
loader = {
systemd-boot.editor = false;
# Use the systemd-boot EFI boot loader.
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
# Silent Boot
# https://wiki.archlinux.org/title/Silent_boot
kernelParams = [
"quiet"
"splash"
"vga=current"
"rd.systemd.show_status=false"
"rd.udev.log_level=3"
"udev.log_priority=3"
];
consoleLogLevel = 0;
# https://github.com/NixOS/nixpkgs/pull/108294
initrd.verbose = false;
};
Also relevant:
$ nix-info -m
- system: `"x86_64-linux"`
- host os: `Linux 5.13.13, NixOS, 21.11 (Porcupine)`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.3.15`
- channels(rule): `"home-manager, nixos-21.11pre312125.21c937f8cb1"`
- channels(root): `"nixos-21.11pre312335.8d8a28b47b7"`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
With this configuration, I see these lines during boot:
setfont: KDFONTOP: Function not implemented
checking /dev/disk/by-uuid/06ec4e80-17e2-4a26-abc6-f829b36aac96...
fsck (busybox 1.33.1)
[fsck.ext4 (1) -- /mnt/root/] fsck.ext4 -a /dev/disk/by-uuid/06ec4e80-17e2-4a26-
nixos: clean, 2763324/61956096 files, 21927677/247822080 blocks
<<< NixOS Stage 2 >>>
running activation script...
setting up /etc...
starting systemd...
The first five lines look like they occur inside the initrd/initramfs (apparently, it’s an initramfs called initrd).
The Stage 2 lines are a bit of a surprise, because I have boot.initrd.verbse = false;
, but that was added by nixpkgs #108294 and silences NixOS Stage 1, but seemingly not Stage 2.
I’d prefer not to use Plymouth. I tried it, but for some reason, it didn’t appear during boot and was causing my system to hang during shutdown.
Any ideas for silencing either of these blocks of text?
Thanks!
P.S. These blocks of text disappear and reappear a couple times during the boot sequence and change size as they do so. I might be more willing to allow a non-silent boot sequence if messages stayed on screen throughout, so ideas to eliminate that issue are also welcome