How to install GRUB Splash screen

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
svedel77

How to install GRUB Splash screen

Post by svedel77 »

Hi everyone,

I'm all new to Linux Mint, so bare with me...
I've copied a JPG-file to /boot/grub folder.
And from the terminal I typed "

Code: Select all

sudo update-grub
"
But the jpg-image isn't found as a splash image. Output from the terminal where it shoul find the image is : "

Code: Select all

Searching for splash image ... none found, skipping ...
"

What am I doing wrong, and how to install a splash-image in Linux Mint 13 ?

Best regards
Søren
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
caribriz

Re: How to install GRUB Splash screen

Post by caribriz »

Hi,
Welcome to Linux Mint forums!

You have already added your image to the /boot/grub folder (as administrator), so now you need to edit a section of the file /etc/grub.d/06_mint_theme.

Open a terminal:

Code: Select all

sudo gedit /etc/grub.d/06_mint_theme
In the opened file, scroll down to the section beginning: # check for usable backgrounds

Change the line: use_bg=false
to read
use_bg=true

"Uncomment" this line - just remove the # symbol from the beginning of the line -
#if [ "$GRUB_TERMINAL_OUTPUT" = "gfxterm" ] ; then
so it reads:
if [ "$GRUB_TERMINAL_OUTPUT" = "gfxterm" ] ; then

Go to this line - but leave it as is including the # at the beginning:
# for i in {/boot/grub,/usr/share/images/desktop-base}/linuxmint.{png,tga} ; do

Just add this line directly underneath it, but substitute the name of your own image where it says your-image-name

Code: Select all

for i in {/boot/grub,/usr/share/images/desktop-base}/your-image-name.{png,tga,jpg} ; do
- note that there is no # at the beginning of this line

Then, "uncomment" only these lines below (just remove the # symbol from the beginning of the line) - keep the formatting the same

Code: Select all

#    if is_path_readable_by_grub $i ; then 
#      bg=$i
#      case ${bg} in
#        *.png)		reader=png ;;
#        *.tga)		reader=tga ;;
#        *.jpg|*.jpeg)	reader=jpeg ;;
#      esac
#      if test -e /boot/grub/${reader}.mod ; then
#        echo "Found Debian background: `basename ${bg}`" >&2
#        #use_bg=true
#        break
#      fi
#    fi
#  done
#fi
So the whole file should then look like this - with your actual image name substituted where it says "your-image-name." - the dot after the image name must be included:

Code: Select all

#!/bin/bash -e

source /usr/lib/grub/grub-mkconfig_lib

set_mono_theme()
{
  cat << EOF
set menu_color_normal=white/black
set menu_color_highlight=white/light-gray
EOF
}

# check for usable backgrounds
use_bg=true
if [ "$GRUB_TERMINAL_OUTPUT" = "gfxterm" ] ; then
#  for i in {/boot/grub,/usr/share/images/desktop-base}/linuxmint.{png,tga} ; do
    for i in {/boot/grub,/usr/share/images/desktop-base}/your-image-name.{png,tga,jpg} ; do
      if is_path_readable_by_grub $i ; then 
        bg=$i
        case ${bg} in
            *.png)		reader=png ;;
            *.tga)		reader=tga ;;
            *.jpg|*.jpeg)	reader=jpeg ;;
       esac
       if test -e /boot/grub/${reader}.mod ; then
          echo "Found Debian background: `basename ${bg}`" >&2
          #use_bg=true
          break
      fi
    fi
  done
fi

# set the background if possible
#if ${use_bg} ; then
#  prepare_grub_to_access_device `${grub_probe} --target=device ${bg}`
#  cat << EOF
#insmod ${reader}
#if background_image `make_system_path_relative_to_its_root ${bg}` ; then
#  set color_normal=white/black
#  set color_highlight=white/light-gray
#else
#EOF
#fi

# otherwise, set a monochromatic theme for Ubuntu
#if ${use_bg} ; then
#  set_mono_theme | sed -e "s/^/  /g"
#  echo "fi"
#else
set_mono_theme
#fi
Save the file.

