https://wiki.archlinux.org/api.php?action=feedcontributions&user=Rongmu&feedformat=atomArchWiki - User contributions [en]2024-03-28T10:03:13ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Silent_boot&diff=285182Silent boot2013-11-29T09:10:07Z<p>Rongmu: fix mistyping: fskc=>fsck</p>
<hr />
<div>[[Category:Boot process]]<br />
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. [http://www.youtube.com/watch?v=tuqhsqrhXk0 Video demonstration]<br />
<br />
== Syslinux and Systemd ==<br />
<br />
The kernel section in {{ic|/boot/syslinux/syslinux.cfg}} should look something like:<br />
<br />
APPEND root=/dev/sda1 rw 5 init=/usr/lib/systemd/systemd quiet vga=current<br />
<br />
vga=current is the kernel argument that avoid weird behaviours like [https://bugs.archlinux.org/task/32309 grey flash].<br />
<br />
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 using {{ic|quiet loglevel&#61;<level>}}, where {{ic|<level>}} is any number between 0 and 7, where 0 is the most critical, and 7 is debug levels of printing. Note that this only seems to work if both {{ic|quiet}} and {{ic|loglevel&#61;<level>}} 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 the {{ic|dmesg}} command. For more information, see the <i>Documentation/kernel-parameters.txt</i> file of the {{Pkg|linux-docs}} package.<br />
<br />
Configure your systemd getty service as described upon [[Automatic login to virtual console]].<br />
<br />
{{hc|$ grep Exec /etc/systemd/system/autologin\@.service|<br />
...<nowiki><br />
ExecStart=-/sbin/agetty -n -i -a YOUR_USERNAME %I<br />
...</nowiki><br />
}}<br />
<br />
To remove lastlog message you need to comment out ''lastlog'' in {{ic|/etc/pam.d/login}}:<br />
<br />
#session optional pam_lastlog.so<br />
<br />
Also `touch ~/.hushlogin` to remove the Last login message.<br />
<br />
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]:<br />
{{hc| /etc/sysctl.d/20-quiet-printk.conf|<br />
<nowiki>kernel.printk = 3 3 3 3</nowiki>}}<br />
<br />
To hide {{ic|startx}} messages, you could redirect its output to {{ic|/dev/null}}, in your [https://github.com/kaihendry/Kai-s--HOME/blob/master/.bash_profile .bash_profile] like so:<br />
<br />
$ [[ $(fgconsole 2>/dev/null) == 1 ]] && exec startx -- vt1 &> /dev/null<br />
<br />
Outstanding Issues:<br />
* [https://bugs.freedesktop.org/show_bug.cgi?id=57216 Systemd shutdowns are not quiet] - As of systemd v206, the {{ic|quiet}} kernel command line parameter is now respected on shutdown, though it seems that if you use the {{ic|shutdown}} hook of {{Pkg|mkinitpcio}}, this function has not been set up to support that parameter.<br />
<br />
== GRUB and systemd ==<br />
<br />
For a silent boot using grub, let systemd check the root filesystem. For this, remove ''fsck'' from:<br />
<br />
HOOKS=(...) <br />
<br />
in {{ic|/etc/mkinitcpio}} and then run:<br />
<br />
mkinitcpio -p linux<br />
<br />
Then, edit {{ic|/etc/default/grub}} and set:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="ro quiet"<br />
<br />
then run:<br />
<br />
grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
Now edit the files {{ic|systemd-fsck-root.service}} and {{ic|systemd-fsck@.service}} located at {{ic|/usr/lib/systemd/system/}} to configure ''StandardOutput'' and ''StandardError'' like this:<br />
<br />
(...)<br />
<br />
[Service]<br />
Type=oneshot<br />
RemainAfterExit=yes<br />
ExecStart=/usr/lib/systemd/systemd-fsck<br />
StandardOutput=null<br />
StandardError=journal+console<br />
FsckPassNo=1<br />
TimeoutSec=0<br />
<br />
See [http://www.freedesktop.org/software/systemd/man/systemd-fsck@.service.html this] for more info on the options you can pass to {{ic|systemd-fsck}} - you can change how often the service will check (or not) your filesystems.</div>Rongmuhttps://wiki.archlinux.org/index.php?title=Talk:USB_flash_installation_medium&diff=277433Talk:USB flash installation medium2013-10-03T11:23:47Z<p>Rongmu: edit previous talk</p>
<hr />
<div>== <s>About making the installation media without overwriting</s> ==<br />
I'm not totally sure if I misunderstood something, but I had to change the path of the entries of the *.cfg files. For instance:<br />
<br />
INCLUDE boot/syslinux/archiso_sys.cfg<br />
<br />
became:<br />
<br />
INCLUDE syslinux/archiso_sys.cfg<br />
<br />
It was the only way it worked with the unofficial ISO x86_64 image of march 13th, 2012. Looks like the syslinux command described in the page doesn't get the path as it should. <br />
<br />
I edited all of the .cfg files, but probably only editing this ones should have been enough:<br />
<br />
archiso.cfg<br />
archiso_head.cfg<br />
archiso_sys_inc.cfg<br />
<br />
I hope it could be useful to somebody, because I spend some time with this (I even thought that was a problem with the hardware). I think it could be possible to make a simple script (or give some command lines) to patch the files once they are copied into the USB and run syslinux.<br />
<br />
Thanks !!<br />
:I cannot find that this is still relevant to the article as it now exists. I am striking it out as it looks like it could be good to remove. [[User:AdamT|AdamT]] ([[User talk:AdamT|talk]]) 10:33, 8 August 2013 (UTC)<br />
<br />
::Just lunched from USB drive without UUID(don't have any idea why it didn't have one). Solution was to change label to appropriate in loader/entries/archiso-x86_64.conf. Not sure weither this should be added to article.<br />
--[[User:Versusvoid|Versusvoid]] ([[User talk:Versusvoid|talk]]) 16:00, 18 August 2013 (UTC)<br />
::Versusvoid, I would love to adapt the article but I cannot follow your description above. Looking at that section, it may be out dated. If you are watching this please elaborate when you have time. Thanks, [[User:AdamT|AdamT]] ([[User_talk:AdamT|Talk]]) 08:32, 23 August 2013 (UTC)<br />
<br />
:::Ok. For some reason ubuntu did not see USB UUID. So ''blkid -o value -s UUID /dev/sdx1'' were returning empty string. The solution was:<br />
<br />
:::''$ sed -i "s|label=ARCH_.*|label=$(blkid -o value -s LABEL /dev/sdx1)|" loader/entries/archiso-x86_64.conf''<br />
<br />
:::in the USB mounting directory. --[[User:Versusvoid|Versusvoid]] ([[User talk:Versusvoid|talk]]) 08:05, 31 August 2013 (UTC)<br />
<br />
:::It seems that sometimes you have to get the UUID by running the command as root. --[[User:Rongmu|Rongmu]] ([[User talk:Rongmu|talk]]) 11:23, 3 October 2013 (UTC)</div>Rongmuhttps://wiki.archlinux.org/index.php?title=Talk:USB_flash_installation_medium&diff=277432Talk:USB flash installation medium2013-10-03T11:19:54Z<p>Rongmu: execute blkid after the flash drive is mounted or as root user.</p>
<hr />
<div>== <s>About making the installation media without overwriting</s> ==<br />
I'm not totally sure if I misunderstood something, but I had to change the path of the entries of the *.cfg files. For instance:<br />
<br />
INCLUDE boot/syslinux/archiso_sys.cfg<br />
<br />
became:<br />
<br />
INCLUDE syslinux/archiso_sys.cfg<br />
<br />
It was the only way it worked with the unofficial ISO x86_64 image of march 13th, 2012. Looks like the syslinux command described in the page doesn't get the path as it should. <br />
<br />
I edited all of the .cfg files, but probably only editing this ones should have been enough:<br />
<br />
archiso.cfg<br />
archiso_head.cfg<br />
archiso_sys_inc.cfg<br />
<br />
I hope it could be useful to somebody, because I spend some time with this (I even thought that was a problem with the hardware). I think it could be possible to make a simple script (or give some command lines) to patch the files once they are copied into the USB and run syslinux.<br />
<br />
Thanks !!<br />
:I cannot find that this is still relevant to the article as it now exists. I am striking it out as it looks like it could be good to remove. [[User:AdamT|AdamT]] ([[User talk:AdamT|talk]]) 10:33, 8 August 2013 (UTC)<br />
<br />
::Just lunched from USB drive without UUID(don't have any idea why it didn't have one). Solution was to change label to appropriate in loader/entries/archiso-x86_64.conf. Not sure weither this should be added to article.<br />
--[[User:Versusvoid|Versusvoid]] ([[User talk:Versusvoid|talk]]) 16:00, 18 August 2013 (UTC)<br />
::Versusvoid, I would love to adapt the article but I cannot follow your description above. Looking at that section, it may be out dated. If you are watching this please elaborate when you have time. Thanks, [[User:AdamT|AdamT]] ([[User_talk:AdamT|Talk]]) 08:32, 23 August 2013 (UTC)<br />
<br />
:::Ok. For some reason ubuntu did not see USB UUID. So ''blkid -o value -s UUID /dev/sdx1'' were returning empty string. The solution was:<br />
<br />
:::''$ sed -i "s|label=ARCH_.*|label=$(blkid -o value -s LABEL /dev/sdx1)|" loader/entries/archiso-x86_64.conf''<br />
<br />
:::in the USB mounting directory. --[[User:Versusvoid|Versusvoid]] ([[User talk:Versusvoid|talk]]) 08:05, 31 August 2013 (UTC)<br />
<br />
:::It seems that the flash drive should be mounted at first before you can blkid to get it's UUID. Otherwise you can get the UUID by running the same command as root. --[[User:Rongmu|Rongmu]] ([[User talk:Rongmu|talk]]) 11:19, 3 October 2013 (UTC)</div>Rongmu