64-bit Jaunty guest on 32-bit Jaunty host with VirtualBox

If your processor supports 64-bit you can run a 64-bit OS on top of your 32-bit OS using VirtualBox. Which can be very useful e.g. for testing an application you are developing in different environments.

Your CPU must support 64-bit. To test (thanks http://www.cyberciti.biz/faq/linux-how-to-find-if-processor-is-64-bit-or-not/):

grep flags /proc/cpuinfo

and look for lm (long mode) .

Your BIOS must support 64-bit. I believe it will usually be set correctly if using something like a Core 2 Duo CPU but that needs confirmation.

Install a 64bit version of Linux. NB the correct Ubuntu package will say AMD64 even if it is for an Intel CPU because of some licensing deal. E.g. “Alternate install CD for 64-bit PC (AMD64) computers (standard download)” is still the correct option even if using an Intel Core 2 Duo CPU.

Apparently, “A 64 bit host CPU is not enough to run 64 bit guests (in contrast to VMWare). It must also have virtualization extensions. ” (https://help.ubuntu.com/community/VirtualBox/Installation). See http://en.wikipedia.org/wiki/X86_virtualization for a list of supported CPUs.

To confirm your OS is 64-bit

uname -a

Finally, here is relevant information from the VirtualBox User Manual:

Starting with Version 2.1, you can even run 64-bit guests on a 32-bit host operating
system, so long as you have sufficient hardware.
In particular, 64-bit guests are supported under the following conditions:
1. You need a 64-bit processor with hardware virtualization support (see chapter 1.2, Software vs. hardware virtualization (VT-x and AMD-V), page 11).
2. You must enable hardware virtualization for the particular VM for which you want 64-bit support; software virtualization is not supported for 64-bit VMs.
3. If you want to use 64-bit guest support on a 32-bit host operating system, you must also select a 64-bit operating system for the particular VM. Since supporting 64 bits on 32-bit hosts incurs additional overhead, VirtualBox only enables this support upon explicit request.


VirtualBox’s 64-bit guest support (added with version 2.0) and multiprocessing (SMP, added with version 3.0) both require hardware virtualization to be enabled. (This is not much of a limitation since the vast majority of today’s 64-bit and multicore CPUs ship with hardware virtualization anyway; the exceptions to this rule are e.g. older Intel Celeron and AMD Opteron CPUs.)

Ubuntu Karmic Alpha 5 Editing GRUB2

I used to know how to edit /boot/grub/menu.lst to change the order of Operating Systems (e.g. Windows XP, Ubuntu Jaunty, Ubuntu Karmic, and Kubuntu Jaunty), set the default, and set the delay. But with alpha 5 of Ubuntu Karmic that has all changed with the introduction of GRUB2. Here’s what I did instead.

Your goal is to change /boot/grub/grub.cfg but you shouldn’t do that directly. You should change some config files and then run a special grub update command.

Open one of the config files for other OSs (as root):
sudo gedit /etc/grub.d/30_otheros
sudo gedit /etc/grub.d/30_os-prober

I commented out redundant entries e.g. different kernel versions, and then saved it.

Then edit the main grub config file:
sudo gedit /etc/default/grub

I changed the relevant line to:
so that the 5th item (0,1,2 …) would boot by default.

Finally, run the grub update command to regenerate /boot/grub/grub.cfg:
sudo update-grub

You can check the result in /boot/grub/grub.cfg to see everything went well.

Not a lot trickier than under plain GRUB and apparently GRUB2 has a lot of possible benefits depending on your circumstances (http://www.gnu.org/software/grub/grub-2.en.html).

BTW GRUB2 has attracted some controversy and there are some interesting points in the following article and its comments (http://aronzak.wordpress.com/2008/09/30/stay-away-from-grub2/).