Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Grub2 Background Screen
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
dman777
l33t
l33t


Joined: 10 Jan 2007
Posts: 943

PostPosted: Mon Nov 08, 2010 5:41 am    Post subject: Grub2 Background Screen Reply with quote

I can not get a background png screen to work on my system with Grub 1.98. Here are my configurations...if anyone can help please. My /boot drive is a separate partition which is sda2.


Code:
   1.
      localhost one # file /boot/grub/themes/orange.png
   2.
      /boot/grub/themes/orange.png: PNG image data, 1600 x 1280, 8-bit/color RGB, non-interlaced
   3.
      localhost one # cat /etc/default/grub
   4.
      GRUB_BACKGROUND=/boot/grub/themes/orange.png
   5.
      localhost one # cat /boot/grub/grub.cfg
   6.
      #
   7.
      # DO NOT EDIT THIS FILE
   8.
      #
   9.
      # It is automatically generated by /sbin/grub-mkconfig using templates
  10.
      # from /etc/grub.d and settings from /etc/default/grub
  11.
      #
  12.
       
  13.
      ### BEGIN /etc/grub.d/00_header ###
  14.
      if [ -s $prefix/grubenv ]; then
  15.
        load_env
  16.
      fi
  17.
      set default="0"
  18.
      if [ ${prev_saved_entry} ]; then
  19.
        set saved_entry=${prev_saved_entry}
  20.
        save_env saved_entry
  21.
        set prev_saved_entry=
  22.
        save_env prev_saved_entry
  23.
        set boot_once=true
  24.
      fi
  25.
       
  26.
      function savedefault {
  27.
        if [ -z ${boot_once} ]; then
  28.
          saved_entry=${chosen}
  29.
          save_env saved_entry
  30.
        fi
  31.
      }
  32.
      set timeout=6
  33.
      set default=0
  34.
      insmod png
  35.
      insmod jpeg
  36.
      background_image (hd0,1)/grub/themes/orange.png
  37.
      ### END /etc/grub.d/00_header ###
  38.
       
  39.
      ### BEGIN /etc/grub.d/10_linux ###
  40.
      menuentry "Windows XP" {
  41.
            set root='(hd0,0)'
  45.
      chainloader +1
  46.
      }
  47.
       
  48.
      menuentry "Gentoo System" --class gentoo --class gnu-linux --class gnu --class os {
  49.
              insmod ext2
  50.
              set root='(hd0,2)'
  51.
              echo    Loading the big bad ass Gentoo system...
  52.
              linux   /boot/kernel1 root=/dev/sda3 video=uvesafb:mtrr:3,ywrap,1024x768-32
  53.
      }
  54.
       
  55.
      menuentry "Gentoo GNU/Linux, with Linux x86_64-2.6.31-gentoo-r6 (recovery mode)" --class gentoo --class gnu-linux --class gnu --class os {
  56.
              insmod ext2
  57.
              set root='(hd0,2)'
  58.
              search --no-floppy --fs-uuid --set 4fd741d6-9234-4d86-91f1-4c66501474ca
  59.
              echo    Loading Linux x86_64-2.6.31-gentoo-r6 ...
  60.
              linux   /kernel-genkernel-x86_64-2.6.31-gentoo-r6 root=UUID=4bd35c77-af42-4c58-b9e3-601bed1989e1 ro single
  61.
              echo    Loading initial ramdisk ...
  62.
              initrd  /initramfs-genkernel-x86_64-2.6.31-gentoo-r6
  63.
      }
  64.
      ### END /etc/grub.d/10_linux ###
  65.
       
  66.
      ### BEGIN /etc/grub.d/30_os-prober ###
  67.
      ### END /etc/grub.d/30_os-prober ###
  68.
       
  69.
      ### BEGIN /etc/grub.d/40_custom ###
  70.
      # This file provides an easy way to add custom menu entries.  Simply type the
  71.
      # menu entries you want to add after this comment.  Be careful not to change
  72.
      # the 'exec tail' line above.
  73.
      ### END /etc/grub.d/40_custom ###
  74.
      localhost one #
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2391
Location: Wisconsin (USA)

PostPosted: Mon Nov 08, 2010 4:27 pm    Post subject: Reply with quote

I'm not sure but I don't think grub supports PNG. You should use .xpm.gz, and there are complex restrictions on the palette set allowed (I think 16 colors but in practice only 14 or so are usable).

Again I may be wrong as it's been a long time since I messed with grub backgrounds.
Back to top
View user's profile Send private message
niick
Tux's lil' helper
Tux's lil' helper


Joined: 09 Mar 2006
Posts: 88

PostPosted: Mon Nov 08, 2010 6:59 pm    Post subject: Reply with quote

Here is my grub2 cfg file. I use a tga image for the background, you can use the gimp to save your png as one.

Code:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
  set saved_entry=${prev_saved_entry}
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z ${boot_once} ]; then
    saved_entry=${chosen}
    save_env saved_entry
  fi
}
set timeout=5
insmod font
loadfont /boot/grub/unifont.pf2
insmod vbeinfo
set gfxmode="1680x1050x32"
set gfxpayload=keep
insmod gfxterm
terminal_output gfxterm
insmod tga
background_image /boot/grub/bg.tga
set menu_color_normal=white/black
set menu_color_highlight=black/white
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Gentoo GNU/Linux, with Linux 2.6.36-zen0-r1" --class gentoo --class gnu-linux --class gnu --class os {
   insmod ext2
   set root='(hd0,1)'
   search --no-floppy --fs-uuid --set 4db7f3d5-9e3e-46f8-b176-9b1e6405d4d2
   echo   Loading Linux 2.6.36-zen0-r1 ...
   linux   /kernel-2.6.36-zen0-r1 root=/dev/sda3 ro  quiet fastboot acpi_enforce_resources=lax rootfstype=ext4
}
menuentry "Gentoo GNU/Linux, with Linux 2.6.36-zen0-r1 Plymouth" --class gentoo --class gnu-linux --class gnu --class os {
   insmod ext2
   set root='(hd0,1)'
   search --no-floppy --fs-uuid --set 4db7f3d5-9e3e-46f8-b176-9b1e6405d4d2
   echo   Loading Linux 2.6.36-zen0-r1 ...
   linux   /kernel-2.6.36-zen0-r1 root=/dev/sda3 ro  quiet splash fastboot acpi_enforce_resources=lax rootfstype=ext4
   initrd /boot/initramfs-2.6.35-zen3.img
}
menuentry "Gentoo GNU/Linux, with Linux 2.6.35-zen3" --class gentoo --class gnu-linux --class gnu --class os {
   insmod ext2
   set root='(hd0,1)'
   search --no-floppy --fs-uuid --set 4db7f3d5-9e3e-46f8-b176-9b1e6405d4d2
   echo   Loading Linux 2.6.35-zen3 ...
   linux   /kernel-2.6.35-zen3 root=/dev/sda3 ro  quiet fastboot acpi_enforce_resources=lax rootfstype=ext4
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/11_windows ###
menuentry "Windows XP" {
   set root=(hd1,1)
   drivemap -s hd0 hd1
   chainloader +1
}
### END /etc/grub.d/11_windows ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
Back to top
View user's profile Send private message
hirakendu
Guru
Guru


Joined: 24 Jan 2007
Posts: 386
Location: san diego

PostPosted: Wed Nov 10, 2010 9:14 am    Post subject: Reply with quote

I do use png background in grub. You can see my grub config here and backgrounds here.
_________________
Helium Sources || Gentoo Minimal Livecd
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum