How to install GRUB Splash screen

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read this

How to install GRUB Splash screen

Postby svedel77 on Sat Jun 09, 2012 2:53 pm

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
svedel77
Level 1
Level 1
 
Posts: 8
Joined: Wed Jun 06, 2012 8:12 am

Linux Mint is funded by ads and donations.
 

Re: How to install GRUB Splash screen

Postby caribriz on Sat Jun 09, 2012 7:45 pm

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.


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.
Image
Desktop: C2D E6400 / Asus P5LD2SE / 2GB ram / Asus GeForce 210 / 320GB (WinXP) & 1TB (Mint - various)
Laptop: Asus A53E-SX1455V - i5 2450M / 4GB ram / Intel HD 3000 / 500GB (Win7/Mint 17 Cinnamon)
caribriz
Level 5
Level 5
 
Posts: 884
Joined: Mon Nov 28, 2011 7:43 am

Re: How to install GRUB Splash screen

Postby svedel77 on Sat Jun 09, 2012 10:51 pm

Thank you very much for your quick answer. I'll try it!
svedel77
Level 1
Level 1
 
Posts: 8
Joined: Wed Jun 06, 2012 8:12 am

Re: How to install GRUB Splash screen

Postby travalon on Sun Jun 17, 2012 10:38 am

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.
Linux Mint user since yesterday.
travalon
Level 1
Level 1
 
Posts: 39
Joined: Sun May 20, 2012 8:34 pm

Re: How to install GRUB Splash screen

Postby caribriz on Sun Jun 17, 2012 7:39 pm

@ 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
Image
Desktop: C2D E6400 / Asus P5LD2SE / 2GB ram / Asus GeForce 210 / 320GB (WinXP) & 1TB (Mint - various)
Laptop: Asus A53E-SX1455V - i5 2450M / 4GB ram / Intel HD 3000 / 500GB (Win7/Mint 17 Cinnamon)
caribriz
Level 5
Level 5
 
Posts: 884
Joined: Mon Nov 28, 2011 7:43 am

Re: How to install GRUB Splash screen

Postby travalon on Wed Jun 20, 2012 4:05 am

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
Linux Mint user since yesterday.
travalon
Level 1
Level 1
 
Posts: 39
Joined: Sun May 20, 2012 8:34 pm

Re: How to install GRUB Splash screen

Postby travalon on Mon Jun 25, 2012 12:06 am

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.
Linux Mint user since yesterday.
travalon
Level 1
Level 1
 
Posts: 39
Joined: Sun May 20, 2012 8:34 pm

Re: How to install GRUB Splash screen

Postby Zorba on Thu Feb 28, 2013 6:52 pm

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
Image
User avatar
Zorba
Level 8
Level 8
 
Posts: 2290
Joined: Tue May 29, 2012 10:12 pm
Location: Tunisia

Re: How to install GRUB Splash screen

Postby dagon on Thu Feb 28, 2013 7:04 pm

Code: Select all
mint#!/bin/bash -e


Should probably be
Code: Select all
#!/bin/bash -e
Image
User avatar
dagon
Level 7
Level 7
 
Posts: 1690
Joined: Mon Dec 06, 2010 4:33 am
Location: Kungälv, Sweden

Re: How to install GRUB Splash screen

Postby Zorba on Thu Feb 28, 2013 7:11 pm

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 :( :(
Image
User avatar
Zorba
Level 8
Level 8
 
Posts: 2290
Joined: Tue May 29, 2012 10:12 pm
Location: Tunisia

Re: How to install GRUB Splash screen

Postby dagon on Thu Feb 28, 2013 7:45 pm

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.
Image
User avatar
dagon
Level 7
Level 7
 
Posts: 1690
Joined: Mon Dec 06, 2010 4:33 am
Location: Kungälv, Sweden

Re: How to install GRUB Splash screen

Postby Zorba on Thu Feb 28, 2013 7:48 pm

Can you check the file history in gedit?


How can I check gedit history!!!
Image
User avatar
Zorba
Level 8
Level 8
 
Posts: 2290
Joined: Tue May 29, 2012 10:12 pm
Location: Tunisia

Re: How to install GRUB Splash screen

Postby Zorba on Thu Feb 28, 2013 7:52 pm

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
Image
User avatar
Zorba
Level 8
Level 8
 
Posts: 2290
Joined: Tue May 29, 2012 10:12 pm
Location: Tunisia

Re: How to install GRUB Splash screen

Postby dagon on Thu Feb 28, 2013 8:07 pm

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*
Image
User avatar
dagon
Level 7
Level 7
 
Posts: 1690
Joined: Mon Dec 06, 2010 4:33 am
Location: Kungälv, Sweden

Re: How to install GRUB Splash screen

Postby Zorba on Thu Feb 28, 2013 8:14 pm

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 ~ $
Image
User avatar
Zorba
Level 8
Level 8
 
Posts: 2290
Joined: Tue May 29, 2012 10:12 pm
Location: Tunisia

Linux Mint is funded by ads and donations.
 

Return to Installation & Boot

Who is online

Users browsing this forum: No registered users and 17 guests