Date Tags linux

So I fell prey to Apple's marketing, and I bought a Nano for my wife's birthday. It's for her, I promise! (Sadly, the 2 day fedex shipping, turned into almost two weeks. It was stuck in China having a "shipment exception" for over 5 days.

Apple customer service claimed they didn't know what the holdup was, just that they were sorry. To be fair they refunded my shipping expenditures, but even discounting the 5 days in China, the "two day" shipping took 4 days (not counting a full weekend)!). Since we have no Windows machine (or Mac for that matter) I'll document my work with Linux. I'm using gentoo, perhaps some of the "desktop friendly" distros make the udev stuff less of a hassle.

  • Charge the nano. Plug it into a powered usb port.

  • Set up udev. This can be a little tricky. For more details check out here. From dmesg, I noticed that the Nano was being detected as a usb storage device.:

    usb-storage: device found at 2 usb-storage: waiting for device to settle before scanning Vendor: Apple Model: iPod Rev: 1.62 Type: Direct-Access ANSI SCSI revision: 00SCSI device sdb: 7999488 512-byte hdwr sectors (4096 MB)sdb: assuming Write Enabledsdb: assuming drive cache: write through SCSI device sdb: 7999488 512-byte hdwr sectors (4096 MB)sdb: assuming Write Enabledsdb: assuming drive cache: write through sdb: sdb1 sdb2Attached scsi removable disk sdb at scsi1, channel 0, id 0, lun 0Attached scsi generic sg1 at scsi1, channel 0, id 0, lun 0, type 0

  • Use the udevinfo command to find out about the usb device (don't start looking at /sys/bus/scsi cause it won't work! Ask me how I know)

    matt@mycomputer ~ $ udevinfo -a -p /sys/bus/usb/devices/2-2/

    udevinfo starts with the device the node belongs to and then walks up thedevice chain, to print for every device found, all possibly useful attributesin the udev key format.Only attributes within one device section may be used together in one rule,to match the device for which the node will be created. looking at class device '/sys/bus/usb/devices/2-2': SUBSYSTEM=="unknown" SYSFS{bConfigurationValue}=="1" SYSFS{bDeviceClass}=="00" SYSFS{bDeviceProtocol}=="00" SYSFS{bDeviceSubClass}=="00" SYSFS{bMaxPower}=="500mA" SYSFS{bNumConfigurations}=="2" SYSFS{bNumInterfaces}==" 1" SYSFS{bcdDevice}=="0001" SYSFS{bmAttributes}=="c0" SYSFS{configuration}=="" SYSFS{detach_state}=="0" SYSFS{devnum}=="13" SYSFS{idProduct}=="120a" SYSFS{idVendor}=="05ac" SYSFS{manufacturer}=="Apple" SYSFS{maxchild}=="0" SYSFS{product}=="iPod" SYSFS{serial}=="000A270012314B59" SYSFS{speed}=="12" SYSFS{version}==" 2.00" Add the following line to /etc/udev/rules.d/10-local.rules (note the spaces). The SYMLINK part will create a /dev/ipod entry for you. BUS="usb", SYSFS{model}="iPod " NAME="%k", SYMLINK="ipod"

  • Create mount directory

    mkdir /mnt/ipod

  • Update /etc/fstab. Most linux ipod-friendly apps expect a /mnt/ipod. Update /etc/fstab accordingly

    /dev/ipod /mnt/ipod auto nodev,nosuid,user,rw,noauto 0 0

  • Make sure you have the correct kernel modules load hfs kernel module

    modprobe hfs

  • Mount that puppy

mount /mnt/ipod

  • launch gtkpod
  • create directories (File->Create Ipod Directories). Necessary the first time.
  • Put some tunes on it
  • Make sure you 'umount' before unplugging...

It appears that amarok (v1.3.2 works too). Still need to figure out how to get album covers working (perhaps an amarok script might be needed).