Installing Ubuntu on Virtual PC for Windows Lovers

I am a total noob when it comes to working with Linux. The only experience I have with Unix is in college when I used to pipe the manual of trn via the write command to unsuspecting classmates. If I remember correctly, this is how you do it.

write username | man trn

This would fill the user’s screen with a bunch of text. Always good for a laugh.

Normally, the write command informs the receiver who originated the message. I remember there was some way to hide who I was when sending the message, but have since forgotten that trick. Yep, them are some true ! Good times! Good times!! Good times! Good times!

As usual, I digress.

I recently decided to try out Ubuntu to see what all the fuss was about. My notes here apply to Virtual PC 2007.

Downloading Ubuntu and Setting up the VPC

To start, download the iso image from the Ubuntu download site. I downloaded the 7.04 version first since I assumed the bigger the version number, the better, right? We’ll see this isn’t always the case as we’ll see.

For completeness, I also installed 6.06.

When creating a new Virtual PC, make sure to bump up the ram to at least 256 MB of memory. Also make sure there is enough disk space. I tried to skimp and had a problem with the install. If in doubt, use the default value for disk space.

Installing Ubuntu

After creating a new Virtual PC machine, select the CD menu and then Capture ISO Image and browse for the iso image you downloaded.

Virtual PC Capture ISO Image Menu

When the Ubuntu menu comes up, make sure to select Start Ubuntu in Safe Graphics Mode. I’ll explain why later.

Ubuntu startup screen

At this point, Ubuntu boots up and if you’re a total noob like me, you might think “Wow! That was a fast install!”.

It turns out that this is Ubuntu running off the CD. I must’ve been tired at the time because this confounded me for a good while as everytime I rebooted, I lost all progress I was making. ;) The next step is to really perform the install.

The Mouse Capture Issue

If you’re running Ubuntu 7.04, you might run into an issue where you can’t use the mouse in the VPC. This is due to a bug in some Linux distros where it cannot find PS/2 mice, which is the type that VPC emulates.

This post has a workaround for dealing with this issue by using the keyboard until these distros are fixed. Heck, this might be a great feature of 7.04 since it forces you to go commando and learn the keyboard shortcuts.

Ubuntu 6.06 does not suffer from this problem, so it may be a better starting point if you and the mouse have a great rapport.

The Real Install

At this point, you are ready to start the install. From the top level System menu, select Administration | Install.

Starting the Install

The installation process asks you a few simple questions and doesn’t take too long.

The Bit Depth Issue

Earlier I mentioned making sure to start Ubuntu in Safe Graphics Mode. The reason for this is that the default bit depth property for Ubuntu is 24, which Virtual PC does not support. If you fail to heed this advice, you’ll see something like this. Kind of looks like that All Your Base Are Belong to Us video.

Ubuntu without the proper printer settings

Fortunately, I found the fix in this post on Phil Scott’s blog (Phils rule!). I bolded the essential elements.

Once I was in there, I found the configuration file for the graphics card in /etc/X11. Sso type in cd /etc/X11, although I certainly hope even the most harden of MScentric people can figure that out :). Once in there I opened up xorg.conf using pico (so type in pico xorg.conf - isn’t this fun?). Browse down to the screen section. Opps, looks like the defaultDepth property is 24, which VirtualPC doesn’t support. I changed this to 16 and hit CTRL-X to exit (saving when prompted of course). Typed in reboot and awaaaaaaay we go.

When I ran through these steps, I found that I had to use the sudo command (runs the command as a super user) first. For example:

sudo pico xorg.conf

Your results may vary. Speaking of sudo, have you seen my t-shirt from XKCD.com?

Virtual Machine Additions for Linux

At this point, you’ll probably want to install the Virtual Machine Additions. Unfortunately, the additions only work for Windows and OS/2 guest operating systems.

However, you can go to the Connect website and download Virtual Machine Additions for Linux. It took me a while to find the actual download link because various blog posts only mentioned the Connect site and not the actual location.

