How To Install and Run Ubuntu Linux Inside Windows

Posted January 29, 2008 9:27 am by with 44 comments

Have you ever wanted to actually try Ubuntu Linux (Live CD’s don’t count) without having to worry about partitioning or installing another hard drive or setting up a dual boot? This step by step guide will walk you through the exact steps to run Ubuntu totally inside of Windows utilizing a virtual machine.

A great benefit to using a virtual machine is you can run the Ubuntu operating system and get access to the entire free software library the Linux community offers without having to give up Windows. Additionally, this is a great way to evaluate Ubuntu to see if it is something you might want to switch to.

Keep in mind though, while running any “guest” operating system inside of a virtual machine is fast, it is not as fast as if you had the same OS installed as your “host” (primary) OS. Most of the hardware environment is emulated so you will most likely not get all their features. For example, if you have a fancy graphics card installed on your Windows machine, the same device may not be available to your virtual machine, leaving you to run a more generic graphic driver for the guest OS. This is only a minor thing though, because the real benefit here is being able to run Windows and Ubuntu at the same time.

Requirements

While there are several methods and a variety of virtual machine software to choose from, I am going to install Ubuntu Linux using Microsoft Virtual PC 2007 for this walk through. The process should be very similar for any other virtual machine software if you want to use something different.

  • Windows XP or Vista.
  • Respectable processor (at least ~1.5 Ghz or a dual core).
  • At least 1 GB RAM.
  • Microsoft Virtual PC 2007 (it’s free). The download page says it requires XP Pro, but there are numerous reports it works on XP Home just fine.
  • Latest distro of Ubuntu (7.10 at the time of this writing). Once you have downloaded the ISO file, burn it to CD.