Then in the terminal:

Code: Select all

sudo update-grub

It should find your image file.
Then reboot.

Note:
This post has been edited on 2 March 2013.
An error was made initially - in the first section after "use_bg=true", I didn't indicate that an additional line should be "uncommented".
I have added this section to the post above to rectify this:

Code: Select all

"Uncomment" this line - just remove the # symbol from the beginning of the line -
#if [ "$GRUB_TERMINAL_OUTPUT" = "gfxterm" ] ; then
so it reads:
if [ "$GRUB_TERMINAL_OUTPUT" = "gfxterm" ] ; then
However, the line in the remainder of the original post was correct - that is, the same line was uncommented as it should be elsewhere in the post.
This correct line was, in fact, copied/pasted and used correctly in the posts below.

I have also now included the entire file /etc/grub.d/06_mint_theme - how it should look after editing it - instead of just posting the relevant section of the file.
I hope this will be easier to follow.

I have retested the amended instructions with both LM13 Cinnamon and LM14 Cinnamon installs - both worked for me.[/color]

Note that the additional section added does not relate to the problem Brahim experienced below.

Apologies for any confusion this may have caused.
Last edited by caribriz on Fri Mar 01, 2013 11:49 am, edited 7 times in total.
svedel77

Re: How to install GRUB Splash screen

Post by svedel77 »

Thank you very much for your quick answer. I'll try it!
travalon

Re: How to install GRUB Splash screen

Post by travalon »

I followed these instructions andsaw no decernable change. I'm wondering if the spaces after you "uncomment" this section matter.

Code: Select all

# check for usable backgrounds
use_bg=true
if [ "$GRUB_TERMINAL_OUTPUT" = "gfxterm" ] ; then
#  for i in {/boot/grub,/usr/share/images/desktop-base}/linuxmint.{png,tga} ; do
   for i in {/boot/grub,/usr/share/images/desktop-base}/your-image-name.{png,tga,jpg} ; do
    if is_path_readable_by_grub $i ; then
     bg=$i
     case ${bg} in
        *.png)      reader=png ;;
        *.tga)      reader=tga ;;
       *.jpg|*.jpeg)   reader=jpeg ;;
      esac
     if test -e /boot/grub/${reader}.mod ; then
        echo "Found Debian background: `basename ${bg}`" >&2
        #use_bg=true
        break
      fi
    fi
done
fi
I tried to make it look exactly like the reference but I think I missed a space.
caribriz

Re: How to install GRUB Splash screen

Post by caribriz »

@ travalon

Make sure the image you copy into /boot/grub (as administrator) is the appropriate filetype (jpg, png or tga).

Try copying and pasting the uncommented section that I posted above, into the appropriate place in your /etc/grub.d/06_mint_theme file,
then change only your image's filename in the correct spot - making sure the . directly after your image name is retained.
It is essential to keep the file's format/punctuation correct.

Save the file, then in the terminal "sudo update-grub".

caribriz
travalon

Re: How to install GRUB Splash screen

Post by travalon »

well I tried and failed again but I am having some severe problems with the OS right now so I'll just skip this project for now.

Thx caribriz
travalon

Re: How to install GRUB Splash screen

Post by travalon »

Got it using grub customizer found here: https://launchpad.net/grub-customizer/

You can get help if you do a Google search for grub customizer.
Brahim Salem

Re: How to install GRUB Splash screen

Post by Brahim Salem »

Heeeeeeeeeeelp! I have tried to add a grub background and when runnig

Code: Select all

sudo update-grub
and got this msg

Code: Select all

mint@mint-Inspiron-N5040 ~ $ sudo update-grub
[sudo] password for mint: 
Generating grub.cfg ...
Found background image: background.png
/etc/grub.d/06_mint_theme: 1: /etc/grub.d/06_mint_theme: mint#!/bin/bash: not found
/etc/grub.d/06_mint_theme: 3: /etc/grub.d/06_mint_theme: source: not found
/etc/grub.d/06_mint_theme: 18: /etc/grub.d/06_mint_theme: is_path_readable_by_grub: not found
Found linux image: /boot/vmlinuz-3.5.0-17-generic
Found initrd image: /boot/initrd.img-3.5.0-17-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Linux Mint 14 Nadia (14) on /dev/sda5
done
mint@mint-Inspiron-N5040 ~ $
and my 06_mint_theme looks like this:

