Monday, November 06, 2006

autofs: mounting iPod & USB


1. Install the goodies:

# aptitude install autofs pmount


2. Edit autofs config file:

# sudo vi /etc/auto.master

/media /etc/auto.media --ghost


3. Get your device ID:

# ls /dev/disk/by-id/ | grep iPod

usb-Apple_iPod_000A270012E6900E
usb-Apple_iPod_000A270012E6900E-part1
usb-Apple_iPod_000A270012E6900E-part2


4. Create custom config for media:

# sudo vi /etc/auto.media


dvd -fstype=auto,ro :/dev/dvd
usb -fstype=vfat :/dev/disk/by-id/usb-KINGMAX_USB2.0_Flashdisk_00000000000064-part1
ipod -fstype=vfat,iocharset=iso8859-1,fmask=0117,dmask=0007,gid=plugdev :/dev/disk/by-id/usb-Apple_iPod_000A270012E6900E-part2


You can use UUID instead of ID to identify your device. It's shorter. You could also use LABEL but there would be a chance of a conflict.

ipod -fstype=vfat :/dev/disk/by-uuid/A5D3-DF28


5. Reload autofs:

# sudo /etc/init.d/autofs reload


6. Start gtkpod or just check out /media/ipod and witness the magic.

5 comments:

Anonymous said...

Thank you for the guide. I just applied first two and plugged iPod. It automounted. Rythmbox auto started. Do i still need to create a custom config for media. Cause you know it's working :)

Anonymous said...

I couldn't play files. I removed iPod from fstab, uninstalled aoutofs pmount. Now ipod is automounted, songs are playing, I can browse other partitions. Strange.ygyxr

Unknown said...

Didn't work at all. Ipod shuffle still mounts as /media/NAMEOFIPOD rather than the specified location, and is mounted by the wrong user.

Unknown said...

Ayam Sabung Taji

Unknown said...

lukisan sabung ayam paling mahal di dunia