Ubuntu – Ubuntu Server 15 terminal resolution

display-resolutiongrub2servervirtualboxwindows 10

Running an Ubuntu Server 15.10 as a guest VirtualBox VM, on a Windows 10 host.

Default terminal resolution is too small and messy, and I want to maximize the terminal or at least get it to a bigger resolution.

I've tried to edit /etc/default/grub and /etc/grub.d/00_header according to the following:

  1. Proper way to change terminal resolution in Ubuntu Server 13.04?
  2. How do I increase console-mode resolution?
  3. Maximum terminal resolution in ubuntu server virtual box guest
  4. Change Ubuntu Server 14.04 Screen Resolution
  5. adjust resolution on Ubuntu Server 10.04?

grub resolution does respond and changes accordingly, but I don't really care for that – I want to change the terminal resolution.

I tried editing the GRUB_GFXMODE line according to the vbeinfo's available resolutions. After running update-grub and update-grub2 I got the following output:
output from running update-grub command

Ideas?

Best Answer

Full-screen resolution can be achieved on the VirtualBox server console terminal, but setting only the GRUB_GFXMODE in the /etc/default/grub is not enough. (It may be enough for the desktop version though...)

I downloaded and installed Ubuntu 15.10 x64 server installer to test this solution and it worked!

Install hwinfo

sudo apt-get install hwinfo -fy

Got the supported mode using hwinfo

sudo hwinfo --framebuffer | grep <desired resolution>

For me it was

sudo hwinfo --framebuffer | grep 1280x1024

and the output looked like follows.

  Mode 0x0306: 1280x1024 (+160), 4 bits
  Mode 0x0307: 1280x1024 (+1280), 8 bits
  Mode 0x0319: 1280x1024 (+2560), 15 bits
  Mode 0x031a: 1280x1024 (+2560), 16 bits
  Mode 0x031b: 1280x1024 (+3840), 24 bits
  Mode 0x0345: 1280x1024 (+5120), 24 bits

Please note that it gave two mode values for 24 bit colour, but only one of them was a valid value, the other one just didn't work. In this case do as I did, try an other value from the list.

Edit /etc/default/grub

sudo nano /etc/default/grub

Uncomment the line starting with #GRUB_GFXMODE, add below it a new line for GRUB_GFXPAYLOAD_LINUX. Finally locate the line starting with GRUB_CMDLINE_LINUX_DEFAULT and add the chosen video mode from the previous hwinfo query.

Here is a sample fragment of my /etc/default/grub file.

GRUB_CMDLINE_LINUX_DEFAULT="video=0x0345"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# 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=1280x1024
GRUB_GFXPAYLOAD_LINUX=1280x1024

Save the file using CTRL+O, then exit pressing CTRL+X.

Now we can upgrade grub and reboot.

sudo update-grub && sudo reboot

After reboot you will have a terminal with your chosen/full screen resolution :)

Also tried it on Ubuntu 14.04 and 16.04 with success.