HOWTO Framebuffer:Bootsplash:Grubsplash
Contents
* 1 2.6.8 and newer kernels
* 2 Objectives
o 2.1 Benefits
o 2.2 Drawbacks
* 3 High resolution framebuffer & bootsplash!
o 3.1 Kernel mode numbers
* 4 Setting framebuffer without bootsplash!
* 5 Smaller fonts on framebuffer for greater area!
* 6 Extending consolefont, framebuffer and bootsplash to all 12 virtual terminals!
* 7 Personalising your bootsplash theme!
* 8 Taking screenshots!
* 9 Personalizing your grub splash image!
* 10 Trivia:
* 11 See also
2.6.8 and newer kernels
As of 2.6.8 gensplash has taken over bootsplash.
From the Gentoo guide on migrating from 2.4 to 2.6:
bootsplash no longer maintained
If you used the gentoo-sources-2.4 kernel, you may have used the bootsplash functionality in order to provide yourself with a colourful framebuffer console.
The developer of bootsplash appears to have lost interest in his project, given some design problems. However, Gentoo developer Michal Januszewski is developing a successor, gensplash, which is included in the gentoo-sources-2.6 kernel. You can follow Michal's Gensplash in 5 easy steps document in order to familiarize yourself with how gensplash is operated."
Note: This HowTo is mainly for BootSplash, go here for GenSplash, which includes the use of Spock's fabulous bootsplash2fbsplash tool for converting old Bootsplash themes to GenSplash.
Objectives
* High resolution framebuffer
* High resolution bootsplash image
* Smaller fonts on framebuffer for greater area
* Greater choice of fonts for varied appearance
* Personalising your bootsplash theme
* Taking screenshots of your framebuffer and bootsplash
* Using multimedia apps and graphical browser on framebuffer
* Personalising your grub splash screen image
* Extending framebuffer and bootsplash to all 12 virtual terminals
Benefits
* Higher resolution
* Configurable and pretty appearance
* Multimedia and graphical browser capability on VTs
* Framebuffer will work on any kernel version
Drawbacks
* Slow scrolling of text output on VT's
* Reduced or zero scroll back buffer
High resolution framebuffer & bootsplash!
Emerge media-gfx/bootsplash (graphical backgrounds for frame buffer consoles).
Warning: with the latest kernels (from gentoo-sources 2.6.8-r1) bootsplash has been replaced by gensplash and this part of the howto doesn't apply anymore ! for further information, see HOWTO gensplash.
emerge splashutils
Overwrite your old bootsplash configuration files.
etc-update
Check that the symbolic link /usr/src/linux is pointing to the kernel of your choice.
readlink -f /usr/src/linux
Some kernels such as gentoo-sources, gaming-sources and xfs-sources already have the bootsplash patch built in. Check whether your kernel supplies bootsplash and if it does not have it then patch the kernel as below.
Warning: This patch does not apply cleanly to current (Aug 22, 2004) gentoo-sources or development-sources!
bootsplash_patch
Enter the kernel configuration.
make menuconfig
For all kernel trees build these options directly into your kernel. Do NOT make them modules and do not enable nvidia or ATI specific options.
For 2.6.x kernel tree enable the following options.
Linux Kernel Configuration: 2.6.x
General setup --->
[*] Prompt for development and/or incomplete code/drivers
Processor type and features --->
[*] MTRR (Memory Type Range Register) support
Device Drivers --->
Block devices --->
<*> Loopback device support
<*> RAM disk support
(4096) Default RAM disk size
[*] Initial RAM disk (initrd) support
Graphics support --->
[*] Support for frame buffer devices
[*] VESA VGA graphics support
Console display driver support --->
[*] Video mode selection support
<*> Framebuffer Console support
Bootsplash configuration --->
[*] Bootup splash screen
For 2.4.x kernel tree enable the following options.
Linux Kernel Configuration: 2.4.x
Code maturity level options --->
[*] Prompt for development and/or incomplete code/drivers
Processor type and features --->
[*] MTRR (Memory Type Range Register) support
Block Devices ->
[*] Loopback device support
[*] RAM disk support
(4096) Default RAM disk size
[*] Initial RAM disk (initrd) support
Console Drivers ->
[*] VGA text console
[*] Video mode selection support
Console Drivers -> Frame-buffer support ->
[*] Support for frame buffer devices
[*] VESA VGA graphics console
[*] Use splash screen instead of boot logo
For any kernel do NOT enable the following options or else you risk bootsplash not working or framebuffer corruption when switching VTs.
Linux Kernel Configuration: Any kernel
Device Drivers --->
Graphics support --->
< > nVidia Riva support (do not enable!)
Logo configuration --->
[ ] Bootup logo (do not enable!)
If you have problems later disable the following option in kernel
Linux Kernel Configuration: Any kernel
Device Drivers --->
Character devices --->
< > /dev/agpgart (AGP Support)
And add the following line to your /etc/X11/XF86Config[-4] or /etc/X11/xorg.conf file.
Option "NvAGP" "1"
* Compile your kernel as below for 2.6.x kernel.
make && make modules_install
* Compile your kernel as below for 2.4.x kernel.
make dep && make clean bzImage modules modules_install
Install your kernel as below but do NOT unmount /boot and do NOT reboot until asked to later.
mount /boot
mv /boot/bzImage /boot/bzImage.old
cp /usr/src/linux/arch/i386/boot/bzImage /boot/
If you get errors during kernel compilation or missing options during configuration do as below.
cd /usr/src/linux/
mv .config ~/kernel.config
make mrproper
mv ~/kernel.config .config
make oldconfig
make menuconfig
Assuming /boot is mounted set an image to appear during the boot process.
/sbin/splash -s -f /etc/bootsplash/default/config/bootsplash-1280x1024.cfg >> /boot/initrd-1280x1024
Or you can copy an already exisiting initrd image that is provided with the bootsplash package.
cp /usr/share/bootsplash/initrd-1280x1024 /boot/
Edit your /boot/grub/grub.conf file. The example below has been provided for your convenience. Here are the meanings of the various parameters.
video= goes on kernel line and controls display options such as ywrap and mtrr which speed up framebuffer scrolling
vga= goes on kernel line and controls the resolution and colour depth of framebuffer
splash= goes on kernel line and takes either 'silent' or 'verbose' but silent boots may not work
initrd= goes on a new line after kernel line and loads an image during the booting process.
default 0
timeout 10
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
# With both framebuffer and bootsplash
title=Gentoo GNU/Linux 1.4 (+fb +splash)
root=(hd0,0)
kernel=/bzImage root=/dev/hda3 video=vesafb:ywrap,mtrr vga=0x31A splash=silent
initrd=/initrd-1280x1024
# With framebuffer but without bootsplash
title=Gentoo GNU/Linux 1.4 (+fb -splash)
root=(hd0,0)
kernel=/bzImage root=/dev/hda3 video=vesafb:ywrap,mtrr vga=0x31A
# Without both framebuffer and bootsplash
title=Gentoo GNU/Linux 1.4 (-fb -splash)
root=(hd0,0)
kernel=/bzImage root=/dev/hda3
Here is a lilo.conf example configuration courtesy of ophidia.
image = /boot/vmlinuz
root = /dev/hdaX
label = Gentoo
initrd = /boot/initrd (/boot/initrd is symbolic link on your initrd)
vga = 0x317
append="video=vesafb:ywrap,mtrr:2 splash=silent" #(generally in that order) for 2.6.13 kernel onwards
1. append="video=vesafb:ywrap,mtrr splash=silent" #(generally in that order) for 2.6.x kernel
# append="video=vesa:ywrap,mtrr splash=silent" # for 2.4.x kernel
read-only
Note that in the above grub and lilo configuration examples the keyword 'vesafb' is applicable to 2.6.x kernels. For 2.4.x kernels it should be changed to 'vesa'.
Kernel mode numbers
Here is a chart of kernel mode numbers for the 'vga=' boot parameter. Colours 640x400 640x480 800x600 1024x768 1152x864 1280x1024 1400x1050 1600x1200
4 bits ? ? 0x302 ? ? ? ? ?
8 bits 0x300 0x301 0x303 0x305 0x161 0x307 ? 0x31C
15 bits ? 0x310 0x313 0x316 0x162 0x319 0x340 0x31D
16 bits ? 0x311 0x314 0x317 0x163 0x31A 0x341 0x31E
24 bits ? 0x312 0x315 0x318 ? 0x31B 0x342 0x31F
32 bits ? ? ? ? 0x164 ? ? ?
Note that 32-bit video modes do not support bootsplash images.
Look at the following reference files if you need more detailed information.
* /usr/share/bootsplash/grub.conf.sample
* /usr/src/linux/Documentation/fb/vesafb.txt
* /usr/src/linux/Documentation/svga.txt
Add bootsplash to the default run level so that it starts on every boot.
rc-update add bootsplash default
Reboot and bask in the glory of bootplash wonder. To remind yourself of what kernel parameters you booted with do as below.
cat /proc/cmdline
Setting framebuffer without bootsplash!
To have a framebuffer only without bootsplash for greater area remove bootsplash from your default run level and reboot.
rc-update del bootsplash default
Remove or comment out this line from your chosen menu entry in grub.conf.
initrd=/boot/initrd-1280x1024
Smaller fonts on framebuffer for greater area!
Open /etc/rc.conf and change the following variable. For Gentoo 2005.0 you find it in /etc/conf.d/consolefont
CONSOLEFONT="default8x9"
To see what other fonts are available for use look in the following location and add the name without the extension to /etc/rc.conf.
/usr/share/consolefonts
Extending consolefont, framebuffer and bootsplash to all 12 virtual terminals!
Open /etc/init.d/consolefont and change all instances of
for x in 1 2 3 4 5 6 7 8 9 10
to
for x in {1..12}
If you cannot find "for x in 1 2 3 4 5 6 7 8 9 10" in /etc/init.d/consolefont then it might be possible that you have to change /etc/conf.d/rc Change
RC_TTY_NUMBER=11
to
RC_TTY_NUMBER=12
Open /etc/conf.d/bootsplash.conf and change the following variable as below.
BOOTSPLASH_TTYS="0 1 2 3 4 5 7 8 9 10 11"
For the above changes to take effect you can either reboot or restart the above init.d scripts as below. Voila!
/etc/init.d/consolefont restart
/etc/init.d/bootsplash restart
Personalising your bootsplash theme!
Create your own directory structure called 'personal'.
mkdir -p /etc/bootsplash/personal/images/
cp -r /etc/bootsplash/gentoo/config /etc/bootsplash/personal/
Change the symbolic link for the default theme.
rm /etc/bootsplash/default
ln -s /etc/bootsplash/personal /etc/bootsplash/default
Open /etc/conf.d/bootsplash.conf and change it as below.
BOOTSPLASH_THEME=default
Copy images of your choice and of correct resolution and depth into /etc/bootsplash/personal/images/. Make sure images have a resolution of 96x96 and not 300x300. Note that this is not image size but rather 'pixels per inch'. For more information look here. Open /etc/bootsplash/default/config/bootsplash-1280x1024.cfg and change paths below to point to your images.
File: /etc/bootsplash/default/config/bootsplash-1280x1024.cfg
jpeg=/etc/bootsplash/default/images/bootsplash-1280x1024.jpg
silentjpeg=/etc/bootsplash/default/images/silent-1280x1024.jpg
To have your image appear during boot add it to /boot otherwise omit this step.
mount /boot
/sbin/splash -s -f /etc/bootsplash/default/config/bootsplash-1280x1024.cfg >> /boot/initrd-1280x1024
Or with a newer version do:
mount /boot
/sbin/bootsplash_initrdgen default
cp /usr/share/bootsplash/initrd-default-1280x1024 /boot/initrd-1280x1024
Note: you can replace default with any themename you want. Reboot, test and post feedback.
Taking screenshots!
emerge fbgrab
fbgrab ~/console.png
Personalizing your grub splash image!
emerge gimp
wget http://dhruba.codewordt.co.uk/files/grub-image.scm -P ~
mv ~/grub-image.scm /usr/share/gimp/1.2/scripts/
use ftp://ftp.yi.se/pub/games/quakeworld/users/hardcampa/bootsplash/grub-image.scm for backup porposes
Start gimp and open an image of your choice. Right click on the image, select File, Grub Boot Image and save in your home directory. A sample image is provided in instructions below for you to try. Other images can be found here which is a very useful resource.
wget -P ~
mv ~powered-by.xpm.gz /boot/grub/
Modify /boot/grub/grub.conf to point to the new image.
splashimage=(hd0,0)/boot/grub/gentoo-boot.xpm.gz
To create images of the correct kind either follow the command line instructions at linux.tkdack.com duplicated below for convenience or use the gimp plugin.
convert -size 800x600 file.jpg -resize 640x480 -colors 14 -profile '*' file.xpm
gzip file.xpm
Trivia:
For trivia first emerge aalib, svgalib and DirectFB. You can set additonal USE flags for MMX and SSE for DirectFB.
* Mplayer on framebuffer: Try 'emerge mplayer' and then 'mplayer -vo fbdev '.
Try out this link: HOWTO Mplayer on Framebuffer
* Graphical browser on framebuffer:
emerge links
chown root:root /usr/bin/links2
chmod +s /usr/bin/links2
links2 -g -driver directfb.
Other drivers are X, vesa, svgalib and fb. Try them all and see what works best for you. How did links go for you? For the fb driver you may have to enable gpm. Edit the gpm config file and start it through the init.d script.
Note: If you have the 2.6.8 version of the linux kernel, this will not work. Check out gensplash for a suitable replacement.
阅读(1739) | 评论(0) | 转发(0) |