Wednesday, February 11, 2009

IE8 in Ubuntu with VirtualBox

2009-05-03 - Updated guide for Ubuntu 9.04, Virtualbox 2.2 and IE8 final.

If like me you are an Ubuntu user and web developer, you'll have been after a convenient way to test in Windows based browsers, without having to reboot or switch computers. Sure, there's IEs4Linux, but I've never found it a pleasurable experience, and what about testing other browsers in Windows?

Finally, a really convenient solution has come along in the shape of VirtualBox and some Microsoft supplied machine images. As of version 2.1.0, VirtualBox supports the VHD hard disk image format, which means it can run the images Microsoft helpfully supply for testing websites with different IE versions on Windows XP SP2, Windows XP SP3 and Windows Vista. These copies of Windows expire after 3 months or so, but it's far better than using dodgy downloaded copies. If you are comfortable installing non-free software, this is a very effective setup.

This guide is based on the great 10 Volt Media guide to installing Internet Explorer on OSX using VirtualBox, I have simply converted their procedure to make it suitable for Ubuntu 9.04 users.

The Windows images do have a habit of blue screening when booted in VirtualBox, so you have to tinker with them a little bit to get it working, but it's simple enough if you follow this guide.

After updating this guide to use Virtualbox 2.2 and the new Windows disk images, I no longer get the dreaded blue screen of death, so no need to fiddle around in safe mode. The USB and Audio devices no longer work, I will look into a fix for those.

I describe how to install the WinXP/SP2/IE8 disk image, but you can easily use one of the others if you'd prefer.

That's enough blathering, let's get on with it...

Install Virtual Box

Add the following source to /etc/apt/sources.list, or use Synaptic etc if you prefer.

deb http://download.virtualbox.org/virtualbox/debian jaunty non-free


Or, if you are still using Intepid:

deb http://download.virtualbox.org/virtualbox/debian intrepid non-free


Add the Sun public key.

$ wget -q http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc -O- | sudo apt-key add -


Install VirtualBox, accepting prompts to create the vboxusers group and compile the VirtualBox kernel module.

$ sudo apt-get update && sudo apt-get install virtualbox-2.2


Restart for good measure (and to get the VirtualBox menu item).


Download and extract the virtual hard disk image.

Create a dir to hold the VHD file.

$ mkdir -p ~/VirtualMachines/HardDisks && cd ~/VirtualMachines/HardDisks


Download the IE8RC1-XPSP3.exe file, it's quite a large file so why not go and make a nice cup of tea...

$ wget http://download.microsoft.com/download/B/7/2/B72085AE-0F04-4C6F-9182-BF1EE90F5273/IE8-XPSP3.exe


Once it's finished, extract the vhd file.

$ unrar e IE8-XPSP3.exe XP\ SP3\ with\ IE8\ 2009-Apr.vhd


Remove the exe, you won't need that anymore.

$ rm IE8-XPSP3.exe



Create Virtual Machine

Launch VirtualBox from the Gnome menu, Applications > System Tools > Sun xVM VirtualBox

Create a new VM by clicking New.

Give it a name and set operating system as Windows XP.

Assign some RAM, no more than half your physical RAM is advisable.

At the Virtual Hard Disk screen click Existing to open the Virtual Media Manager.

Click Add and select the VHD file extracted earlier.

Click Select to close the Virtual Media Manager.

Click Next then Finish, you'll return to the main VirtualBox app which should now list your new VM.


Configure Windows VM

Select the VM in Virtualbox then press Start to power it up

Dismiss any windows, dialogs, etc.

Devices > Install Guest Additions

Follow the prompts, accepting default values to install VirtuaBox Windows additions.

Choose to reboot machine when complete - Machine > Reset

Click OK to mouse pointer dialog, you won't need to maually capture the mouse again, handy!

Start > Run > "cmd"

> D:\VBoxWindowsAdditions-x86.exe /extract /D=C:\Drivers


Start > Administrative Tools > Computer Management

Select Device Manager.

Select Batteries, Unknown Device -> Disable

Select Sound, video and game controllers, Multimedia Audio Controller -> Disable

Select Universal Serial Bus controllers, Universal Serial Bus (USB) Controller -> Disable

Select Network Adapters, Ethernet Controller -> Update Driver

Select Yes, now and every time, click Next

Select Install from a list or specific location, click Next

Enter location "C:\Drivers\x86\Network\AMD"

Click Finish

Open a browser, test connection

You're done!

Bonus Tips

When closing the VM, choose "Save the machine state" to avoid watching tedious boot up screens when you restart it

Select Machine > Seamless Mode to hide the Windows desktop altogether leaving the application windows to run seamlessly alongside your Ubuntu windows. This is probably my favourite feature of VirtualBox :-)

Blue screen?

A previous version of this guide dealt with a problem where the Windows images would blue screen. This appears to have been fixed now, so try letting Windows boot first and hopefully everything will be fine, otherwise...

Hold F8 as the VM boots.

Choose "safe mode with command prompt".

Cancel any wizards, mising file dialogs that come up.

At the DOS prompt, enter

> cd \WINDOWS\system32\drivers
> ren processr.sys processr.old


Restart the VM - Machine > Reset

Saturday, January 27, 2007

WSXGA+ on an Acer AL2032WA with Xorg and Nvidia drivers

