Slackware Bootsplash Howto

3 02 2009

Hi all. I don’t know about any of you, but the fact that the original bootsplash patch is becoming obsolete and being superceded by sucky… sorry, I mean splashy… really pisses me off. I love the simplicity and speed of bootsplash, and splashy has failed to deliver on almost every front. It’s slow, ungraceful, difficult to make really pretty, and what annoys me more than anything is that the verbose mode is utter crap. Kernel panics will never be easy to diagnose again.

I don’t install bootsplash often enough to know it off by heart, and I find that every time I install Slackware on a new system I want to put a bootsplash on I can never exactly remember how — cue many frustrating wasted hours trying to get it sorted. I’d imagine it’s a problem that I’m not alone in encountering, so for your intellectual enjoyment (and hopefully to help retain your hair’s colour!), here’s a full howto.

NB: If you are a newbie to compiling kernels, creating initramfs images and reconfiguring LILO, then consider seriously practising/reading up on them before attempting this, as you could render your system unbootable.

Step 1: Patch, configure and install the kernel.

You’ll need a working patch for the kernel you’re using. Sometimes a patch from a previous kernel will work, but always patch with the following tags first:

patch --dry-run -p1 < bootsplash-3.1.6-$(uname -r)

This will just test the patch. If you get any HUNK FAILED messages, then DON’T USE IT! Also, if you are trying a patch from a different kernel, then replace $(uname -r) with the patch’s kernel version.

You will now need to configure the kernel using your favourite .config editor. I’m a huge fan of xconfig (type make xconfig in your kernel’s unpacked directory). You will need to turn OFF the existing bootup logo and turn on the bootup splash screen. It’s probably a good idea to make sure you have initrd/initramfs support in there too.

Now compile and install your kernel. If you don’t know how to do this, Eric Hameleers (Alien Bob) has written an excellent guide on his Dokuwiki. Take heed of all of his warnings, as doing this wrong could hose your computer. See you after the KERNEL PANIC.

Now boot up your new kernel.

Step 2: Download, compile and install the splash util.

There are countless copies of the splash utilities scattered around the internet, and the places you’ll find them change regularly, so I can’t give you a direct link, but version 3.0.7 seems to be a pretty good bet, and easy to find.

Once you have downloaded the package, just typing make will result in a huge b0rk-fest. The only binary you need is splash, so just type make splash, and you should be ok. Now copy this into /sbin and that’s step 2 complete.

Step 3: Make your initramfs format initrd.gz

I find this is where the guides all start to tell fibs. They all tell you just to use the splash binary and redirect the output to a file. THIS DOES NOT WORK. The reason being that Slackware now uses an initramfs image for it’s initial ramdisk, which is a compressed cpio archive. Just using this file will not be recognised, and annoyingly there will be no useful pointers to show you what’s wrong.

First off, you’ll want to download a bootsplash from somewhere. Kde-look has some pretty nifty ones. Now create the directory /etc/bootsplash/themes. Put the files you downloaded in here in the format /etc/bootsplash/themes/theme-name/images and themes/theme-name/config.

UPDATE (8/7/2011):

If you are creating your own images to use as a bootsplash, you will need to make sure that they must be in YCbCr 221111 JPEG format, which means that they must use the JPEG file format, YCbCr color space, and subsampling must be set to 2×2, 1×1, 1×1. This is achieved in GIMP by choosing JPG format, and then under Advanced Options, selecting 2×2, 1×1, 1×1 (smallest file) from the Subsampling drop down box. Simple when you know how!

Now to actually create the initramfs. First of all, check for the existence of a file called initrd.gz in your /boot folder. If there is one there, then you should back it up before proceeding, as it will now be blown away. Navigate to /boot and type:

mkinitrd -c -k $(uname -r) -f filesystem on root partition -r /dev/root partition

There will now be a folder called initrd-tree in /boot. This will be the contents of your initrd. Navigate to this folder and use the following command:
splash -s -f /etc/bootsplash/themes/theme-name/config/bootsplash-1024x768.cfg > bootsplash

This has placed some information for the kernel on the location of the bootsplash theme in the cpio archive. You now need to place the bootsplash into the folder in exactly the same directory structure that exists on your filesystem. Create the folder /boot/initrd-tree/etc/bootsplash/themes and copy in the bootsplash theme you downloaded and installed earlier.

To finish off our penultimate step, go to /boot again and type simply mkinitrd to compress the contents of /boot/initrd-tree into the initrd.gz file you will now see in the /boot folder.

Step 4: Reconfigure LILO and reboot.

Ok, we’ve got to the point of no return. You have a working bootsplash enabled kernel and a brilliantly put together initramfs image. Now you’ll need to modify the /etc/lilo.conf section which points at your new kernel as follows:
image = /boot/vmlinuz-custom-2.6.27.7-1 # Or whatever your kernel image is called
root = /dev/hda7 # Or whatever your root partition is.
label = Slacksplash # Name it anything you like
initrd = /boot/initrd.gz
append = "splash=silent"
read-only

You will also need to configure LILO to boot in the screen mode for whichever resolution and bit depth the splash image is in. You can find a list of VESA screen modes here. You can either use the decimal or hexadecimal values. Lilo will understand both, but make sure you prefix the hexadecimal number with 0x… Here is an example:

# First of all in decimal:
vga=791
# This is the same as the following in hexadecimal:
vga=0x317

If you get the screen depth wrong, all will appear to go fine, but you won’t get a splash image. I have to fiddle with this almost every time I apply a bootsplash!