Ubuntu isn’t listed in the list of supported distributions. I’ll let you know if it works for Ubuntu.

Now What?

So now I have Ubuntu running in a virtual machine. It comes with Open Office, Firefox, etc... preinstalled. My next step is to install VMWare and MonoDevelop and start tinkering around. Any suggestions on what else I should check out?

UPDATE: Perhaps I should use VMWare 6 instead since it supports multi-monitor in a virtual machine. That’s hot!

Technorati tags: , ,

What others have said

Requesting Gravatar... Tero Miettinen May 06, 2007 5:03 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
You were talking about the sudo-command, most system-files need you to be super-user(aka root), in order to be able to write the changes to the file.

In Ubuntu su-program is not used by default, I prefer to use that when changing something like this. It actually logs you in as super-user instead of executing one command.

Ps. My first post ;)
Requesting Gravatar... chep May 06, 2007 7:08 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
Just a remark...
It's
$ man trn | write username
and not the other way around ;)

2Tero Miettinen:
If you want su-like behavior in Ubuntu, use:
$ sudo -i

Ubuntu has user 'root' disabled from loggin in by default. Some people find it as a way to improve security (attacker has to guess user name first, instead of using well known 'root').
Requesting Gravatar... Steve Harman May 06, 2007 8:18 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
Phil, when you said
Perhaps I should use VMWare 6 instead...

Were you referring to VMware Workstation, or Server? I ask b/c Workstation is currently in version 5.x and 6.0 is still in beta - oh and Workstation runs about $200 per license. Whereas VMware Server is free (as in beer), and is somewhere around version 1.0.x.

I've loved VMware when I used it in the past, and I was really excited when the decided to make Server free. Unfortunately it's not an ideal virtualization system to run on a dev box as I don't like to have the extra [server] process running when I'm not using VMs.

However, VMware Workstation it runs more as a standalone application (like VPC 2007), so it's not using up system resources when it's not in use. The big downside is the 200 smacks it'll cost you to get the Workstation license. Maybe they'll give us a discount for being good OSS developers? :)
Requesting Gravatar... Haacked May 06, 2007 9:05 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
@chep, would the following work?

write username < man trn
Requesting Gravatar... Scott May 06, 2007 10:27 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
sudo -s works too, starts a root shell.

I've never run into the bit-depth limitation under VPC? I haven't run Unbuntu 7.04 though, earlier versions I've run under VPC and VMWare with no desktop problems. But I've always run under Windows XP. Are you running VPC under Vista? The close/min/max buttons look Vista-ish in your screenshots.

Damn Small Linux is a great distro to install on your work machine for testing or running small wikis. ~50MB and can run in a 64MB VM with a full graphical desktop. You can start it up, leave it running, and hardly even notice an drag on your system.

I'm digging VMWare player & server and the plethora of pre-installed/configured virtual machines they have at their site. I wish there was a VPC community site sponsored by MS that had lots of pre-configured virtual machines. Player is free and there is a free tool avalable that lets you make VM images from physical machines.
Requesting Gravatar... Paul May 06, 2007 11:26 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
Interesting that you got this to work on Virtual PC. MS usually only has the option to create Windows based images.

I've never really liked VMWare. It always seemed to slow down my Windows box and would take forever to boot. I might give Virtual PC a try when I have some spare time.

Requesting Gravatar... Haacked May 06, 2007 11:34 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
@Scott: Yep, it's Vista.

@Paul: Well the fact that Microsoft has Virtual Machine Additions for Linux shows they are finally changing their tune on these matters. Unfortunately, the additions didn't work for me with Ubuntu.
Requesting Gravatar... DotNetKicks.com May 06, 2007 11:36 PM
# Essential Guide to Installing Ubuntu on Virtual PC
You've been kicked (a good thing) - Trackback from DotNetKicks.com
Requesting Gravatar... engtech May 07, 2007 9:34 AM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
VMWare has preinstalled Ubuntu images.

