User avatar
skidoobond
Posts: 40
Joined: Mon Feb 25, 2013 8:26 pm

How to get rid of the startup text and add a splash screen

Wed Apr 03, 2013 2:16 am

First, a disclaimer: the information below is gathered information that I found posted in parts by others. I compiled the bits and pieces and tweaked some lines to make this work for me. I didn't intend to imply this is my sole work. I just don't recall where I got every little bit, sorry.
That out of the way, here we go with the instructions.

I started with the 2013-02-09-wheezy-raspbian.img file and built my SD card. Details on this are on this site. I set my locale, keyboard, timezone, and set the startup to not run X on boot. If all you want is to remove the scrolling text, skip to step 10.
1) Type in "sudo apt-get update" to get the latest OS updates.
2) Type in "sudo apt-get upgrade" to get some more OS stuff.
3) Type "sudo nano /etc/inittab" and add "#" to the beginning of the line "1:2345:respawn:/sbin/getty --noclear 38400 tty1". Under that line add "1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1". Type ctrl-x, then y enter to save. This will log into the pi user without the password and prompt. Go ahead and reboot to try it out by typing "sudo reboot".
4) Type "sudo apt-get install fbi", then y to install. This installs the viewer to display the images.
5) Type "sudo nano /etc/init.d/asplashcreen.sh". Type in the following into the file:
#! /bin/sh
do_start () {
fbi -T 1 -t 5 -noverbose -a /etc/splash.png
exit 0
}
case "$1" in
start|"")
do_start
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
# No-op
;;
status)
exit 0
;;
*)
echo "Usage: asplashscreen.sh [start|stop]" >&2
exit 3
;;
esac

:
Type ctrl-x, then y enter to save. You can call the script file anything, but the original poster suggests using a... will put this in the top of the boot sequence. I added .sh because that's how I denote my script files.
6) Type "sudo chmod a+x /etc/init.d/asplashscreen.sh". Then, type "sudo insserv /etc/init.d/asplashscreen.sh". Followed by, Type "sudo update-rc.d asplashscreen.sh start". This sets up the splash screen to start. The png file is called in step 5. Use any method to put the png file in the /etc directory and call it splash.png. You could use a jpg as well and put it elsewhere, just use the correct call to fbi.
7) Type "sudo nano /etc/init.d/stopsplash.sh". Type in the following into the file:
sleep 5s
sudo pkill fbi
Type ctrl-x, then y enter to save. This creates a script to stop display of the splash screen.
8) Type "sudo chmod a+x /etc/init.d/stopsplash.sh".
9) Type "sudo insserv /etc/init.d/stopsplash.sh". Then, type "sudo update-rc.d stopsplash.sh start". Then, type "sudo chmod a+x /etc/init.d/stopsplash.sh".
10) Type "sudo nano /boot/cmdline.txt". Replace "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait" with "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait"
Type ctrl-x, then y enter to save. This step is what actually stops displaying the scrolling text on boot. Reboot and you should now see the RPi logo with a blinking cursor. After a few seconds, your splash screen should appear. The delay is because the scrolling text process is still going on, you screen just won't display the text. Once the OS is loaded, the asplashscreen.sh script will run.

falconsfan
Posts: 4
Joined: Tue Oct 23, 2012 4:28 pm

Re: How to get rid of the startup text and add a splash scre

Thu Apr 04, 2013 2:49 am

Works perfectly! Thank you for being willing to share and give step by step. I actually tried this before, but I believe it is important that you update and upgrade first, because I didn't before when I tried this and it wouldn't display the image. :D

jviyer
Posts: 30
Joined: Mon Nov 04, 2013 3:48 pm

Re: How to get rid of the startup text and add a splash scre

Sat Nov 01, 2014 7:19 pm

skidoobond,
thanks for the detailed steps.
It takes about 45 seconds before mysplash.png shows up on the screen.
when I reboot,
-blinking cursor comes for a second or two
-next the rainbow (or 4 colorpixels on the screen (usual splash)) appears for a snap
-that disappears & blinking cursor for the next 40+ seconds
-then mysplash appears for about 10 seconds (the sleep time in the stop)
-shortly after which it gets killed (by the stop script) and my regular screen etc.
So wondering if I can do something for it to show earlier on in the process (when I have the 40 second
blank screen)
I am on pi B+, which has a wireless wifi usb and connected to hdmi monitor

