Making Ubuntu 7.04 Work Under Virtual PC 2007
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.
Comments
Anonymous
August 07, 2007
Any suggestion on getting the VM extentions for Linux working with Ubuntu? [I actually haven't even tried this, because Ubuntu is pretty speedy for me without any modifications (I have a VT-enabled machine). Let me get back to you on this. - mikekol]Anonymous
August 08, 2007
THANKS A MILLION!! WORKS LIKE A CHARM! :DAnonymous
August 09, 2007
WOWSOME! Thanks so much. P.S. You should try Xubuntu.Anonymous
August 10, 2007
Flawless instructions. Very helpful, thank you much!.Anonymous
August 11, 2007
Worked great but I the ubuntu VPC has no network connection. I need this to port an application to Linux and cannot use shared networking to test client server operations. [I've had network issues with Ubuntu as well, and not just in a VM. I'm not sure whether it's by design or not, but I've had to manually tell the machine to connect to the wired network almost every time I turn it on. I've done this my clicking on the network icon in the upper-right hand corner of the screen and choosing 'Wired Network' from the list. As long as you have the Virtual Machine's network adapter set to use the correct physical adapter on your host, I've had it work every time. - mikekol]Anonymous
August 11, 2007
The comment has been removedAnonymous
August 12, 2007
The directions worked great. However, once Ubuntu is booted up it runs very slow. I'm not sure if the VM additions need to be installed, but any suggestions on how to speed it up would be great. I am running Virtual PC 2007 with the host OS as Vista. Thanks...Anonymous
August 12, 2007
Ubuntu works a lot faster if you have Hardware Virtualization turned on: http://www.hanselman.com/blog/VirtualPCTipsAndHardwareAssistedVirtualization.aspxAnonymous
August 13, 2007
Mike, Great post! Thanks for the info!Anonymous
August 13, 2007
Mike, Great ! This works perfectly. Vitor MauricioAnonymous
August 14, 2007
Great instructions - even for a newbie like me.Anonymous
August 15, 2007
The comment has been removedAnonymous
August 15, 2007
Update: I am a fool. I kept plugging at it and gave up on Google and went to the Ubuntu site and started digging. Here: https://help.ubuntu.com/community/FixVideoResolutionHowto From this page I used the "sudo dpkg-reconfigure -phigh xserver-xorg" command and got more resolution. I am only able to get 1280x1024 rather than the 1440x1050 of my screen but this is good enough for me now.Anonymous
August 15, 2007
The comment has been removedAnonymous
August 15, 2007
Use Vmware workstation. It's a lot better...Anonymous
August 17, 2007
I have found that Ubuntu 7.04 under Virtual PC 2007 (running on Vista or XP SP2) starts up with a dead network every time. I created a shell script to run this command "sudo /etc/init.d/networking restart" and this reset correctly picks up the DHCP info from both my office and home DHCP servers and I am all set. Odd that it fails on initial startup as VPC 2007 virtualizes all the hardware before it even processes the bios startup of the machine.. I would use VMWare but it costs a whole lot more than $0 in order to be able to build out and use new VMs. I use it at work and like it but I don't wish to buy it for home. DaveAnonymous
August 17, 2007
Great! Worked on my set (WinXP x64 host / VPC2007) in 1 hour, taking time to read a couple of articles here and there. It would be great to have a solution to install VM additions to smoothe mouse transitions and so on between the VM and the host, but it already works quite well with the Hardware Virtualization activated. The DHCP client issue is also something that should find a solution. Dave: how did you exactly run your solution (newbee on Linux!)?Anonymous
August 18, 2007
It's all very well for people to be saying "Use VMWare", but that's not even out for Vista yet. My new machine came with Vista, so until I can see harware support for everything it comes with, it will be the base OS. At least Virtual PC runs on Vista I say!Anonymous
August 20, 2007
I also had to include clock=pit See http://support.microsoft.com/Default.aspx?kbid=918461Anonymous
August 21, 2007
it worked.. great! thanks so much.. this was so simple.. :)Anonymous
August 22, 2007
I was having some issues related to the gnome settings daemon starting up, and locking up the VM. I found I had to have a minimum of 256 megs of ram allocated to the VM and that was no longer an issue.Anonymous
August 25, 2007
I found this on the i8042.noloop option. https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/87262Anonymous
August 25, 2007
I tried Ubuntu Ultimate under VPC2007 and I didnt even have to mod the graphics, but still had to do the mouse-compatibility thing. (If you like/want Vista Ultimate, try Ubuntu Ultimate!!!!!)Anonymous
August 26, 2007
I had tried getting Ubuntu to run on Windows Vista the other way (booting from CD) but that didn't work and this did the trick. Thanks for the article!Anonymous
August 27, 2007
I got stuck very early on - the xorg.conf file doesn't exist, and naturally I'm not able to create it. Also I've found that the mouse is "stuck" in the VM window (so I use ALT GR + ENTER to get back to XP).Anonymous
August 27, 2007
Ok, upon return to xwindows I can actually see something - although it's black and white, horizontally extended and not pretty :D Figured since I could see things I could install it, and then make the needed changes. But as I get to the location window I can't get further as I can't make the window small enough to see the whole thing - including some kind of "next" button which I don't know how to get to with the keyboard lolAnonymous
August 27, 2007
Ok, if anyone runs into the same problem as me, get the alternate CD image - installation is text based, so you can finish the installation, and then follow the instructions hereAnonymous
August 28, 2007
I used the safe graphics mode and it worked just fine. Thank you for this tip on getting the mouse working.Anonymous
August 28, 2007
Safe graphics mode did not require editing xorg.conf by the way.Anonymous
August 31, 2007
Make sure you type Xorg.conf - it won't find the file if you type a lower case xAnonymous
September 01, 2007
Thanks. I can't figure out what would i do without your post... Thks agains..Anonymous
September 02, 2007
Worked just fine. Thanks a lot!Anonymous
September 10, 2007
After I typed i8042.noloop and hit enter, I received the followed error: checksum for device 1 is not valid (0x89) checksum for device 2 is not valid (0xbe) Any idea? [Sorry, no idea. Does it happen every time? Does it prevent Ubuntu from booting? You might want to try an Ubuntu support forum to see if they have any ideas on what to try. - mikekol]Anonymous
September 12, 2007
Is there a way I could receive the Ubuntu file from you? I can't seem to find the right one. Or even a link to where you got yours? Also.....how do I capture the ISO? I know, I know, stupid question, but it's a necessary idiocy. [I can't distribute any files like that, sorry. If you're using Virtual PC, start the VM and click the CD menu (I think... I don't have VPC on my machine right now), and click Capture Image. Then you can point it to an ISO file. - mikekol]Anonymous
September 13, 2007
Thanks man, I'll try it. But do you have a link to the file? If not, it's cool.Anonymous
September 13, 2007
Thanks man, I'll try it. But do you have a link to the file? If not, it's cool.Anonymous
September 14, 2007
Accidentally clicked submit twice. Sorry!Anonymous
September 20, 2007
I have fixed the graphics parts. Since the mouse is not working, I'm not able to select the installation option. I've tried all keys on the keyboard, but without any luck. Any hints/tips would be appreciated :)Anonymous
October 01, 2007
The comment has been removedAnonymous
October 01, 2007
Actually I figured it out, you have to do F7. So my problem is now that when I try to find the word "depth", it is not found. Any ideas?Anonymous
October 07, 2007
First off, I could not get the video fix mentioned here to help with the setup screen running off the window, however F4 did fix it. I did get the mouse thing going and made it through setup to initial boot. Now my problem is that the bootup gets stuck at "* Running local boot scripts (/etc/rc.local)." The hard disk mentions no activity, but the ethernet does. I checked the ISO image integrity and found it to be good. I also upped the VM memory to 256. Any ideas? (Oh, I'm using Server 7.04.)Anonymous
October 07, 2007
Update: I found that the system /did/ finish booting, but simply failed to show a prompt until I hit ENTER. Also found out (via Google) that the server edition does not come with a GUI. I know one can be installed, but I don't have the knowledge to accomplish that. I tried some install commands mention on the net, but none worked properly, mostly due to "no package found" type errors. Even the online update feature did not pull a desktop package. Unless someone feels charitable and wants to post a reply on how to load a desktop onto the server edition, I'll keep searching. :)Anonymous
October 13, 2007
I can not get the second step to work. I end up with a screen with no list for the mouse fix. I then decided to reboot, and release the *.iso, and now when it Xubuntu loads, I get an error stating "Reboot and select proper Boot Device or Insert Boot Media in selected Boot device" and nothing. Not sure what has happened here.Anonymous
October 13, 2007
I realized my mistake! I had not run through the full install. Rather than burn and waste CDs I use a program called Virtual Clone Drive. Saves tonnes of CDs from becoming coasters. Google it.Anonymous
October 23, 2007
Thanks for the super simple steps-- always helps to get things going just knowing someone else has successfully done so before. Has anyone seen the case where the mouse wiggles and tracks, but clicking isn't recognized? I'm on a Dell Latitude running 32bit Vista, VPC 2007, Ubuntu 7.10. Update (without having yet posted). What worked for me was holding left-alt while clicking.. go figure..? From now on it seems to be working just fine. All the best!Anonymous
October 24, 2007
The proper way to update the /boot/grub/menu.lst is to edit the two lines defoptions and altoptions -- add the i8042.noloop to those two lines, so they look something like this:
defoptions=quiet splash i8042.noloop
... #altoptions=(recovery mode) i8042.noloop single Then save the file and run sudo update-grub to automatically update the two "live" entries you mentioned updating in this article. This will ensure that the change carries through for any kernel image updates so you won't have to keep making the same edits for each new kernel version entry in the menu.lst.
Anonymous
October 25, 2007
Thank you so much for posting this excellent solution. I was about to abort my efforts. Now I can test away! Cheers.Anonymous
October 25, 2007
I was having the same problems as everyone else until I found this webpage. The live cd and the install kept hanging during boot. After playing around with it for awhile I had to add the i8042.noloop and the clock=pit mods and it worked great. Thanks!!!!!Anonymous
October 30, 2007
The comment has been removedAnonymous
November 03, 2007
Thanks very much for posting this how-to article. Has anyone, to your knowledge, experimented with the Folding@Home 64-bit Linux SMP client using Ubuntu in Virtual PC 2007? I'd be interested to learn how to make it work.Anonymous
November 26, 2007
Настройка Ubuntu 7.10 под VirtualPC 2007. Включаем работу мыши и правильную наст