01 > ȸҰ

 
작성일 : 18-01-22 18:03
부팅메세지
 글쓴이 : 이로직…
조회 : 6,419  

자료 출처:https://wiki.archlinux.org/index.php/silent_boot 가져옴


Silent boot

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.Video demonstration

Kernel parameters

Change thekernel parametersusing the configuration options of your boot loader, to include the following parameters:

quiet vga=current

vga=currentis the kernel argument that avoid weird behaviours likeFS#32309.

If you are still getting messages printed to the console, it may be dmesg sending you what it thinks are important messages. You can change the level at which these messages will be printed by usingquiet loglevel=, whereis any number between 0 and 7, where 0 is the most critical, and 7 is debug levels of printing.

quiet loglevel=3 vga=current

Note that this only seems to work if bothquietandloglevel=are both used, and they must be in that order (quiet first). The loglevel parameter will only change that which is printed to the console, the levels of dmesg itself will not be affected and will still be available through the journal as well as thedmesgcommand. For more information, see theDocumentation/kernel-parameters.txtfile of thelinux-docspackage.

If you also want to stop systemd from printing its version number when booting, you should also appendudev.log_priority=3to your kernel commandline (source). If systemd is used in aninitramfs, appendrd.udev.log_priority=3instead.

If you are using thesystemdhook in theinitramfs, you may get systemd messages during initramfs initialization. You can passrd.systemd.show_status=falseto disable them, orrd.systemd.show_status=autoto only suppress successful messages (so in case of errors you can still see them). Actually,autois already passed tosystemd.show_status=autowhenquietis used, however for some motive sometimes systemd inside initramfs does not get it. Below are the parameters that you need to pass to your kernel to get a completely clean boot with systemd in yourinitramfs:

 quiet loglevel=3 rd.systemd.show_status=auto rd.udev.log-priority=3

Alsotouch ~/.hushloginto remove the Last login message.

sysctl

To hide any kernel messages from the console, add or modify thekernel.printkline according to[1]:

/etc/sysctl.d/20-quiet-printk.conf
kernel.printk = 3 3 3 3

startx

To hidestartxmessages, you could redirect its output to/dev/null, in your.bash_profilelike so:

Note:Redirection is broken with rootless login. SeeXorg#Broken redirection.
$ [[ $(fgconsole 2>/dev/null) == 1 ]] && exec startx -- vt1 &> /dev/null

fsck

To hide fsck messages during boot, let systemd check the root filesystem. For this, removefsckfrom:

HOOKS=(...) 

in/etc/mkinitcpio.confand then run:

mkinitcpio -p linux

Now copy the filessystemd-fsck-root.serviceandsystemd-fsck@.servicelocated at/usr/lib/systemd/system/to/etc/systemd/system/and edit them, configuringStandardOutputandStandardErrorlike this:

(...)

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/lib/systemd/systemd-fsck
StandardOutput=null
StandardError=journal+console
TimeoutSec=0

Seethisfor more info on the options you can pass tosystemd-fsck- you can change how often the service will check (or not) your filesystems.

Remove console cursor blinking

The console cursor at boot keeps blinking if you follow these instructions. This can be solved by passingvt.global_cursor_default=0to the kernel[2].

To recover the cursor in the TTY, run:

# setterm -cursor on >> /etc/issue

Make GRUB silent

To hide GRUB welcome and boot messages, you may install unofficialgrub-silentAURpackage.

After the installation, it is required to reinstallGRUBto necessary partition first.

Then, take an example as/etc/default/grub.silent, and make necessary changes to/etc/default/grub.

Below three lines are necessary:

GRUB_DEFAULT=0
GRUB_TIMEOUT=0
GRUB_RECORDFAIL_TIMEOUT=$GRUB_TIMEOUT

Lastly, regenerategrub.cfgfile.