Ubuntu Server 18.04 hide/disable all boot messages (kiosk mode)
Solution 1
These are the steps I came to after several attempts. Please let me know if there's any improvement.
At the moment it remains only an annoying cursor blinking on the left.
Again, let share something relevant (if any).
Configure Auto-Login
(thanks to JPelletier's answer https://askubuntu.com/a/1045909/702388)
Configure Getty:
sudo mkdir /etc/systemd/system/[email protected]/
sudo tee -a /etc/systemd/system/[email protected]/autologin.conf <<EOF
[Service]
ExecStart=
ExecStart=-/sbin/agetty --skip-login --noissue --autologin kiosk --noclear %I $TERM
Type=idle
EOF
Enable Getty:
sudo systemctl enable [email protected]
Quiet boot (without kernel and welcome messages)
Edit grub file: sudo nano /etc/default/grub
and set these key-value couples:
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="quiet"
GRUB_RECORDFAIL_TIMEOUT=0
of course you must do sudo update-grub
to actually apply them.
Remove Cloud Init
echo 'datasource_list: [ None ]' | sudo -s tee /etc/cloud/cloud.cfg.d/90_dpkg.cfg
sudo apt-get purge cloud-init -y
sudo rm -rf /etc/cloud/; sudo rm -rf /var/lib/cloud/
Disable MOTD (Message Of The Day) when login (via SSH too)
sudo touch ~/.hushlogin
Remove pre-login message
sudo rm /etc/issue
Silent shutdown
Edit /etc/sysctl.d/10-console-messages.conf
and write this: kernel.printk = 0 4 1 7
Look here for more information: https://askubuntu.com/a/1044446/702388
Solution 2
I found on 18.04 LTS that GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub is overwritten by /etc/default/grub.d/50_curtin_settings.cfg. That tid-bit of information was a bit hard to find.
Solution 3
Now that you have fixed the Kernel boot logs, you have to finalize your kiosk configuration and the login screen will not show anymore!
Configure auto-login, you can do that with getty like I did and explained in my orignal question.
Configure Getty:
sudo mkdir /etc/systemd/system/[email protected]/
sudo tee -a /etc/systemd/system/[email protected]/autologin.conf <<EOF
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin YOU_USER_HERE--noclear %I $TERM
Type=idle
EOF
Enable Getty:
sudo systemctl enable [email protected]
You also want to configure XOrg / Chrome to start automatically on login. The solution I used before may not be the best one today. I had to use xserver-xorg-legacy
but it probably means that you can use xorg in a better way than login script.
Related videos on Youtube
LucaM
Updated on September 18, 2022Comments
-
LucaM over 1 year
I've just installed Ubuntu Server 18.04 LTS on my Intel NUC PC.
I'd like to make it a kiosk system, running only Chrome (for example).
How can I suppress / hide / disable all these messages printed to the monitor? I'd like to be a black screen from power on to (e.g.) Chrome.
I did follow Ubuntu Server 16.04.02 with Splash Screen and Kiosk mode and other tutorials like that. But there's something new in 18.04 (I think) that prevents me for getting things done.
-
Grub. Editing
GRUB_CMDLINE_LINUX_DEFAULT
didn't change anything, I had to editGRUB_CMDLINE_LINUX
instead. Is it ok? (Note: of course I runsudo update-grub
after each change)GRUB_DEFAULT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT=0 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="" GRUB_CMDLINE_LINUX="quiet" GRUB_TERMINAL=console
Welcome / MOTD / login messages
No way to avoid them! The closest I got was to remove
/etc/update-motd.d/
folder so I only saw something like:Ubuntu 18.04 LTS nuc tty1 nuc login: kiosk (automatic login) Last login: [...] kiosk@nuc:~$
(Note: I disabled autorun script for actually seeing these messages, otherwise they're too fast to catch.)
Ideally all those outputs should disappear in order to boot just black, from power on to Chrome. And back of course: from Chrome to power off, but that's another story.
Which files should I take care of?
How can I reach a completely silent / quiet boot?
--- Update about GRUB ---
Done a fresh install of Ubuntu 18.04 Server LTS on another PC. I can confirm that the key
GRUB_CMDLINE_LINUX_DEFAULT
doesn't do anything; instead I've to setGRUB_CMDLINE_LINUX
.Tried to crawl the web but nothing found about that. Am I the only one who experienced this behaviour??
-
LucaM almost 6 yearsJust a simple test run few minutes ago: fresh install of Ubuntu 16.04 Server on the same machine, did anything else than GRUB editing
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
and boot messages did actually disappeared. All of them: kernel and welcome. -
JPelletier almost 6 yearsSo
GRUB_CMDLINE_LINUX="quiet"
worked for kernel messages on 18.04 right? Now your only issue is the login screen right? -
LucaM almost 6 yearsYes @JPelletier, you're right. To be honest I'm actually doing some researches and will post the solution I'll come to.
-
JPelletier almost 6 yearswere you able to find the solution?
-
LucaM almost 6 yearsI'm very very very close. Just an annoying cursor blinking on the left. But at the moment I'm running out of time for this project, so I'll auto-answer my question when I got time for.
-
-
Nick over 3 yearsThis solved it for me on Ubuntu 18.04.