Difference between revisions of "Silent boot"

From ArchWiki
Jump to: navigation, search
m (tweaks)
(improved a bit, please remove those greps)
Line 6: Line 6:
 
Your /boot/syslinux/syslinux.cfg should look something like:
 
Your /boot/syslinux/syslinux.cfg should look something like:
  
    $ grep APPEND /boot/syslinux/syslinux.cfg | head -n1
+
$ grep APPEND /boot/syslinux/syslinux.cfg | head -n1
    APPEND root=/dev/sda1 ro 5 init=/usr/lib/systemd/systemd quiet vga=current
+
APPEND root=/dev/sda1 ro 5 init=/usr/lib/systemd/systemd quiet vga=current
  
vga=current is the ''kernel argument'' that avoid weird behaviour like [https://bugs.archlinux.org/task/32309 flash grey].
+
vga=current is the kernel argument that avoid weird behaviours like [https://bugs.archlinux.org/task/32309 flash grey].
  
 
Configure your systemd getty service as described upon [[Automatic_login_to_virtual_console]].
 
Configure your systemd getty service as described upon [[Automatic_login_to_virtual_console]].
Line 18: Line 18:
 
To remove lastlog message you need to comment out ''lastlog'' in /etc/pam.d/login:
 
To remove lastlog message you need to comment out ''lastlog'' in /etc/pam.d/login:
  
    #session                optional        pam_lastlog.so
+
#session                optional        pam_lastlog.so
  
To hide any kernel messages from the console use [http://unix.stackexchange.com/a/45525/27433 this tip]:
+
To hide any kernel messages from the console add or modify the ''kernel.printk'' line like the [http://unix.stackexchange.com/a/45525/27433 following]:
  
    $ grep ^kernel.printk /etc/sysctl.conf  
+
$ grep ^kernel.printk /etc/sysctl.conf  
    kernel.printk = 3 3 3 3
+
kernel.printk = 3 3 3 3
  
 
To hide startx messages, you could redirect its output to /dev/null, like so:
 
To hide startx messages, you could redirect its output to /dev/null, like so:
  
    [[ $(fgconsole 2>/dev/null) == 1 ]] && exec startx -- vt1 &> /dev/null
+
[[ $(fgconsole 2>/dev/null) == 1 ]] && exec startx -- vt1 &> /dev/null
  
 
Outstanding Issues:
 
Outstanding Issues:
 
* [https://bugs.freedesktop.org/show_bug.cgi?id=57216 Systemd shutdowns are not quiet]
 
* [https://bugs.freedesktop.org/show_bug.cgi?id=57216 Systemd shutdowns are not quiet]

Revision as of 11:37, 4 May 2013

This page is for those who prefer to limit the verbosity of their system to a strict minimum, either for aesthetics or other reasons. Following this guide will remove all text from the bootup process.

Syslinux+Systemd

Your /boot/syslinux/syslinux.cfg should look something like:

$ grep APPEND /boot/syslinux/syslinux.cfg | head -n1
APPEND root=/dev/sda1 ro 5 init=/usr/lib/systemd/systemd quiet vga=current

vga=current is the kernel argument that avoid weird behaviours like flash grey.

Configure your systemd getty service as described upon Automatic_login_to_virtual_console.

$ grep Exec /etc/systemd/system/autologin\@.service
ExecStart=-/sbin/agetty -n -i -a YOUR_USERNAME %I

To remove lastlog message you need to comment out lastlog in /etc/pam.d/login:

#session                optional        pam_lastlog.so

To hide any kernel messages from the console add or modify the kernel.printk line like the following:

$ grep ^kernel.printk /etc/sysctl.conf 
kernel.printk = 3 3 3 3

To hide startx messages, you could redirect its output to /dev/null, like so:

[[ $(fgconsole 2>/dev/null) == 1 ]] && exec startx -- vt1 &> /dev/null

Outstanding Issues: