With the recent OS 3.1.1 release it was really only a matter of time before I got around to upgrading again. My previous firmware upgrade was not very smooth. As I’ve mentioned previously, I run iTunes on a VMWare image of Windows XP – hosted on my Ubuntu desktop.
During the firmware upgrade process the iPod changes the type of USB device it is – this causes problems for Linux/VMWare. I had previously thought there was no way to get around these issues, making VMWare based firmware upgrades impossible. I’m happy to report that I was wrong.
Motivated by the OS 3.1.1 upgrade being free of charge (to suckers users who had purchased 3.0, and only $5 otherwise), I figured I’d take another run at making this work under Ubuntu / VMWare. I found a post that discussed upgrading the iPhone under VMWare, and it turns out that this was pretty much the magic sauce to make things work. The steps are shamelessly reproduced here, I cannot take the credit:
Create a file
Reload udev to refresh the configuration we just changed:
sudo /etc/init.d/udev reload
Forcefully remove the kernel modules:
sudo /sbin/modprobe -r snd_usb_audio
sudo /sbin/modprobe -r usbhid
Perform the upgrade under VMWare.
Reverse these steps after the upgrade to restore your Ubuntu machine to normal:
sudo rm /etc/modprobe.d/blacklist-usb
sudo /etc/init.d/udev reload
Read on for gory details on what I actually did..
Since the blog post that I based this on was targeted at the iPhone, I figured I didn’t need to use all of the steps. Based on poking around with lsmod, it seemed the only USB module that was active was usbhid. So my 1st attempt I omitted snd_usb_audio from the blacklist.
This was a mistake, the process hung with the dialog above – failing to locate my iPod part way through the upgrade. It turns out the iPod Touch is a much closer cousin to the iPhone than it seems. In one of the reset/reboot modes – it apparently advertises itself as a USB audio device of some form (microphone?). Thus it is necessary to blacklist the snd_usb_audio module to prevent Linux from trying to have a conversation with this device, interrupting the VMWare access.
Oh yeah, and usbhid – if you happen to have a USB mouse as I do – you’ll find that once you issue the sudo /sbin/modprobe -r usbhid your mouse will no longer work. I ended up using a 2nd PC with VNCViewer to “remotely” control my desktop to get mouse events in.
Once I had the right set of steps as shown at the start of this post, I was in business. Of course, due to my initial failure I was using the restore option vs. upgrade. In the end its the same thing and I’ll get it right the first time with the next firmware upgrade.
I was a bit worried that I had messed up the backup again (as I did with the 3.0 upgrade). A backup is created when you initiate the upgrade, but as that had failed – would I be able to restore the backup after the firmware restore finished?
As a bonus – I did come across a related blog posting that outlines how to create a config file to prevent Linux from detecting your iPod Touch as a camera (if that bothers you). This post also seems to imply that blacklisting the usbhid may not be required. By removing snd_usb_audio and preventing Linux from trying to handle the iPod Touch as a camera (or anything else) you can keep usbhid – I’ll leave that as an excercise for the reader.