After a recent apt-get dist-upgrade and upgrade of the Nvidia drivers on my Debian Etch machine, I noticed that my screen resolution was reduced to 1024x768 :-(

Having invested a while ago in my lovely Acer AL2032WA flatscreen monitor, I decided it was high time to get the full value out of it. I had previously been running at 1600x1200 after failing to get 1680x1050 (WSXGA+) to work the last time I tried.

A quick look at the xorg logs didn't tell me much, other than the fact that a bunch of modes weren't validating. Restarting x with the -verboselog switch set to 6 gave me more to go on:
Validating Mode "1680x1050":
...
Mode is rejected: Mode (1680 x 1050) is too large for DFP
Native Resolution (Max: 1280 x 1024).
It seems that the Acer gives some wholly inaccurate resolution information. The Nvidia driver howto told me to add the following option to the Monitor section of /etc/X11/xorg.conf:
Option "ModeValidation" "NoDFPNativeResolutionCheck"
On restarting x I was greeted with beautiful 1680x1050 resolution :-) The only minor annoyance is some panning on the login screen, but I can live with that.

Tuesday, January 16, 2007

MythTV box - Part 2 - Assembly

Once I finally had all the parts, assembling them all was relatively simple, and it was all done in a couple of hours.



The P150 is a nice little case, but it weighs quite a bit due to the steel plating used in its construction. The easily removed side and front panels enable good access to the interior, although things were bound to get a little cramped once the heatsink went in.



Fitting the Scythe Ninja was perhaps the scariest part of the operation. It requires quite a degree of force to get the clips to engage with the processor mount, and the motherboard was making ominous cracking noises as I struggled with it. This wasn't helped by the fact that the light had faded more than I realised, and I had to frantically grab my headtorch to see what I was doing!



The rest of the components went it smoothly. Although there was not a lot of room to spare between the passive heatsink on the graphics card and the nearby capture card, I figured it would be okay and so far hasn't been a problem.



One of the most unusual features of the case are the rubber band mounts for the hard disk. These are optional but as I was aiming for quiet operation I was eager to try them out. They work really well; even if I strain I really can't hear a peep out of the Western Digital disk (which is reputed to be very quiet anyway).



The P150 has some very handy cable management features, very helpful for keeping the interior free for unimpeded airflow.

The initial power-on in any system build is always a nervous experience, but there were no problems. The P150 doesn't have a case speaker (even though it's listed in all the specs and documentation, weird) so it was difficult to hear the usual POST beeps, I got around this issue by simply running the line-out to a stereo. The A8N-SLI actually has POST voice reporting (HAL here we come), so it was actually a pleasant female voice that first told me my new computer had booted successfully :-)

As a system, I am very pleased with the result. Even with the case fan set to it's lowest setting everything runs very cool, the processor typically at an acceptable 35C. I considered modding the case a bit, switching off the case fan altogether and relying solely on the PSUs' ultra-quiet fan, but it's really quiet enough already. Sometimes you just have to stop tinkering!

Now everything was working, I was just itching to get started with the software installation and configuration. And that's exactly what I'll cover in the next post in this series...

Thursday, January 11, 2007

MythTV box - Part 1 - Hardware

Over the last few weeks I have been engaged in the process of selecting, ordering and assembling the hardware for my new MythTV box.

I was originally inspired to do this after reading Garry Parkers excellent MythTV Ubuntu HowTo. A quick experiment adding a capture card and MythTV to my existing Debian machine, and I was convinced.

After doing a bit more reading about setting up MythTV systems, I came up with my hardware requirements:
  • Silence, or as near to it as possible
  • Low power consumption
  • Looks
I wanted it to be as quiet as possible as it's going to be running most of the time, and there's nothing more annoying than the constant droning of fans. My existing PVR, a DigiFusion FVRT200, is fairly quiet but I still find it's low volume hard disk hum distracting. Luckily, quietness goes hand in hand with power efficiency, so getting one will go a long way towards achieving the other.

Quite early on I decided *not* to go for an HTPC case, it seems difficult to get a really quiet one and they are fairly limited in terms of expansion space. Given that I was probably left with choosing a standard midi case, it had to be fairly pleasing to the eye as it'll be difficult to hide it entirely behind my (admittedly large) television.

After much research and loss of sleep, I settled on this configuration:
After a few abortive attempts to order the components from dabs.com, I gave up. My order seemed to get stuck at some security checking stage for days on end, then get mysteriously cancelled. Frustrated with their terrible customer service I gave up and defected to ebuyer.com, who handled my order perfectly and even came in a bit cheaper.

The only component I had trouble finding was the Asus motherboard. It was a couple of years old and there did not seem to be a single retail copy anywhere in the UK. As a last resort I tried ebay and found one, despite a few problems the seller had getting parcelforce to pick things up over the Christmas period, it all worked out ok in the end.

In my next post I will go through the assembly process, and include some photos of my lovely new system. After that I will follow up with details of the software installation and configuration process.

Update - 2007.02.04

Just as I was about to begin assembly I discovered a potential compatibility problem between my A8N-SLI Premium motherboard and the Antecs' NeoHE 430 power supply. It turned out not to be a problem for me, but I would advise anyone else using this combination to check out the URL above.

 

Copyright 2009
Template by GeckoandFly modified and converted to Blogger Beta by Blogcrowds.
No part of the content or the blog may be reproduced without prior written permission.