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:
- 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).
- At the language selection screen, hit
Escape
, thenF6
and bring up the boot options string. Delete the part that saysquiet splash --
and replace it withvga=788 noreplace-paravirt
(other vga boot codes may work too). - 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.
- 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).
- 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. - Enter the following commands:
sudo mount -o bind /dev /media/volumeidentifier/dev
sudo chroot /media/volumeidentifier/ /bin/bash
mount -t proc none /proc
nano /etc/default/grub - Replace
quiet splash
withvga=788
and comment out thegrub_hidden_timeout
line (using#
) in /etc/default/grub, then save the file and exit nano. - Enter the following command:
nano /etc/grub.d/10_linux
- In the
linux_entry
section, changeargs="$4"
toargs="$4 noreplace-paravirt"
, then save the file and exit nano. - Enter the
update-grub
command and ignore any error messages about not being able to find the list of partitions. - 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!
FYI
volumeidentifier is the guid on the menubar of the Place/HDD
and it’s update-grub not update_grub
:-)
Thanks Mike… typo corrected ;-)
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.
Thanks Chris – there are quite a few PowerShell posts elsewhere on this blog.
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###
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?
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.
Mark Wilson thanks it is working
Very useful. Thanks (works with MINT 13.
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.
I experienced similar problem with 12.04, so I installed 10.04 instead. It refused to reboot under Win 7 but the created VHD booted OK in MS Virtula PC 2007 under Win XP Pro. I tried to run an upgrade to 12.04 but it reported that it needs 20 hours (after 30 min. download). It is still doing the upgrade