Announcement

Collapse
No announcement yet.

Grub2 Tweaks for Natty

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

    Grub2 Tweaks for Natty

    For Natty users, using Grub2.

    This describes how to:

    Set the screen resolution for the Grub Menu.
    Always display the Grub Menu.
    Remove the 10-second countdown timer.
    Enable display of boot messages and splash screen.
    Add a background image.

    So far I have not figured out how to change the Grub Menu text colors (normal and highlighted). It's controlled somewhere in the /etc/grub.d/05_debian_theme file, but this file is very different from it's predecessors!

    You need to make changes to one file:

    /etc/default/grub

    Open this file for editing (as root) in your favorite text editor.
    To allow the background image to 'look good' we are going to set the resolution. Locate and uncomment (remove the #) this line:

    #GRUB_GFXMODE=640x480

    Change the specified resolution to one that is supported by your monitor/lcd screen. For me, my laptop has a native resolution of 1440x900 when the Desktop is displayed, so a Grub2 resolution of 1024x768 is best. My line looks like:

    GRUB_GFXMODE=1024x768

    Change:
    GRUB_HIDDEN_TIMEOUT_QUIET=true
    to:
    #GRUB_HIDDEN_TIMEOUT_QUIET=true

    Change:
    GRUB_TIMEOUT=10
    to:
    GRUB_TIMEOUT=-1

    Change:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
    to:
    #GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

    Save and close the file.

    Now you just need to copy (as root) the background image of your choice (must be a .png, .tga, or jpg image) to the /boot/grub folder. The image will look it's best if it is the same size as the resolution you set for GRUB_GFXMODE=

    With these changes done, you need to update grub.cfg. In a console type:

    sudo update-grub

    Now you can shutdown and reboot your PC. Your Natty Grub Menu should be displayed with the specified resolution and your background image should be there in all it's glory.

    Have fun.
    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

    #2
    Re: Grub2 Tweaks for Natty

    So far I have not figured out how to change the Grub Menu text colors (normal and highlighted). It's controlled somewhere in the /etc/grub.d/05_debian_theme file, but this file is very different from it's predecessors!
    Hmm - both the "old" and the new are using the configuration file if available.

    Maverick 05_debian_theme:
    Code:
    ...
    # this allows desktop-base to override our settings
    f=/usr/share/desktop-base/grub_background.sh
    if test -e ${f} ; then
     . ${f}
    else
    ...
    Natty 05_debian_theme:
    Code:
    ...
    # Include the configuration of desktop-base if available.
    if [ -f "/usr/share/desktop-base/grub_background.sh" ]; then
    	. "/usr/share/desktop-base/grub_background.sh"
    fi
    ...

    Making the configuration file with the background image, text color and the highlight color.

    Code:
    sudo mkdir -p /usr/share/desktop-base/
    and
    Code:
    kdesudo kate /usr/share/desktop-base/grub_background.sh
    Code:
    WALLPAPER="/usr/share/wallpapers/Horos/contents/images/1920x1200.png"
    COLOR_NORMAL="light-gray/black"
    COLOR_HIGHLIGHT="green/black"
    Save and exit.

    Updating:
    Code:
    sudo update-grub
    Generating grub.cfg ...
    Found background image: /usr/share/wallpapers/Horos/contents/images/1920x1200.png
    Found linux image: /boot/vmlinuz-2.6.38-5-generic
    Found initrd image: /boot/initrd.img-2.6.38-5-generic
    Found linux image: /boot/vmlinuz-2.6.38-4-generic
    Found initrd image: /boot/initrd.img-2.6.38-4-generic
    Found memtest86+ image: /boot/memtest86+.bin
    Found Kubuntu 10.10 (10.10) on /dev/sdb1
    Found Microsoft Windows XP Professional on /dev/sdc1
    done
    Booting

    Seems to work...
    [img width=400 height=251]http://img101.imageshack.us/img101/8710/quiccapture.jpg[/img]


    Links:
    > Grub2
    > Topic: Common Splash From Start To Finish
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

    Comment


      #3
      Re: Grub2 Tweaks for Natty

      Thank's Rog! Okay, followed your suggestion. Going to see how it looks here.

      Works great! Makes changing Natty's Grub theme easier as well, as there is no tweaking of the 05_debian_theme file. I'll go back and do the same for my Maverick and Lucid setups as well.
      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


        #4
        Re: Grub2 Tweaks for Natty

        Thank You for the great info
        Dave Kubuntu 20.04 Registered Linux User #462608

        Wireless Script: http://ubuntuforums.org/showthread.p...5#post12350385

        Comment

        Working...
        X