For those of you looking to chuck your Windows XP, you may like what method I have chosen for those times you absolutely must have it available. I looked around at a few VM efforts. I considered buying Win4Lin, until I read the readme which states it cannot work with usb devices in the guest OS... unless they are already working in the host... or something like that. Bottom line... no usb except maybe a mouse or keyboard. I looked at the vm in Knoppix, QEMU and KQEMU... it looked complicated enough to put on a back burner for me.

I had already tried winetools... but that had a drawback somewhere I can't remember at the moment.
Next up, VirtualBox by Innotek, which
Sun Microsystems just bought.
That made me curious enough to try it out, if I could install it on Knoppix.

Well we all know that vmWare can probably do this. But at $189 who needs windows THAT badly!
Recently I had to run a Windows program on my Knoppix box. This program needed to access a low speed USB device, in particular... an energy monitor that monitors my house's electrical usage. That would be the TED 1001, available at TED. It has only a windows NT,XP program that you can use to monitor it with called Footprints. It required .Net version 2.0 and has a USB to Serial port driver that you have to install as well, called CDM 2.02.04.exe. It's on the net as well.

I am going to try and list the steps I did to get that working, on Knoppix 5.1.1, installed to a 5GB partition that has the Knoppix DVD iso file on it. I have my persistent home (knoppix.img) file on a separate XP ntfs partition which is about 5GB also.
I am running on a older AMD 32 bit board, so I can't help you on what will happen with the 64 bit version running on a 32 bit i386 Knoppix. I am just trying to find a cheap pc to record the data this monitor sends out every second or so. I wonder if getting the 32 bit i386 deb will work well on Knoppix 5.1.1 which is basically i386 as well. I'll do that soon enough and add to this thread later what my results were. Maybe someone else has already done this.

So let me get started telling you what I did. Download this deb, for Knoppix 5.1.1 users. If you run a different Knoppix version... you'll have to do some checking for which version to use. They have debs for Etch and Sarge.

First I did some commandline checking with apt-get -s install ~/Desktop/virtualbox_1.5.6-28266_Debian_etch_i386.deb to see if it would complain. Then after getting no complaints, I then installed it without the -s.
It gave me some error about a kernel module was not available for it... with a line saying I should execute "sudo /etc/init.d/vboxdrv setup" in a console. I think dpkg was even offering to do this for me, but I just opened another console and did it there and when it finished I went back and continued.
On the dvd version this built without any errors. The CD version may be missing kernel headers. When you are finished, you can type "lsmod | grep vbox" without quotes in a console and you should see a module loaded, such as vboxdrv 54912 0. As for any additional libraries VirtualBox requires... on the DVD version everything is there already.

Next, since there are no shiny new icons on the Desktop, I had to roll my own. Right clicking on the Desktop, and picking... Create New->Link to Application. In the General tab... you can fill in a more descriptive name than "Link to Application" is. I chose VirtualBox. Then click the Application tab and in the third text field, labeled "Command" enter /usr/bin/VirtualBox. You are done unless you want to change your icon... by clicking on the blue gear. I wound up grabbing the one off the website.
that I can touch up if the non transparent background really winds up bugging me.
Edit: Mar 09, 2008 I found a transparent version so here it is
[b]Edit: May 28, 2008 The image disappeared. I'll put it up on my server till I find out why.

Next, add the knoppix user to the vboxusers group, by editing the file /etc/group.
Mine now says: vboxusers:125:knoppix on the last line, as I just added the word knoppix to the end of what was put there by the installation. Then I had to reboot... maybe I could have just logged out but my Knoppix reboots quickly now that I have fixed this bug.

Next I opened a terminal... and I typed sudo VirtualBox. Sometimes a program finishes installing when run the first time... and that's best done as root. I dunno. Better safe than sorry.,

Now for the fun part... Creating the virtual Windows XP. You'll want to have some hard disk space for this... although for my needs I don't plan on using the expanding drive feature of VirtualBox. I used the fixed option. There are only 2 things I need to mention before we stick in a Windows Installer cd. Unless you have 2 cdrom drives in the same pc, you may have a hard time using one for Knoppix, and one for the Windows installer. That's another good reason to just go ahead and create some permanent partitions for Knoppix, and a separate one for your persistent home sized accordingly.
Some offtopic stuff follows.
Using Gilles' van Ruymbeke's wonderful minirt_511a.gz, I can boot Knoppix from anywhere. Ntfs drives included. I have even used his ntfs_rw cheatcode which allows you to have an iso image of Knoppix on your XP drive... and be able to write to that same drive when you are in Knoppix. Ok, so if you want to know about getting that minirt_511a.gz, and using it on your pc... I would suggest a www.knoppix.net+minirt_511a.gz&hl=en&safe=off&filt er=0]Google site search[/url] of these forums for minirt_511a.gz, as the one here seems to return nothing for some strange reason.

I have prepared a script which will load the files you need to edit, into an editor... and using straight KDE dialogs and dcop, allow you to see what those changes are... and extract a boot directory to what is supposed to be your C: drive. If you feel adventurous, you can get both files Here is knoppix-pmi-setup.sh and Here is boot.tar.bz2 and place them in the same directory before running the pmi-setup script. After downloading the script, and reading it to make sure it might do what you want... you'll need to open a terminal and cd to the directory you saved the files to and make the script an executable with a, "chmod +x knoppix-pmi-setup.sh" command. Even though it will give you gui stuff to use, I'd still recommend running it from the console. Some error messages are "normal" non critical kde errors... but it does the job, and was fun for me to explore dcop with.
Ok, in the screenshots below, you should notice I am giving direct control of the Cd Rom drive to windows. It worked flawlessly for my XP install set that way. And that I use /dev/hdc because it's the master drive on the second IDE controller.

The other thing... I have turned off usb 2.0... because as I was learning this myself, I had problems enabling high speed usb.
EDIT: Mar 06, 2008 OK...duh! I decided to plug in a High Speed USB device... and after I enabled it in the VirtualBox Devices menu, it worked great in Windows XP as well. I wasn't sure the TED device was a USB 1.x device before... but now I am. So the short of it is to go ahead and turn on EHCI if you have a High speed device plugged in already

One more tip... find your real mac address out by typing "ifconfig" in a console. Then use the same address for the network card in Network. You will run into problems activating windows if your vm has a different mac address than the one that gets sent to M$ from Knoppix. Layers and layers...

You should now be ready to insert your XP installation disk, and click the VirtualBox's Start button.









And now we are installing XP into a .vdi file... one you can backup to an external drive.
How long has it been since I could do that!!!!!
(Yeah, I have Ghost... but that is almost as inconvenient as installing XP.)





Running TED Footprints energy monitor program.






Now once you are up and running in your Guest OS, there is one last step to make to enable a usb device. In VirtualBox's main menu, of an already running XP or whatever OS you choose to load, go to the Devices menu... and pick USB. You will get a popout menu of what VirtualBox says is available to enable inside the guest OS vm. Once I did that... then windows device discovery took over and installed the drivers for the device.

Since I cannot remember how I did it... I'll also mention there is a feature called "guest additions." At some point I was prompted to install them, and said sure, go ahead. They may be needed or not.
EDIT: Mar 8, 2008 Well as I get more familiar with VirtualBox, this content will reflect that. Guest Additions, you are not really finished until you also install them too. First you go to the Devices menu of VirtualBox, and select Install Guest Additions. Once you do that... there will be a new drive. Mine is VBOXADDITIONS_1.5.6_28241. Double clicking it should start it's installation. Once you restart... going to My Network Places, then Entire Network... should show you a new class "VirtualBox Shared Folders." Now following instructions for sharing your drives with your VirtualBox Guests should work as expected.
I would suggest to start out making a folder in your $home's Desktop... ie...
mkdir ~/Desktop/VboxHome
then creating a shared folder to that folder using the VirtualBox gui. This way your permissions will not be a factor. Once you have that working you can try elsewhere. When VirtualBox asks you for a Folder Path I would also recommend to use full pathnames.
For my earlier example
/home/knoppix/Desktop/VboxHome
instead of ~/Desktop/VboxHome


You may notice my cpu usage was around 65%... I believe that is from the usb device sending really small chunks of data. I could be wrong but when I plug that box in... the vm takes more cycles. I could care less. I don't plan on sticking an expensive pc on for just an electric monitor program to run. If it burns up, I'll find another lol.

Enjoy.

VirtualBox does have a help facility with alot of helpful information I see no point in covering here.

edits: jw
1. fixed a few smal typos, but I will be making updates to this.
2. Mar 06, 20008 correct my USB 2.0 dilema... to show it must have a USB 2.0 device plugged in for it to be detected as such.
3. Mar 08, 2008 Add some more info about Guest Additions.
4. Mar 10, 2008 Located a transparent icon, the white background bugged me.
5. May 28, 2008 Transparent Image has disappeared... I'll host an archive of it for this article.