New hint

Jan Stifter pctel at gmx.net
Thu Jan 29 12:29:24 PST 2004


Hello,
after searching for material, how to make a nice bootsplash (like SuSE and 
gentoo) and solving some problems, I decided to write a hint about this 
topic.

Please take a look at it, if you find it useful.

Enjoy
Jan
-------------- next part --------------
AUTHOR:   Jan Stifter

DATE:     2004-01-29 $Id: bootsplash.hint,v 1.6 2004/01/29 20:26:40 cvs Exp $

LICENSE:  GNU Free Documentation License

SYNOPSIS: How to make a nice bootsplash during your bootup procedure

DESCRIPTION:
When looking at distributions like gentoo or SuSE, they use a nice bootscreen
at startup, where a background graphics is visible during the booting of the
system. If you want this, the hint is for you.

PREREQUISITES:
a) kernel patch: ftp://ftp.suse.com/pub/people/stepan/bootsplash/kernel/bootsplash-3.0.7-2.4.22-vanilla.diff.bz2
b) bootsplash utility: ftp://ftp.suse.com/pub/people/stepan/bootsplash/rpm-sources/bootsplash/bootsplash-3.0.7.tar.bz2
c) linux-Theme: ftp://ftp.suse.com/pub/people/stepan/bootsplash/themes/Theme-Linux.tar.bz2

I have the files in /usr/src/, if you have them in another place, adapt the
following commands.

HINT:
1. Kernel stuff
---------------
1.1) Patch your kernel with the bootsplash kernel patch

cd /usr/src/linux (where my kernel sources are)   
bzcat ../bootsplash-3.0.7-2.4.22-vanilla.diff.bz2 | patch -p1

1.2) Configure and compile the kernel:
 
make menuconfig

Select:
Code maturity level options -> [*] Prompt for developmnet and/or incomplete code/drivers

Block Devices -> [*] RAM disk support
                 [*]   Initial RAM disk (initrd) support

Console Drivers -> Frame Buffor Support -> [*] Support for Frame Buffer Devices [EXPERIMENTAL]
                                           [*] Vesa VGA graphics console
                                           [*] Use splash screen instead of boot logo

Compile your kernel with 
make dep; make bzImage
then copy your kernel into /boot (I assume your kernels are in /boot) with
cp arch/i386/boot/bzImage /boot/splash-kernel

2. Install splash utility
-------------------------

cd /usr/src
bzip2 -d bootsplash-3.0.7.tar.bz2
tar xvf bootsplash-3.0.7.tar
cd bootsplash-3.0.7/Utilities
make
cp ./splash /usr/sbin

In case you want to use animations, copy also fbresolution fbtruetype fbmngplay
to /usr/sbin

3. Create a configuration
-------------------------

We use the simple linux configuration. Once, everything
works fine, you can start tuning your bootup-sequence with animations, ...
Take a look at [1], where you find lots of nice information, how to create
a configuration.

cd /usr/src
bzip2 -d Theme-Linux.tar.bz2
mkdir -p /etc/bootsplash/themes/
cd /etc/bootsplash/themes/
tar xvf /usr/src/Theme-Linux.tar

4. Create the initrd file
-------------------------
These steps have to be repeated, every time you change something on the
configuration.

splash -s -f /etc/bootsplash/themes/Linux/config/bootsplash-1024x768.cfg > /boot/initrd.linux

5. Lilo
-------
First some theory:

You need to say to lilo, which resolution the vesa framebuffer should switch to.
This is done by the vga=XXX parameter.

From Documentation/fb/vesafb.txt in the kernel source tree, you see the table:

    | 640x480  800x600  1024x768 1280x1024
----+-------------------------------------
256 |  0x301    0x303    0x305    0x307
32k |  0x310    0x313    0x316    0x319
64k |  0x311    0x314    0x317    0x31A
16M |  0x312    0x315    0x318    0x31B

The 64k line is the line to go, since we use 16bpp pictures.
You need to translate these values into dec:

    | 640x480  800x600  1024x768 1280x1024
----+-------------------------------------
hex |  0x311    0x314    0x317    0x31A
dec |   785      788      791      794

For a resolution of 1024x768, which is used, vga=791 is the right one.

So /etc/lilo.conf looks like this:

boot = /dev/hda
prompt
lba32
timeout = 30

menu-title = "Welcome to Linux"

image = /boot/splash-kernel
vga = 791
label = lfs
initrd = /boot/initrd.linux
root  = /dev/hda6

Of course, you have to adapt root= and boot= to your system.
Now, run /sbin/lilo


6. More tweaks
--------------
To switch off the bootscreen, use
echo "master" > /proc/splash

To enable the silent mode at startup, use splash=silent in the kernel
command line. In /etc/lilo.conf, use append="splash=silent".

To switch to silent mode at any time, use
echo "silent" >/proc/splash
(you need to have started with splash=silent).

To switch to verbose mode at any time, use
echo "verbose" > /proc/splash

To switch automagically to the first terminal, e.g. during shutdown, use
chvt 1

Progress bar handling:

The progress shows up only in silent mode and only, if you have defined
the "box silent ...." commands. 
See README.config in the bootsplash/Documentation directory for the syntax.

To show the progress bar:
echo "show XX" > /proc/splash
   where XX is a number from 0 to 65534. 
Use the following for automatic nice scrollbar:
echo "show $(( 65534 * ( $progress ) / $num ))" > /proc/splash
  where 
progress: current service
num: total number of services

To switch between the silent and the verbose mode during bootup, press "F2".

Enjoy!

ACKNOWLEDGEMENTS:
[1] A lot of material was taken from www.bootsplash.org

CHANGELOG:
[2003-12-01]
* first version



More information about the hints mailing list