# ipod+udev rules ? No /dev/ipod ?? [FIXED] Auto Mount OK

## jetboo

Hi, i got a ipod nano 8gb and i cant get it listed by uvdev in /dev as /dev/ipod

i fallowed this (a bit too old) wiki http://www.gentoo-wiki.info/Apple_iPod for setting the udev rules and put it in /etc/udev/rules.d/60-ipod.rules

the  ipod appears as /dev/sdb1 and /dev/sdb2 but impossible to get /dev/sdb2 sylinked to /dev/ipod

Can you guys help me ? 

```
SUBSYSTEM=="scsi", ATTRS{manufacturer}=="Apple*", ATTRS{model}=="iPod*", KERNEL=="sd?2",SYMLINK+="ipod", GROUP="plugdev"
```

Emerge info

```

Portage 2.1.8.3 (selinux/v2refpolicy/x86/developer, gcc-4.4.3, glibc-2.11.2-r0, 2.6.33-rc8 i686)

=================================================================

System uname: Linux-2.6.33-rc8-i686-Intel-R-_Core-TM-2_Duo_CPU_P7350_@_2.00GHz-with-gentoo-2.0.1

Timestamp of tree: Wed, 11 Aug 2010 21:30:22 +0000

app-shells/bash:     4.0_p37

dev-java/java-config: 2.1.11

dev-lang/python:     2.6.5-r3, 3.1.2-r4

dev-util/cmake:      2.8.1-r2

sys-apps/baselayout: 2.0.1

sys-apps/openrc:     0.6.1-r1

sys-apps/sandbox:    2.2

sys-devel/autoconf:  2.13, 2.65

sys-devel/automake:  1.4_p6-r1, 1.9.6-r2, 1.10.3, 1.11.1

sys-devel/binutils:  2.20.1-r1

sys-devel/gcc:       4.4.3-r2

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.6b

virtual/os-headers:  2.6.34

ACCEPT_KEYWORDS="x87"

ACCEPT_LICENSE="* -@EULA AdobeFlash-10.1 Broadcom dlj-1.1 skype-eula"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=core2 -pipe -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/X11/xkb"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"

CXXFLAGS="-O2 -march=core2 -pipe -fomit-frame-pointer"

DISTDIR="/usr/portage/distfiles"

FEATURES="assume-digests collision-protect distlocks fixpackages loadpolicy multilib-strict news parallel-fetch protect-owned sandbox selinux sesandbox sfperms sign splitdebug strict test-fail-continue unmerge-logs unmerge-orphans userfetch userpriv usersandbox"

GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

LINGUAS="fr"

MAKEOPTS="-j4"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/local/portage/layman/gnome"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="X a52 aac aalib acpi aiglx alsa amr amrwb apache2 audiofile autoipd automount avi awesome berkdb bigger-fonts bitmap-fonts bluetooth bzip2 cairo ccache cddb cdparanoia cdr cdrom cli consolekit cracklib crypt css curl cxx dbus dhcp dri dts dvb dvd dvdr emboss encode evdev exif fam ffmpeg firefox firefox3 flac flash fortran ftp fuse gdbm gif glut glx gmp gpm gstreamer gtk gtk2 gzip hal hddtemp iconv ipod ipv6 jabber java jpeg jpeg2k kdrive laptop lcms ldap libg++ libnotify libwww live lm_sensors macbook mad mikmod mjpeg mmx mmxext mng modules mozilla mp3 mp4 mpeg mpeg2 mplayer mudflap musepack mysql ncurses nls nsplugin nvidia nvram ogg opengl openmp pango pcre pdf perl pmu png posix ppds pppd python qt3support qt4 quicktime readline reflection sdl selinux session simplexml slang smp sndfile snmp soap sockets sox spell spl sse sse2 sse3 ssl startup-notification suid svg svga syslog tcl tcpd theora tiff timidity tk truetype udev unicode unsupported usb utf8 v4l v4l2 vcd videos vidix vim-pager vim-syntax vorbis win32codecs wma wma123 wxwindows x86 xcb xcomposite xine xinerama xkb xml xorg xpm xscreensaver xsl xulrunner xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="fr" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

```

kernel 

```
 Linux DjanBoX 3.6.33-rc8 #1 SMP PREEMPT Mon Aug 9 21:06:38 CEST 2010 i686 Intel(R) Core(TM)2 Duo CPU P7350 @ 2.00GHz GenuineIntel GNU/Linux
```

lsusb 

```

Udev Bus 001 Device 006: ID 05ac:120a Apple, Inc. iPod Nano

```

```
*  sys-fs/udev

      Latest version available: 160

      Latest version installed: 160

      Size of files: 663 kB

      Homepage:      http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html

      Description:   Linux dynamic and persistent device naming support (aka userspace devfs)

      License:       GPL-2
```

Last edited by jetboo on Sun Aug 15, 2010 11:58 pm; edited 2 times in total

----------

## bobspencer123

maybe try this: (it works for my printer)

```

 ATTRS{idVendor}=="05ac, ATTRS{idProduct}=="120a", MODE="0664", SYMLINK+="ipod"

```

also put this in a new rule like 91-local.rules

make sure your restart udev or reload rules and trigger.

```

udevadm control --reload-rules

udevadm trigger

```

EDIT: hmmm ... i tested this and it does creat a symlink but you can't mount because it doesn't go to /dev/sd?2 .... I then tried adding KERNEL parameter but then it wouldn't even creat the symlink. I'm currently using HAL and it autonmagically creates IPOD symlink ... maybe this is messing with my new rule. Not sure.

----------

## jetboo

Thx for your answer but i am a real noob, do you suggest me to modify my lines with yours or that i use ONLY what you wrote ?

----------

## jetboo

Ok thx !! it worked with 

```
ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="120a", KERNEL=="sd?2",MODE="0664", SYMLINK+="ipod"
```

it seems the ATTRS{model}=="iPod*" fails for unknown reason..

its more pratical for me but it works this wayLast edited by jetboo on Sun Aug 15, 2010 2:49 pm; edited 1 time in total

----------

## bobspencer123

 *jetboo wrote:*   

> Ok thx !! it worked with 
> 
> ```
> ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="120a", KERNEL=="sd?2",MODE="0664", SYMLINK+="ipod"
> ```
> ...

 

cool ... I was testing it out with mine when you answered and it doesn't work for me but I think that must be because HAL rules are taking over.

----------

## jetboo

But why the ATTRS{model}=="iPod*" fails??

----------

## jetboo

Also does anyone have an idea why 

```
ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="120a", KERNEL=="sd?2",MODE="0664", SYMLINK+="ipod"

ACTION=="add", KERNEL=="sd?2", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="120a", RUN+="/bin/mount -t auto  rw,user /dev/ipod /media/ipod"
```

Doesnt works ? i want to automount /dev/ipod to /media/ipod but it doesnt seem to work : //

----------

## jetboo

of course, it had to create the folder first  :Very Happy: 

here : it works with 

```
ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="120a", KERNEL=="sd?2",MODE="0664", SYMLINK+="ipod", NAME="ipod"

ACTION=="add", KERNEL=="sd?2", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="120a", RUN+="/bin/mkdir /media/ipod"

ACTION=="add", KERNEL=="sd?2", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="120a", RUN+="/bin/mount -t auto   -o sync,flush,rw,user /dev/ipod /media/ipod"

ACTION=="remove", KERNEL=="sd?2", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="120a", RUN+="/bin/umount  /media/ipod"

ACTION=="remove", KERNEL=="sd?2", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="120a", RUN+="/bin/rmdir /media/ipod"
```

----------