Once you’ve got it configured, run lilo. I tend to use lilo -c -v as -c speeds up the initial loading of the kernel (compact mode), and -v gives you a whole bunch of useful information to help troubleshoot any problems.

Now reboot, select your kernel from the list and admire all the beautiful colours swirling across your screen.

That’s it… Done. Any questions just leave me a comment.

n00b


Actions

Information

14 responses

13 02 2009
Eric Hameleers

Nice little howto, I’ve bookmarked it.

Cheers, Eric

13 02 2009
n00bsys0p

Your thanks is much appreciated! Nice to know people notice!

X-T (aka n00b)

16 02 2009
Rouvas Stathis

At the bootspalsh.org site, version 3.0.7 that you recommend is tagged for 2.4.30, while ver.3.1.6 is tagged for 2.6.15. Are you certain that there are no problems using bootspalsh.3.0.7 against Slack.12.2 ?

In the past, I’ve successfully used both bootspash versions against their respective kernels, but I’ve stopped using bootsplash (and I dearly miss it) since Slack.12.1 and the updating of kernels in Slack. Are you suggesting that bootsplash version is irrelevant of the kernel version?

16 02 2009
n00bsys0p

In my experience, I’ve not had an issue using either bootsplash version with a 2.6 kernel. I’m no programmer, so I can’t tell you what the differences are between the versions, but they both work using this method. In practice I suppose it’s a better idea to use the more recent package, though.

The bootsplash patch is the only thing I’ve ever had a problem with between kernels. As I mentioned I’m not any sort of programmer, so I’m not really equipped for rolling my own. For the splash I implemented in writing the guide I used the Zenwalk 2.6.27 patch on the stock Slack 12.2 kernel source. I did have problems getting 2.6.28 to work with it though – It all patched fine then did nothing when I made the initrd.

Come back to the light, though, Rouvas! You know bootsplash is the only way to go! Aid us few bootsplash-champions in keeping it’s name alive!

n00b

21 02 2009
Rouvas Stathis

I haven’t thought of looking into Zenwalk….I’ll give it a try and let you know how it goes.

21 02 2009
n00bsys0p

Cool. If you hit any brick walls, just leave me a quick message.

n00b

9 03 2009
NeGr0

hi!
progressbar??? how to use??
my bar its frozen :S

10 03 2009
n00bsys0p

Hi NeGr0,

The main things to look for regarding the progress bar are:

1 – Bootsplash Version – Must be Version 3 to support all of the functionality.
2 – Configuration – The {resolution}.cfg file should have the bootsplash configuration in there. I’m not an expert on bootsplash configuration, but try the splash in the first link at the end of this comment, as I’ve used it successfully with the progress bar working.
3 – rc.S/rc.M scripts. There are a couple of different methods for getting your bootsplash progress bar implemented on Slackware. I’ve only ever really been successful with the one which implicitly sends a number to the splash program. Try link number 2 after this comment for a rundown on both methods. Ignore most of the information abouit implementing bootsplash, because it’s all wrong on that page.

Slackware splash with progress bar: http://www.kde-look.org/content/show.php/Slackware+Bootsplash?content=98310
Progress bar implementation: http://slackwiki.org/Bootsplash

n00b

13 03 2009
NeGr0

tnx for response n00b.
my problem was that it had not changed the permissions for bootsplash :$

13 03 2009
n00bsys0p

No problem. Glad to hear you fixed it. I take it you mean the permissions on /proc/splash? Always good to learn from others’ successes.

n00b

28 03 2009
Rag Sagar

i patched the kernel with a bootsplash patch i got from http:// www . esnips.com/doc/c7c42b44-3ebd-4ef5-ae3e-b055355518e8/bootsplash-3.1.7-2.6.27
But i cant see any options under “Boot Splash Configurations ” to turn on when running make menuconfig. Is that a problem with that patch?

29 03 2009
n00bsys0p

Hi Rag!

I can’t vouch for the patch you have linked, as I’m no C programmer, so have no idea how the patches actually work. Try the one from here. It’s a GZip, so just run gunzip bootsplash-3.1.6-2.6.27.diff.gz before you try to patch the kernel. This patch worked for me 100% ok on the 2.6.27.7 kernel source from http://www.kernel.org. Remember – do the –dry-run before actually patching, or you could mess up your kernel source badly.

To test if your uncompiled kernel’s .config will support bootplsah, go to your kernel source folder after applying the patch and run make menuconfig. Now quit out of this ncurses screen, save your configuration and type the following command: grep -i bootspalsh .config

If this comes up with CONFIG_BOOTSPLASH=y/n (y/n being one or the other), then your patch has worked. If you find that it says CONFIG_BOOTSPLASH=n, then edit the .config file directly with a text editor and change n to y then compile and install your kernel.

To test whether the currently running kernel supports bootsplash: Make sure you have CONFIG_IKCONFIG_PROC (“Enable access to .config through /proc/config.gz” in General Setup) enabled in the currently running kernel, then try zcat /proc/config.gz | grep -i bootsplash. If this comes up CONFIG_BOOTSPLASH=y, then the kernel you are currently running is configured for bootsplash.

Any questions just shout me on the site or if you want my email for more direct contact just let me know.

n00b

8 01 2013
Mark De Silva

Erm I know very old thread, but anyone have any luck keeping the bootsplash though KMS activation after the udev trigger?

8 01 2013
n00bsys0p

Hi Mark,

No, I’ve always had to use nomodeset to keep Bootsplash working. It’s a pain, because it also disables some functionality of the Intel X driver. If you ever do come up with a way of doing so, please let me know at my new site: http://n00bsys0p.co.uk

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Follow

Get every new post delivered to your Inbox.

%d bloggers like this: