How to change splash screen on grub menu during boot?

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7

Issue

How to change splash screen on grub menu during boot?

Resolution

For Red Hat Enterprise Linux 5 and 6:

  • Copy any image to make as a splash image

  • Login as root user and then change the grub directory as shown below:

# cd /boot/grub/
  • Install the gimp package
# yum install gimp*
  • Create a new directory for custom images resulting with the directory path of /boot/grub/images
# mkdir images
  • Next copy the image into the image directory and then changing to the new directory
# cd /boot/grub/images
  • Run the following to convert the image to xpm:
# convert myimage.jpg -resize 640x480! -colors 14 -depth 8 custom-image.xpm
  • Continue by compressing the image into gzip format:
# gzip custom-image.xpm
  • This result of this should leave a file as custom-image.xpm.gz

  • Use a text editor to edit grub.conf such as vi, vim emacs etc.

# vi /boot/grub/grub.conf
  • When altering location of splash image, change the default line from the location of the splash image. Here is an example:
 splashimage=(hd0,0)/grub/splash.xpm.gz 

     Change to:   

 splashimage=(hd0,0)/grub/images/custom-image.xpm.gz
  • Reboot to observe that the new image is appearing on boot.

NOTE: For more information on Login Banners see article: How to configure a Login Banner or Splash Screen in Red Hat Enterprise Linux

For Red Hat Enterprise Linux 7 with UEFI:

  • GRUB2 was introduced in Red Hat Enterprise Linux 7, and the steps for previous Red Hat Enterprise Linux versions are not applicable yet.
  • png format can be used for image file as well.

  • Locate a background png file as /boot/grub2/splash.png

  • Edit /etc/sysconfig/grub
  GRUB_TERMINAL_OUTPUT="gfxterm"
  GRUB_BACKGROUND="/boot/grub2/a.png"
  • Install grub2-efi-modules (in Optional channel)
  • Copy the module directory into /boot/efi/EFI/redhat.
cp -rf /usr/lib/grub/x86_64-efi /boot/efi/EFI/redhat
  • Recreate the grub configuration file
grub2-mkconfig -o /etc/grub2-efi.cfg
  • Reboot to observe that the new image is appearing on boot.

NOTE: In the case of Legacy BIOS, the almost same steps can be applicable. But, the directory name is changed, and modules are included in the grub2 package.
The name of the modules directory (destination for copy) is /boot/grub2/i386-pc. The grub configuration file is /etc/grub2.cfg.
NOTE: In the case of changing the installation ISO image for UEFI machine, the name of the modules directory (destination for copy) is /EFI/BOOT/x86_64-efi.
- In detail see: How to add a background image to the GRUB menu in EFI on a DVD

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

4 Comments

Il faudrai préciser pour le dernier cas installation ISO UEFI ou placer le bout de code car de mon coté je n'arrive pas à charger mon image splash.png

Bonjour Monsieur Court,

Notre ingénieur a créé la solution ci-dessous suite à votre dossier:

https://access.redhat.com/solutions/5183201

J’espère cela aide.

Cordialement, Grazia Sapienza, Associate Manager, Support Delivery

All,

If you did not understand the discussion between Phillipe Court and Grazia Sapienza, here is a translation:

===========================================================================================================

Philippe Court

It will be necessary to specify for the last case ISO UEFI installation or to place the piece of code because on my side I cannot load my image splash.png

=========================================================================================================

Hello Mr. Court,

Our engineer has created the following solution following your file:

https://access.redhat.com/solutions/5183201

I hope this helps.

Sincerely, Grazia Sapienza, Associate Manager, Support Delivery

===========================================================================================================

Regards,

Jan Gerrit Kootstra

Thanks Jan, I was going to do that but you have been faster! ;) Your collaboration is much appreciated.