http://search.vmware.com/search?q=ubuntu&filter=0&btnG=VMTN+Appliance+Search&restrict=&output=xml_no_dtd&sort=date%3AD%3AL%3Ad1&ie=UTF-8&btnG.y=12&client=vmtn_appliance&num=10&btnG.x=15&oe=UTF-8&proxystylesheet=vmtn_appliance&site=vmtn_appliance

Also, here's a guide to 7 things people should change after installing ubuntu:

http://www.pcworld.com/article/id,130923-page,1-c,linux/article.html

You may be able to infer that I've been planning to do more playing around with Ubuntu. :)

I love using unix for development. Every operating system should come with grep.
Requesting Gravatar... Scott Elkin May 07, 2007 10:29 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
I had to add the vga=771 to the F6 parameters on install to get it to work.

http://coolthingoftheday.blogspot.com/2006/06/virtual-pc-2004-ubuntu-and-video.html
Requesting Gravatar... James May 09, 2007 8:13 AM
# Mouse Mouse! Kill It!
Hey hey! So thanks for the tips about installing Ubuntu on virtual PC.

I was running VPC2007 at home and wanted to try out some of the Linux distros. Ubuntu 6.06 installed fine, and although it had mouse support it was sluggish etc. I thought that installing the "Virtual PC additions" package would solve that problem...but DAMN! i spent forever trying to work out how to install the goddamn thing.

I couldn't do it in the end. It was jsut tooooooo confusing. Has anyone else gopt any tips for installing those ADDITIONS onto an ubuntu setup?

I'm just having a ball with virtual PCs at the moment. They're really cool. Just for giggles..I am infecting my virtual machine with as many virii as I can. Just to see what the virii actually do? My anal security on my host os prevents me from doing it on that machine.....so woot! to the virtual ones.
Requesting Gravatar... Paul Duggan May 09, 2007 3:16 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
Phil. Great post about Ubuntu, although I found 6.06 has the mouse problem too (?).
What to do next? You should definitely check out Amazon EC2 -- you can fire up your own Virtual Ubuntu or Fedoro or whatever. Or fire up 10 of them. Install MySQL, Apache, generally go mad!
Great to see you're an Amiga fan too - man, that machine was something. Might just have to check out Amiga Forever now.
P.S. Check out my blog for a couple of cool soccer posts.
Requesting Gravatar... Donny J May 11, 2007 12:56 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
Those freakin' Canadians. What's that all aboot anyways? I like bacon. I like pig's feet. Why should I buy goverment endorsed meat? Cause it's safe? Na...
Requesting Gravatar... Adrian May 23, 2007 12:44 AM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
Nice tutorial, I run into the mouse issue but the keyboard fix works good. I then tried out the kernel patch and it works!. Thanks a lot guys.
Requesting Gravatar... Ammar Jun 03, 2007 1:17 AM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
hii tried wht u said but i cant get further than Ubuntu boot screen.it just stuck there all i see is the boot screen thats all.help me!
Requesting Gravatar... Ben Jun 20, 2007 3:45 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
I donno what I am doing wrong, but even when I take the start in safe graphic mode I got the "All Your Base Are Belong to Us" effect, and sudo will not work,
ubuntu@ubuntu:~$ sudo
-bash: /usr/bin/sudo: cannot execute binary file
Requesting Gravatar... Phill Jul 25, 2007 1:28 AM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
Great, great :*...

I have a share PC and none in my family can see the benefits in Linux, and open source at all... So this is truly beautiful :D thx
Requesting Gravatar... JayJ Aug 10, 2007 11:31 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
Just letting you know there is a fix for the mouse issue cf check it here for CLEAR instructions :)

http://blogs.technet.com/seanearp/rss_tag_Troubleshooting.xml
Requesting Gravatar... harish Aug 26, 2007 4:46 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
Thanks , the step by step instruction was just perfect and saved me lot of time =)

