Ubuntu Server VM Console Tweaks

As technologists, we're blessed with a wealth of interesting and useful tools these days. One of my favorites is the VirtualBox virtualization product from Oracle. It runs on a variety of host platforms including Windows, Linux, and Mac and enables one to easily run another guest operating system. I use VirtualBox to run Arch Linux, Ubuntu Server, and Snow Leopard on my Windows 7 and 8 hobby hacking notebooks.

I could prattle on about why every self respecting developer should do the same, but that's a ditty for another time. Today I'm going to show you one way to fix the puny default command line UI of a fresh Ubuntu Server installation on VirtualBox.

On most modern systems, when you fire up a freshly installed console-based VM, you're greated by a tiny little window and terrible looking fonts. If you installed a GUI-based VM, you can change the default graphics behavior by building and installing the Guest Additions.

But how do you change things on a console-based VM? There are a number of ways (setupcon in .profile, deprecated vga kernel boot parameter, etc) but I'm going to show you a more elegant way using grub and an updated initial RAM disk.

Update Grub

I'll assume you've already installed a Ubuntu Server 12.10 VM and are sitting at the shell prompt.

First, configure grub (actually grub2) to use a different display resolution and grow the tiny VirtualBox VM window by editing grub's defaults and compiling a new /boot/grub/grub.cfg. On my Windows 8 64bit host system, setting GRUB_GFXMODE=1024x768x24 was the perfect size. You may need to drop into grub's shell and run vbeinfo to find your systems supported graphic modes.

jon@ubusvr64:~$ sudo vim /etc/default/grub
# modify the following configuration variable
jon@ubusvr64:~$ sudo update-grub

Update the Initial RAM Disk

Next, update your console setup and init RAMdisk environment to use a better looking font. You'll tweak a couple configuration variables, copy the desired font to the correct location, and update the current init RAMdisk. As my console uses CODESET=Lat15, I chose the TerminusBold font sized at 24x12.

jon@ubusvr64:~$ sudo vim /etc/default/console-setup
# modify the following configuration variables
jon@ubusvr64:~$ sudo cp /usr/share/consolefonts/Lat15-TerminusBold24x12.psf.gz /etc/console-setup
jon@ubusvr64:~$ cd /etc/console-setup && sudo gzip -d Lat15-TerminusBold24x12.psf.gz
jon@ubusvr64:~$ sudo update-initramfs -u
jon@ubusvr64:~$ sudo reboot


As you can see, this was a fairly painless yet elegant way to save your eyes when using a console-based Ubuntu Server VM via VirtualBox. If you've discovered a cleaner solution, drop me an email.

Remi LeRante's “Time for msysGit”

I use msysGit every day -- without issue -- on my Win7 system. I also use git every day on my Arch Linux system.

And I'm not the only guy developing on Windows that finds msysGit to be great. By now you're saying “So what's your point Remi!?” The point is that threads like this one have gone well past boring into absolutely annoying.


Simple. The msysGit downloads still have preview in their filenames eventhough the code has worked solidly for quite awhile. I can understand why the project's contributors might want to be humble and let the code quality speak for itself. But it's quite another thing to hamstring the code by labeling it preview.

It's time for this nonsense to come to an end and for msysGit to hold it's head up high and walk proud.

If you agree, drop over to the msysGit mailing list and tell them what a great job they're doing! And, oh by the way, please drop the preview label from your downloads :)

Lua (1)
Python (2)
Go (1)
Ruby (7)