Difference between revisions of "Silent boot"

From ArchWiki
Jump to: navigation, search
(remove inittab nonesense)
(Syslinux+Systemd)
(3 intermediate revisions by the same user not shown)
Line 9: Line 9:
 
     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 magic ''kernel argument'' not to do something crazy like: https://bugs.archlinux.org/task/32309
+
vga=current is the magic ''kernel argument'' not to do something crazy like [https://bugs.archlinux.org/task/32309 flash grey].
  
 
Configure your systemd getty service like so:
 
Configure your systemd getty service like so:
  
 
     x220:~$ grep ExecStart /usr/lib/systemd/system/getty@.service
 
     x220:~$ grep ExecStart /usr/lib/systemd/system/getty@.service
     ExecStart=-/sbin/agetty -i -a YOUR_USERNAME %I 38400
+
     ExecStart=-/sbin/agetty --skip-login --noissue --autologin YOUR_USERNAME %I 38400
  
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
Line 25: Line 25:
 
     kernel.printk = 3 3 3 3
 
     kernel.printk = 3 3 3 3
  
Outstanding Issues:
+
To hide startx messages, you could redirect its output to /dev/null, like so:
* https://bugs.archlinux.org/task/32729
+
* https://github.com/karelzak/util-linux/issues/21
+
* https://bugs.freedesktop.org/show_bug.cgi?id=57216
+
  
==Grub configs==
+
    [[ $(fgconsole 2>/dev/null) == 1 ]] && exec startx -- vt1 &> /dev/null
  
To avoid the verbose text, you can add this line to the grub kernel command "quiet console=tty12". It will send the output of the boot process to the "tty 12", while remaining on the "tty 1".
+
Outstanding Issues:
 
+
* [https://github.com/karelzak/util-linux/issues/21 agetty's automatic login is noisy]
Example configuration for /boot/grub/menu.lst
+
* [https://bugs.freedesktop.org/show_bug.cgi?id=57216 Systemd shutdowns are not quiet]
 
+
# (0) Arch Linux
+
title  Arch Linux
+
root  (hd0,5)
+
kernel /vmlinuz26 root=/dev/disk/by-uuid/b2f2fc9a-6305-4770-aed2-fccb3ec51d5c ro quiet console=tty12
+
initrd /kernel26.img
+
 
+
This configuration will only leave the Arch logo on the screen for the whole boot process. If you would like to also remove the logo, simply add "logo.nologo" to the kernel command, like this:
+
 
+
# (0) Arch Linux
+
title  Arch Linux
+
root  (hd0,5)
+
kernel /vmlinuz26 root=/dev/disk/by-uuid/b2f2fc9a-6305-4770-aed2-fccb3ec51d5c ro quiet console=tty12 logo.nologo
+
initrd /kernel26.img
+

Revision as of 01:54, 20 November 2012

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 magic kernel argument not to do something crazy like flash grey.

Configure your systemd getty service like so:

   x220:~$ grep ExecStart /usr/lib/systemd/system/getty@.service
   ExecStart=-/sbin/agetty --skip-login --noissue --autologin YOUR_USERNAME %I 38400

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 use this tip:

   $ 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: