HOWTO: Custom Bootsplash in Sabayon4
- 1 Custom Bootsplash in Sabayon4
- 2 About Bootsplashes in Sabayon4
- 3 Creating a theme by editing a default one
- 4 Using Gimp to make/change your pictures
- 5 Preview your theme without installing anything
- 6 Hacking the initramfs
- 7 Create a Grub Entry for Your Hacked Initramfs
- 8 Why is this useful?
- 9 Some Final Warnings
Custom Bootsplash in Sabayon4
After destroying my system twice (thank the gods for partimage!) I finally found out how to get a custom bootsplash in Sabayon4 and I write this to share my findings with everyone interested before you have to go through the same trouble as I did. The key - and the trap - is the initialramfs!
You'll either end up with a system that doesn't boot because most stuff will be missing from initramfs (if you just create initramfs), or you'll end up with a custom kernel and custom kernel modules lacking stuff the original had - like nvidia support!! If that happens, you'll have a lot of work to do, because just booting a failsafe copy of the old kernel will not work as the modules are differnt!
So if you want to have a custom bootsplash in Sabayon4, you can follow this howto in which I'll show you something unconventional: hacking the initramfs and editing it manually. I'll try to expain everything in detail so that even not so experienced users can do it. So don't get annoyed thinking 'get to the point, I already know this!', if you're a more experienced user, maybe you skip to the end of this article just for the intramfs hacking.
About Bootsplashes in Sabayon4
To get started: The splash themes can be found in /etc/splash,
I recommend you install the package 'bootsplash-themes' with Spritz, they are by default for another program (bootsplash) but will be automatically converted to work with splash-utils (the program Sabayon4 uses).
Then, choose a theme you like, you can test them the following way: Open a terminal and type:
splash_manager -c list
This will show you all themes available, to test them, type:
splash_manager -c demo --theme=THEME_NAME
Creating a theme by editing a default one
If you don't find anything you like, pick one as a base, we will edit it. To do so, open a root konqueror (kdesu konqueror /), goto /etc/splash and copy the folder of the theme you'll use as a base to /etc/splash, of course you'll have to choose a new name for the folder and your theme (let's call it 'custom_splash' here). Now, go to your new folder. Inside, you'll find a .cfg file and a folder for the images. Edit the .cfg file if you want to change the progress bar or the text area (in pixels) for verbose mode. If you want to see how your edited progress bar(s) behave, just save the file and run 'splash_manager -c demo --theme=custom_splash' for a preview.
By the way, I picked the 'Deflorist' theme as a base, because the two crossing progress bars look really great.
Now, for your own images: Goto the image folder and you'll find two images: silent and verbose. Silent is the normal bootsplash picture and verbose is the background for the tty1 konsole (you can get it with ctrl+alt+f1 and switch back to your graphic session with ctrl+alt+f7 if you didn't know this).
Using Gimp to make/change your pictures
If you want your own pictures, they have to be correct size and must have the correct color depths. The easiest way to accomplish this is the following: Open your own picture with gimp and scale it to the correct size. Open the picture you want to replace (silent or verbose) with gimp also. Go to your own picture, scale the window to be bigger than the image, click the first tool icon (boxed selection) and select your whole picture. You can grab a bigger area (that's why we scaled the window, makes selection easier), it doesn't matter. Now press ctrl+c to copy the image. Click the window with the original image (verbose or silent) and press ctrl+v to paste your own image over the old one. This way, you can be sure the resulting file will have correct format. Save the old file (overwrite it). Now you can test your theme again (as explained above) and if you like it, we can proceed to the next step.
Preview your theme without installing anything
Reboot your system and when grub starts look for 'splash=silent,theme:sabayon' in the kernel parameters and change that to 'splash=silent,fadein,theme:custom_splash' (fadein is optional but adds a neat effect!). Then press enter to boot. Don't worry, your splash theme is not in the initramfs and thus not available at boot time, so it will only show up about half way into the boot process. If that works, we can now hack initramfs to make it available just after the boot menu.
Hacking the initramfs
To do so, open a root konqueror and in /root create a subfolder called initramfs_hack. Copy the file initramfs-genkernel-x86_64-2.6.27-sabayon (or whatever your initramfs is called) from /boot to /root/initramfs_hack. You can do this with drag and drop if you use two root konqueror windows, but make sure to COPY it, not to MOVE. Now, with the root konqueror window showing the content of /root/initramfs_hack active, press F4 to open a terminal for that folder. Type:
gzip -dc initramfs-genkernel-x86_64-2.6.27-sabayon | cpio -i
(and change the filename to what your initramfs is called) to unpack it, then delete the initramfs file from your /root/initramfs_hack folder (if you don't do this, you'll repack the old archive into the new one, so delete it first). After unpacking, you'll have a /root/initramfs_hack/etc/splash folder, this is where your theme goes, so copy the /etc/splash/custom_splash folder to /root/initramfs_hack/etc/splash (you can again drag and drop with root konqueror). Now, let's repack it: go back to the root terminal for /root/initramfs_hack and type:
find . -print | cpio -o -H newc | gzip -9 > initramfs_hacked 2> /dev/null
This will repack the folder and leaves you with a file called initramfs_hacked in the folder /root/initramfs_hack. Copy or move this file to /boot (you can drag and drop with root konqueror).
Create a Grub Entry for Your Hacked Initramfs
Now edit /boot/grub/grub.conf and you're done: Mark the whole first block for Sabayon and copy it to the end of the file, call it 'Sabayon with hacked initramfs' or something. Do not overwrite the original block yet, you can do it later if everything works. In this block, find the line 'initrd /boot/initramfs-genkernel-x86_64-2.6.27-sabayon' and edit it to 'initrd /boot/initramfs_hacked'. Also in that block, look for 'splash=silent,theme:sabayon' and change that to 'splash=silent,fadein,theme:custom_splash' (again: fadein is optional but adds a neat effect!). Save the file, reboot and select the new option to test it. If everything works, make that grub entry your default (or move to first block in the file). If it doesn't work, no harm done, because all your original stuff is still there.
Why is this useful?
This way, we can change the bootsplash without any recompiling and stuff, safe and sound. You don't have to compile anything and if you followed the steps correctly no harm could have been done.
Some Final Warnings
This page was created by frisil and it's my first wiki page ever, so be kind on me...