This isn’t exactly on topic for this blog, since up to this point I’ve really only talked about getting Windows Vista running in a VM, but sometimes it’s nice to talk about something else for a change.
One of the things that I like most about Virtual Machines is that they let me play with other operating systems besides Windows without having to have a dedicated computer risk its well-being for the task. If something doesn’t work in a VM, then a quick click of a button and it’s gone.
One of the other operating systems I’ve been playing around with lately is Ubuntu Linux.
There have been a good number of blog posts about getting Ubuntu working under VPC, but I haven’t found any of them to be totally comprehensive, so I wanted to do one that encompases all of the issues that I’ve had getting it running. Please keep in mind that I am certainly not an expert in Linux – I really only know enough to get myself into trouble, but not necessarily back out. Also, I didn’t come up with most of the tips here myself – thanks to ArcaneCode for a series of posts about the mouse issues, culminating with indianabeck’s tip about the boot parameter. And thanks to my friend Marc Teale who helped me figure out how to fix the video problem, and taught me the fundamentals of actually using Linux and editing the configuration files. And also to Microsoft’s own Ben Armstrong, who pointed me to ArcaneCode in the first place.
- So, the first step, obviously, is to get a Windows PC with Virtual PC 2007 installed. I’m running the x64 version on Windows Vista Ultimate. Download the ISO for Ubuntu in whatever fashion you choose – just remember that Virtual PC only supports 32-bit guests, so make sure you grab the i386 version. Also, you don’t need the alternate installer version. Just grab the regular one.
- Start Virtual PC, create a VM with the specifications you want, and boot it. During POST, click the CD menu, and capture the Ubuntu ISO you just downloaded. You may need to reset the VM to get it to boot properly.
- On the Ubuntu boot menu, select Start or install Ubuntu and hit F6. Add i8042.noloop
to the end of the line, and press Enter. This will make the mouse work in recent versions of the kernel.
- When Ubuntu boots to the Live CD and XWindows loads, the graphics will be… not good. You’re going to need to change the color depth to make it display correctly. To do that:
- Hit CTRL-ALT-F1 to drop to a console.
- Type sudo nano /etc/X11/xorg.conf and press Enter.
- Press CTRL W, type depth and press Enter. You should see a line that says "DefaultDepth 24". Delete 24 and type 16.
- Press CTRL O, and press Enter to save the file.
- Press CTRL X to exit the nano editor.
- Press CTRL-ALT-F7 to switch back to XWindows – that graphics will still not be right.
- Press CTRL-ALT-Backspace to reload XWindows. The graphics should be good to go now.
- Run the installation like you normally would. When installation is complete, Ubuntu will boot, and the video should be correct (it was for me – if it’s not, repeat the step listed above), but the mouse won’t work. To fix the mouse in a more permenant manner, we’ll need to add a kernel parameter to the GRUB loader. Here’s how:
- Boot into Ubuntu on the hard drive.
- Hit CTRL-ALT-F1 to drop to a console and log in.
- Type sudo nano /boot/grub/menu.lst.
- Press CTRL W and type end default options, then press Enter.
- The first entry in the list below is the entry containing the information to boot Ubuntu in regular mode. Find the line that starts with kernel and go all the way to the end of it. At the end, type i8042.noloop, press CTRL O, and press Enter to save.
- At this point, you can do the same with the other entries, like the recovery mode one if you care enough to bother. If not, just hit CTRL X to exit nano.
- Type sudo reboot to reboot the VM.
- The next time you boot into XWindows, your mouse should work without issue. (You should also note that if you happen to upgrade your kernel version, you’ll need to make this change *again*.)
- And you’re good to go do whatever it is you want to do.