The purpose of the steps here is to remove Rainbow image, Raspberry Pi Logo, login messages, etc. from Raspberry Pi boot up process when it’s in console autologin mode. For silent boot in desktop mode, please see this post. After following the steps, the first thing you see will be a shell prompt like below.
1 |
pi@raspberrypi:~ $ |
I tested it with Raspberry Pi 3 running Raspbian Stretch Desktop (November 2017 version).
– Console Autologin
If it’s not yet in Console Autologin mode, launch raspi-config.
1 |
sudo raspi-config |
Then, navigate to “Boot Options” > “Desktop / CLI” and select “Console Autologin“.
– Password change if SSH enabled
If SSH is enabled, change the login password to avoid the warning message below.
1 2 |
SSH is enabled and the default password for the 'pi' user has not been changed. This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password. |
1. Disable “Welcome to PIXEL” splash
Disable plymouth-start service.
1 |
sudo systemctl mask plymouth-start.service |
2. Remove Rainbow Screen
2-1. Open “/boot/config.txt”.
1 |
sudo nano /boot/config.txt |
2-2. Add below at the end of the file.
1 2 |
# Disable rainbow image at boot disable_splash=1 |
3. Remove Raspberry Pi logo and blinking cursor
3-1. Open “/boot/cmdline.txt”.
1 |
sudo nano /boot/cmdline.txt |
3-2. Add below at the end of the line.
1 |
logo.nologo vt.global_cursor_default=0 |
‘logo.nologo’ and ‘vt.global_cursor_default=0’ remove Raspberry Pi logo (image of four raspberries in the top left corner) and blinking cursor, respectively.
4. Remove login message
Create ‘.hushlogin’ file in home directory.
1 |
touch ~/.hushlogin |
It removes login message below [1]:
1 2 3 4 5 6 7 8 9 |
Last login: Tue Nov 21 14:51:56 2017 Linux raspberrypi 4.9.41-v7+ #1023 SMP Tue Aug 8 16:00:15 BST 2017 armv7l The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. |
5. Remove autologin message by modify autologin service
5-1. Open the unit file for autologin service.
1 |
sudo nano /etc/systemd/system/autologin\@.service |
5-2. Modify the line starts with “ExecStart”
From:
1 |
ExecStart=-/sbin/agetty --autologin pi --noclear %I $TERM |
To:
1 |
ExecStart=-/sbin/agetty --skip-login --noclear --noissue --login-options "-f pi" %I $TERM |
It removes autologin message below:
1 2 |
Raspbian GNU/Linux 9 raspberrypi tty1 raspberrypi login: pi (automatic login) |
6. Verify
Reboot the board and see if it works properly.
1 |
sudo reboot |
In case a lightning bolt icon is shown in the right-top corner of the screen, see this post.
References
[1] Remove GNU licence and ‘no warranty’ thing when logging into ssh