I like eyecandy especially when it comes to my Linux workstation. I was pleasantly surprised when I first booted up my fresh install of Kubuntu 10.04. However after installing the NVIDIA drivers (Sigh. NVIDIA when will you learn? Open sourcing your drivers is not going to kill you.), I lost the pretty Kubuntu splash screen. After a lot of experimentation and searching the Web for a sane solution, I managed to not only bring back the splash screen but also add a pretty background for GRUB. Here is how:
1. Install the v86d package
sudo aptitude install v86d
Why exactly a daemon is needed to execute x86 code is beyond me. But without it GRUB2 and the initialization scripts refuse to show the proper splash screen. Instead you get the fallback purple Ubuntu text theme.
2. Edit Your Grub Config (/etc/default/grub)
This is a big step. You need to edit the GRUB2 configuration to add a few modsetting options. Otherwise things will not work out. You’ll need to edit the configuration first use your favourite text editor to edit the file. I use Vi for this example. If you prefer Kate or gedit to change the “sudo vi” parts to “kdesudo kate” or “gksudo gedit” throughout the manual.
sudo vi /etc/default/grub
You’ll need to change the following lines:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=" splash quiet vga=769"
To something like this:
#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" #GRUB_CMDLINE_LINUX=" splash quiet vga=769" GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodset video=uvesafb:mode_option=1280x1024-24,mtrr=3,scroll=ywrap"
Commenting out those lines prevents the original configuration. Note that the GRUB_CMDLINE_LINUX_DEFAULT should be one line, I put it on two lines for readability.. Instead we want to manually set the video mode of the framebuffer. Namely we want to use the uvesafb driver and to run the resolution at 1280×1024 with 24-bits of colour. If your screen uses a different resolution substitute it in the mode_option option. [It always good to check what resolutions your graphics card supports, by using the vbeinfo command when running inside of grub.]
mode_option=1280x1024-24
In addition, to you’ll need to change the following line:
GRUB_GFXMODE=640x480
To something like this:
GRUB_GFXMODE=1280x1024 GRUB_GFXPAYLOAD_LINUX=1280x1024x24
The first line sets the correct mode for the graphical console. The second one keeps the changes when switching over to Plymouth. If the second line sounds magical, I can just vouch it worked for me. Other users reported not needing this line or using the “keep” instead of an actual resolution.
3. Edit /etc/initramfs-tools/modules
Next up we need to update what options get included in our initramfs (initial ramdisk that gets loaded up first by Grub and that is used to initialize the entire system at boot). On the very bottom of the /etc/initramfs-tools/modules file, just add the following new line. This will make initramfs load up the right splash mode at boot.
uvesafb mode_option=1280x1024-24 mtrr=3 scroll=ywrap
4. Fixing the Splash Delay
This next step fixes the delay that normally happens when Plymouth runs at boot. Open and edit the /etc/initramfs-tools/conf.d/splash file. All you need is to add the following line on the bottom of the file:
FRAMEBUFFER=y
5. Updating GRUB2 and Initramfs
Before you can see the changes in actions, you need to update your initram and Grub installs. First you need to rebuild the initramfs image with:
sudo update-initramfs -uv
Then you need to update your Grub installation with:
sudo update-grub2
And you are done! Below I also mention how to modify which Plymouth theme gets used, and how to add a nice background image to Grub.
Changing the Plymouth Splash Theme
Before you can change the Plymouth theme, you will need to either install or build your own theme. I did not bother with building my own but the second link below gives instructions on how to build your own. Once you have some additional themes, you can switch between them by running:
sudo update-alternatives --config default.plymouth
Follow the on-screen instructions and rebuild your initramfs image as you did above.
Changing Grub’s Background
Just like with the Plymouth themes, you’ll need to install an extra package (e.g. grub2-splashimages) or create your own images. Next you will need to edit the script that sets up your Grub2 image. It seems a bit hackish, but at the moment there isn’t a better way to do this. So open the /etc/grub.d/05_debian_theme file with your favourite text editor. Look for the following line (should be line 10):
WALLPAPER="/usr/share/images/desktop-base/moreblue-orbit-grub.png"
All you need to do is to change the WALLPAPER value, to the full path of the image you want to use as your background. The third link below contains some useful guidelines for picking a background image with the correct dimensions and colour value. I would stick with an image that is 640×480 and 16 bit colours. Once you finish editing that line, remember to update your Grub2 install just like we did above.
And there you have it – a much nicer looking booting experience. I’d like to thank the following sources for letting me piece together this guide: