Modify the command line resolution in Ubuntu virtualbox

Source: Internet
Author: User
Changing Console mode resolution
Post a reply
13 posts • Page 1 of 1
Changing Console mode resolution

Postby Mario F.» 27. Jul 2010
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 with 1366 × 768 pixels ). but I can understand if this mode isn' t supported. but setting at least a 1024x768 mode wocould be much appreciated.

What am I doing wrong or missing?

Mario F.

Posts: 5
Joined: 27. Jul 2010
Primary OS: MS Windows 7
Vbox version: Puel
Guest osses: Linux

Top
Re: Changing Console mode resolution

Postby Sasquatch» 27. Jul 2010
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 shoshould already have 'quiet splash '). run 'sudo Update-grub 'after the change, reboot and check if it works.

This answer cold'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 re talking about.
Howto: install linux guest Additions
Howto: use shared folders on Linux guest
Try searching the forums first with Google and add the site filter for this forum.
E. g. Install guest additions site: forums.virtualbox.org

PMS asking for help will be ignored. Create a topic instead.

Sasquatch
Site moderator

Posts: 16392
Joined: 17. Mar 2008
Location: Netherlands
Primary OS: Ubuntu other
Vbox version: Puel
Guest osses: Windows XP, Linux

Top
Re: Changing Console mode resolution

Postby Mario F.» 27. Jul 2010
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 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 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
Primary OS: MS Windows 7
Vbox version: Puel
Guest osses: Linux

Top
Re: Changing Console mode resolution

Postby perryg» 27. Jul 2010
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: 14402
Joined: 6. Sep 2008
Location: 41 ° 15 '31 "N/95 ° 56 '15" W
Primary OS: Linux other
Vbox version: ose self-compiled
Guest osses: * nix-Windows-other

Top
Re: Changing Console mode resolution

Postby Sasquatch» 27. Jul 2010
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 re talking about.
Howto: install linux guest Additions
Howto: use shared folders on Linux guest
Try searching the forums first with Google and add the site filter for this forum.
E. g. Install guest additions site: forums.virtualbox.org

PMS asking for help will be ignored. Create a topic instead.

Sasquatch
Site moderator

Posts: 16392
Joined: 17. Mar 2008
Location: Netherlands
Primary OS: Ubuntu other
Vbox version: Puel
Guest osses: Windows XP, Linux

Top
Re: Changing Console mode resolution

Postby Mario F.» 27. Jul 2010

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
Primary OS: MS Windows 7
Vbox version: Puel
Guest osses: Linux

Top
Re: Changing Console mode resolution

Postby perryg» 27. Jul 2010
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 5502 times

Perryg
Site moderator

Posts: 14402
Joined: 6. Sep 2008
Location: 41 ° 15 '31 "N/95 ° 56 '15" W
Primary OS: Linux other
Vbox version: ose self-compiled
Guest osses: * nix-Windows-other

Top
Re: Changing Console mode resolution

Postby Mario F.» 28. Jul 2010
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
Primary OS: MS Windows 7
Vbox version: Puel
Guest osses: Linux

Top
Re: Changing Console mode resolution

Postby perryg» 28. Jul 2010
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: 14402
Joined: 6. Sep 2008
Location: 41 ° 15 '31 "N/95 ° 56 '15" W
Primary OS: Linux other
Vbox version: ose self-compiled
Guest osses: * nix-Windows-other

Top
Re: Changing Console mode resolution

Postby fixedwheel» 28. Jul 2010

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: 1563
Joined: 13. Sep 2008

Top
Re: Changing Console mode resolution

Postby Mario F.» 28. Jul 2010

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
Primary OS: MS Windows 7
Vbox version: Puel
Guest osses: Linux

Top
Re: Changing Console mode resolution

Postby perryg» 28. Jul 2010
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: 14402
Joined: 6. Sep 2008
Location: 41 ° 15 '31 "N/95 ° 56 '15" W
Primary OS: Linux other
Vbox version: ose self-compiled
Guest osses: * nix-Windows-other

Top
Re: Changing Console mode resolution

Postby NOx metus» 31. Aug 2010

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 has nicht, was du sagest.

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.