Share your knowledge at the LQ Wiki.
Go Back > Linux Answers > Hardware
User Name


By kvas at 2005-10-10 05:50
Here are some basic tips how to use Apple iPod with Linux. The examples have been tested in Fedora Core 3 and 4 distros, the exact same things are likely to work also in other distros but file locations and other details may vary.

Also iPod(s) can be connected to the computer via USB or Firewire, the following examples only cover Firewire. Basically in both cases the iPod is seen as a external disk, the difference is in the kernel modules that are needed.

*** Connecting iPod to your Linux box

Linux sees iPod as an external disk, pretty much the same way as USB memory sticks for example. You should create entry in /etc/fstab is order to easily mount the iPod. For this you need to find out the device file name for the iPod, like this:

Change to root user:
% su -

Open /var/log/messages log file
# tail -f /var/log/messages

Connect iPod to the computer with USB or Firewire cable. You can see the device file name for iPod in the log file, it is usually 'sda1' or something similar.

Create a mountpoint for iPod.
# mkdir -p /media/ipod

Create /etc/fstab entry for iPod. Something like this ('users' option means normal users can mount it):

/dev/sda1 /media/ipod vfat users,exec,noauto,managed 0 0

TIP: You can use udev with iPod to make it always appear with the same device file name. Put this in /etc/udev/rules.d/00.rules

## iPod
BUS="scsi", SYSFS{model}="iPod*", NAME="ipod"

When you connect iPod to the Linux box udev will create /dev/ipod device file. Now your /etc/fstab line changes into:

/dev/ipod /media/ipod vfat users,exec,noauto,managed 0 0

*** Managing songs

You can manage the songs in iPod with GtkPod application, just type 'gtkpod' into Google search to find out all about it.

*** Disconnecting iPod

After you have uploaded new songs to iPod, you obviously want to disconnect it. At least if you connect with Firewire you need to do two separate things to correctly disconnect the iPod.

1. Unmount it
# umount /media/ipod

After umount iPod stays still in "Do not disconnect" state. You need to eject it before you can safely take it away from the dock. To do this enter:
# eject /dev/ipod

Another way to do it is:
# rmmod sbp2

But that does not always work, it tends to claim that sbp2 module is in use...

TIP: I often got the following errors when connecting iPod to my Linux box (FC4, 2.6.11 default kernel)

kernel: ieee1394: sbp2: Error logging into SBP-2 device - login timed-out
kernel: sbp2: probe of 000a27000266620f-0 failed with error -16

There seems to be something wrong about the sbp2 module or other firewire modules in 2.6.11 kernel, but sometimes this helps:

Keep the iPod connected to the computer while restarting it (hold Menu and Play buttons for 5 seconds). After it restarts, sbp-2 module is loaded OK and you can mount the iPod again.


All times are GMT -5. The time now is 02:38 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration