Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

grub-pc: custom splashscreen without rebuilding grub.cfg

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
User avatar
edbarx
Posts: 5401
Joined: 2007-07-18 06:19
Location: 35° 50 N, 14 º 35 E
Been thanked: 2 times

grub-pc: custom splashscreen without rebuilding grub.cfg

#1 Post by edbarx »

This is definitely not rocket science for anyone who read a little bit about unix-like systems like Linux. The tedious chore of rebuilding /boot/grub/grub.cfg can be made unnecessary if one uses a symbolic link pointing to the actual splashscreen image file. Then, one can update the symbolic link to point at whatever image one may want, provided grub-pc supports the image format.

This is the /boot/grub/grub.cfg code that loads my grub-pc splashscreen:

Code: Select all

if background_image /splash/splash.png; then
  set color_normal=white/black
  set color_highlight=green/black
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
Note the absolute path for the symbolic link splash.png. The splash images were placed in /splash in the grub dedicated partition. You can place your images in /boot in which case you can use /boot/splash.png.

As I said, splash.png is a symbolic link:

Code: Select all

lrwxrwxrwx 1 root root      13 Apr 28 14:49 splash.png -> caribbean.png
This can be created using the command:

Code: Select all

ln -s actual_image_file.png splash.png
After these changes, to change the splash screen there would be no need to update grub-pc. Updating the symbolic link is enough and obviously the linked image.

Enjoy! :)
Debian == { > 30, 000 packages }; Debian != systemd
The worst infection of all, is a false sense of security!
It is hard to get away from CLI tools.

Post Reply