# Ipod Nano and udev

## patman

I've followed the howto at http://gentoo-wiki.com/HARDWARE_iPod.  I have a 4GB Ipod Nano that has a USB interface.

When plugged in, the device is recognized as /dev/sda1 and 2.  I'd like it to be recognized as /dev/ipod, so that I can automount it more easily.  Per the howto, I added this line to /etc/udev/rules.d/60-ipod.rules:

```
BUS=="usb", SYSFS{manufacturer}=="Apple*", SYSFS{product}=="iPod*", KERNEL=="sd?2", SYMLINK+="ipod"
```

I then executed udevstart to reset the system.  

When I plug the Ipod in, it's still recognized as /dev/sda1 and 2, and I get plenty of dmesg entries from usb-storage.  I can mount them by hand, no problem.

I don't see any response from udev, at all.  Anyone know what the problem might be?

----------

## acidbreez

i dont know if it'll help any but try rebooting your computer and try it again?

----------

## xante

In my personal oppinion, I would just setup hal and dbus and not even worry about what device name its located under because it will be auto-mounted when you insert the usb/firewire cable...look it up on gentoo-wiki.  It worked very well with my usb-key.

----------

## swimmer

 *xante wrote:*   

> In my personal oppinion, I would just setup hal and dbus and not even worry about what device name its located under because it will be auto-mounted when you insert the usb/firewire cable...look it up on gentoo-wiki.  It worked very well with my usb-key.

 

You're right xante - well .... at least it was like that for me for  aperiod of time ... but now it isn't anymore :-/ If I plug in my iriver I get an error msg by ivman with "unknown device" or something like that and the Iriver is *not* mounted automatically anymore  :Sad: 

Until now I could not figure out what changed that behaviour  :Sad: 

Greetz

swimmer

----------

## F-0_ICE

i also can't get udev to create /dev/ipod for me. the only info i ca think of offering right now is the udev version i have which is 103. 

just let me know what info you may need form me to assist in this problem. TIA

----------

## xante

Patman are you saying that your ipod is showing up as both /dev/sda1 and /dev/sda2 at the same time? or are you saying that when you unplug /dev/sda1 and plug in your ipod again before sda1 becomes available it sets itself to /dev/sda2?

Honestly I dont know much about udev rules, but this has got me curious because Im hoping to get an ipod in February and this may become an issue for me as well.  Good luck.

----------

## patman

 *xante wrote:*   

> Patman are you saying that your ipod is showing up as both /dev/sda1 and /dev/sda2 at the same time? 

 

Well, yes, but that's because it's a 2-partition device.

The Ipod, when plugged in, looks similiar to any other USB mass storage device.  Partition one is for some administrative stuff, partition 2 is where your data's held.

What these howto's try to do is to get that second partition to be called /dev/ipod, so it's easier to mount/automount.

----------

## F-0_ICE

mine also is a two partition device sdf1/sdf2 just like patman said.

EDIT: i don't know why but now i have a /dev/ipod symlink but it seems next to useless since kde and amarok will still pick it up as sd*. and i can't get it set to anything else.

is it possible to make /dev/ipod the device itself instead of a symlink to the sd* ?

if that can be done i thinks all our problems will be solved

----------

## discostu

I'm using gnome-volume-manager which automatically puts a folder icon on my desktop when I plug in my usb iPod nano. On the right click menu it says unmount. Is there a way to get it to recognize that the iPod wants an "eject" command called. The device says "Do Not Disconnect" after i do a umount, but if I do an eject it says I can disconnect.

Thanks.

----------

## discostu

After further investigation gnome-volume-manager does seem to have a property called "autoipod" in gconf. This is enabled and given a command to execute when it recognizes a device as being a portable music player. However, it doesn't recognize my nano as being one. Anyone have any idea why? I do have libipoddevice installed which is supposed to work with hald when an ipod is connected.

Thanks.

----------

## jsheedy

Are you using the correct BUS, I have been using scsi and it works fine on two different systems.  

BUS=="scsi", SYSFS{model}=="*iPod*", KERNEL=="sd?2", SYMLINK+="ipod"

----------

## discostu

 *jsheedy wrote:*   

> Are you using the correct BUS, I have been using scsi and it works fine on two different systems.  
> 
> BUS=="scsi", SYSFS{model}=="*iPod*", KERNEL=="sd?2", SYMLINK+="ipod"

 

I am using BUS=="usb", SYSFS{manufacturer}=="Apple*", SYSFS{product}=="iPod*", KERNEL=="ub?3", SYMLINK+="ipod"

Because, my iPod shows up on /dev/uba1,uba2,uba3 with the 3 being the partition with all the data.

Looking in hal-device-manager: EHCI Host Controller -> iPod -> USB Mass Storage Interface -> Unknown Device -> Volume, Volume, Volume (hfsplus)

