Displaying an image during boot instead of the default command line scrolling text

This is based on the guide here. 

This solution works but there are a few seconds of text shown before the boot image appears.

Install fbi

sudo apt-get install fbi
Copy the splashscreen image to be used

Copy your custom splash image into: /etc/ and name it "splash.png".

Presumably the resolution to use is 1920x1080px.

Create A Script


sudo nano

Paste the following into the text editor:


#! /bin/sh
### BEGIN INIT INFO
# Provides:          asplashscreen
# Required-Start:
# Required-Stop:
# Should-Start:      
# Default-Start:     S
# Default-Stop:
# Short-Description: Show custom splashscreen
# Description:       Show custom splashscreen
### END INIT INFO


do_start () {

    /usr/bin/fbi -T 1 -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 [start|stop]" >&2
    exit 3
    ;;
esac

:

IMPORTANT – If copying and pasting via SSH check it has pasted in correctly (pasting via FiseSSH for us caused the # lines and the esac line to be altered and need modifying back to be correct)

Exit and save the file as: /etc/init.d/asplashscreen

(using a name starting with 'a' will ensure it runs first)

Finally make the script executable and install it for init mode:


sudo chmod a+x /etc/init.d/asplashscreen
sudo insserv /etc/init.d/asplashscreen

Thats it:


sudo reboot

 

Getting Out Of Black Screen

If you get a black screen at the end of booting (if you've not setup auto running the GUI etc) use CTRL + ALT + F2 to get the command prompt

USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.

Comments

  1. K.R. O'Connell

    4 years ago

    Sorry Rosie
    just type > sudo pcmanfm
    and then navigate to the “/etc” folder in the file manager that opens
    Good luck

  2. K.R. O'Connell

    4 years ago

    Rosie you need to open the folder as root
    in a terminal window type > sudo pcmanfm/etc
    the folder opens and will accept pasted files

    worked for me but the terminal did complain about not liking to do it

  3. Rosie

    4 years ago

    Sorry, i’m a bit new to the pi, so this might seem a little basic, but I’m getting stuck trying to add the image to the /etc folder. When I try, I receive the error message “splash.png: Error opening file “/etc/splash.png”: Permission denied”. What am I missing here?

  4. zef

    4 years ago

    Hello, I’m stuck on the first line to install fbi with “sudo apt-get install fbi” : it tells me that it is impossible to fecth some of the files and tells me to try to do “apt-get update or –fix-missing”… What should I do? Thanks

    1. snow

      4 years ago

      Maybe you can try an update before:
      sudo apt update

  5. antonio

    7 years ago

    Why it does not work just for me?What checks can i do?

    1. hhh

      7 years ago

      doesnt work for me either, did everything as the tutorial says and didnt get any error messages or anything, nothing changed.

  6. Tuomas Eramajaarvi

    8 years ago

    Hi, I tried the above steps on RPI3 under Jessie Lite (2017-01-11).
    The FBI shows my picture correctly from commandline, but during the boot I can NOT get my splash picture. Only the original boot text running. What is the problem ?
    /I want to use Jesse Lite because I don’t need graphic desktop at all/

    1. Jimmy Van den Bliek

      8 years ago

      Have you found out how to fix it. Same problem for me?

    2. Tuomas Eramajaarvi

      8 years ago

      no any solution still :-(

    3. Matheos

      8 years ago

      Found !

      I’ve installed rpi-update

      then mkinitramfs -o /boot/initrd (not sure if it is really needed)
      then plymouth-set-default-theme solar -R

      then reboot

    4. Tuomas Eramajaarvi

      8 years ago

      I’m gonna try, thanks a lot !

  7. WP

    8 years ago

    I get an LSB error on booting, but can run the script from terminal with “sudo /etc/init.d/asplashscreen” withour errors. any ideas?

    1. James

      8 years ago

      Same here, I suspect a change in the startup as I cant get rid of the verbose text on startup either. not sure what’s going on yet.

  8. Zdeněk

    9 years ago

    Did you find a solution? or we are the only 2, who didn´t get it work? I´ve the same issue. The splashscreen is visible at the end of boot sequence. in Ini.d folder it is the 1st script. thanks for help

    1. Nail

      8 years ago

      first;
      sudo nano /boot/cmdline.txt
      add “logo.nologo quiet” without the quotes at the end of the line

      then;
      sudo nano /etc/rc.local
      type “clear” without the quotes just before the line “exit 0”

      then reboot.

  9. Paul

    9 years ago

    Anyone knows how to make it on the screen instead of the boot text?

  10. Jonathan

    9 years ago

    Wondering if there is a known issue with the Raspberry Pi 2 and this method, I for the life of me can’t get it to work, I’m getting a [FAIL] startpar: service(s) returned failure: asplashscreen … failed! message on startup.

  11. tj

    10 years ago

    Hello,

    i modified the boot as I wish but only thing I couldn’t remove so far is the first logo which appears with the message for recovery mode hold shift. Do you know where is this logo located or how to remove it.

    Thanks

    1. Jonathan

      9 years ago

      Not sure if this will help, but I have my older Pi’s setup this way so I only get my splash screen, no text or anything else.

      From a terminal window, type the following:
      sudo nano /boot/cmdline.txt

      Replace console=tty1 with console=tty3 to redirect boot messages to the third console.
      at the end of the line, add loglevel=3 to disable non-critical kernel log messages.

      Hide the logo by adding: logo.nologo
      Hide the flashing _ text cursor by adding vt.global_cursor_default=0

      The line should look like this:

      dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty3 root=/devmmcblk0p2 rootfstype=ext4 elevator=deadline rootwait loglevel=3 logo.nologo vt.global_cursor_default=0

      Hide mouse cursor
      ==============
      To hide the mouse cursor on inactivity open a terminal window on the Raspberry Pi, type the following:
      sudo apt-get install unclutter

      Disable Sleep Screen
      ================
      To force the screen to stay on you need to do the following, this will prevent the screen from going blank after 15 minutes.

      From a terminal window, type the following:
      sudo nano /etc/lightdm/lightdm.conf

      Add the following lines to the [SeatDefaults] section:
      # don’t sleep the screen
      xserver-command=X -s 0 dpms

      Hope this helps, I’ve used this on my Pi’s to load straight into a refreshing web browser (additional steps required for loading browser not listed here), but it essentially removes anything thats annoying except for my custom splash screen and the webpage that loads.

    2. Adam P

      9 years ago

      Thank you for those steps. I tried this on Pi 2B, works great. Only step I didn’t verify was your “Disable Sleep Screen” but I don’t see why it wouldn’t work.

      I have my splash screen, then xwin autostarts which goes straight to a fullscreen VLC stream from a USB webcam. I have my splash screen set as my wallpaper in xwindows (no desktop icons, hidden menu), with the intention of making it seem like it was part of the boot splash. Ideally there would be no flicker, but that’s perhaps asking too much. Unfortunately after the main boot process, it goes black for about 5 – 10 seconds while xwin starts up, then shows the “splash screen” again for a second (the desktop / wallpaper), then VLC starts full screen. Besides the 5 – 10 second black screen, everything transitions very smoothly. If VLC starts with teh “cvlc” command, there’s no UI flicker or anything.

    3. dirac bracket

      8 years ago

      This works great! Thanks for these neat tricks!
      I have one last thing I need to get rid though: When rebooting, the large rainbow square first shows up for a fraction of a second. Any way to disable that?
      Cheers!

    4. dirac bracket

      8 years ago

      OK. found it. Add disable_splash=1 to config.txt.
      Now it is perfect!

    5. Adam

      8 years ago

      Thanks for posting the tip :-)

  12. Patrik Dahlström

    10 years ago

    I solved it by adding

    echo 0 > /sys/class/graphics/fbcon/cursor_blink
    to the init script

  13. Majenko Technologies

    10 years ago

    Add the kernel command line option: logo.nologo

  14. Afnan

    4 years ago

    hiiii,
    script is working fine in my Rpi on boot.
    but the problem is picture show only for 1 second on boot, where i want to hold the picture atleast for 10 second…… here is my fbi line.

    /usr/bin/fbi -T 1 -noverbose -a -t 10 /etc/splash.png

    i dont know why it is not hold for 10 second ?

  15. imtiyaj Kaji

    4 years ago

    Thank you for the script. Does it add delay to boot up x?
    There is black screen for about 20sec between splash and X starting. Is there any way to replace this black screen with splash.

  16. Dylanett

    4 years ago

    Is there a way to get this to load before the first few lines of output (like finding the usb keyboad), or at least to hide the output until the splash screen kicks in?

    1. Adam

      4 years ago

      Not that we could find at the time, but please share if you find a way

  17. JSquaredZ

    4 years ago

    Seems to work except for me(Running raspian) it comes up at the end of the boot sequence. I want it to be on the screen instead of the boot text.

  18. Brandon I.

    4 years ago

    Is there a way to automate the CTRL+ALT+F2 key sequence? My pi always runs into the black screen problem.

  19. NOOB Blog

    4 years ago

    Is there a way to remove the small black quadrat in the top left corner?

Comments

Your email address will not be published. Required fields are marked *