Steps To Install Ubuntu Linux Inside Of Microsoft Virtual PC 2007

  1. Open Virtual PC and click New inside of the Virtual PC Console. The New Virtual Machine Wizard starts. Click Next.
  2. Select the option to create a new virtual machine. Click Next.
  3. Enter “Ubuntu Linux” for the name of the virtual machine. Click Next.
  4. Select “Other” for the operating system. Click Next.
  5. Select the option to adjust the amount of RAM and assign at least 256 MB, but I would recommend 512 or higher. The more RAM you assign the faster Ubuntu will run, but your “host” Windows install will have that much less RAM while the virtual machine is running. Click Next.
  6. Select the option to use a new virtual disk. Click Next.
  7. Select a location to save the virtual machine file and assign a size for the virtual machine. The size you specify will be the size of Ubuntu’s hard drive, so make sure you assign at least 10,000 MB (10 GB). Click Next.
  8. Review the summary page and click Finish to create the new virtual machine. There should now be an entry called “Ubuntu Linux” in your Virtual PC Console. You can select this entry and click the Settings button to review or change the VM settings.df8btqd3_54f75gb7c5
  9. Insert your Ubuntu CD into your CD drive, select the Ubuntu Linux entry and press Start.
  10. When your virtual machine (VM) starts for the first time, it will not have any devices assigned to boot from. As a result, you will probably get a screen which shows the VM trying to boot from the network (“spinning” cursor) or just simply a “No boot device found” error.
  11. To fix this, you need to tell the VM to use the CD drive from your host OS. From the CD menu of Virtual PC, select “Use Physical Drive D:” (where D is the drive letter of your CD drive in Windows). This will bind the the D drive in Windows to be the CD drive in your VM.
  12. From the Virtual PC menu, select Action > Reset to restart the VM.
  13. Once the VM reboots, it will read the CD and give you the Ubuntu boot menu. As of the time of this writing, Ubuntu 7.10 has a bug in its kernel which does not communicate correctly with PS2 driver emulators used by VM software such as Virtual PC 2007. Here is how to work around this issue (thanks to the Ubuntu Forums and this bug report):
    1. While on the boot menu, press F6 to view the boot command string at the bottom of the screen.
    2. At the end of the command string, remove “splash” and enter “i8042.noloop” before the two dashes.
    3. Select the option to Start Ubuntu in safe graphics mode.
    4. Your screen should look like the screenshot below. If it does, press Enter to boot to Ubuntu.df8btqd3_55dqz9x6fv
  14. The boot process may take some time to load. If you see a blank screen for a few minutes, this is fine. Eventually you will see Ubuntu loading all of its start up services and then the GUI will appear. You are now in the Ubuntu Live CD Environment.
  15. Since the mouse and keyboard are shared between your VM and host Windows OS, once you click inside the VM it will “lock” the mouse and keyboard input. To transfer control back to your host Windows OS, press the Right Alt key.
  16. You can feel free to play around with the applications, but since everything is running from the CD the response will be really slow. Let’s get down to business and install Ubuntu on the virtual machine. To start, simply double click the Install icon on the desktop. The installation program will then start (be patient).df8btqd3_56c5txs2hf
  17. Select your language. Click Forward.
  18. Select your time zone. Click Forward.
  19. Select your keyboard layout. Click Forward.
  20. The Ubuntu partitioner will detect the amount of space you allocated to your VM. For this guide, I am going to use the default option which is to use the entire disk for the Ubuntu install, however you can certainly manually configure your partitions if you prefer, but I will not cover manually editing your partitions in this guide. Select the option for guided and click Forward.
  21. Fill out the information about yourself. Make sure you note your user name and password. Click Forward.df8btqd3_57hbm4xxg3
  22. Review the installation summary and click Install to load Ubuntu on your virtual machine. This may take some time, so be patient.
  23. Once the install is complete you will get a notice to remove the installation CD. In the Virtual PC menu (remember, press the Right Alt key to transfer the mouse) select CD > Eject and remove your Ubuntu installation CD. Click Restart now to boot to your new Ubuntu installation on your virtual machine.
  24. Before we go into Ubuntu for the first time, we need to apply the mouse fix to the completed installation to work around the kernel bug. This only needs to be done one time. When the VM is booting, you will see a message which says “Press ESC to load the GRUB config”. Press ESC to enter the GRUB configuration (if you didn’t press ESC in time, simply go to Action > Reset to reboot the VM).
  25. In the GRUB configuration, make sure the first option which reads “Ubuntu [Version], kernel 2.6.x-x-generic” is selected and press E.df8btqd3_64dndsgmd3
  26. Select the kernel option (should be the second line) and press E.df8btqd3_59gkdmh5dw
  27. Just like when installing Ubuntu, change “splash” at the end of the line to be “i8042.noloop”. Press Enter to apply the changes.df8btqd3_60hnv95zf6
  28. Back on the kernel option screen, press B to start Ubuntu. Once logged into Ubuntu, I will show you how to edit this permanently so you don’t have to make this change every time you boot.
  29. Once the Ubuntu login screen appears, enter the user name and password you created during the installation.
  30. Welcome to Ubuntu completely inside of Windows.df8btqd3_61gtfqsvd7
  31. Now, here is how to apply the permanent fix for the kernel mouse bug. Once you do this you will not have to worry about the mouse problem anymore:
    1. Go to Applications > Accessories > Terminal.
    2. Enter: sudo gedit /boot/grub/menu.lst
    3. When prompted, enter your login password.
      df8btqd3_62crdmbcgc
    4. Locate the “kernel” line we edited in when first booting Ubuntu (line ~132) and once again, change “splash” to “i8042.noloop”.
      df8btqd3_63grdc4khn
    5. Save your changes.
  32. You are done! Enjoy running Ubuntu from inside of Windows.

Of course, remember you are running Ubuntu Linux entirely from inside of a virtual environment. This should have no effect on program functionality, however you will most likely not be able to play any open GL games. I’ve also found that sound does not work out of the box, but if you need it this fix should help (I have not tried this though, as I do not use sound in my VM).

That’s it. Get down to giving Ubuntu a real good look and you might want to make it your primary OS.