(that's three "volume" siblings.

Any ideas?

Thanks.

----------

## jsheedy

Well I don't use the low performance USB block device kernel drive.  I had heard that SCSI emulation is faster, but I am not for sure.  One thing I do know, I have the udev rule working correctly with SCSI emulation.  I guess you could give it a try.

----------

## Zythran

I've had a few issues with udev recognizing removable drives.  The way that has worked for me (not specifically with iPods, as I don't have one so I can't say for sure, but in general) is to use the following format:

```
BUS=="usb", SYSFS{serial}=="1C6015DA3FB46BBE", NAME="%k", SYMLINK="flash"
```

Other formats using more generic options haven't worked quite as well for me, but using the serial number has.  You can get the device's serial number with usbview.

----------

## discostu

 *Zythran wrote:*   

> I've had a few issues with udev recognizing removable drives.  The way that has worked for me (not specifically with iPods, as I don't have one so I can't say for sure, but in general) is to use the following format:
> 
> ```
> BUS=="usb", SYSFS{serial}=="1C6015DA3FB46BBE", NAME="%k", SYMLINK="flash"
> ```
> ...

 

My device is recognized and mounted. The problem is it is just recognized as being a flash hard drive. I want gnome-volume-manager and libipoddevice to recognize it as a portable music player (ipod). I can tell that neither of them are recognizing it b/c:

gnome-volume-manager is supposed to execute a command I've specified when it recognizes the device as a portable music player. The command does not get executed when I connect my ipod

libipoddevices has a command "ipod" that listens and prints out when an ipod device is connected, but it doesn't print anything when my ipod is connected.

So, do I have to use scsi emulation to get this to work? I would definitely prefer not.

Thanks.

----------

## dmvianna

 *patman wrote:*   

> Per the howto, I added this line to /etc/udev/rules.d/60-ipod.rules:
> 
> ```
> BUS=="usb", SYSFS{manufacturer}=="Apple*", SYSFS{product}=="iPod*", KERNEL=="sd?2", SYMLINK+="ipod"
> ```
> ...

 

Just remove the KERNEL rule, and it will work.   :Smile: 

```
BUS=="usb", SYSFS{manufacturer}=="Apple*", SYSFS{product}=="iPod*", SYMLINK+="ipod"
```

----------

## pathfinder

hi guys, i also followed the wiki.

i don  t get anything...

the fstab entry is /dev/sdb2 or /dev/ipod?

i put sdb2 as the second one doesn t work.

udevstart...

i rebooted the computer. 

now, in My Computer appears the icon Apple iPod Music Player

That s nice.

but if i try to mount it as a user rightclicking on the icon, it won t work "there is probably no media in the drive"

so I write in a shell mount /mnt/ipod

and then the other icon disappears forever from the Computer list (even after reloading)

And a nice window pops up, with Calendar/contacts/Music/etc... folders.

But I could do this long before following the tutorial, and i still can t get how the hell I could just copy songs into the ipod!!! aaaargh

if i go to Music and iTunes then therer are folders fd2 etc with 4-letters names as files (my songs) but copying other songs there won t show the songs in the ipod...

I tried banshee plus official plugins and ipod-sharp, but i habve no clue on how I should make it work...

any ideas?

----------

## dmvianna

 *pathfinder wrote:*   

> the fstab entry is /dev/sdb2 or /dev/ipod?

 

You should check if you have one or another, then use it. Did you try this?

```
$ ls /dev/ipod
```

 *pathfinder wrote:*   

> now, in My Computer appears the icon Apple iPod Music Player

 

Which WM are you using? KDE, Gnome?

 *pathfinder wrote:*   

> but if i try to mount it as a user rightclicking on the icon, it won t work "there is probably no media in the drive"

 

Maybe you have to right click on it and ask it to mount it? I'm sorry, I have no clue on which WM are you using. I use Fluxbox.

 *pathfinder wrote:*   

> so I write in a shell mount /mnt/ipod
> 
> and then the other icon disappears forever from the Computer list (even after reloading)
> 
> And a nice window pops up, with Calendar/contacts/Music/etc... folders.

 

Ignore it, unless you want to use your iPod as a storage device. Nothing you put manually onto it will ever play.

 *pathfinder wrote:*   

> But I could do this long before following the tutorial, and i still can t get how the hell I could just copy songs into the ipod!!! aaaargh
> 
> if i go to Music and iTunes then therer are folders fd2 etc with 4-letters names as files (my songs) but copying other songs there won t show the songs in the ipod...

 

Never try to copy songs to the iPod as if it were an USB drive. It won't work. It's directory tree is weird, you need a program like gtkpod to do it for you.

 *pathfinder wrote:*   

> I tried banshee plus official plugins and ipod-sharp, but i habve no clue on how I should make it work...
> 
> any ideas?

 

Never used banshee. gtkpod works for me.

My guess is it was being mounted correctly at the beginning, when you could see the Apple iPod Music Player. You're not supposed to copy anything to it manually, hence it wouldn't let you open it. If you're using KDE, probably it will have a program to handle it (Amarok?). I would suggest you return to your initial configuration, then install Amarok/gtkpod and then try to use them to communicate with the iPod.

Good luck!   :Wink: 

----------

