Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Grub2: Can't change Boot Screen Resolution
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
Twenynge
n00b
n00b


Joined: 08 Jan 2010
Posts: 56

PostPosted: Wed Jan 20, 2010 4:50 am    Post subject: [SOLVED] Grub2: Can't change Boot Screen Resolution Reply with quote

I recently performed a fresh Gentoo install and opted to load Grub2 instead of Grub. I am able to boot just fine, but for the life of me I cannot change the boot screen resolution. I ran vbeinfo, and my video bios supports 1280x720x32.

I've tried inserting:
Code:
set gfxmode=1280x720
in /boot/grub/grub.cfg, but it does nothing. I've tried 1280x720x32 as well, and it also does nothing. I noticed that the gentoo install of sys-boot/grub-9999 did not create a /etc/default/grub directory, so I created one based off of the gentoo wiki article on Grub2. After editing that file and running the app that updates your grub.cfg file (forgot what it was), It still wouldn't change the resolution.

I tired to reinstall grub, but couldn't get through the compile without an error.

Anybody have any ideas on how to change the resolution of grub2?


Last edited by Twenynge on Thu Jan 21, 2010 4:36 am; edited 1 time in total
Back to top
View user's profile Send private message
StringCheesian
l33t
l33t


Joined: 21 Oct 2003
Posts: 887

PostPosted: Wed Jan 20, 2010 11:43 pm    Post subject: Reply with quote

Here's a working 1280x720 grub.cfg:
Code:
# Timeout for menu
set timeout=10
# Set default boot entry as Entry 0
set default=0

#insmod ext2
insmod font
#set root=(hd0,3)
#if loadfont /grub/unifont.pf2 ; then

#   loadfont /grub/unifont.pf2
#   loadfont /grub/terminus.pf2
   loadfont /grub/10x20.pf2
   insmod vbeinfo
#   vbeinfo
   set gfxmode="1280x720;1024x768;800x600"
   insmod gfxterm
   terminal_output gfxterm
#   insmod video
#   insmod vbe
   insmod jpeg
   background_image /grub/aurora-glow-720p.jpg
#fi

set menu_color_normal=white/black
set menu_color_highlight=black/white

# Entry 0 - Load Linux kernel from very first partition of the first disk and mount as root filesystem the third partition
menuentry "Gentoo Linux 64 bit sda6" {
   set root=(hd0,6)
   linux (hd0,6)/boot/vmlinuz root=/dev/sda6 rootfstype=ext4 rootflags=data=writeback,barrier=0 ro quiet
#   linux (hd0,6)/boot/vmlinuz root=/dev/sda6 rootfstype=ext4 rootflags=data=writeback ro quiet
}

I'm sorry that its so messy. I copied parts from examples and from a Ubuntu grub.cfg, but it still took a lot of trial and error. When it finally worked I was tired of rebooting so I didn't touch it even to clean it up.

Here's a cleaned up and commented (but untested) version that should still work:
Code:
# Timeout in seconds before default is booted
set timeout=10

# Default (counting from 0)
set default=0

# Load a font
insmod font
loadfont /grub/your_font_filename.pf2

# It should be ok to delete this line, but I haven't verified that
insmod vbeinfo

# List your perferred resolution and fallback resolutions here
set gfxmode="1280x720;1024x768;800x600"
insmod gfxterm
terminal_output gfxterm

# Set a background image
#insmod png
insmod jpeg
background_image /grub/your_image_filename.jpg

set menu_color_normal=white/black
set menu_color_highlight=black/white

# Add your menuentrys here

Remember to change your_font_filename.pf2 and your_image_filename.jpg.

This page of the wiki shows how to generate a pf2 font for grub:
http://grub.enbug.org/gfxterm
It doesn't mention that grub-mkfont can take any font as input - even a truetype font.

EDIT: Notice that someone added this near the bottom of the wiki page, YMMV:
Quote:
This currently does not work for me. You must run vbeinfo before gfxterm, otherwise gfxterm fails.
Back to top
View user's profile Send private message
Twenynge
n00b
n00b


Joined: 08 Jan 2010
Posts: 56

PostPosted: Thu Jan 21, 2010 4:23 am    Post subject: Reply with quote

Thanks for the reply. I think I have it half working at this point. My background image shows up just fine, but I'm having problems with the fonts that I've created. Everything ends up being shown as '?', making it pretty much unreadable. Do I have to specify a different font? Is there somewhere I can download "grub ready" fonts?

Edit: Forgot a slash so my font path was screwed up. Everything is working like a charm! Thanks for the help.
Back to top
View user's profile Send private message
Tolstoi
l33t
l33t


Joined: 20 May 2004
Posts: 678

PostPosted: Tue Feb 02, 2010 4:05 pm    Post subject: Reply with quote

Thanks, finally got a background image. Going to test some fonts next.
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