44 responses to How To Install and Run Ubuntu Linux Inside Windows

  1. jonnyd February 3rd, 2008 at 11:25 am

    Thanks for the guide! Works beautifully with Vista Business.

        Reply

  2. Jonathan February 8th, 2008 at 4:27 pm

    would this tutorial work if I placed the VM on an external HD?

    thanks

        Reply

  3. Jason Faulkner February 10th, 2008 at 9:07 pm

    It should work just fine. I have not personally tried it, but I know of people who run several VM’s via MS Virtual PC 2007 from an external drive. I’m not sure about the performance, but I imagine there isn’t much of a drop off… if any.

    If you try it yourself, post your findings. I would be interested to see what you find.

        Reply

    • Ashish March 19th, 2009 at 5:32 am

      Hi Jason,

      Thanks for a nice guide to install Linux inside Windows.

      By the way I am a big fan of Linpus linux and gOS I tried to install both of them using Virtual PC but it ends up saying Unknown Processor Error ! this error msg appears just after the boot from the iso (image file).

      Can you recomend something? My laptop is running XP SP2, its Sony Vaio VGN-SR19XN, with 2 GB RAM and 160 GB HD, and Core 2 Duo P8400 @ 2.26 GHz

      thanks for the help,

      Regards,

      Ashish

          Reply

  4. scorp February 19th, 2008 at 4:13 am

    It would pay to checkout microsoft virtual pc additions,if memory serves it’s an update that lets mouse move freely between vpc & desktop ???,i can’t remember how to install it,there was something about the action button in the open vpc window,anyway ms will have documentation

        Reply

  5. Jason Faulkner February 20th, 2008 at 2:07 pm

    scorp,

    The VPC additions you are referring to (Action > Install or Update Virtual Machine Additions) do not work in anything except VM running a Windows OS.

        Reply

  6. scorp February 20th, 2008 at 6:13 pm

    John
    Cheers & to answer does it work on external hdd,yes it does i’ve just installed ubuntu to it & all is good,i’m now installing kubuntu.

    This tut may not work for all,for those of you who remove “SPLASH” then add 18042 etc & find it does’nt work,just do this instead ,leave the line complete & only add what you see as follows after the dashes e.g “splash–i8042.noloop” ,then hit enter & your mouse will be able to be captured.

    These links will add more info you may find usefull,if links @ the bottom are stuffed up google for http://woodwardweb.com
    http://arcanecode.wordpress.com

    http://woodwardweb.com/programming/000387.html

    http://arcanecode.wordpress.com/2007/10/18/installing-ubuntu-under-710-under-virtual-pc-2007/

    I’m glad i can finally install ubuntu in msvpc, i attempted it back in 06 but had no luck & just gave up till now ,so 10 stars for how to

        Reply

  7. scorp February 20th, 2008 at 6:18 pm

    Dam it ! sorry Jason i was’nt reading properly & got your name wrong,is there any chance you can edit my post to correct it & not bother letting this post be posted
    cheers

        Reply

  8. Michael Craddock February 24th, 2008 at 2:18 pm

    Great article. I previously tried installing 2 versions of Linux in Microsoft Virtual PC 2007; Suse Linux 10.2 and Ubuntu Linux 7.0.4. Suse Linux installed with no problems, and the keyboard and mouse worked. However, I never could get the mouse to work with Ubuntu Linux. So, I ended up piecing together a slower computer from spare parts and installed Ubuntu 7.0.4 on it. However, with this article I now have Ubuntu Linux 7.10 running, and the mouse working, within Virtual PC 2007.
    I am having 2 problems with this version of Ubuntu that I did not have with Ubuntu 7.0.4. One is the sound card not working and the other one deals with a network connection. Can I post them here, or somewhere else?

        Reply

  9. Michael Craddock February 24th, 2008 at 2:37 pm

    One thing I neglected to mention in my previous post, and that is about the installation of Ubuntu Linux. Once you’ve downloaded the Linux ISO file to your PC, you don’t have to burn it to a CD first to install it within Microsoft Virtual PC 2007. You can do the installation from the ISO file on your hard drive.
    In the Menu bar under “CD,” select “Capture ISO Image” during the boot up process. Since you’ll have to navigate to the folder where the ISO file is the first time, the boot process may go past where you need it to before you can get to the file and select it. If that happens, then select “Reset” under “Action” in the menu bar, and the virtual PC will “reboot.” As soon as the reboot process starts and you can make a selection under “CD,” select “Capture ISO File” again. When the window opens this time, it should be in the folder where the ISO file is, assuming you got to that folder the last time, before you Reset the virtual PC.

        Reply

  10. Jason Faulkner February 26th, 2008 at 4:38 pm

    scorp-
    Thanks for the info on running the VM from an external hard drive. Glad you were able to confirm it works. Additionally thanks for the extra tip for people who the “i8046.noloop” fix doesn’t work for. I haven’t tried it since (obviously) the change I made in the guide works for me.
    No worries on the name… I know what you meant. :)

    Michael-
    Did you try the fix for the sound I linked to at the end of the guide? As for the network, try right-clicking the network icon which appears in the notification bar at the top of the Ubuntu screen and forcing the selection for a wired connection. I had network issues on one machine and this fixed it.
    Nice find on the capture ISO image… I haven’t tried it, but that would greatly increase the install speed and save a CD.

        Reply

    • Michael Craddock April 14th, 2008 at 5:03 pm

      Thanks for the tip on my networking problem. It corrected. I did check out the tips for fixing the sound at the end of the guide, but the only one I saw was for Red Hat Linux.

          Reply

  11. Ricardo February 29th, 2008 at 7:09 pm

    After you do all this (the setting up & all) of Ubuntu Linux, when you close out of MS VM app & Ubuntu, does it reset everything & you have to do everything again?

    Thanks :) .

        Reply

  12. Ricardo February 29th, 2008 at 7:15 pm

    P.S.

    Also forgot to mention, I am currently MS Win, but going for Ubuntu to see & try for first time (when I do all this) use. :)

        Reply

  13. Jan Lenstra March 2nd, 2008 at 10:15 am

    Many thanks for the clear directions on this forum.
    My Ubuntu 7.10 is running now, almost properly.
    The only problem now is the mouse. I can use it, but the speed is far to high. I already set is to the slowest motion but 1 mouse-pixel is allmost 1 centimeter on my screen. Does someone have a solution for this?

        Reply

  14. jc March 2nd, 2008 at 6:14 pm

    When i installed Ubuntu Desktop 7.10 during install it stated it could not access the security updates. Once install completed and downloaded the security updates (and installed), upon restart the OS never came back up. I was able to log in and the it dyed at orange screen with the mouse.

    And also the manual change of the grub didn’t take either. Currently on a new install but am afraid to perform security update.

    jc

        Reply

  15. jc March 3rd, 2008 at 9:03 am

    Well, it’s running now..it gives me some kind of daemon error when i go to some sections but i’ll play with the os for now and re install if i like it.

    jc

        Reply

  16. Bill Gates March 8th, 2008 at 7:15 am

    Thanks for the guide. Been loking for thing like this. Thanks again.

    http://cracks.host.sk

        Reply

  17. Paul Nancarrow April 8th, 2008 at 10:10 pm

    Any tips for how to do this with an already existing Ubuntu installation in a separate partition of the hard drive? I have my laptop set up to dual-boot. But it would be great if I could run Ubuntu within Windows without having to reinstall Ubuntu. I’ve seen lots of tutorials around for creating a virtual machine installation of Ubuntu under Windows. But few clues about how to run an existing installation in a vm. Any help?

        Reply

  18. scorp April 14th, 2008 at 7:22 pm

    @ JC
    Download the latest distro of ubuntu at last count it was Beta 8.04 or it may be 8.05 ? not that it matters the general public release is due this month,you may find it’s a bit more compatible,also for those of you who download it,don’t bother with the no loop fix as it’s now fixed and the line is no longer needed or at least it worked for me as i forgot to enter it..lol..

    @ Paul
    the VM is a software that you install into either windows or linux,to not confuse i’ll be talking about microsoft vpc 2007 (which also works in xp home,ignore the warning when installing) once you install MSVPC 2007 into xp you are then able to start the vpc & install ubuntu into a virtual machine,a virtual disk does not create a new partition it instead basicly installs to a folder say inside My Docs or where ever you put it,you can also place it on a DVD-RW or DVD-RAM Disk so i would assume a cd-rw if the distro is small enough yes i have tried it on a DVD-RAM disk & it worked fine tho a little slow

    To recap the latest distro of Ubuntu once burne to disk does’nt require a vpc to run while your in windows,tho i have’nt tried it there’s plenty f screen shots showig it in action,if however you find MSVPC to limiting & want to run a vpc inside linux virtual box by sun micro,if i’m not mistaken it allows you to run windows in a vpc inside linux etc

        Reply

  19. scorp April 14th, 2008 at 7:32 pm

    @ Riccardo
    If i’m not mistaken once you’ve installed it & turn it off it starts up as tho you had just finished installing it,however from that point on if you don’t use “save changes” it will always revert back to that original install,it would’nt be a bad idea to enable undo disks in settings also

        Reply

  20. scorp April 14th, 2008 at 8:08 pm

    @ Paul
    Did’nt think it would be possable but turns out you can unless i’m misreading once again..lmao..:p
    http://www.vmware.com/pdf/dualboot_tech_note.pdf

        Reply

    • Paul Nancarrow April 14th, 2008 at 11:27 pm

      Thanks, Scorp. This looks really helpful!

          Reply

  21. scorp April 15th, 2008 at 12:51 am

    You might want to checkout & see if vmware player can do what you want as it’s free for personal use,the way i see it at almost 200mb to download it must have some serious features attached to it.

        Reply

  22. Icebreaker April 29th, 2008 at 5:44 am

    VirtualBox is an fully open source alternative to Virtual PC and VMWare, and you can install the “Virtual Machine Additions” under Linux too, so it makes your life a lot easier.

    IMHO it’s way more faster than Virtual PC.

        Reply

  23. TiGG May 21st, 2008 at 10:58 pm

    do you think i can do the same thing as shown here (steps) if i wanna install mac os x 10.2 on my pc? i have tried abotu a million different ways… still have not got it to work. and its pissin me off… oh also the mac os x 10.2 is the actual cd from apple

        Reply

  24. scorp May 23rd, 2008 at 3:45 pm

    It can be installed on a pc tho i don’t know how or how much hassle it would be or what hardware the comp needs,come to think of it emulators are used ?? ,as for inside a vpc i have’nt come across anyone that’s done it,you’d have to search the net but i would’nt hold my breath,the only advice i could give on that is install xp then use windowblinds with a mac theme :p

        Reply

  25. scorp May 28th, 2008 at 11:17 pm

    If you find when installing ubuntu 8.04 into vpc & you run into that what appears ti be a slurry of colors,it’s because vpc uses 16bit while the install uses 32bit,to get around that nonsense(or if you find it won’t install using the 2nd option of normal install),don’t use the install feature but instead use the “try it out” which is the first option,then press F4 for safe mode,hit enter,then enter again,the rest is follow the on screen prompts,just remember that it can appear at times that nothings happ’n,you can usually tell if it’s installing by keeping an eye on the lower right cnr hdd & cd icons & the coloured bubble that will appear.

    ps: can’t take credit for the install as i found it searching the net

        Reply

  26. mikecrad May 29th, 2008 at 12:14 pm

    Thanks for the tip, Scorp. I wish I had known about it prior to installing 8.04 a couple of weeks ago. I had the same thing happen with the display going haywire when I tried installing 8.04 using the normal install option. I didn’t see the option from the install menu in 8.04 to install it in safe graphics mode, like there was in 7.10. So, I first reinstalled 7.10 in the safe graphics mode and ended up upgraded to 8.04 from within the OS. I didn’t realize I could do this in the first place. Otherwise, I would not have deleted the VHD with 7.10 and tried to do a clean install of 8.04. I held my breath when I did the upgrade. I was afraid I’d see the slurry of colors I did when I tried to install 8.04, but that did not happen.

        Reply

  27. scorp May 29th, 2008 at 8:56 pm

    Yeah it’s pretty daft that early versions did’nt give the graphic crap even when installing as a dual boot but the later ones do

    You’ll find there will be a bit of swirling of colours while it’s installing into a vpc,it’ll pass so let it continue,there will also be 1 error message popup,can’t remember what it said just clik it to continue & all should work out fine,the only real issue i had was getting the ethernet to work & that was fixed by left clikcing “wired network”

    The only annoying thing is i’d like to increase the size of the vpc window,it’s a real pain having to use scroll to navigate web pages from left to right & top to bottom,so anyone come across a fix post a link or something

        Reply

  28. barfo September 3rd, 2008 at 7:32 pm

    whoa! I’m going to forget this! this is too much work for average users!

        Reply

  29. scorp November 26th, 2008 at 1:10 am

    lmao..practice makes perfect or at least once you finally get it running you wonder what was so hard.

    Just recently installed the latest distro’s of ubuntu & kubuntu as dual boot,i gotta say the changes made to kubuntu are excellant it’s the same but different way different,i like the exploding windows & the new grub editor is more refined

        Reply

  30. catalin bocanu November 27th, 2008 at 1:52 pm

    Ubuntu as LiveCD ISO can be easily deployed in Windows with the help of VMware player, as well as Fedora 10 Live CD and other Linux distributions. The entire 5 minutes tutorial can be read in this article: http://www.downloadtube.com/blog/2008/11/26/fedora-10-inside-windows-screenshot-tour/

        Reply

  31. scorp November 28th, 2008 at 1:09 am

    barfo if your still around it is possible to install ubuntu & i assume kubuntu as you would install any other software into xp or i assume (vista?? ) to try it out,then remove it thru add/remove,it’s been a while since i did it that way earlier in the year to see what the newer version was like,can’t quite remember but i seem to recall getting the boot OS selection screen ?? just see what the ubuntu site says

        Reply

  32. Jim February 9th, 2009 at 9:44 pm

    Hi Guys,

    I’m BRAND NEW to Linux and I installed Ubuntu 8.1 – I tried to follow the steps but only got as far as starting in safe graphics mode…(then the steps didn’t match…)

    I chose the option to ‘run inside windows’ and basically it ran through a command sequence ending in [ end trace 4eeaetc... ] and then nothing happens…

    Am I supposed to wait for a while, because it seemed pretty much done?

    Any help you could give would be greatly appreciated!

        Reply

    • Brandon April 2nd, 2009 at 11:05 pm

      i have the same problem as jim, xcept im using 8.04.1 or i just might be reading something completely arbitruary, i cant be sure. Use lehmans terms please.

          Reply

  33. zack May 20th, 2009 at 11:56 pm

    i just built an amazingly fast custom pc and i would like to know is it really safe to run ubuntu on virtual machine? my system specs are as follows, windows vista ultimate 64-bit, amd phenom quad-core 9500 2.21ghz, 6gb ram, 500gb hard drive. i just dont want to screw up my new machine ya know? if anyone has any helpful tips on how i should go about this process i would greatly appreciate the input.

    phenomcore,

        Reply

    • Ash June 18th, 2009 at 9:16 am

      It will be absolutely fine to install on your new machine. Just download/install windows virtual pc 2007 and as above, follow the steps. Probably worth allocating the virtual RAM atleast 1GB.

          Reply

  34. DaveT September 25th, 2009 at 5:47 am

    Hi there.

    I have just installed 9.04 onto a WIndows 7 host using the latest Virtual PC.

    Although the installer (sort of) managed to get past the graphics problems without help, I found that the mouse would not work. So I looked for a solution on the web.

    After looking at theis post, I followed the directions given here although they are for an older version. Anyway, they worked fine, and now I can run my Ubuntu alongside XP et al, so thanks for this post.

    Regards,
    DaveT

        Reply

  35. Luke October 29th, 2009 at 9:48 am

    Good point , but some conflicts can appear . i prefer to use only one operating system.

        Reply

  36. vinod February 22nd, 2010 at 3:00 am

    hi,
    i have installed ubuntu 8.04 inside windows,
    While installing i allocated 5 gb, now for doing project i need to download packages, i have already downloaded allmost all the packages but the problem is the entire 5 gb is consumed and its saying no space on device while i tried to download new packages,
    So how can i allocate more space to ubuntu, infact i have space in the drive but how can i allocate it to ubuntu?
    or how can i retrieve the packages i have downloaded in case if its not possible to allocate more space so i can reinstall ubuntu with more space and install these packages directly without downloading them .

        Reply

    • Guest June 28th, 2010 at 4:17 am

      Hi,
      Facing the same problem of yours……………Did u got any solution???

          Reply

  37. jasyn April 10th, 2010 at 1:43 am

    Can you install Ubuntu Linux 9.10 as a VM on Win 7? I’ve tried the Live CD but it comes up with a blank screen after the initial main menu…need help here…thanks.

        Reply

  38. chenhongjuan July 28th, 2010 at 2:51 am

    You'll find there will be a bit of swirling of colours while it's installing into a vpc,it'll pass so let it continue,there will also be 1 error message popup,can't remember what it said just clik it to continue & all should work out fine,the only real issue i had was getting the ethernet to work & that was fixed by left clikcing “wired network”
    http://www.ukghdhair.com/

        Reply

Leave a Reply