Code: Select all

mint#!/bin/bash -e

source /usr/lib/grub/grub-mkconfig_lib

set_mono_theme()
{
  cat << EOF
set menu_color_normal=white/black
set menu_color_highlight=white/light-gray
EOF
}

# check for usable backgrounds
use_bg=true
if [ "$GRUB_TERMINAL_OUTPUT" = "gfxterm" ] ; then
#  for i in {/boot/grub,/usr/share/images/desktop-base}/linuxmint.{png,tga} ; do
   for i in {/boot/grub,/usr/share/images/desktop-base}/background.{png,tga,jpg} ; do
    if is_path_readable_by_grub $i ; then
     bg=$i
     case ${bg} in
        *.png)      reader=png ;;
        *.tga)      reader=tga ;;
       *.jpg|*.jpeg)   reader=jpeg ;;
      esac
     if test -e /boot/grub/${reader}.mod ; then
        echo "Found Debian background: `basename ${bg}`" >&2
        #use_bg=true
        break
      fi
    fi
 done
fi


# set the background if possible
#if ${use_bg} ; then
#  prepare_grub_to_access_device `${grub_probe} --target=device ${bg}`
#  cat << EOF
#insmod ${reader}
#if background_image `make_system_path_relative_to_its_root ${bg}` ; then
#  set color_normal=white/black
#  set color_highlight=white/light-gray
#else
#EOF
#fi

# otherwise, set a monochromatic theme for Ubuntu
#if ${use_bg} ; then
#  set_mono_theme | sed -e "s/^/  /g"
#  echo "fi"
#else
set_mono_theme
#fi
dagon
Level 7
Level 7
Posts: 1655
Joined: Mon Dec 06, 2010 4:33 am
Location: Kungälv, Sweden
Contact:

Re: How to install GRUB Splash screen

Post by dagon »

Code: Select all

mint#!/bin/bash -e
Should probably be

Code: Select all

#!/bin/bash -e
Brahim Salem

Re: How to install GRUB Splash screen

Post by Brahim Salem »

dagon wrote:

Code: Select all

mint#!/bin/bash -e
Should probably be

Code: Select all

#!/bin/bash -e
Now when I run

Code: Select all

