Talk:HOWTO iPod Shuffle
From Gentoo Linux Wiki
Well, try not to mount your iPod with the sync option and use the instructions in the following page: http://shuffle-db.sourceforge.net/
Sure, you'll still need Windows to start. But then again, I'm sure everybody can find a friend or somebody else with a Windows install.
[edit] music on /dev/sda1?
Well, I haven't got an iPod Shuffle, but an iPod 4G. And when I mount it on Linux the music is stored at /dev/sda2. On /dev/sda1 the iPod operating system is stored. Is this different on iPod Shuffle?
If not, the entry for fstab must be changed.
[edit] amaroK supports the iPod Shuffle
I just added a link to amaroK website, maybe we need something more/better.
[edit] iPod Udev Rule
I created with a file /etc/udev/rules.d/80-ipod-alias-generator.rules that will hold all my iPod rule. Usefull when more than one iPod is going to connect to the computer.
Connect the ipod and with some search you'll find the good /sys hook,in my case : /sys/block/sda
udevinfo -a -p /block/sda will show you usefull info : (for my gen2 shuffle)
udevinfo -a -p /block/sda
Udevinfo starts with the device specified by the devpath and then walks up the chain of parent devices. It prints for every device found, all possible attributes in the udev rules key format. A rule to match, can be composed by the attributes of the device and the attributes from one single parent device.
looking at device '/block/sda':
KERNEL=="sda"
SUBSYSTEM=="block"
DRIVER==""
ATTR{stat}==" 16 12 224 217 0 0 0 0 0 148 217"
ATTR{size}=="1982464"
ATTR{removable}=="1"
ATTR{range}=="16"
ATTR{dev}=="8:0"
looking at parent device '/devices/pci0000:00/0000:00:10.3/usb1/1-3/1-3:1.0/host11/target11:0:0/11:0:0:0':
KERNELS=="11:0:0:0"
SUBSYSTEMS=="scsi"
DRIVERS=="sd"
ATTRS{ioerr_cnt}=="0x0"
ATTRS{iodone_cnt}=="0x68"
ATTRS{iorequest_cnt}=="0x68"
ATTRS{iocounterbits}=="32"
ATTRS{timeout}=="30"
ATTRS{state}=="running"
ATTRS{rev}=="2.70"
ATTRS{model}=="iPod "
ATTRS{vendor}=="Apple "
ATTRS{scsi_level}=="3"
ATTRS{type}=="0"
ATTRS{queue_type}=="none"
ATTRS{queue_depth}=="1"
ATTRS{device_blocked}=="0"
ATTRS{max_sectors}=="240"
looking at parent device '/devices/pci0000:00/0000:00:10.3/usb1/1-3/1-3:1.0/host11/target11:0:0': KERNELS=="target11:0:0" SUBSYSTEMS=="" DRIVERS==""
looking at parent device '/devices/pci0000:00/0000:00:10.3/usb1/1-3/1-3:1.0/host11': KERNELS=="host11" SUBSYSTEMS=="" DRIVERS==""
looking at parent device '/devices/pci0000:00/0000:00:10.3/usb1/1-3/1-3:1.0':
KERNELS=="1-3:1.0"
SUBSYSTEMS=="usb"
DRIVERS=="usb-storage"
ATTRS{interface}=="Mass Storage Interface"
ATTRS{modalias}=="usb:v05ACp1301d0100dc00dsc00dp00ic08isc06ip50"
ATTRS{bInterfaceProtocol}=="50"
ATTRS{bInterfaceSubClass}=="06"
ATTRS{bInterfaceClass}=="08"
ATTRS{bNumEndpoints}=="02"
ATTRS{bAlternateSetting}==" 0"
ATTRS{bInterfaceNumber}=="00"
looking at parent device '/devices/pci0000:00/0000:00:10.3/usb1/1-3':
KERNELS=="1-3"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{serial}=="FFFFFFFFFFFFFFFF"
ATTRS{product}=="iPod"
ATTRS{manufacturer}=="Apple"
ATTRS{maxchild}=="0"
ATTRS{version}==" 2.00"
ATTRS{devnum}=="13"
ATTRS{speed}=="480"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{bNumConfigurations}=="2"
ATTRS{bDeviceProtocol}=="00"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceClass}=="00"
ATTRS{bcdDevice}=="0100"
ATTRS{idProduct}=="1301"
ATTRS{idVendor}=="05ac"
ATTRS{bMaxPower}=="500mA"
ATTRS{bmAttributes}=="80"
ATTRS{bConfigurationValue}=="1"
ATTRS{bNumInterfaces}==" 1"
ATTRS{configuration}=="High Power, High Speed"
...
At this point you have enought info to build your basix udev-rule You need the mounting device : KERNEL=="sda" (it may appear some where else like sdb or sdd) The target subsystems : SUBSYSTEMS=="usb" and the serial : ATTRS{serial}=="FFFFFFFFFFFFFFFF" (replace by your serial) For further classification : ATTRS{product}=="iPod" ATTRS{manufacturer}=="Apple"
A device name : in my case z50 as it is the name that appears within iTune
now we can edit the rule
# $EDITOR /etc/udev/rules.d/80-ipod-alias-generator.rules ACTION=="add", KERNEL=="sd[a-z]", SUBSYSTEMS=="usb", ATTRS{serial}=="FFFFFFFFFFFFFFFF", ATTRS{product}=="iPod", devinfo -a -p /sys/block/sda, SYMLINK+="ipod/z50"
save and close then test udevtest /block/sda
if everything is good, you could only unplug and plugit back and you will have a symlink in /dev/ipod/z50 -> /dev/sda
Add as much as you want for all your lovely iPod that my connect to your computer often else just build a simplier rule where you don't check for serial but be carefull to put it at last in your rules file.
