Using an iPod nano 5g with Linux

Modern linux distributions are very good at supporting Apple's iPod range such as the classic and nano. However most tutorials  assume that you have iTunes available if you need to restore the device. What do you do when things go wrong and you need to restore the iPod to factory settings?

In this short tutorial I show you how to wipe a 5th generation iPod nano (with camera) and make it ready to use, using only Linux.

Preamble

The method outlined here works for the fifth generation iPod. It may work for some generations of the iPod Classic as well. It shouldn't be necessary to do all this for older models, and it may not work for newer ones. If you have an iPod touch, it won't help much either.
I use elementary os Luna, based on Ubuntu 12.04, but this approach should work on any linux distro.

Prerequisites

You will need to install gnupod tools. I used
sudo apt-get install gnupod-tools

First, wipe your iPod

You don't really have to do this, but I wanted to show that you really can start from nothing.
Connect the iPod to the computer; it should auto-mount.
Then open a terminal and type:
rm -rf /media/<my iPod>
wherever your iPod is mounted.
Now unmount and remove the iPod. Switch it on, and wait for it to restart. Choose your language and connect it to your computer again. The iPod will now have a fresh set of directories.

Second, hash the database

Older versions of the iPod didn't need this step. The iPod database will need to be hashed. Normally iTunes  would create the database correctly, but we don't have that luxury.
You will need the FireWire GUID for the iPod. Open a file manager and browse to the iPod mount. Delve into the directory called 'iPod_Control', and then 'Device'. You should see a file named 'SysInfo'. Ignore this, it will be empty and you can leave it that way. Instead, open the file named 'SysInfoExtended.xml'. Find the entry called 'FireWire GUID' and copy the sixteen character serial number.
Enter the serial number, and download a file named 'Hashinfo'. Save this in the Ipod_Control/Device directory on the iPod.

Third, create the iPod database

You will use gnupod tools to create a new, empty, iPod database. In the terminal type
gnupod_INIT -m /media/<my iPod>
This will create a new, blank database on the iPod, hashed with the info you downloaded  in the last step.

All done!

Now you are free to use your iPod. Any tool that uses a recent version of libgpod should now be able to read and write to the iPod. I find Banshee does a good job of sending music to the iPod, and gpodder is reliable for podcasts, but Clementine and Rythmbox have good reputations too.

Comments

  1. I had given up on my 5g, but the combination of removing every last file and powering it up, adding the hashinfo, and getting rid of the "usbmount" package and any dedicated mountpoint (even one advertised with IPOD_MOUNTPOINT) finally has all the normal software showing my ipod.

    ReplyDelete
  2. Glad to hear it works for you too.

    ReplyDelete
  3. What if, when attempting to create the new database, pasting or typing that script gets this?

    bash: syntax error near unexpected token 'newline'

    ReplyDelete
  4. Is the ipod mounted, and if so where. Make sure you put this location into the line

    gnupod_INIT -m /media/

    for example on my machine, I would type

    gnupod_INIT -m /media/Mark\'s\ iPod/

    with the spaces and apostrophe escaped as shown. I don't know if the location has to end with a trailing slash or not.


    Good luck.

    ReplyDelete
  5. Hey! I'm getting crazy, anything seems to work for me... I've already sent 2 letters to Apple with my indignation ;)
    I'm using Ubuntu 14.04 and just bought an Ipod Nano 5g. I tried what you said, but didn't work. Do you think you could help me? thank you

    ReplyDelete
    Replies
    1. Yes, sure. Just send me an email with what you did and what happened, and I'll try to help.

      Delete
    2. Thanks Mark! I can not find your email

      Delete
    3. Sorry, my profile was not public. You can email now by clicking on my name.
      I have just reset my iPod using 14.04 and it still works, with a few slight differences, due to the way the iPod is mounted. If you let me know which step is causing a problem, I will try to help.

      Delete
  6. Hi! You resurrected my old 5g for me! After not using it for a while I've encountered a strange error "Failed to generate sqlite database: an error occurred during Locations.itdb.cbk generation" in basically any app that uses libgpod. I thought I've searched entire Internet and found no solution and was already googling for another mp3 player model, but then I've found this post and it worked like a charm! Many thanks again!

    ReplyDelete
  7. For anyone who gets the following error: "Can't use 'defined(@array)'" see here for workaround:
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813920

    ReplyDelete
  8. Hey, I've been attempting to run doom on my ipod nano 5g while having minute knowledge on coding cause why not. I know doom runs on linux and since I cant find a tutorial itself on how I can download it on my ipod I thought I'd break it up and try to find how to run linux first then move from there. However the file SysInfoExtended.xml is not in my ipods files so I do not know how to access the firewire GUID. Do you have any suggestions on what I should do?

    ReplyDelete

Post a Comment