Setting up the Linux Mint grub menu. How to use a *.png wallpaper to spice up your boot menu.

Posted: June 4, 2012. At: 3:06 PM. This was 5 years ago. Post ID: 4007

Setting up the Linux Mint grub menu, set a png file as the background

This is my copy of the /etc/grub.d/06_mint_theme file I found on my system, I have uncommented quite a lot of the code and I got it working. I then copied a png format image to my /boot/grub folder and then ran sudo update-grub and the png format image was added to the grub configuration. I am not sure why this file was commented out, it does work once you edit it. I think that the grub configuration is actually using the /etc/grub.d/05_debian_theme file, but it is not bad to be able to fix this one as well.

#!/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

This is the appropriate section of my /boot/grub/grub.cfg file, apparently the /etc/grub.d/05_debian_theme file does take care of the wallpapers after all, but why is the /etc/grub.d/06_mint_theme script commented out? I guess you could use that instead to theme your grub menu. My grub2 menu is set to display at 1680×1050 pixels resolution, it is best to choose a wallpaper that matches the resolution of the grub menu. This goes to show that you do have many options on Linux Mint 13 Maya for customizing your grub menu however you wish.

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod xfs
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set=root c84b3630-79a5-4ab3-85a5-f50bc23a3da9
insmod png
if background_image /usr/share/wallpapers/grub2wall.png; then
  true
else
  set menu_color_normal=white/black
  set menu_color_highlight=black/light-gray
fi
### END /etc/grub.d/05_debian_theme ###
 
### BEGIN /etc/grub.d/06_mint_theme ###
set menu_color_normal=white/black
set menu_color_highlight=white/light-gray
### END /etc/grub.d/06_mint_theme ###

No comments have been made. Use this form to start the conversation :)

Leave a Reply