Changing Console Mode Resolution

Discussions about using Linux guests in VirtualBox.
Post Reply
Mario F.
Posts: 5
Joined: 27. Jul 2010, 15:26
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Linux

Changing Console Mode Resolution

Post by Mario F. »

Host: Windows 7
Guest: Ubuntu 10.04
VBox: 3.2.6 PUEL
Guest Additions: Installed

Hello all,

I'm trying to change the resolution of the console mode of this Ubuntu VM. I'm trying to do that by setting GRUB_GFXMODE in /etc/default/grub. Changes are having no effect. However, I don't have the VESA BIOS extension installed. Grub tells me this much when I run vbeprobe. Meanwhile, dmesg confirms(?) no VESA module is ever loaded and insmod vbe returns "can't read 'vbe': No such file or directory".

Ideally I'd like to set it to a non standard mode supported by that monitor (a WXGA operating at 16:9 with 1366 × 768 pixels). But I can understand if this mode isn't supported. But setting at least a 1024x 768 mode would be much appreciated.

What am I doing wrong or missing?
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Changing Console Mode Resolution

Post by Sasquatch »

When you boot, hold down the shift key and you will get the Grub2 menu. Now edit the line that mentions the kernel. At the end, add 'vga=794' without the quotes and boot it using Ctrl+x I believe (it's on the screen which key will boot the system). When that works, you need to change /etc/default/grub to include that added line as a default value (it should already have 'quiet splash'). Run 'sudo update-grub' after the change, reboot and check if it works.

This answer could've been found by a simple query in a search engine.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Mario F.
Posts: 5
Joined: 27. Jul 2010, 15:26
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Linux

Re: Changing Console Mode Resolution

Post by Mario F. »

Thanks for the answer, but I had tried that first... exactly because I did a search on the forums. There's no change to the console mode current resolution of 640x480.

I also tried to set a new resolution with (on my host console)

Code: Select all

VBoxManage setextradata "Ubuntu 10.04 LTS" "CustomVideoMode1" "1024x768x32" 
and then changing /etc/default/grub to (making sure GRUB_GFXMODE is commented out) :

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet text vga=0x160"
This didn't work either. No change whatsoever. Ubuntu boots into the console in 640x480.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Changing Console Mode Resolution

Post by Perryg »

Check this out http://ubuntuforums.org/showpost.php?p= ... stcount=10 and see if it will help.
I use it to fix the framebuffer problem in Ubuntu 10.04 Server but it does go into setting different resolutions.
Keep in mind that you will need to actually edit different files since this has of course changed but you get the idea.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Changing Console Mode Resolution

Post by Sasquatch »

Trying to get the OS run in a higher resolution and trying to get Grub in a higher resolution are two very different things. Grub in a higher resolution is easy, getting Ubuntu 10.04 server do that isn't.
The VBoxManage command won't help either, because it's a hint for when you run a GUI. A display manager probes the monitor and video card for acceptable resolutions and represents appropriate options for that. A CLI system doesn't.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Mario F.
Posts: 5
Joined: 27. Jul 2010, 15:26
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Linux

Re: Changing Console Mode Resolution

Post by Mario F. »

Perryg wrote:I use it to fix the framebuffer problem in Ubuntu 10.04 Server but it does go into setting different resolutions.
Keep in mind that you will need to actually edit different files since this has of course changed but you get the idea.
Thanks Perryg. This makes sense. I'll try it later and will give some feedback.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Changing Console Mode Resolution

Post by Perryg »

Yup works really well. I just did it and while I edited the boot parm at the start of grub by hitting e set the vga=0x0305 then ctrl-x it boots at 1024x768 and I don't see any screen problems.
U-1004-Server-1024x768.jpg
U-1004-Server-1024x768.jpg (222.62 KiB) Viewed 75890 times
Mario F.
Posts: 5
Joined: 27. Jul 2010, 15:26
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Linux

Re: Changing Console Mode Resolution

Post by Mario F. »

Sounded promising, but couldn't make it work. Also the latest version of ubuntu introduces Grub2 which removes menu.lst. I believe all I need to perform step 6 is to edit /etc/default/grub instead. And I did. To be sure I also boot-shift and edited the menu entry to include the vga line. But to no avail.

In any case. thanks for the help.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Changing Console Mode Resolution

Post by Perryg »

You must do everything in the order they are listed.
/etc/modprobe.d/blacklist-framebuffer.conf is the file that is listed instead of just blacklist-framebuffer
then look for the line GRUB_CMDLINE_LINUX="" in /etc/default/grub and put the resolution you want between the "" save and exit
Then run update-grub Reboot and there you have it.
Since this is all done from the CLI and no X, I selected an 8 bit resolution. Not sure if the others actually work.
fixedwheel
Volunteer
Posts: 1699
Joined: 13. Sep 2008, 02:18

Re: Changing Console Mode Resolution

Post by fixedwheel »

Mario F. wrote:Sounded promising, but couldn't make it work.
work around:

sudo apt-get install openssh-server
... and use PuTTY from the host
Mario F.
Posts: 5
Joined: 27. Jul 2010, 15:26
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Linux

Re: Changing Console Mode Resolution

Post by Mario F. »

Perryg wrote:Since this is all done from the CLI and no X, I selected an 8 bit resolution. Not sure if the others actually work.
Bingo!
Slap me for my stupidity. That did it, of course.

Thanks a bunch, Perry.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Changing Console Mode Resolution

Post by Perryg »

I wish I had done this when I first saw the post while working with my framebuffer issue. Working from the CLI like I do most of the time this is far better since the line wrap is less and I can actually control the size of the screen. Much better indeed.
Nox Metus
Posts: 14
Joined: 11. Aug 2010, 09:01
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Winows 7, Ubuntu

Re: Changing Console Mode Resolution

Post by Nox Metus »

Mario F. wrote:I'm trying to do that by setting GRUB_GFXMODE in /etc/default/grub. Changes are having no effect.
Using GRUB_GFXPAYLOAD_LINUX=1280x1024x24 instead of GRUB_GFXMODE and then update-grub worked for me with exactly the same configuration.
Ich weiß nicht, was du sagest.
Post Reply