Announcement

Collapse
No announcement yet.

Grub2 Splash image bug or error ?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Grub2 Splash image bug or error ?

    Hello i have a fresh install kubuntu 10.04 LTS with grub2 and i can't get the splash screen working :S

    This is my Grub Version
    Code:
    update-grub -v
    /usr/sbin/grub-mkconfig (GNU GRUB 1.98-1ubuntu6)
    this is little part of my /etc/grub.d/05_debian_theme

    Code:
    !/bin/bash -e
    
    source /usr/lib/grub/grub-mkconfig_lib
    
    # this allows desktop-base to override our settings
    f=/usr/share/desktop-base/grub_background.sh
    if test -e ${f} ; then
     source ${f}
    else
      WALLPAPER="/boot/grub/77942-wolf.tga"
     COLOR_NORMAL="black/black"
     COLOR_HIGHLIGHT="magenta/black"
    fi
    
    set_mono_theme()
    {
     cat << EOF
    set menu_color_normal=white/black
    set menu_color_highlight=black/light-gray
    EOF
    }
    
    # check for usable backgrounds
    [b]use_bg=true[/b]
    if [ "$GRUB_TERMINAL_OUTPUT" = "gfxterm" ] ; then
    for i in /boot/grub/`basename ${WALLPAPER}` ${WALLPAPER} ; do
    And this is the output of the grub update
    Code:
    sudo grub-mkconfig --output=/boot/grub/grub.cfg
    Generating grub.cfg ...
    Found background image: 77942-wolf.tga
    Found linux image: /boot/vmlinuz-2.6.32-22-generic
    Found initrd image: /boot/initrd.img-2.6.32-22-generic
    Found linux image: /boot/vmlinuz-2.6.32-21-generic
    Found initrd image: /boot/initrd.img-2.6.32-21-generic
    Found memtest86+ image: /boot/memtest86+.bin                                                                    
    Found Microsoft Windows XP Professional on /dev/sda3                                                                
    Found Windows NT/2000/XP (loader) on /dev/sda5                                                                   
    done
    This is the /etc/default/grub
    Code:
    # If you change this file, run 'update-grub' afterwards to update
    # /boot/grub/grub.cfg.
    
    GRUB_DEFAULT=0
    #GRUB_HIDDEN_TIMEOUT=0
    GRUB_HIDDEN_TIMEOUT_QUIET=true
    GRUB_TIMEOUT=10
    GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
    GRUB_CMDLINE_LINUX=""
    
    # Uncomment to disable graphical terminal (grub-pc only)
    #GRUB_TERMINAL=console
    
    # The resolution used on graphical terminal
    # note that you can use only modes which your graphic card supports via VBE
    # you can see them in real GRUB with the command `vbeinfo'
    GRUB_GFXMODE=640x480
    
    # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
    #GRUB_DISABLE_LINUX_UUID=true
    
    # Uncomment to disable generation of recovery mode menu entries
    #GRUB_DISABLE_LINUX_RECOVERY="true"
    
    # Uncomment to get a beep at grub start
    #GRUB_INIT_TUNE="480 440 1"
    And then i reboot my laptop i don't seen the boot splash ? Somebody have a idea why ?

    #2
    Re: Grub2 Splash image bug or error ?

    I don't think your 'little part' of your /etc/grub.d/05_debian_theme is written correctly. It isn't like mine. For your comparison, this is my entire /etc/grub.d/05_debian_theme file. Use it as a guide only.

    #!/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=black/white
    EOF
    }

    # check for usable backgrounds
    use_bg=false
    if [ "$GRUB_TERMINAL_OUTPUT" = "gfxterm" ] ; then
    # for i in {/boot/grub,/usr/share/images/desktop-base}/moreblue-orbit-grub.{png,tga} ; do
    for i in {/boot/grub,/usr/share/images/desktop-base,/usr/share/images/grub}/Dragon_wings_1280x800.{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=black/black
    set color_normal=yellow/black
    set color_highlight=magenta/black
    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
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: Grub2 Splash image bug or error ?

      I concur.

      This is the relevant part of my lucid debian_theme:
      #!/bin/bash -e

      source /usr/lib/grub/grub-mkconfig_lib

      # this allows desktop-base to override our settings
      f=/usr/share/desktop-base/grub_background.sh
      if test -e ${f} ; then
      source ${f}
      else
      WALLPAPER="/usr/share/images/desktop-base/background.tga"
      COLOR_NORMAL="white/black"
      COLOR_HIGHLIGHT="magenta/black"
      fi

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

      # check for usable backgrounds
      use_bg=false
      if [ "$GRUB_TERMINAL_OUTPUT" = "gfxterm" ] ; then
      for i in /boot/grub/`basename ${WALLPAPER}` ${WALLPAPER} ; 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 background image: `basename ${bg}`" >&2
      use_bg=true
      break
      fi
      fi
      done
      fi
      HP Pavilion dv6 core i7 (Main)
      4 GB Ram
      Kubuntu 18.10

      Comment


        #4
        Re: Grub2 Splash image bug or error ?

        The OP's 05_debian_theme file looks exactly like mine in two installs.

        Showhog - I think yours is different possibly because you did an upgrade, rather than new install? Yours looks like the theme file from the 9.10 version of grub-pc. To verify, I launched my vbox Karmic and Lucid fresh installs side-by-side to compare.

        apamix: I think the issue might be the absence of something in your other files. Look in your /boot/grub/grub.cfg and verify you have this in the header section:

        if loadfont /grub/themes/fonts/9x18.pf2 ; then
        set gfxmode=640x480
        insmod gfxterm
        insmod vbe
        if terminal_output gfxterm ; then true ; else
        # For backward compatibility with versions of terminal.mod that don't
        # understand terminal_output
        terminal gfxterm
        fi
        fi
        If you do, two things to check/try:

        1. Verify your image file is 640x480. I'm using a png file and if I had it the wrong size it would still display, just shrunk or expanded depending, but I don't know if grub-pc handles tga files differently.

        2. Try adding set gfxpayload=640x480 below set gfxmode=640x480 in grub.cfg. I realize this edit will be wiped if you run update-grub, but I will tell you how to make it permanent if it works.

        Let us know how it turns out. IMO, the graphical part of grub-pc is still a little "buggy". Installs are behaving differently with the exact same settings in some cases.

        Please Read Me

        Comment


          #5
          Re: Grub2 Splash image bug or error ?

          Originally posted by oshunluvr
          Showhog - I think yours is different possibly because you did an upgrade, rather than new install? Yours looks like the theme file from the 9.10 version of grub-pc. To verify, I launched my vbox Karmic and Lucid fresh installs side-by-side to compare.
          No. My 10.04 was a 'fresh' installation, both root and /home partitions. My 05_debian_theme is 'modified' just a bit. I have the original (I make copies of system files before I edit them). I'll post it tonight when I get home.
          Windows no longer obstructs my view.
          Using Kubuntu Linux since March 23, 2007.
          "It is a capital mistake to theorize before one has data." - Sherlock Holmes

          Comment


            #6
            Re: Grub2 Splash image bug or error ?

            Interesting that your theme file matches mine from Karmic but my Lucid one match's the OP's.

            I'm sure we're both fully updated...odd :P

            Please Read Me

            Comment


              #7
              Re: Grub2 Splash image bug or error ?

              Rats! I have to correct myself. Yes, my 10.04 was a fresh install. But, It isn't my controlling OS - Karmic is, and that was a Grub Legacy upgraded to Grub 2.

              So the 05_debian_theme I posted is from my 10.04, which is what is used when I opt to boot into Lucid as apposed to Karmic. :P


              Windows no longer obstructs my view.
              Using Kubuntu Linux since March 23, 2007.
              "It is a capital mistake to theorize before one has data." - Sherlock Holmes

              Comment


                #8
                Re: Grub2 Splash image bug or error ?

                There ya go... I can stop scratching my head now.

                BTW, the Lucid version of grub fixes a few bugs... Time to dump the old grub-y ways and move into the new world, old man!!! lol...

                Here, let me help :

                grub-install hd0



                Please Read Me

                Comment


                  #9
                  Re: Grub2 Splash image bug or error ?

                  As I prefer, and do, boot into Lucid 10.04, I should make it the controlling OS. I always install Grub to the root partition. My MBR is empty as far as I know.

                  So, if I'm booted into Lucid 10.04, running grub-install hd0 will take the controlling Grub 2 and put the boot-strap into the MBR? On a reboot, I'll boot into Lucid's 10.04 Grub menu first?
                  Windows no longer obstructs my view.
                  Using Kubuntu Linux since March 23, 2007.
                  "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                  Comment


                    #10
                    Re: Grub2 Splash image bug or error ?

                    I did it by booting up Lucid (from my karmic installed grub-pc), running grub-install /dev/sda (I think you can use device names or grub names), then update-grub. That's all it took. I still boot to my karmic install occasionally, but I'm now using the newer Lucid grub-pc.

                    A nice change from the old grub...

                    Please Read Me

                    Comment


                      #11
                      Re: Grub2 Splash image bug or error ?

                      And using the same version of Grub on ones installed OS's makes things easier to manage - only have to learn/remember one set of rules.
                      Windows no longer obstructs my view.
                      Using Kubuntu Linux since March 23, 2007.
                      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                      Comment


                        #12
                        Re: Grub2 Splash image bug or error ?

                        There is my /etc/grub/grub.cfg

                        Code:
                        ### BEGIN /etc/grub.d/05_debian_theme ###
                        insmod ext2
                        set root='(hd0,1)'
                        search --no-floppy --fs-uuid --set 54bd0220-ec0d-4ab6-b642-25f1c7d2275b
                        insmod tga
                        if background_image /boot/grub/77942-wolf.tga ; then
                         set color_normal=black/black
                         set color_highlight=magenta/black
                        else
                         set menu_color_normal=white/black
                         set menu_color_highlight=black/light-gray
                        fi
                        ### END /etc/grub.d/05_debian_theme ###
                        oshunluvr : yes my 77942-wolf.tga is 640x480 its really strange ... and

                        Code:
                        **@**:~$ sudo ls -la /boot/grub/*.tga
                        -rw-r--r-- 1 root root 307260 2010-05-12 11:19 /boot/grub/77942-wolf.tga
                        Now i will try to chmod 777 /boot/grub/77942-wolf.tga and i will replay what's happen
                        -=> And this not work

                        Comment


                          #13
                          Re: Grub2 Splash image bug or error ?

                          The only thing I can think of is this:

                          Your wallpaper is in /boot/grub/, correct

                          Your /boot directory is on /dev/sda1 and /grub is a subdirectory of /boot (not on another partition), correct?

                          If those statements are both true AND /boot is a separate partition, your /boot/grub/grub.cfg should look like
                          insmod ext2
                          set root='(hd0,1)'
                          search --no-floppy --fs-uuid --set 54bd0220-ec0d-4ab6-b642-25f1c7d2275b
                          insmod tga
                          if background_image /grub/77942-wolf.tga ; then
                          set color_normal=black/black
                          not
                          insmod ext2

                          search --no-floppy --fs-uuid --set 54bd0220-ec0d-4ab6-b642-25f1c7d2275b
                          insmod tga
                          if background_image /boot/grub/77942-wolf.tga ; then
                          set color_normal=black/black
                          The only other thing I notice is my grub.cfg does not have quotes around (hd0,1). I'm still thinking

                          Snowhog: Ever try a dedicated grub partition? If you're a flagrant multi-booter like me it prevents accidentally removing your boot files!

                          Please Read Me

                          Comment


                            #14
                            Re: Grub2 Splash image bug or error ?

                            Interesting No i have dual booting i my laptop, but everything looks good
                            /dev/sda1 on / type ext3 (rw,errors=remount-ro) , so yes /boot is on /dev/sda1

                            Comment

                            Working...
                            X