« Research Note 1 | Main | A fun LaTeX Command »

Getting a 64-bit copy of Windows XP

I've been getting a few emails about folks interested in using my MatlabBGL software on 64-bit installations of Windows. 

Personally, I don't have a 64-bit installation of a Windows environment (XP, Server, or Vista) which always made testing a little difficult.  A while back, the ICME sysadmin (a really huge help!) setup a machine with a 64-bit copy of XP to test for one person.  I got the code compiled and everything tested.  (Unfortunately, I couldn't reproduce the problem he identified.) 

In theory, I thought it would work quite simply.  I compile a 64-bit libmbgl, and they compile the .mexw64 files on their system.

Life is never that simple.

Suffice it to say, I ran into tremendous problems on getting libmbgl and the mex files compiled on the other computer.

To attack the problem I set about getting a 64-bit copy of WinXP.

Sometimes, being at Stanford is great.  I emailed our sysadmin.  By the time I came back from my next class, a WinXP 64-bit edition CD was waiting for me.  He need to run somewhere to get the volume license key, but in a short bit, I had my operating system.

I did not get another computer to install it on and instead, I setup QEMU on my ubuntu system.

sudo apt-get install qemu

Blah

To get things working, I created a 16GB image for the qemu virtual machine and an ISO of the winxp64 install disk. 

qemu-img create winxp64.img 16G # create the qemu image
dd if=/dev/cdrom of=winxp64.iso # create the iso (may need to change /dev/cdrom)
qemu -boot d -hda winxp64.img -cdrom winxp64.iso -m 512 -localtime

At which point I got an error message about how I needed a 64-bit machine to install a 64-bit version of XP.

Blast.

Google quickly provided the answer and the following command ...

qemu-system-x86_64 -boot d -hda winxp64.img -cdrom winxp64.iso -m 512 -localtime

... gave me a working virtual machine with a running windows installation extolling the benefits of 64-bit computing. 

The install took ages.  When it finished, XP rebooted itself and qemu did not boot from the virtual CD-ROM again.  Quickly thereafter, I logged into the XP system and tried Internet Explorer.

Nothing... there was no network!

Blast.

Google showed that I should be able to setup a NE2000 PCI network card with QEMU, but some quick checking showed that XP64 didn't have a NE2000 PCI driver.

Double blast.

A few hours past and I considered the possibility that my "open-source" QEMU idea wouldn't cut it.  After reading the QEMU FAQ, they posted a note on how to get the network working with Windows Server 2003.  Inspiration struck when I remembered that XP64 is based on the Windows Server 2003 source code.  I clicked the "howto" from the QEMU FAQ and the link was dead!

BLAST!

But, the link was to a realtek site, whereas the NE2000 driver should have been a novell site.  Maybe... there was something else I could do?  Indeed there was: QEMU can also emulate a realtek card as I found out on another page.  I tried this and still had problems, but Windows recognized the driver and virtual network card.  Another google search showed that I had to add just one more command line option to make things work. 

qemu-system-x86_64 winxp64.img -m 512 -net nic,model=rtl8139,vlan=0 -net user,vlan=0

... gave me a working virtual machine with a 64-bit copy of XP and access to the Internet. 

Finally.

Maybe now I can do some much work.  Just remember folks, "I do these things so you don't have to."  (I feel like someone famous said that sentence.  Google turns up nothing, however.)

References

TrackBack

TrackBack URL for this entry:
https://www.stanford.edu/~dgleich/cgi-bin/mt/mt-tb.cgi/10

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About

This page contains a single entry from the blog posted on December 6, 2007 1:12 PM.

The previous post in this blog was Research Note 1.

The next post in this blog is A fun LaTeX Command.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.34