Requesting Gravatar... Robert Aug 28, 2007 9:21 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
Dude mine either gets stuck in the boot screen or after its booted nothing happens.....lol help meeee
Requesting Gravatar... a ron Sep 07, 2007 9:53 AM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
Why am I not surprised? "Linux has solved all those install issues now, it's easier than windows!" Well no. In a very common environment for testing new software, neither the mouse nor graphics work. Humorously, you end up having to edit your x config, just like in the stereotypical Linux problems from history.
None of the other OSes I tried had any issue and worked out of the box with graphics and mouse - XP, 2K, NT4, OS/2, eCS, Win98.
Failed! Same as always.
Requesting Gravatar... Michael Wexler Sep 27, 2007 7:49 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
There is a simple fix for the mouse issue which will work even past various upgrades. See my blog at Ubuntu 7.04 and no mouse on Virtual PC where I explain how to easily fix it. Same issue and same fix for 7.10, btw.
Requesting Gravatar... khopcus Oct 25, 2007 10:56 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
stuck at bootscreen in virtual pc? Add clock=pit to the end of your kernel line when booting.
Requesting Gravatar... AttmayMB61489 Nov 08, 2007 10:12 AM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
You don't even know how long I've had EVERY issue described in this article. THANK YOU SO MUCH!!! :)
Requesting Gravatar... mario Nov 13, 2007 6:53 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
ok when im installing ubuntu what do i put as the mount point???
Requesting Gravatar... shamabaghodia Jan 18, 2008 9:43 AM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
Easy ways to fix the no mouse problem when using Ubuntu with MS Virtual PC...

Temporary:
- As you are starting up hit Esc at the Grub loader.
- Press 'e' to start editing.
- Goto the 'kernel' line and press 'e' again to edit the line.
- At the end of the line or text type " i8042.noloop" without the quotes. WITH the space before the i8042.noloop.
- Hit enter and then hit 'b' to boot.

Permanent:
- Open up a terminal (Applications > Accessories > Terminal).
- Enter in: sudo pico /boot/grub/menu.lst
- Look for the following lines in the file...


## ## End Default Options ##

title Ubuntu, kernel 2.6.20-15-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=fccafcc7-d7cc-4594-9459-a8f0db7b9f7f ro quiet splash
initrd /boot/initrd.img-2.6.20-15-generic
quiet
savedefault


- Change the kernel line to: kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=fccafcc7-d7cc-4594-9459-a8f0db7b9f7f ro quiet splash i8042.noloop
- Save and your done.

Upgrade Permanent:
The file /boot/grub/menu.lst could be overwritten when Ubuntu upgrades so to ensure your change is included in the upgrade...
- Change the following line in /boot/grub/menu.lst...


# kopt=root=UUID=fccafcc7-d7cc-4594-9459-a8f0db7b9f7f ro


to...


# kopt=root=UUID=fccafcc7-d7cc-4594-9459-a8f0db7b9f7f ro i8042.noloop
Requesting Gravatar... shamabaghodia Jan 18, 2008 9:57 AM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
Oh yeah for those stuck at the Ubuntu menu, you know "Start or install Ubuntu, Start Ubuntu in Safe Graphics Mode, etc" You hit enter but nothing happens?

Check the file size of the Ubuntu ISO file you downloaded. It should be around 700MB. If its not then you'll need to download Ubuntu again.

Strangely its a common problem where I've seen users struggling when the file fails to download completely but it will still run the Ubuntu startup menu.
Requesting Gravatar... Serkan Mar 05, 2008 5:40 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
Can Ubuntu run with XGL on Virtual PC?
Requesting Gravatar... mj Apr 02, 2008 4:54 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
looks great but real install is better.
Requesting Gravatar... Ouberdoub Apr 19, 2008 1:33 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
Umm, I"ve already install ubuntu but can only run one at a time. Can I use VPC to access the ubuntu I've already installed?
Requesting Gravatar... Ed Evans May 12, 2008 4:29 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
Not sure if the ps/2 mouse/keyboard fix works for 8.04 but read several posts from others with success stories on VirtualBox. I don't think it has the dual display feature but it is fast, free and works great.
Requesting Gravatar... Time Jun 14, 2008 7:53 AM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
How about just uploading the Virtual Machine and VM Hard disk so we don't have to go through the process of downloading everything and waiting so long just to go through more steps.
Requesting Gravatar... Maro Aug 22, 2008 1:13 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
Use Virtual Box to instal ubuntu on Windows. I tryed with vitual pc but work adnd configuration on vp was very annying. Now I use VB and have no problem with anything, I work on dualhead mode in resolution 1280x1024 Ubuntu.
Requesting Gravatar... ahabman Aug 22, 2008 8:55 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
To get around the error that says -

