Translation(s): English - Italiano - Русский
How to design and test a GRUB SplashImage.
GRUB v2 Splash Image
Grub2 is ready to display a graphical screen (GRUB v1.95 is also known as “version 2”, it's called grub by upstream ).
Image constraints :
- 640×480 pixels (you can change this, for instance 1024×768).
- 24 and 32bits True colors : 24 bits = 16 million colors ; 32 bits = 16 million colors + 8 bits for alpha channel).
- The text layout is fixed (including the frame).
- Specify a black background in "set menu_color_normal", in order to make GRUB menu transparent.
In order to make it easier to draw your image, I've created two templates with a transparent layer containing what GRUB will overlay...
So you know how to positions elements, and how everything will fit... It should save you quite some time.
GRUB v1 Splash Image
Debian/Etch 's GRUB is ready to display a graphical screen (GRUB v0.97 is also known as version 1, it's called grub-legacy by upstream ).
Image constraints :
file format : XPM
- 640×480 pixels (you can't change this)
16 colors (only 14 are available for your image, or 15 if all your background is black ).
- The text layout is fixed (including the frame).
In order to make it easier to draw your image, I've created two templates with a transparent layer containing what GRUB will overlay...
So you know how to positions elements, and how everything will fit... It should save you quite some time.
Of course, The first thing you should do is to change the ugly, grey background
Convert to XPM
There are many ways...
Open the image (SVG, scp, etc..) with GIMP, then change the image mode to index, 15 colors, then save as XPM. (note, the resulting may get distorted).
or Use imagemagick to convert the format (see the "Test with QEMU" below).
Test with QEMU / KVM
There's a floppy that is ready to test your graphics :
- Download and uncompress the floppy image (You'll have to do it once only).:
cd ~/ wget http://www.klabs.be/~fpiat/linux/boot/grub/grub_0.97-28-debian.floppy.gz gzip -d grub_0.97-28-debian.floppy.gz
- Test you splashimage (mount the floppy image, Convert your image, unmount the floppy, launch qemu)
mount ~/grub_0.97-28-debian.floppy /mnt -o loop rsvg-convert < ~/fp-debian(grub)-discret.svg > /tmp/temp_grub.png convert /tmp/temp_grub.png -resize 640x480 -colors 14 +dither /mnt/boot/grub/splashimages/test.xpm umount /mnt qemu -fda ~/grub_0.97-28-debian.floppy
- note 1 : you must unmount to sync the data to the floppy-image file.
note 2 : "+dither" actually means "don't dither" !
rsvg-convert belongs to the package librsvg2-bin
convert belongs to the package imagemagick
You may want to press Ctrl-Alt-F to switch qemu to Fullscreen mode, for a better "preview".
Check qemu screendump command to make a screenshot.
Add your Debian splash images for GRUB
Debian provide some images in grub-splashimages. Here are some other contributions.
GRUB v1 Preview |
GRUB v2 Preview |
Author |
None |
Franklin Piat (GPL license) |
|
Franklin Piat (GPL license) |
See also
use Gimp to create compressed TGA. Imagemagic-6.2.4 "convert -compress RLE" doesn't work. (1)