Sunday, August 27, 2006

Slackware Linux 10.2 Bootsplash Quick Howto -- by Excessive

Slackware Linux 10.2 Bootsplash Quick Howto
-------------------------------------
by Excessive

This document explains how to set up Bootsplash on a Slackware Linux 10.2 with Kernel 2.6.17.7.

1. Getting files

First, we have to get the required packages from www.bootsplash.org:

a. Bootsplash kernel patch:
ftp://ftp.openbios.org/pub/bootsplash/kernel/bootsplash-3.1.6-2.6.15.diff

b. Bootsplash utilities:

ftp://ftp.openbios.org/pub/bootsplash/rpm-sources/bootsplash/bootsplash-3.0.7.tar.bz2

c. Generic Linux theme:
ftp://ftp.openbios.org/pub/bootsplash/themes/Theme-Linux.tar.bz2

Please extract these archives to seperate folders. For example:

bootsplash-3.0.7.tar.bz2 to ~/bootsplash/tools
Theme-Linux.tar.bz2 to ~/bootsplash/themes

with tar or Midnight Commander (mc) before proceeding.

2. Preparing:

a. Patch your kernel:

Become root (via su) and navigate to /usr/src/linux directory (provided it is pointing the 2.6.17.7 kernel)

# cd /usr/src/linux

# patch -p1 < /path/to/bootsplash-3.1.6-2.6.15.diff

file drivers/char/keyboard.c
Hunk #1 succeeded at 1160 (offset 98 lines).
patching file drivers/char/n_tty.c
Hunk #1 succeeded at 1298 (offset 6 lines).
patching file drivers/char/vt.c
Hunk #1 succeeded at 3238 (offset -22 lines).
patching file drivers/video/Kconfig
Hunk #1 succeeded at 1473 (offset 4 lines).
patching file drivers/video/Makefile
patching file drivers/video/bootsplash/Kconfig
patching file drivers/video/bootsplash/Makefile
patching file drivers/video/bootsplash/bootsplash.c
patching file drivers/video/bootsplash/bootsplash.h
patching file drivers/video/bootsplash/decode-jpg.c
patching file drivers/video/bootsplash/decode-jpg.h
patching file drivers/video/bootsplash/render.c
patching file drivers/video/console/bitblit.c
patching file drivers/video/console/fbcon.c
Hunk #4 succeeded at 1104 (offset -4 lines).
Hunk #5 succeeded at 1729 (offset -6 lines).
Hunk #6 succeeded at 1819 (offset -4 lines).
Hunk #7 succeeded at 1965 (offset -6 lines).
Hunk #8 succeeded at 2083 (offset -3 lines).
Hunk #9 succeeded at 2207 (offset -3 lines).
Hunk #10 succeeded at 2413 (offset -3 lines).
patching file drivers/video/console/fbcon.h
patching file drivers/video/vesafb.c
Hunk #1 succeeded at 167 (offset -34 lines).
patching file include/linux/console_struct.h
patching file include/linux/fb.h

#

b. Now your kernel is patched, its time for us to enable bootsplash in the kernel:

# make menuconfig

Under Device Drivers > Block Devices

<*> RAM disk
(1) Default number of RAM disks
(4096) Default RAM disk size (kbytes) (NEW)
[*] Initial RAM filesystem and RAM disk (initramfs/initrd) support

Under Device Drivers > Graphics Support

<*> Support for frame buffer devices
[*] VESA VGA graphics support

Under Console display driver support

[*] Video mode selection support
<*> Framebuffer Console support
[*] Select compiled-in fonts
[*] VGA 8x8 font
[*] VGA 8x16 font

Under Logo configuration

[ ] Bootup logo (Disable it)

Under Bootsplash configuration

[*] Bootup splash screen

Save your new kernel configuration and compile:

# make ; make install ; make modules_install

CHK include/linux/version.h
CHK include/linux/compile.h
Kernel: arch/i386/boot/bzImage is ready (#6)
Building modules, stage 2.
MODPOST
Added Linux *
INSTALL drivers/hwmon/hwmon.ko
INSTALL .....
.
.
if [ -r System.map -a -x /sbin/depmod ]; then /sbin/depmod -ae -F System.map 2.6.17.7; fi

#

c. Compile the splash utility:

Navigate to the directory which you extracted the utilities (as a normal user):

$ cd ~/bootsplash/tools/utilities
$ make splash
gcc -Os -Wall -I/usr/include/freetype2 -L/usr/lib splash.c -o splash

Now become root and copy splash to /sbin/ :

# cp splash /sbin/

d. As now everything is in order, let's create our bootsplash configuration:

# mkdir /etc/bootsplash
# mkdir /etc/bootsplash/themes/

After creating directories, copy the contents of ~/bootsplash/themes to /etc/bootsplash/themes directory.
Again, copying with Midnight commander is easiest :)

After copying the contents of themes directory, a directory named Linux will be created at /etc/bootsplash/themes directory.

Let's create our initrd image with splash utility:

Recommendation: if you have a /boot/initrd.splash, remove it before issuing the command above.

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

Now, open your /etc/lilo.conf and add three lines:

vga = 791 (under # VESA framebuffer console @ 1024x768x64k line)
append="splash=silent" (under root = /dev/*** line)
initrd=/boot/initrd.splash (under append="splash=silent" line)

and save lilo.conf. after saving, execute the command:

# lilo
Added Linux *
#

and reboot.

Congratulations! You now have a brand new Bootsplash background under your beloved Slackware 10.2 system.
You can change the images of your theme at /etc/bootsplash/themes/Linux/images. Be sure to use:

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

after changing your images. If for some reason, your image doesn't show up at the console, check the size
of the image, and resave it with gimp. It will work that way.


You may send your problems to texcessive@gmail.com