How can I set up silent boot?

Hi,

I would like to know how to set up “silent boot”.

I’ve tried it with
boot.kernelParams = [ "quiet" ] in my hardware-configuration.nix.

I can see that in the generated /boot/grub/grub.cfg quiet was added like this:
...f142e001b/init quiet loglevel=4
but the boot output is still verbose. I think I had the same problem on an other distro and resolved it with changing the parameter order. Is this the same problem and if it is, how can I remove loglevel to add it with boot.kernelParams?

Thanks

Have you tried programs.plymouth.enable = true? I haven’t tried it yet, but supposedly it hides all boot messages behind a blank screen with the nix logo and a loading animation.

I think it is boot.plymouth.enable = true;

2 Likes

I’ve found plymouth doesn’t work well on nixos. It’s started in stage 2, so you still get console output from stage 1 before switching to plymouth for a very short time.

4 Likes

We echo some things to the screen in stage 1 which plymoth cannot hide. I have some local patches that hide them on workstations but it really needs to be turned into a proper option - right now it’s just a hack. But if somebody would like to do implement that properly, that would be awesome.

The proper thing is to start plymouth earlier in stage 1.

It’d be neat to see absolutely no output. I bet it isn’t hard? Just someone has to make a PR to remove output? Can we make it so that if esc is pressed then it shows output, or something?

1 Like

It’d be neat to see absolutely no output. I bet it isn’t hard? Just someone has to make a PR to remove output? Can we make it so that if esc is pressed then it shows output, or something?

Famous last words :slight_smile:

Hiding the output and showing it if you push esc is a large part of what plymouth does, so it’s “merely” a matter of starting it earlier. However, the boot process is not all that simple, and it’s very annoying for people if you screw it up.

One constraint is that we currently start plymouth after the LUKS passphrase screen would be shown (so it doesn’t cover it up). So any change to show it earlier would have to make sure that people can still unlock their filesystems.

Plymouth supports showing a password prompt. This is how a lot of distros do it.

1 Like

I know I am probably alone in this, but I don’t see the appeal of suppressing the informational messages that appear at boot. I often notice something red when I watch my machine boot and get a hint that I need to look into it.

Also, modern machines boot so fast that there is barely time to display the bootsplash anyway.

Just my personal perspective.

A setting that makes the splash show the output when there are errors would be nice. But if there’s no errors I’d prefer the pleasant experience (it’s something I can customize and enjoy while booting).

I really like Android and ChromeOS boot experiences.

2 Likes

This is why my interactiveShellInit reports systemd unit failures. Every time I open a terminal, I’m told about failures in my system. (I also have it show me loadavg and failing ZFS pools).