thanks a lot

beta-tester
Posts: 1237
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: How to get rid of the startup text and add a splash scre

Sun Nov 02, 2014 6:25 am

jviyer wrote:It takes about 45 seconds before mysplash.png shows up on the screen.
when I reboot...
to save a second, you can add " nosplash quiet" at the end of the line if the /boot/cmdline.txt
and delete all not needed comments of the /boot/config.txt file, to reduce the loading and parse time.
and enable overclocking.

but it is maginal what you will win here.

thats, because of the kernel has to be loaded and initialized so far to be able to come to that point, where the your picture is loaded and displayed.
to get this work way earlier, i think you have to compile your own modified kernel.

PS.: when you compile the kernel, there is also an option to replace the raspberry pi logo by an image you like. in case you are using all the time the same monitor resolution, you are able to replace the logo to nearly fullscreen logo without changing the code behind.
{ I only give negative feedback }
RPi Model B (rev1, 256MB) & B (rev2, 512MB) & B+, RPi2B, RPi3B, RPi3B+, RPiZeroW, ...

User avatar
PangolinPaws
Posts: 89
Joined: Wed Mar 05, 2014 9:04 pm
Location: Wiltshire, UK
Contact: Website

Re: How to get rid of the startup text and add a splash scre

Tue Dec 23, 2014 10:17 am

3) Type "sudo nano /etc/inittab" and add "#" to the beginning of the line "1:2345:respawn:/sbin/getty --noclear 38400 tty1". Under that line add "1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1". Type ctrl-x, then y enter to save. This will log into the pi user without the password and prompt. Go ahead and reboot to try it out by typing "sudo reboot".
I may have jumped in the deep end and set this up with a user other than pi. This user doesn't have sudo privileges so I can no longer change the /etc/inittab file.

For now I've just connected via SSH as pi and changed /etc/inittab back to normal, but is there a way for me to revert back to the login prompt, or just be able to log in as another user locally after I make the above change?

Thank you for your help ^_^
https://github.com/PangolinPaw

User avatar
DougieLawson
Posts: 36123
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: How to get rid of the startup text and add a splash scre

Tue Dec 23, 2014 11:23 am

PangolinPaws wrote:I may have jumped in the deep end and set this up with a user other than pi. This user doesn't have sudo privileges so I can no longer change the /etc/inittab file.
Whoops! What's the hole in your foot and why do you have a smoking weapon in your hand?

Shutdown, pull the card.

Edit /boot/cmdline.txt and add init=/bin/sh to the end of the single line of text in there. [If using NOBS you'll need to hold [SHIFT] while you boot and use the recovery system cmdline editor.]

Connect a TV & keyboard.

Boot the system and you will get a root command shell running. You can then mount the root filesystem mount /dev/mmcblk0p2 / (or mount /dev/mmcblk0p6 / # if using NOBS) and undo the damage. Last thing is edit the cmdline.txt back to normal then reboot.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
PangolinPaws
Posts: 89
Joined: Wed Mar 05, 2014 9:04 pm
Location: Wiltshire, UK
Contact: Website

Re: How to get rid of the startup text and add a splash scre

Tue Dec 23, 2014 2:23 pm

DougieLawson wrote:Whoops! What's the hole in your foot and why do you have a smoking weapon in your hand?
Pretty much. Panic did set in when I realised what I'd done. Connecting via SSH to undo my recent 'work' has saved me more than once!
https://github.com/PangolinPaw

User avatar
DougieLawson
Posts: 36123
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: How to get rid of the startup text and add a splash scre

Tue Dec 23, 2014 5:29 pm

PangolinPaws wrote: Pretty much. Panic did set in when I realised what I'd done. Connecting via SSH to undo my recent 'work' has saved me more than once!
Shooting code dead with an editor was the primary reason that I installed my private personal gitolite server.
http://gitolite.com/gitolite/index.html
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
Richard-TX
Posts: 1549
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: How to get rid of the startup text and add a splash scre

Tue Dec 23, 2014 8:06 pm

I really don't know how some people operate, but if I am exploring in uncharted waters I make a copy of the config file(s) that I want to edit. A simple "cp config.cfg config.cfg.O" works for me....every time. If it is a massive project, a cpio archive is my tool of choice. Why CPIO? cpio copies everything including devices that reside in /dev.
Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip

Return to “Beginners”