An unrecoverable processor error has been encountered.
The virtual machine will reset now.

helpdeskgeek.com/.../installing-ubuntu-804-on-m...
Requesting Gravatar... StophVista Sep 23, 2008 6:37 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
The newest version works in safe graphics mode without modification
Requesting Gravatar... ng Oct 12, 2008 9:36 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
i am telling i have already install ubuntu 7.10 in virutal pc. and now how to install ubuntu 8.10 BETA version install in Virtual PC
Requesting Gravatar... Narendra Garg Oct 23, 2008 6:23 AM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
i am install already ubuntu 7.10 and now how to install ubuntu 8.10 beta install in virutal pc
Requesting Gravatar... David Whyte Oct 27, 2008 6:51 AM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
I have been banging about for a few hours searching for a fix for the Ubuntu mouse issue. I just stumbled across the fix for the mouse issue that does not require vm additions. It works like a charm.

blogs.msdn.com/.../...k-under-virtual-pc-2007.aspx
Requesting Gravatar... Jay Oct 29, 2008 8:19 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
Awesome write up, I had to do the f4, f6 and then it was all good. Thanks
Requesting Gravatar... kirbylover4000 Jan 25, 2009 11:08 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
Seems all good...but the download links are broken.
I'd like to see Virtual PC for myself as I have never used it before and need it. Restarting to switch OSes between WinXP and Ubuntu just sucks!

[p.s. I don't know you, you don't know me and so on but I googled Virtual PC (thank god for google!) and found this page, followed links , were aparently broken and left this comment.] ;-)
Requesting Gravatar... fedro Jan 26, 2009 12:00 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
esci fuori di qui se pensano che siamo andati in quinta non bisogna mai dirlo a marzia
Requesting Gravatar... the machinist Mar 14, 2009 6:38 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
VPC '07 will install Ubuntu 8.10 but you still need to use the Safe Graphics Mode (F4 at title screen) and no mouse bugs. Even more entertaining is when I installed VPC it said it wouldn't work with my current OS (Vista Home Prem.) but it seems to operate just fine, and only minimal lag while running Aero... not too shabby.
I also run 2 monitors and set VPC to start in fullscreen on my 2nd monitor.
Requesting Gravatar... webster72n Apr 05, 2009 4:00 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
I installed Ubuntu 8.10 on a virtualbox and everything is fine, except for two things:
1. it doesn't activate my printer, even though recognizing it.
2. it also doesn't find my modem, which is a dial-up connection.
To resolve my dilemma, I am advised to use an HP printer and upgrade to Broadband by a person familiar with ubuntu systems.
Since I am financially restricted, my options are limited accordingly and therefore I would like to find a way to make things work with what I've got. Is that possible and, if so, how?

P.S.: The host system is Vista Home Premium, 32 bit.
Requesting Gravatar... san Dec 28, 2009 11:49 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
can we install virtual PC on vista home premium 32 bit
Requesting Gravatar... CoderHead Feb 04, 2010 8:11 PM
# re: Installing Ubuntu on Virtual PC for Windows Lovers
Great write-up. I'm running Virtual PC on Windows 7 Ultimate x64, installed Ubuntu 9.10 Desktop without any issues. Fun!

What do you have to say?

(will show your gravatar)
Please add 6 and 2 and type the answer here: