0

I am using VirtualBox 4.3 (on Ubuntu) to take screenshots of various Ubuntu installer bootloader screens (eg. GRUB2, syslinux), and I would like to decrease the number of rows and columns that the bootloader renders to.

Since the OS isn't loaded at this point, I can neither install nor use the VirtualBox guest additions. Is there a way to change the resolution presented the virtual machine at this point?

If it makes a difference, I am only concerned with (virtual) EFI booting.

2 Answers 2

0

You need to configure the vga kernel startup parameter:

For example at boot you might use: vga=795. This would set your system to boot using the Live label with a screen resolution to 24bit 1280X1024. Here are some more examples of common vga boot values:

Depth  | 800×600 | 1024×768 | 1152×864 | 1280×1024 | 1600×1200
 8 bit | vga=771 | vga=773  | vga=353  | vga=775   | vga=796
16 bit | vga=788 | vga=791  | vga=355  | vga=794   | vga=798
24 bit | vga=789 | vga=792  | NA       | vga=795   | vga=799

See this post from the Ubuntu forums for more details: http://ubuntuforums.org/showthread.php?t=258484

Edit:

If using GRUB2 and its graphical interface, you will need to edit

 /etc/default/grub

find the line

 #GRUB_GFXMODE=640x480

remove the # and change 640x480 for the preferred mode you wrote down.

 e.g. GRUB_GFXMODE=1200x800

save, then type

 sudo update-grub

NOTE: the preferred mode has to be among those listed by vbeinfo. See post https://askubuntu.com/questions/54067/how-do-i-safely-change-grub2-screen-resolution for additional details

1
  • I don't think that's going to change how GRUB2 itself renders.
    – detly
    Sep 9, 2014 at 23:42
0

For rEFInd:

# Set the EFI text mode to be used for textual displays. This option                                                                                                                                                                          
# takes a single digit that refers to a mode number. Mode 0 is normally                                                                                                                                                                       
# 80x25, 1 is sometimes 80x50, and higher numbers are system-specific                                                                                                                                                                         
# modes. Mode 1024 is a special code that tells rEFInd to not set the                                                                                                                                                                         
# text mode; it uses whatever was in use when the program was launched.                                                                                                                                                                       
# If you specify an invalid mode, rEFInd pauses during boot to inform                                                                                                                                                                         
# you of valid modes.                                                                                                                                                                                                                         
# CAUTION: On VirtualBox, and perhaps on some real computers, specifying                                                                                                                                                                      
# a text mode and uncommenting the "textonly" option while NOT specifying                                                                                                                                                                     
# a resolution can result in an unusable display in the booted OS.                                                                                                                                                                            
# Default is 1024 (no change)                                                                                                                                                                                                                 
#                                                                                                                                                                                                                                             
#textmode 2                                                                                                                                                                                                                                   

# Set the screen's video resolution. Pass this option either:                                                                                                                                                                                 
#  * two values, corresponding to the X and Y resolutions                                                                                                                                                                                     
#  * one value, corresponding to a GOP (UEFI) video mode                                                                                                                                                                                      
# Note that not all resolutions are supported. On UEFI systems, passing                                                                                                                                                                       
# an incorrect value results in a message being shown on the screen to                                                                                                                                                                        
# that effect, along with a list of supported modes. On EFI 1.x systems                                                                                                                                                                       
# (e.g., Macintoshes), setting an incorrect mode silently fails. On both                                                                                                                                                                      
# types of systems, setting an incorrect resolution results in the default                                                                                                                                                                    
# resolution being used. A resolution of 1024x768 usually works, but higher                                                                                                                                                                   
# values often don't.                                                                                                                                                                                                                         
# Default is "0 0" (use the system default resolution, usually 800x600).                                                                                                                                                                      
#                                                                                                                                                                                                                                             
#resolution 1024 768                                                                                                                                                                                                                          
#resolution 1440 900                                                                                                                                                                                                                          
#resolution 3                                                                                                                                                                                                                                 
resolution 1920 1080

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .