So, here’s what I promised. Have fun
This is specifically about updating TomTom One New Edition using Ubuntu Hardy 8.04, QEMU/KVM to virtualize Windows XP (SP3), but will apply to broader usb-usage in qemu/kvm as well as installing Windows XP into Ubuntu and qemu/kvm.
This walk-through assumes you have Ubuntu Hardy 8.04 and latest updates installed.
The computer I’m using is Dell Latitude D630 with 160Gb SATA drive and 4Gb memory. Display adapter is Intel GM965 as reported by lspci.
From the scratch:
Install qemu and kvm
$ sudo apt-get install qemu kvm
Create an image file to be used as the hard disk (in this case sized 30G) for the Windows XP. Note that using raw image format will only use as much space actually as the installation plus software etc is taking, added few percent. So you won’t actually lose that 30G straight away. It’s a good idea to have plenty of reserve for Windows or any other virtual OS, as it’s a pain to try to expand the image later.
$ qemu-img create -f raw desired_harddisk_name.raw 30G
Get windows XP installation cd as .iso file. “Why?” you’d be asking now. Simple answer is that the installation is way much faster when using a .iso file which is read from hard disk. To use actual cd/dvd-drive, replace “-cdrom filename” with “-cdrom /dev/cdrom”.
Now, start KVM with the following command. Note that “-k fi” is for the desired keyboard layout, in this case fi for finland and “-m 1024″ is the desired memory amount to be allocated to the virtual pc.
$ sudo kvm -localtime -no-reboot -no-acpi -boot d -hda /path/to/desired_harddisk_name.raw -cdrom /path/to/iso-file.iso -usbdevice tablet -k fi -soundhw all -std-vga -m 1024
Complete the first steps of the installation until reboot is required by the installation process.
Note that we started KVM with option “-no-reboot”. this, because a straight reboot without any intervention would fire up the installation cd, thus causing the installation to start all over. We don’t want that.
Start KVM with following command to continue normally with the installation process (and for the future, this startup command works fine).
$ sudo kvm -localtime -no-reboot -no-acpi -boot c -hda /path/to/desired_harddisk_name.raw -usb -usbdevice tablet -k fi -soundhw all -std-vga -m 1024
Now, once you have completed the installation of Windows and all the updates etc, press CTRL-ALT-2 to get to the qemu terminal.
Now it’s time to connect the TomTom device to your computer. Make sure it’s detected correctly (If the folder content pops up to Nautilus, you’re good to go). Open gnome-terminal and type the following commmand
$ sudo lsusb -v | less
Browse until you come across iManufacturer line which says TomTom. now look a bit up and you should see Bus XXX Device XXX: ID XXXX:XXXX
Make a note for yourself of the line, copy it to gedit or write to paper, we’ll be needing this next.
Now, in the qemu terminal, you need to give the following command
(qemu) info usbhost
Output is somewhat like below
(qemu) info usbhost
Device 5.2, speed 12 Mb/s
Hub: USB device 0b97:7761
Device 3.8, speed 12Mb/s
Class 00: USB device 1390:0001, ONE (v3)
Now you should find out the same ID XXXX:XXXX from the output. If you can’t find it, the you prolly didn’t get the SD memory card showing up in Ubuntu either. Get back and fix that problem first.
Next command we’ll be issuing is
(qemu) usb_add host:XXXX:XXXX
if you get just a new line waiting for command, you should be ok, now have a look at Windows, press CTRL-ALT-1.
Now Windows is wondering that what kind of device has been connected. Help windows out by giving standard disk drive driver to it, and Windows should be happy. Almost. After the SD memory card is detected and you can browse the content, you notice that the SD memory card is listed in Explorer as Disk Drive. TomTom HOME does not like this, so we need to safely remove the device. Now that it’s removed safely, go back to qemu terminal with CTRL-ALT-2 and give the following command
(qemu) info usb
output should be something like
(qemu) info usb
Device 0.1, speed 480 Mb/s, Product ONE (v3)
Give following command
(qemu) usb_del 0.1
now, probably the device got unmounted at Ubuntu too, so make sure it’s still mounted or play safe and check that it’s unmounted and disconnect the usb-cable from the TomTom unit. Then reconnect, make sure it’s mounted, go to qemu terminal and issue command
(qemu) info usbhost
You should see the ONE (v3) device, now give command
(qemu) usb_add host:XXXX:XXXX
Go to Windows (CTRL-ALT-1) and check that the TomTom device pops up to Explorer as TomTom (X:) or what ever the drive letter in your case happens to be, also note that there should be that funny little picture with two red hands next to TomTom (X:).
Open the TomTom to explore the content and double click on InstallTomTomHOME.exe and follow thru the installation. Use this method for installing TomTom HOME, as the most recent version of TomTom HOME might not detect the TomTom device correctly. Don’t get any TomTom HOME updates just yet.
Get updates for your TomTom device and when no updates are offered anymore, update the TomTom HOME software also.