a simple howto on customizing the bootsplash on SuSE linux

(this might work on other distros if they use '/sbin/mkinitrd' to build the init ram disk.)

Requirements

most any desktop system since 9.1

unless you've done any hacking on the kernel, then you need to ensure you've compiled framebuffer support, console driver support, and has the bootsplash patch added and compiled into the kernel as well

packages mkinitrd and bootsplash

on my 10.2 install the versions are

bootsplash-3.3-38
mkinitrd-1.2-149

note-able locations

/boot/ location of initrd and kernel
/etc/bootsplash/themes/<THEMENAME>/ your theme directory
/etc/sysconfig/bootsplash system bootsplash config file
/boot/grub/menu.lst grub bootloader menu

the config file

when the initrd is built using mkinitrd, it looks to the file for whether add a bootsplash and theme to use.

in the /etc/sysconfig/bootsplash file
ensure that

SPLASH="YES"

and comment out (#) the default
THEME="SuSE"

and add a line for the <THEMENAME> you are creating

THEME="<THEMENAME>"

the theme

mkdir /etc/bootsplash/themes/<THEMENAME>
mkdir /etc/bootsplash/themes/<THEMENAME>/config
mkdir /etc/bootsplash/themes/<THEMENAME>/images
  • in the images folder
    you can store all the different, but the default size is 1024x768.
    the two files will be bootsplash-1024x768.jpg (for verbose) and silent-1024x768.jpg (for silent...)
    the sizes on these images need to be less than 200k.
  • as for any animations
    they are '.mng' files (MNG not GIF), like '.png' except they can do animations. the problem is that there are not any editors that are readily available to edit these, BUT if you want to try, gimp can 'save as' mng, but it can not re-open it. so i either found other peoples animations or used the SuSE default icon and spinner.
  • in the config folder
    you'll have a
    bootsplash-<SIZE>.cfg
    for each resolution you want to be able to build.
    for this i just copied over the cfg from the /etc/bootsplash/themes/SuSE/config/bootsplash-<SIZE>.cfg that is the same resolution that i'm creating
    the base 1024x768 cfg looks like
    version=3
    state=1
    progress_enable=0
    overpaintok=1
    
    
    fgcolor=7
    bgcolor=0
    
    tx=20
    ty=60
    tw=994
    th=708
    
    
    jpeg=/etc/bootsplash/themes/batts/images/bootsplash-1024x768.jpg
    silentjpeg=/etc/bootsplash/themes/batts/images/silent-1024x768.jpg
    
    
    mnganim logo /etc/bootsplash/themes/batts/images/logo.mng initframe logo silent center 866 614
    mnganim logov /etc/bootsplash/themes/batts/images/logov.mng initframe logov origin 0 0 0
    mnganim infotext /etc/bootsplash/themes/batts/images/infotext.mng initframe infotext silent center 878 652
    
    mnganim anim /etc/bootsplash/themes/batts/animations/spinner.mng silent deltaprevbg center 782 614
    
    trigger silent play anim
    trigger "isdown" quit
    trigger "rlreached 5" toverbose
    trigger "rlchange 0" tosilent
    trigger "rlchange 6" tosilent

the jpeg= and silentjpeg= are your key config here
the mnganim points to the graphic and its orientation, pixel coordinates
the triggers are for when changes the display for its progress or the runlevel currently reached.

if you prefer to add a progress bar instead of animations then there are few slight differences, below is the current config for the awarix thin client bootsplash

# config file version
version=3

# should the picture be displayed?
state=1

# fgcolor is the text forground color.
# bgcolor is the text background (i.e. transparent) color.
#fgcolor=2
fgcolor=7
bgcolor=0

# (tx, ty) are the (x, y) coordinates of the text window in pixels.
# tw/th is the width/height of the text window in pixels.
tx=35
ty=60
tw=650
th=615

# ttf message output parameters
text_x=272
text_y=615
text_size=19
#text_color=0x3f4398
#text_color=0xeef4ff

# name of the picture file (full path recommended)
jpeg=/etc/bootsplash/themes/awarix/images/bootsplash-1024x768.jpg
silentjpeg=/etc/bootsplash/themes/awarix/images/silent-1024x768.jpg

progress_enable=1

#(ax, ay) are the (x, y) coordinates for playing boot/shutdown animations
ax=910
ay=135

# background
box silent noover 74 667 948 690 #ffffff
box silent inter  74 667 74 690 #adc7dc #3f4398 #adc7dc #3f4398
box silent        74 667 948 690 #adc7dc #3f4398 #adc7dc #3f4398


overpaintok=1

the initrd

once you have your theme like you think you want, change directory to /boot
if you just call mkinitrd it will assume a lot of implied configurations and will overwrite files, so i don't like to do this. give it as many options as you can.
for example

[root@cyrus] 535 mkinitrd -s 1280x1024 -k vmlinuz-2.6.18.2-34-default -i initrd-2.6.18.2-34-test
Root device:    /dev/mapper/root (mounted on / as reiserfs)
Module list:    processor thermal ahci ata_piix fan jbd ext3 edd dm-mod dm-snapshot dm-crypt (xennet xenblk dm-mod dm-snapshot)

Kernel image:   /boot/vmlinuz-2.6.18.2-34-default
Initrd image:   /boot/initrd-2.6.18.2-34-test
Adding the root filesystem module (reiserfs)
Shared libs:    lib/ld-2.5.so lib/libacl.so.1.1.0 lib/libattr.so.1.1.0 lib/libc-2.5.so lib/libdevmapper.so.1.02 lib/libdl-2.5.so lib/libhistory.so.5.1 lib/libncurses.so.5.5 lib/libpthread-2.5.so lib/libreadline.so.5.1 lib/librt-2.5.so lib/libutil-2.5.so lib/libuuid.so.1.2 lib/libvolume_id.so.0.73.0 lib/libnss_files-2.5.so lib/libnss_files.so.2 lib/libgcc_s.so.1
Driver modules: scsi_mod sd_mod processor thermal libata ahci ata_piix fan edd dm-mod dm-snapshot dm-crypt aes-i586 sha1 sha256
Filesystem modules:     jbd mbcache ext3 reiserfs
Including:      initramfs fsck.reiserfs
Bootsplash:     batts (1280x1024)
18039 blocks

this will specify the size you want and will create a new initrd called initrd-2.6.18.2-34-test only for kernel vmlinuz-2.6.18.2-34-default. if you don't specify a size, it will add support for whatever sizes you have in the /etc/bootsplash/themes/<THEMENAME>/config/ folder.

grub bootloader

edit the /boot/grub/menu.lst file and go to the title entry you are going to boot from

it might be safe to copy it down to a new section in case it doesn't boot properly

and point the initrd line to the initrd file you just created. Also, the vga= option on the kernel line needs to be set to the resolution you configured the bootsplash for, i typically do mine in hex, but i understand that it can be done in octal as well.
MODES

Color depth      | 640x480  800x600  1024x768 1280x1024
-----------------+-------------------------------------
256        (8bit)|  769      771       773      775
32000     (15bit)|  784      787       790      793
65000     (16bit)|  785      788       791      794
16.7 Mill.(24bit)|  786      789       792      795

Colours   640x400 640x480 800x600 1024x768 1152x864 1280x1024 1600x1200
  -------+--------------------------------------------------------------
  4 bits |    ?       ?     0x302      ?        ?        ?         ?
  8 bits |  0x300   0x301   0x303    0x305    0x161    0x307     0x31C
 15 bits |    ?     0x310   0x313    0x316    0x162    0x319     0x31D
 16 bits |    ?     0x311   0x314    0x317    0x163    0x31A     0x31E
 decimal |           d785    d788     d791
 24 bits |    ?     0x312   0x315    0x318      ?      0x31B     0x31F
 decimal |           d786    d789     d792
 32 bits |    ?       ?       ?        ?      0x164      ?

example

title 2.6.18.2-34
    root (hd0,3)
    kernel (hd0,1)/vmlinuz-2.6.18.2-34-default root=/dev/sda4 vga=0x31A resume=/dev/sda1 splash=verbose
    initrd (hd0,1)/initrd-2.6.18.2-34

reboot and cross your fingers