Changing Console Mode Resolution

Discussions about using Linux guests in VirtualBox.

Changing Console Mode Resolution

Postby Mario F. » 27. Jul 2010, 15:40

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?
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

Postby Sasquatch » 27. Jul 2010, 20:38

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.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Re: Changing Console Mode Resolution

Postby Mario F. » 27. Jul 2010, 22:03

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   Expand viewCollapse view
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   Expand viewCollapse view
GRUB_CMDLINE_LINUX_DEFAULT="quiet text vga=0x160"


This didn't work either. No change whatsoever. Ubuntu boots into the console in 640x480.
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

Postby Perryg » 27. Jul 2010, 22:24

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.
Perryg
Site Moderator
 
Posts: 25964
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX - Other

Re: Changing Console Mode Resolution

Postby Sasquatch » 27. Jul 2010, 22:36

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.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Re: Changing Console Mode Resolution

Postby Mario F. » 27. Jul 2010, 22:49

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.
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

Postby Perryg » 27. Jul 2010, 23:40

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 23935 times
Perryg
Site Moderator
 
Posts: 25964
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX - Other

Re: Changing Console Mode Resolution

Postby Mario F. » 28. Jul 2010, 15:17

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.
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

Postby Perryg » 28. Jul 2010, 16:18

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.
Perryg
Site Moderator
 
Posts: 25964
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX - Other

Re: Changing Console Mode Resolution

Postby fixedwheel » 28. Jul 2010, 16:19

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
fixedwheel
Volunteer
 
Posts: 1699
Joined: 13. Sep 2008, 02:18

Re: Changing Console Mode Resolution

Postby Mario F. » 28. Jul 2010, 16:32

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.
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

Postby Perryg » 28. Jul 2010, 16:43

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.
Perryg
Site Moderator
 
Posts: 25964
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX - Other

Re: Changing Console Mode Resolution

Postby Nox Metus » 31. Aug 2010, 21:21

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.
Nox Metus
 
Posts: 14
Joined: 11. Aug 2010, 09:01
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Winows 7, Ubuntu


Return to Linux Guests

Who is online

Users browsing this forum: No registered users and 21 guests