Docs/Howto/Bootsplash
From Mandriva Community Wiki
Various information about how the Mandriva bootsplash works.
see http://www.bootsplash.org/ for more information
Contents |
[edit] Configuration files
You need to have splash=silent in your kernel command line
[edit] /etc/sysconfig/bootsplash
# -*- Mode: shell-script -*- # Specify here if you want to add the splash logo to initrd when # generating an initrd. You can specify : # # SPLASH=no to don't have a splash screen # SPLASH=auto to make autodetect the splash screen # SPLASH=INT Where Integer could be 800x600 1024x768 1280x1024 1600x1200 # SPLASH=auto # Choose the themes. The should be based in # /usr/share/bootsplash/themes/ THEME=Mandriva # Say yes here if you want to leave the logo on the console. # Three options : # # LOGO_CONSOLE=no don't display logo under console. # LOGO_CONSOLE=yes display logo under console. # LOGO_CONSOLE=theme leave the theme to decide. # LOGO_CONSOLE=theme
[edit] /etc/bootsplash/themes/$THEMES/config/
# This is the configuration file for the 1024x768 bootsplash picture. # This file is necessary to specify the coordinates of the text box on the # splash screen. version=3 # should the picture be displayed? state=1 # fgcolor is the text foreground colour. # bgcolor is the text background (i.e. transparent) colour. 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=40 ty=116 tw=944 th=612 # ttf message output parameters text_x=20 text_y=20 text_size=22 text_color=0xeef4ff # name of the picture file (full path recommended) jpeg=/usr/share/bootsplash/themes/Mandriva/images/bootsplash-1024x768.jpg silentjpeg=/usr/share/bootsplash/themes/Mandriva/images/silent-1024x768.jpg progress_enable=1 # background box silent noover 512 732 1000 752 #04045498 box silent inter 512 733 512 751 #99ccff #99ccff #324bb0 #526bb0 box silent 512 733 1000 751 #99ccff #99ccff #324bb0 #526bb0 # black border box silent 512 732 1000 732 #313234 box silent 512 752 1000 752 #eef4ff box silent 512 732 512 752 #313234 box silent 1000 732 1000 752 #eef4ff # text box (left, top) box 35 111 35 729 #313234 box 36 111 985 111 #313234 # (right, bottom) box 985 112 985 729 #eef4ff box 36 729 985 729 #eef4ff # box itself box noover 36 112 984 728 #04045498 overpaintok=1 LOGO_CONSOLE=vt
[edit] Images
[edit] lilo images
Basically you need to convert a bmp image to a lilo understandable image: use the lilo-bmp2mdk script for that purpose. The initial image must be saved with a 128 colors palette.
lilo-bmp2mdk mode:0x103 timer:425,562,126+64,27+64 entry:218,174,27+64,30+64,11,55 clear:600,800,127+64 pos:0,0 < Source-images.bmp > lilo-message.msg
[edit] VESA modes
Choose an 8-bit VESA mode, here are some examples:
hex mode | width (px) | height (px) | notes/comments |
---|---|---|---|
0100 | 640 | 400 | needed for some old laptops |
0101 | 640 | 480 | works on very old hardware |
0103 | 800 | 600 | works on anything not seriously ancient, good lowest common denominator |
0105 | 1024 | 768 | |
0107 | 1280 | 1024 | |
0130 | 1600 | 1200 | feeling lucky? might not work on all chipsets |
[edit] boot images
Images must be saved as jpeg with quality 0.75 without any other option (usually called optimize and progressive) enabled.
Images can be stored anywhere, the default location is /usr/share/bootsplash/themes/$THEME/images/
[edit] Installing a new bootsplash
Whenever a new theme has been installed and you want to have it used by default you should first check the /etc/sysconfig/bootsplash theme, and then recreate an initrd with the mkinitrd script (and update your bootloader). To recreate initrd for an already installed kernel, type the following command (where XXX is the kernel version name, e.g. 2.6.11.6smpmdk. If you want to recreate initrd for your running kernel, this name can be displayed using the command uname -r ):
# mkinitrd /boot/initrd-XXXX.img XXXX # /usr/share/bootsplash/scripts/make-boot-splash /boot/initrd-XXXX.img 1024x768
or use instead:
# installkernel XXXX
which creates the new initrd and adds a new entry in the bootloader.
[edit] Test a bootsplash
The following command will display the bootspash image in your first console:
# splash -s -u 0 /etc/bootsplash/themes/your_theme/config/bootsplash-your_res.cfg
To test the progress bar use:
# echo "show 15000" > /proc/splash
[edit] "Integration" with GDM theme
If you wonder why X always displays a blue background just before gdm is started and displays the (maybe) matching theme: This seems to be a patch done by Mandriva (see http://cvs.mandriva.com/cgi-bin/cvsweb.cgi/SPECS/XFree86/XFree86-4.2.99.3-mandrakelinux-blue.patch) which unfortunately doesn't allow changes without recompiling X.