![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
|
|
Thread Tools | Display Modes |
|
|
#1 | |
|
5 Cups of Ubuntu
![]() Join Date: Apr 2006
Location: Marquette, MI
Beans: 16
Ubuntu Karmic Koala (testing)
|
Customizing Grub2 boot menu
The grub boot menu Ubuntu uses has bothered me since I first saw the SUSE implementation of grub. So, after installing the latest 9.10 beta, I decided it was time to figure out how to get rid of that awful black grub menu. Two days later, here is what I have figured out.
Find an image I used the cool heron image from a previous release of ubuntu. Find it here. My desktop resolution is 1280X1024 so that's what I trimmed down this image to match. You'll have to save this image in PNG/TGA format. You'll see why later so just make sure this is the format you use. Set the default grub resolution Grub2 uses a collection of files to set the various settings it uses. You can specify your desired resolution in the /etc/default/grub file. Edit it with this command: Code:
gksudo gedit /etc/default/grub Code:
GRUB_GFXMODE=1280x1024 Edit this file: /etc/grub.d/00_header with the command: Code:
gksudo gedit /etc/grub.d/00_header Code:
set gfxmode=${GRUB_GFXMODE}
Code:
set gfxpayload=keep Code:
if loadfont `make_system_path_relative_to_its_root ${GRUB_FONT_PATH}` ; then
set gfxmode=${GRUB_GFXMODE}
set gfxpayload=keep
insmod gfxterm
Set a background image and change the highlighting colors To set a background in grub you have to edit the debian theme file stored at /etc/grub.d/05_debian_theme. Edit this file with the command: Code:
gksudo gedit /etc/grub.d/05_debian_theme Code:
use bg=false Quote:
Code:
for i in {/boot/grub,/usr/share/images/desktop-base,/usr/share/images/grub}/xxxxxxxxxx.{png,tga} ;
Code:
for i in {/boot/grub,/usr/share/images/desktop-base,/usr/share/images/grub}/ubuntu.{png,tga} ;
Code:
if background_image `make_system_path_relative_to_its_root ${bg}` ; then
set color_normal=black/black
set color_highlight=magenta/black
else
Code:
if background_image `make_system_path_relative_to_its_root ${bg}` ; then
set color_normal=white/black
set color_highlight=brown/black
else
In order for all of this stuff to work, you'll have to recompile the grub configuration file. Do this by running: Code:
sudo update-grub |
|
|
|
|
|
|
#2 |
|
Ubuntu Guru
![]() |
Re: Customizing Grub2 boot menu
__________________
A person with ubuntu is open and available to others, affirming of others, does not feel threatened that others are able and good, for he or she has a proper self-assurance that comes from knowing that he or she belongs in a greater whole and is diminished when others are humiliated or diminished, when others are tortured or oppressed. ~ Archbishop Desmond Tutu, 1999 ![]() |
|
|
|
|
|
#3 |
|
First Cup of Ubuntu
![]() Join Date: Mar 2007
Beans: 5
|
Re: Customizing Grub2 boot menu
Well, everything went well until updating grub...
Code:
Generating grub.cfg ... No path or device is specified. Try ``grub-probe --help'' for more information. No path or device is specified. Try ``grub-probe --help'' for more information. Any ideas? Is any more information required? Thanks. |
|
|
|
|
|
#4 | ||
|
First Cup of Ubuntu
![]() Join Date: Nov 2008
Beans: 5
|
Re: Customizing Grub2 boot menu
im getting the exact same error on 32 bit
i noticed that if i change the line Quote:
Quote:
Last edited by daemian57; November 6th, 2009 at 02:36 PM.. |
||
|
|
|
|
|
#5 |
|
First Cup of Ubuntu
![]() Join Date: Jan 2007
Beans: 1
|
Re: Customizing Grub2 boot menu
That means that you have an invalid file path in your configuration file. I'm going to guess that when you edited this line...
Code:
for i in {/boot/grub,/usr/share/images/desktop-base,/usr/share/images/grub}/ubuntu.{png,tga} ;
Hope that helps. Last edited by zreed20; November 6th, 2009 at 02:39 PM.. |
|
|
|
|
|
#6 | |
|
First Cup of Ubuntu
![]() Join Date: Nov 2008
Beans: 5
|
Re: Customizing Grub2 boot menu
ahhh dangnabbit I had
Quote:
thanks for helping me find the problem |
|
|
|
|
|
|
#7 |
|
First Cup of Ubuntu
![]() Join Date: Sep 2007
Beans: 10
|
Re: Customizing Grub2 boot menu
It is not necessary nor recommended to change use bg=true in the script. This is used as a flag for the loop logic.
One thing I haven't tested and people should be aware of if they have problems: Suppose you put your image under the /usr directory tree. Does this need to be available at boot time? Some people create a large single partition that holds everything, including /boot. In that case there is no issue. But what if you put boot in its own partition like many people do? Will grub still find the image if it is in /usr and not mounted? Does the image get copied during "update-grub" or is it read at boot time? The safe thing would be to put the image in /boot/grub where grub can get to it no matter what. |
|
|
|
|
|
#8 |
|
First Cup of Ubuntu
![]() Join Date: Mar 2007
Beans: 5
|
Re: Customizing Grub2 boot menu
Still a no-go. Here's the offending line:
Code:
use_bg=true
if [ "$GRUB_TERMINAL_OUTPUT" = "gfxterm" ] ; then
for i in {/boot/grub,/usr/share/images/desktop-base,/boot/grub}/tux.{png,tga} ; do
|
|
|
|
|
|
#9 |
|
First Cup of Ubuntu
![]() Join Date: Nov 2009
Beans: 1
|
Re: Customizing Grub2 boot menu
Is there any way to increase the font size after setting a high resolution?
|
|
|
|
|
|
#10 |
|
First Cup of Ubuntu
![]() Join Date: Nov 2009
Beans: 1
|
Re: Customizing Grub2 boot menu
I tried the directions listed to change the resolution. When I restart the screen re-sizes as it should, but I no longer can see the login prompt.
If I leave the gfxpayload=keep out, the machine boots ok, but back at the old resolution. I am running Ubuntu Server 9.10 in Virtual Box 3.0.10. Any help would be appreciated. Thank you |
|
|
|
| Bookmarks |
| Tags |
| boot, grub2 |
| Thread Tools | |
| Display Modes | |
|
|