Friday, 26 June 2009

Slackware Bootsplash Howto

- SOURCE: http://n00bsys0p.wordpress.com/tag/slackware/
------------------------------------------------------------
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.
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
Now run lilo. I tend to use lilo -c -v as -c speeds up the initial
loading of the kernel, and -v gives you a whole bunch of useful
information.
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





















No comments: