Installing Ubuntu (10.4) on Windows Virtual PC

I use a Windows 7 notebook at work but, sometimes, it’s just easier to drop back into a Unix or Linux machine – for example when I was checking out command line Twitter clients a few days ago (yes, there is a Windows one, but Twidge is more functional).  After all, as one of my friends at Microsoft reminds me, it is just an operating system after all…

Anyway, I wanted to install Ubuntu 10.4 in a virtual machine and, as I have Windows Virtual PC installed on my notebook, I didn’t want to use another virtual machine manager (most of the advice on the subject seems to suggest using Virtual Box or VMware Workstation, which is a workaround – not a solution).  My first attempts were unsuccessful but then I stumbled upon a forum thread that helped me considerably – thanks to MrDerekBush and pessimism on the Ubuntu forums – this is what I found I needed to do:

  1. Create a virtual machine in Windows Virtual PC as normal – it’s fine to use a dynamic disk – and boot from an Ubuntu disk image (i.e. an ISO, or physical media).
  2. At the language selection screen, hit Escape, then F6 and bring up the boot options string.  Delete the part that says quiet splash -- and replace it with vga=788 noreplace-paravirt (other vga boot codes may work too).
  3. Select the option to try Ubuntu without installing then, once the desktop environment is fully loaded, select the option to install Ubuntu and follow the prompts.
  4. At the end of the installation, do not restart the virtual machine – there are some changes required to the boot loader (and Ubuntu 10.4 uses GRUB2, so some of the advice on the ‘net does not apply).
  5. From Places, double click the icon that represents the virtual hard disk (probably something like 135GB file system if you have a default sized virtual hard disk). Then, open a Terminal session and type mount, to get the volume identifier.
  6. Enter the following commands:
    sudo mount -o bind /dev /media/<em>volumeidentifier</em>/dev
    sudo chroot /media/<em>volumeidentifier</em>/ /bin/bash
    mount -t proc none /proc
    nano /etc/default/grub
  7. Replace quiet splash with vga=788 and comment out the grub_hidden_timeout line (using #) in /etc/default/grub, then save the file and exit nano.
  8. Enter the following command:
    nano /etc/grub.d/10_linux
  9. In the linux_entry section, change args="$4" to args="$4 noreplace-paravirt", then save the file and exit nano.
  10. Enter the update-grub command and ignore any error messages about not being able to find the list of partitions.
  11. Shut down the virtual machine.  At this point I was left with a message about Casper resyncing snapshots and, ever after leaving the VM for a considerable period it did not progress further.  I hibernated the VM and when I resumed it, it rebooted and Ubuntu loaded as normal.

There are still a few things I need to sort out: there are no Virtual Machine Additions for Linux on Virtual PC (only for Hyper-V), which means no mouse/keyboard integration; and the Ctrl-Alt-left arrow release key combination clashes with the defaults for Intel graphics card drivers (there are some useful Virtual PC keyboard shortcuts).  Even so, getting the OS up and running is a start!

13 Comments

  • Thursday 15 July 2010 - 13:49 | Permalink


    FYI
    volumeidentifier is the guid on the menubar of the Place/HDD
    and it’s update-grub not update_grub
    :-)

  • Thursday 15 July 2010 - 14:35 | Permalink


    Thanks Mike… typo corrected ;-)

  • Chris Whitfield
    Wednesday 21 July 2010 - 15:18 | Permalink


    Since you are into command line, are using Windows 7, are a *Nix fan, and were looking for a command line twitter client, you might want to check out PowerShell. The shell is an integral part of Windows 7 by default and many cmdlets already have aliases to familiar *Nix style commands (pwd, ls, cat, etc). On top of that, you can use modules to augment standard functionality with scripts and extensions (formerly provided by snapins). In this instance, you can grab the PoshTweet module by Jakul (http://wiki.poshcode.org/Repository/Jaykul/PoshTweet_Module) which has functionality for performing a number of tweet functions, all directly from PowerShell and GUI free.

    Hope this helps you as your article helped me.

  • Saturday 24 July 2010 - 6:36 | Permalink


    Thanks Chris – there are quite a few PowerShell posts elsewhere on this blog.

  • Pingback: Scott Hanselman - Installing Ubuntu 10.4 LTS on Windows Virtual PC on Windows 7

  • Chris
    Sunday 3 October 2010 - 8:12 | Permalink


    I reached to the point where I was to reboot the VM, but I only saw the Casper message for about half a second before I got an error like this

    [ 3103.1######] end_request: I/O error, dev sr0, sector 521###

  • Wednesday 17 November 2010 - 14:27 | Permalink


    I’ve tried to install Ubuntu 10.10 on VM but without success. My problem is during the boot of VM. Have you experience about this problem with Ubuntu 10.10?

  • Vince
    Saturday 18 December 2010 - 23:35 | Permalink


    Thanks a lot!!! It works perfectly on Virtual PC 64bit, Windows 7 64bit and Ubuntu 10.x. I rebooted it at the end of the installation without changing the boot loader so I saw the same error message, “An unrecoverable ….. “. But I could enter into the trial mode again and made the change in the boot loader. Now it is working fine.

  • Sergey
    Thursday 24 February 2011 - 18:32 | Permalink


    Mark Wilson thanks it is working

  • Pingback: Ubuntu 10,10 boot problems in Win 7 virtual pc

  • Pingback: markwilson.it » Blog Recap: 2010 in review

  • Jean-Simon Larochelle
    Wednesday 28 November 2012 - 19:29 | Permalink


    Very useful. Thanks (works with MINT 13.

  • TweetyTweet15
    Sunday 9 December 2012 - 14:30 | Permalink


    This method worked with Ubuntu up to version 11.10, but when I tested Windows Virtual PC with the ubuntu-12.04-dekstop-i386.iso or the ubuntu-12.10-desktop-i386.iso, forget about everything else because the kernel crashes when trying to load initrd.lz from the virtual CD-ROM drive in Windows Virtual PC. Interestingly, in the installer, I typed TweetyTweet15 in the “Real Name” field and the installer automatically set the default computer name to tweetytweet15-VirtualMachine.

  • Leave a Reply

    %d bloggers like this: