1 TITLE: Installing a bootsplash screen with progress bar
3 AUTHOR: Bryan Gale <bryan@2dz.co.uk>
6 How to beautify the boot process with splash screen, progress bar and
7 animation. Will also give you a pretty background on text consoles
14 The SuSE bootsplash kernel patch (versions available for 2.4.18 and 2.4.20
16 ftp://ftp.suse.com/pub/people/stepan/bootsplash/kernel/
17 bootsplash-3.0.7-2.4.18-vanilla.diff
20 ftp://ftp.suse.com/pub/people/stepan/bootsplash/kernel/
21 bootsplash-3.0.7-2.4.20-vanilla.diff
23 The splashutils package:
24 ftp://ftp.suse.com/pub/people/stepan/bootsplash/rpm-sources/bootsplash/
27 The frame-buffer mng player:
28 ftp://ftp.suse.com/pub/people/stepan/bootsplash/rpm-sources/bootsplash/
29 fbmngplay-0.5a.tar.bz2
32 ftp://ftp.suse.com/pub/people/stepan/bootsplash/rpm-sources/bootsplash/
36 ftp://ftp.suse.com/pub/people/stepan/bootsplash/themes/
39 This hint will assume these have been downloaded to /tmp
41 You should also have installed libmng and libjpeg and as described in the Beyond
42 Linux From Scratch book
45 Installing the kernel patch
46 ---------------------------
48 Change to the directory containing your kernel sources, and apply the patch. You
49 will then need to configure your kernel
52 patch -p1 < /tmp/bootsplash-3.0.7-2.4.*-vanilla.diff &&
55 You should enable the following options. Make sure they are compiled into the
56 kernel, and not as modules
58 Code maturity level options --->
59 Prompt for development and/or incomplete code/drivers
60 Block devices ---> RAM disk support
61 Block devices ---> Initial RAM disk (initrd) support
62 Console drivers ---> Video mode selection support
63 Console drivers ---> Frame-buffer support --->
64 Support for frame buffer devices
65 VESA VGA graphics console
66 Use splash screen instead of boot logo
68 Now compile and install the kernel
73 make modules_install &&
74 cp arch/i386/boot/bzImage /boot/lfskernel
77 Installing user space stuff
78 ---------------------------
80 Unpack splashutils.tar.bz2, compile and copy the required binaries to /sbin
83 tar xvjf splashutils.tar.bz2 &&
86 cp splash fbresolution /sbin &&
89 The two binaries we need are splash and fbresolution, so the rest can be
90 deleted. We also need one script from the scripts.tar.bz2 package
92 tar xvjf scripts.tar.bz2 &&
98 The rest of the scripts are largely distro specific, so they can be deleted. The
99 one we save, bootanim, is used by splash to start and stop animations. The mng
100 player will also neeed to be installed to actually play the animations
102 tar xvjf fbmngplay-0.5a.tar.bz2 &&
106 You may get compile errors, but hopefully the fbmngplay binary will be there
110 If you do experence build errors they probably occured while building
111 fbmngplay.static. If you want a static version of fbmngplay, see the note at the
115 Installing a bootsplash theme
116 -----------------------------
118 We need to create a directory for our themes
120 mkdir -p /etc/bootsplash/themes
122 Move the sample theme (or any other theme from http://www.bootsplash.og) to this
123 directory, and un-tar it
125 cd /etc/bootsplash/themes &&
126 tar xvjf /tmp/Theme-Linux.tar.bz2
128 The programs installed earlier will search for the theme in
129 /etc/bootsplash/themes/current, so we need to create a symlink
133 When you want to use a different theme you should delete this symlink and create
134 another one to your new un-tarred theme
137 ln -s MYNEWTHEME current
140 Updating Lilo and rebooting
141 ---------------------------
143 You will need to edit /etc/lilo.conf. Under the entry for your linux kernel add
148 This is so linux boots into a screen resolution that matches the size of the
149 bootsplash screen. You will also need to add
153 To boot into silent mode (i.e. boot messages hidden), you will need also to add
155 append="splash=silent"
157 Not all themes have a silent mode, so this will not always apply.
159 The following will need to be done now, and everytime you want to change theme.
160 Use splash to create a ram disk image of the bootsplash screen
163 /etc/bootsplash/themes/current/config/bootsplash-1024x768.cfg > \
166 Now update the mbr and reboot, and you should see your new splash screen
172 Utilising the progress bar
173 --------------------------
175 If your theme is enabled with a progress bar, you will need to make some changes
176 to your bootscripts to get it to work. The progress bar can be contolled by
177 echoing commands to /proc/splash. For a tidy way to use this, you should add the
178 following code to your /etc/rc.d/init.d/functions script
185 echo "Usage: progressbar {progress}"
189 echo "show $(( 65534 * $1 / 100 ))" > /proc/splash
193 Now edit your bootscripts in /etc/rc.d/rcsysinit.d and (by default)
194 /etc/rc.d/rc3.d to use this function. In general, before each instance of
195 loadproc, you should add
199 Where XXX is boot progress out of 100. The LFS book explains the order in
200 which the scripts will be run, and it will take some trial and error to get a
201 smooth running progress bar. Remeber not to use this function before /proc
208 The splash program handles animation, examining the
209 /etc/bootsplash/themes/current/config/animations.cfg file, if your theme has
210 one. Again, a function should be added to /etc/rc.d/init.d/functions file
217 echo "Usage: animate {hook}"
225 To use it place the following line in your bootscripts wherever an animation
230 To determine values for HOOK, you need to look at
231 /etc/bootsplash/themes/current/config/animations.cfg. The file takes the format
236 This is from the Redmond theme at http://www.bootsplash.org
238 fsck start:bootanim start bounce.mng
240 shutdown: bootanim start bounce.mng
242 The command bootanim is the script we installed earlier, which handles the
243 animations, and uses the fbmngplay command to actually play the things. To see
244 a full list of paramemters, simply run bootanim. In this example we should add
245 the following to the bootscript where fsck is run
249 You should place the line
253 just before the bootscripts finish, as this will stop all animations.
259 should be placed somewhere in the shutdown scripts. Look in
260 /etc/rc.d/rc6.d to see what will be run, and insert the line somewhere
261 before the killproc-ing begins.
263 There is consistency between theme about these hooks, so once you have them in
264 place, they should not need changing. No harm should come from trying to play a
265 non existent animation.
271 Using splash, you can add or change a background on any of your terminals
274 /etc/bootsplash/themes/tty2-theme/config/bootsplash-1024x768.cfg
277 /etc/bootsplash/themes/tty3-theme/config/bootsplash-1024x768.cfg
280 /etc/bootsplash/themes/tty4-theme/config/bootsplash-1024x768.cfg
283 /etc/bootsplash/themes/tty5-theme/config/bootsplash-1024x768.cfg
286 /etc/bootsplash/themes/tty6-theme/config/bootsplash-1024x768.cfg
288 You can remove the background with
290 splash -s -n -u CONSOLENUMBER
292 You can retrun to silent mode using
294 echo "silent" > /proc/splash
296 This may be useful for creating a shutdown screen
298 Verbose mode can be triggered with F2 or
300 echo "verbose" > /proc/splash
302 You may want to place this in the print_status function of
303 /etc/rc.d/init.d/functions, inside the failure case, or use it when your hard
304 drive is being scanned for errors. You may also want to insert it somewhere
305 into your bootscripts if silent mode doesn't automatically give way to verbose
306 when your system finishes booting.
308 If you want to boot into a resolution other than 1024x768, simply follow the
309 instructions as usual, but replace each mention of bootsplash-1024x768.cfg with
310 bootsplash-XRESxYRES.cfg (you will of course need to make sure this file exists
311 within your theme). You will also need to change the vga=791 line in lilo.conf
312 appropriately. Here's a table I borrowed from the Gentoo forums:
314 Colors-----640x480-----800x600-----1024x768-----1280x1024
316 256----------769---------771----------773----------775
317 32000--------784---------787----------790----------793
318 65000--------785---------788----------791----------794
319 16.7 Mill.---786---------789----------792----------795
322 Compiling a static fbmngplay
323 ----------------------------
325 If you keep /usr on a different partition to /, then you will need to use the
326 static version of fbmngplay. This is so it does not depend on any libraries that
327 are on a partition that may not have yet been mounted. To rid yourself of the
328 compile error, edit the line in /tmp/fbmngplay/Makefile
330 LIBSS = $(LIBDIR)/libmng-mini.a $(LIBDIR)/libz.a -lm
334 LIBSS = $(LIBDIR)/libmng.a $(LIBDIR)/libjpeg.a $(LIBDIR)/libz.a -lm
336 Then copy /tmp/fbmngplay/fbmngplay.static to /sbin/fbmngplay
338 The splash command does not have any such dependencies problems, as it links
341 (Thanks to Dagmar d'Surreal for this bit)
346 http://www.bootsplash.org
347 http://forums.gentoo.org/viewtopic.php?t=26494 (Thanks to kachaffeous)
348 The blfs-support mailing list