Archive

Archive for July, 2009

Install Ubuntu 9 on Virtual PC 2007 – part deux

July 4th, 2009 10 comments

Ok, so you installed Ubuntu 9.04 on Virtual PC 2007, and it now asks you to reboot, (or you already tried to reboot, cursed me, and came back here to see if you missed something).
If you are lucky, everything works fine, if not you cannot see anything or you get a bunch of errors. This is because, once again, Ubuntu is trying to guess your virtual screen resolution and it is guessing it wrong.

So you need to edit the ‘boot’ file once and for all so that from now on it boots into the right screen.

You need to do 2 things, first you need to edit the boot, one more time to get into Ubuntu and then you will need to update the boot file so that you no longer have to do this again.

So, reboot Ubuntu, when you see something like ‘grub loading…‘, press esc and you will see a menu.

Select the first line, it will say something along the lines of ‘Ubuntu 9.0.4, Kernel …’. The other lines should say almost the same with extra words like, ‘Recovery mode‘ and ‘memtest86+‘ don’t choose those.
Press ‘e’ to edit the boot commands.

Select the line that says something like “Kernel …“, (normally the first one, but sometimes the second line).
Press ‘e’ again, (to edit that line).
At the end of that line simply add

or

Press ‘enter‘.
Press ‘b’ to start the boot sequence.

Now you are back in business, Ununtu is up and running again.
The last thing you need to do is make sure the changes you just did are saved so you don’t have to do the same thing over and over.

So, once Ubuntu is up and running select the menu option, ‘Applications>Accessories>Terminal’ and you should get a white window with a blinking cursor.
Next to that cursor type the following, ‘gksudo gedit /boot/grub/menu.lst‘, press enter, give your password.

At the end of the line that says ‘Kernel‘ add ‘noreplace-paravirt‘, (without the quotes of course).
Save the file.
Close the editor

Back at the command prompt simply update the grub, (in other words tell Ubuntu that you changed the file).

And that’s all, you can now reboot into your Virtual PC Ubuntu and all should be fine.

Note: If like me you are lazy and you don’t want to type everything, simply copy the text, place your cursor where you want the text to go and in Virtual PC select ‘Edit>Paste‘ and it will ‘type’ everything for you.

<Edit>Have a look at the third post to help you handle updates.

modprobe s

Install Ubuntu 9 on Virtual PC 2007

July 3rd, 2009 26 comments


I have been using Virtual PC to test reported problems, as a windows developer we only ever had to use Virtual PC for Windows OS, (Vista, XP and so on), but now I wanted to use it to install Ubuntu. If you don’t know what Ubuntu is, Wikipedia has a nice little article about it, basically it is a Linux operating system that has all the pretty desktop feature that most of us Windows users have grown to love.

This is what I used to install Ubuntu on my virtual server.

  • Virtual PC2007 sp1, (get it here).
  • Ubuntu Alternate CD, (get it here).

Create a virtual machine with enough resource, I chose 1024Mb of memory and 30Gb disk space. I think the minimum requirement is 256Mb of memory or something like that but if you can spare 1Gb of memory, use it .

Start the virtual machine and go to CD->Capture ISO image…, (you might need to reset the virtual machine afterwards if, like me, you are not quick enough).

When Ubuntu start it should pickup your ‘CD/ISO image’, you then choose your language
At this point if you try to do the install it will not work, this is because the install program does not ‘guess’ what your video mode is, (after all it is a virtual machine, so you cannot blame Ubuntu for guessing wrong).
So you need to tell it what to use.

To do that when you see the Install Ubuntu menu, (make sure that it is highlighted) . Press F6 and then press esc again to close the menu, (I know, I know there are other ways of doing it, but this way is good enough).

You will see a new line at the bottom that will say ‘Boot Options‘ at move your cursor, (with the arrows), to the end of the line. It should say something like “… quiet —“, delete that and replace it with “ noreplace-paravirt vga=791” and press enter to start the install.
The rest of the install should be fairly straight forward.

A couple of notes:

Select ‘No’ when asked to setup the keyboad, it will then ask you what country you are in and what country your keyboard comes from, otherwise Ubuntu will ask you to test your keyboad.

Be careful when choosing a username and password, remember that this is all case sensitive and the username must start lower case.

I chose not to encrypt the directory.

That’s it, enjoy Ubuntu 9.0.4.

<edit>Please have a look at the 2nd part, there are still some more tweaks needed to get your Ubuntu to work as expected.

www.microsoft.com/windows/virtualpc/
Categories: development Tags: ,