sudo gedit /etc/grub.d/06_mint_theme
I get an empty file. can you please send me your 06_mint_theme if you are running Linux Mint 14 Cinnamon :( :(
dagon
Level 7
Level 7
Posts: 1655
Joined: Mon Dec 06, 2010 4:33 am
Location: Kungälv, Sweden
Contact:

Re: How to install GRUB Splash screen

Post by dagon »

Brahim wrote:
dagon wrote:Now when I run

Code: Select all

sudo gedit /etc/grub.d/06_mint_theme
I get an empty file. can you please send me your 06_mint_theme if you are running Linux Mint 14 Cinnamon :( :(
If you start gedit with a file as argument it will create a new empty file from scratch so basically your file is probably moved or deleted.
Did you perhaps edit the theme in your home?
Can you check the file history in gedit?
can you please send me your 06_mint_theme if you are running Linux Mint 14 Cinnamon
Sorry, I'm not on my own computer right now.
Brahim Salem

Re: How to install GRUB Splash screen

Post by Brahim Salem »

Can you check the file history in gedit?
How can I check gedit history!!!
Brahim Salem

Re: How to install GRUB Splash screen

Post by Brahim Salem »

when i run

Code: Select all

sudo update-grub
I get

Code: Select all

mint@mint-Inspiron-N5040 ~ $ sudo update-grub
Generating grub.cfg ...
Found background image: background.png
Found linux image: /boot/vmlinuz-3.5.0-17-generic
Found initrd image: /boot/initrd.img-3.5.0-17-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Linux Mint 14 Nadia (14) on /dev/sda5
/etc/grub.d/50_mint_theme: 1: /etc/grub.d/50_mint_theme: mint#!/bin/bash: not found
/etc/grub.d/50_mint_theme: 3: /etc/grub.d/50_mint_theme: source: not found
/etc/grub.d/50_mint_theme: 18: /etc/grub.d/50_mint_theme: is_path_readable_by_grub: not found
done
dagon
Level 7
Level 7
Posts: 1655
Joined: Mon Dec 06, 2010 4:33 am
Location: Kungälv, Sweden
Contact:

Re: How to install GRUB Splash screen

Post by dagon »

Brahim wrote:
Can you check the file history in gedit?
How can I check gedit history!!!
Arrow to the right of the "open" icon.

Maybe this can give you a clue about the grub.d situation.

Code: Select all

ls /etc/grub.d/*theme*
Brahim Salem

Re: How to install GRUB Splash screen

Post by Brahim Salem »

passerby, A mint user, send me a copy of /etc/grub.d/06_mint_theme file which looks as follows :

Code: Select all

    #!/bin/bash -e

    source /usr/lib/grub/grub-mkconfig_lib

    set_mono_theme()
    {
      cat << EOF
    set menu_color_normal=white/black
    set menu_color_highlight=white/light-gray
    EOF
    }

    # check for usable backgrounds
    use_bg=false
    #if [ "$GRUB_TERMINAL_OUTPUT" = "gfxterm" ] ; then
    #  for i in {/boot/grub,/usr/share/images/desktop-base}/linuxmint.{png,tga} ; do
    #    if is_path_readable_by_grub $i ; then
    #      bg=$i
    #      case ${bg} in
    #        *.png)      reader=png ;;
    #        *.tga)      reader=tga ;;
    #        *.jpg|*.jpeg)   reader=jpeg ;;
    #      esac
    #      if test -e /boot/grub/${reader}.mod ; then
    #        echo "Found Debian background: `basename ${bg}`" >&2
    #        #use_bg=true
    #        break
    #      fi
    #    fi
    #  done
    #fi

    # set the background if possible
    #if ${use_bg} ; then
    #  prepare_grub_to_access_device `${grub_probe} --target=device ${bg}`
    #  cat << EOF
    #insmod ${reader}
    #if background_image `make_system_path_relative_to_its_root ${bg}` ; then
    #  set color_normal=white/black
    #  set color_highlight=white/light-gray
    #else
    #EOF
    #fi

    # otherwise, set a monochromatic theme for Ubuntu
    #if ${use_bg} ; then
    #  set_mono_theme | sed -e "s/^/  /g"
    #  echo "fi"
    #else
    set_mono_theme
    #fi
I saved it and run

Code: Select all

sudo update-grub
and got:

Code: Select all

    mint@mint-Inspiron-N5040 ~ $     sudo update-grub
    [sudo] password for mint:
    Generating grub.cfg ...
    Found background image: background.png
    Found linux image: /boot/vmlinuz-3.5.0-17-generic
    Found initrd image: /boot/initrd.img-3.5.0-17-generic
    Found memtest86+ image: /boot/memtest86+.bin
    Found Linux Mint 14 Nadia (14) on /dev/sda5
    /etc/grub.d/50_mint_theme: 1: /etc/grub.d/50_mint_theme: mint#!/bin/bash: not found
    /etc/grub.d/50_mint_theme: 3: /etc/grub.d/50_mint_theme: source: not found
    /etc/grub.d/50_mint_theme: 18: /etc/grub.d/50_mint_theme: is_path_readable_by_grub: not found
    done
    mint@mint-Inspiron-N5040 ~ 
But when I run:

Code: Select all

ls /etc/grub.d/*theme*
I get:

Code: Select all

mint@mint-Inspiron-N5040 ~ $     ls /etc/grub.d/*theme*
/etc/grub.d/05_debian_theme  /etc/grub.d/50_mint_theme
/etc/grub.d/06_mint_theme
mint@mint-Inspiron-N5040 ~ $ 
Locked

Return to “Installation & Boot”