Over the past few months we have concentrated on exploring Ubuntu Linux, the distribution that continues to grow in popularity, especially with the use of Linux on the desktop.
We’ve also seen the excellent music management application Amarok and its impressive capabilities with handling iPods and other audio players.
Reader Stefan Hoefler writes: “I have switched to Kubuntu and want to take Windows off my machine. I use Amarok exclusively, but how can I update the firmware on my iPod without Windows?”
Fortunately it is possible to do this, but it’s not as simple as running an update program, since Apple doesn’t supply any utilities for Linux.
This month we will look at updating the firmware on an iPod or restoring its factory settings without using Windows or OSX.
First steps
Let’s start by updating the iPod to the latest firmware. Go to www.apple.com/ ipod/download to get hold of the latest Windows executable. The file in question should be called iPodSetup.exe and will be about 40MB. If you want to use an earlier firmware, run a search with Google to find a copy – the process is identical.
With the firmware downloaded, you will need two extra packages before you can proceed. These are ‘wine’, the application that lets you run Windows software, and ‘icoutils’, a utility to extract the firmware from the Windows binary. Install these two packages via Synaptic, or perhaps more quickly, at the command line
$ sudo apt-get install wine icoutils
The version of wine in the Ubuntu Dapper repositories is rather old, but sufficient for this purpose. Next, run the installer and accept all the defaults to the questions asked:
$ wine iPodSetup.exe
The installer may take a minute to complete, so don’t worry if nothing appears to be happening.
Once finished, wine will have created a ‘fake’ Windows environment under ‘.wine/drive_c’ in your home directory. This reflects a C: drive on a Windows machine, and under ‘Program Files’ you will find the files the iPodSetup program installed.
Inside the iPod directory there will be another directory stamped with the date of the firmware, and an ‘exe’ file within. This executable is the file you need, as it contains all the firmware images. Copy this file to somewhere more convenient, such as your home directory.
You may wish to rename it to something simpler, ‘ipodfw.exe’, for example – the original file name in this case is ‘iPod Updater 2006-03-23.exe’.
The last step of this stage is to extract the firmware images from the executable file. Create a directory for the images and use ‘wrestool’, which is part of ‘icoutils’ installed earlier. The command to do this is rather obtuse, so copy it carefully:
$ mkdir ipod_fw
$ wrestool -x —raw -o ~/ipod_ fw -t +FIRM ipodfw.exe
If successful the command should return no messages, but inside the ipod_fw directory you will find several firmware images, each prefixed with the executable name (ipodfw.exe) and ending ‘FIRMWARE-x.y.z’.
Refer to www.ipodwizard.net/wiki/index.php/IPod_Firmware to confirm which image is suitable for your model of iPod. For example, the iPod Nano series all begin with 14.5.x – and in this firmware set 14.5.1.1. Rename the appropriate file for your model to something simpler if you wish, such as newfirm.bin. That’s the hard work over.
Firmware installation
Now that the firmware image for your iPod is extracted you are ready to install
it. Plug the iPod into the computer and wait for Ubuntu to recognise it. Close
any applications that might start up as a result and head back to the terminal
window.
We now need to know the device name Linux has assigned the iPod. One way is to run ‘dmesg’ and look towards the end of the output. The device name will always begin /dev/sdX and may well be something other than ‘sda’, for example, if you have Serial ATA hard drives or USB sticks inserted.
Alternatively, run the ‘mount’ command and look for the device mounted under /media/ipod (or something similar). From now on we will assume the device to be /dev/sda, but it is vital that you use the correct device name for any further steps. Run:
fdisk -l /dev/sda
and you will see that there are two partitions on the iPod: /dev/sda1 and /dev/sda2. The first partition, marked as empty, holds the firmware, and the second the Fat32 filesystem where your music and files are stored.
There is no need to touch the second partition for a firmware update; this process will leave all your music and files intact. We are interested in the first. Before installing the new firmware make a backup of the current one with the ‘dd’ command:
$ cd ipod_fw
$ dd if=/dev/sda1 of=firm.bak
All Open Source and Linux Tags: Linux and Unix
