Udev/hal rules won't automount my ipod

After following directions in the wiki articles on hal and udev to get my ipod to automount and generate the /dev/ipod device, I'm at a loss because nothing seems to work as explained. (I'm running Arch64 with LXDE)
I've added the following rule to /etc/hal/fdi/policy/ipod.fdi:
<?xml version="1.0" encoding="UTF-8"?>
<device>
<match key="@block.storage_device:storage.model" string="iPod">
<merge key="volume.policy.desired_mount_point" type="string">ipod</merge>
<merge key="volume.policy.mount_option.iocharset=iso8859-15" type="bool">true</merge>
<merge key="volume.policy.mount_option.sync" type="bool">true</merge>
</match>
</device>
I've added the following rule to /etc/udev/rules.d/60-ipod.rules
BUS=="usb", ATTRS{manufacturer}=="Apple*", ATTRS{model}=="iPod*", KERNEL=="sd?2", SYMLINK+="ipod", NAME="%k", GROUP="storage"
When I plug in the ipod, Pcmanfm will show 'Apple Ipod Music Player' in the left column with the other drives. When I click on it, it will properly mount the ipod to /media/{name of ipod}. I would like it to mount every ipod at /media/ipod, and create a link /dev/ipod. I haven't put anything in the fstab yet, but in any case, the /dev/ipod link is not created. I know the udev rules work, because it will create the correct link for /dev/pilot when I plug in my Palm.
Help! I'm trying hard to wrap my brain around this, and I don't understand why it's not creating the /dev/ipod link. I've restarted the computer and restarted hal and reloaded udev rules multiple times with no changes.
Thanks!
Scott

Ahhh....thank you!  If I take out the 'last_rule' option it does indeed show up on pcmanfm. However, I think it's happening somewhere outside the parsing of the udev rules (perhaps HAL???) because even if I moved the local rules to the very last (99-local.rules) but kept in the 'last_rule' option, it would still not show up.
Now, second problem is trying to distinguish between flash drive and ipod. I thought you could use a != on an attribute. The rules below still result in /dev/sdb2 on the ipod getting mounted twice .... once to /media/ipod and once to /media/usbhd-sdb2.
## Automount usb drives
#Prevent sd?1 of the ipod from being mounted
KERNEL=="sd?1", ATTRS{manufacturer}=="Apple*", ATTRS{product}=="iPod*", OPTIONS="last_rule"
KERNEL=="sd?2", ATTRS{manufacturer}=="Apple*", ATTRS{product}=="iPod*", SYMLINK+="ipod", NAME="%k", GROUP="storage"
ACTION=="add", KERNEL=="sd?2", ATTRS{manufacturer}=="Apple*", ATTRS{product}=="iPod*", RUN+="/bin/mount -t vfat -o rw,noauto,shortname=mixed,flush,dirsync,quiet,noatime,nodiratime,uid=1000,utf8,umask=077,nodev,nosuid /dev/ipod /media/ipod"
#Automount flash drives to /media/usbdh-sd??
ACTION=="add", ATTRS{product}!="iPod*", KERNEL=="sd[b-z][0-9]", RUN+="/bin/mkdir -p /media/usbhd-%k"
KERNEL=="sd[b-z]", ATTRS{product}!="iPod*", NAME="%k", SYMLINK+="usbhd-%k", GROUP="storage"
ACTION=="add", KERNEL=="sd[b-z][0-9]", ATTRS{product}!="iPod*", SYMLINK+="usbhd-%k", GROUP="storage", NAME="%k"
ACTION=="add", KERNEL=="sd[b-z][0-9]", ATTRS{product}!="iPod*", RUN+="/bin/mkdir -p /media/usbhd-%k"
ACTION=="add", KERNEL=="sd[b-z][0-9]", ATTRS{product}!="iPod*", RUN+="/bin/ln -s /media/usbhd-%k /mnt/usbhd-%k"
ACTION=="add", KERNEL=="sd[b-z][0-9]", ATTRS{product}!="iPod*", PROGRAM=="/lib/udev/vol_id -t %N", RESULT=="vfat", RUN+="/bin/mount -t vfat -o rw,noauto,flush,dirsync,quiet,nodev,nosuid,noatime,nodiratime,dmask=000,fmask=111 /dev/%k /media/usbhd-%k"
ACTION=="add", KERNEL=="sd[b-z][0-9]", ATTRS{product}!="iPod*", RUN+="/bin/mount -t auto -o rw,noauto,async,dirsync,nodev,noatime /dev/%k /media/usbhd-%k"
#Unmount everything on removal
ACTION=="remove", KERNEL=="sd[a-z][0-9]", RUN+="/bin/rm -f /mnt/usbhd-%k"
ACTION=="remove", KERNEL=="sd[a-z][0-9]", RUN+="/bin/umount -l /dev/%k"
ACTION=="remove", KERNEL=="sd[a-z][0-9]", RUN+="/bin/rmdir /media/usbhd-%k"
Any ideas?
Thanks, Scott

Similar Messages

  • [SOLVED]My udev rules don't automount usb device

    Hi,
    I'm using this .rules file for automounting usb devices:
    # start at sdc to ignore the system hard drive
    KERNEL!="sd[c-z]*", GOTO="my_media_automount_end" #sda and sdb are internal hard drives
    ACTION=="add", PROGRAM!="/sbin/blkid %N", GOTO="my_media_automount_end"
    # import some useful filesystem info as variables
    IMPORT{program}="/sbin/blkid -o udev -p %N"
    # get the label if present, otherwise assign one based on device/partition
    ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
    ENV{ID_FS_LABEL}=="", ENV{dir_name}="%k"
    # create the dir in /media and symlink it to /mnt
    ACTION=="add", RUN+="/bin/mkdir -p '/media/%E{dir_name}'"
    # global mount options
    ACTION=="add", ENV{mount_options}="relatime"
    # filesystem-specific mount options (777/666 dir/file perms for ntfs/vfat)
    ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},gid=100,dmask=000,fmask=111,utf8"
    # automount ntfs filesystems using ntfs-3g driver
    ACTION=="add", ENV{ID_FS_TYPE}=="ntfs", RUN+="/bin/mount -t ntfs-3g -o %E{mount_options} /dev/%k '/media/%E{dir_name}'"
    # automount all other filesystems
    ACTION=="add", ENV{ID_FS_TYPE}!="ntfs", RUN+="/bin/mount -t auto -o %E{mount_options} /dev/%k '/media/%E{dir_name}'"
    # clean up after device removal
    ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l '/media/%E{dir_name}'", RUN+="/bin/rmdir '/media/%E{dir_name}'"
    # exit
    LABEL="my_media_automount_end"
    The folders in /media are created successfully but no mounting takes place. The folders are empty and when I do
    umount /media/device
    , it returns:
    umount: device/: not mounted
    But when I try to remove the folder, it sometimes returns:
    rmdir: failed to remove 'device/': Device or resource busy
    When I unplug the device, the folders are deleted successfully.
    When I manually mount the device with the code for ntfs from the rules-file, it works fine. I have also verified that the device is at /dev/sdc.
    Through searching I didn't find any post with a problem like that. My guess was that somehow this test fails:
    ACTION=="add", ENV{ID_FS_TYPE}=="ntfs"
    I already tried removing the second condition, but the result stays the same. So I am left rather clueless, I hope, you guys can help me
    Last edited by toffi-fee (2014-05-04 22:47:38)

    Thanks for the reply! So now I changed the rules to:
    KERNEL!="sd[c-z]*", GOTO="my_media_automount_end"
    ACTION=="add", PROGRAM!="/sbin/blkid %N", GOTO="my_media_automount_end"
    # import some useful filesystem info as variables
    IMPORT{program}="/sbin/blkid -o udev -p %N"
    ACTION=="add", RUN+="/bin/udisksctl mount -b /dev/%k"
    # clean up after device removal
    ACTION=="remove", RUN+="/bin/udisksctl unmount -b '/dev/%k'"
    # exit
    LABEL="my_media_automount_end"
    But now nothing seems to happen when I plug in, also no folder creation at /run/media/user/, hmmm..
    Last edited by toffi-fee (2014-05-04 19:27:53)

  • KDE 4.4 automount - does it honor HAL rules?

    Can anyone point me to an article that explains how KDE4 handles automounting?  It's mounting my Windows NTFS partition rw automatically regardless of what I put in my HAL rules.
    I know I can just put the partition in /etc/fstab as a workaround, but I want to understand how KDE auomounting works.
    (BTW, I don't want NTFS rw b/c 99% of the time I have Windows hibernated to disk - writing to that partition could cause issues.)

    Hi,
    you can configure automounting in KDE4.4 by
    SystemSettings --> Advanced Tab --> Removable Devices
    http://wm161.net/2009/11/28/device-auto … n-kde-4-4/

  • Oh god I overwrote /etc/udev/rules.d/90-hal.rules

    I accidentally sudo overwrote this file with garbage. I haven't rebooted yet. What was in here? Is it important? How do I get it back?
    Thanks!

    If it was something in that directory, the sizes should be different than mine. This is what I have:
    ls -l /etc/udev/rules.d/
    total 52
    -rw-r--r-- 1 root root 1071 2008-09-24 07:07 60-pcmcia.rules
    -rw-r--r-- 1 root root 390 2009-03-07 15:42 75-cd-aliases-generator.rules.optional
    -rw-r--r-- 1 root root 2403 2009-03-07 15:42 75-persistent-net-generator.rules.optional
    -rw-r--r-- 1 root root 8039 2009-03-07 15:42 81-arch.rules
    -rw-r--r-- 1 root root 82 2008-11-30 08:51 90-hal.rules
    -rw-r--r-- 1 root root 28 2008-10-19 06:35 99-fuse.rules

  • CD and USB won't automount

    Hello there! I bearly got arch linux installed in my machine. Managed to install most of my drivers so far, however I can't manage to make my USB automount and appear in the desktop. It won't automount the CDs that i put inside, or even show the icon of the cd/dvd rom in the computer place, i don't even know how to mount it manually. I do know how to manually mount the usb flash drive, but the icon does not appear in the desktop or the Computer place. I have GNOME. can someone please help me?

    # /etc/fstab: static file system information
    # <file system>        <dir>         <type>    <options>          <dump> <pass>
    none                   /dev/pts      devpts    defaults            0      0
    none                   /dev/shm      tmpfs     defaults            0      0
    /dev/cdrom /media/cdrom   auto    ro,user,noauto,unhide   0      0
    /dev/cdrom1 /media/cdrom1   auto    ro,user,noauto,unhide   0      0
    /dev/dvd /media/dvd   auto    ro,user,noauto,unhide   0      0
    UUID=0b888460-badc-4f9b-843d-f8d06d1635b3 swap swap defaults 0 0
    UUID=32c9d792-8bc1-4c75-b4fd-1541871c41a6 /boot ext2 defaults 0 1
    UUID=7381cc48-375e-4de3-945b-9dea6e62d61b / ext3 defaults,noatime,nodiratime 0 1
    UUID=e3a0b77b-cd81-447c-9590-02f27e98ec49 /home ext3 defaults,noatime,nodiratime 0 1
    DAEMONS=(syslog-ng network netfs crond alsa hal fam kdm3 cups)
    Last edited by windtalker (2008-12-19 09:20:40)

  • Please Help - My iTunes library won't recognize my iPod classic

    My iTunes library won't recognize my iPod classic 80gb. I try doing the trouble shooting steps on apple, but they still did not work. Any help would be greatly appreciated. I'd love to add some newer music to my old iPod for listening in the car or when travelling. Thanks a lot.

    Hello dmbnewfie,
    Welcome to the Apple Support Communities!
    I understand that your iPod classic is not being recognized in iTunes when you connect it to your computer. I know you have tried some troubleshooting on the Apple website as well, but without knowing which steps you have completed, I would suggest working through the attached iPod classic Troubleshooting Assistant. 
    Apple - Support - iPod - iPod classic Troubleshooting Assistant
    Have a great day,
    Joe

  • My iTunes won't recognize my iPod 3GS!!! HELP! I had recently updated my iTunes and now upon plugging in my iPod iTunes comes up with a error message.  Leaving me unable to sync anything! :( HELP!

    My iTunes won't recognize my iPod 3GS!!! HELP! I had recently updated my iTunes and now upon plugging in my iPod iTunes comes up with a error message.  Leaving me unable to sync anything! HELP!

    What is the exact error message you are receiving?
    B-rock

  • The iPod touch 5 battery won't charge, the iPod battery gets hot and doesn't turn on...  What is wrong?  Can photos and data be retrieved?

    The iPod touch 5 battery won't charge, the iPod battery gets hot and doesn't turn on...  What is wrong?  Can photos and data be retrieved?

    - See:      
    iPod touch: Hardware troubleshooting
    - Try another cable. Some 5G iPods were shipped with Lightning cable that were either initially defective or failed after short use.
    - Try another charging source
    - Inspect the dock connector on the iPod for bent or missing contacts, foreign material, corroded contacts, broken, missing or cracked plastic.
    - Make an appointment at the Genius Bar of an Apple store. I suspect a hardware problem  due to the hotness. If iTunes can't see the iPod then uor only hope if to contact a data recovery company for getting data off the iPod. If you have an iPod backup you can restore another iPod, iPhone or iPad from the backup to get the data that was in the backup
    Apple Retail Store - Genius Bar                          

  • Itunes won't recognize my ipod nano 2nd gen anymore?

    itunes won't recognize my ipod nano 2nd gen anymore. it just charges it???

    Refer to this article:
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/TS1538

  • ITunes won't recognise my iPod on USB 2.0, only 1.1

    my computer won't recognise my iPod touch 1.1.4 when it is connected via my USB 2.0 PCI card, only when it is plugged in via the motherboards inbuilt USB 1.1 ports. I have plugged it into other computers (all pc's) and it works fine on their USB 2.0 ports.
    What could be causing this?
    cheers.

    Try this if you have not already. This removes and reinstalls ALL Apple software and sometimes that is required.

  • My new iPad is synced with iTunes but now it won't recognize my iPod nano. How do I get it to recognize both? iTunes synced with my Nano just fine until I added the iPad.

    My new iPad is synced with iTunes but now it won't recognize my iPod nano. How do I get it to recognize both? iTunes synced with my Nano just fine until I added the iPad.

    Start here:
    iPhone, iPad, or iPod touch: Device not recognized in iTunes for Windows

  • The latest version of itunes -- just installed -- won't recognize my ipod touch 4th gen.  What's up?

    I just installed itunes version 10.5.2.11, and now it won't recognize my ipod touch 4th gen.  Running on windows 7, very fast desktop.  Previously no prolems with itunes or the ipod.  The computer does recognize the ipod and names it correctly in My Computer.  Any suggestions to wake up itunes and discover the ipod?

    See http://support.apple.com/kb/TS1591.

  • New version itunes (Dec 2012) won't recognize my ipod touch.

    Since installing new itunes on computer, the program won't recognize my ipod.  It does recognize my daughter's iphone.  I've gone through several troubleshooting lists, restarting devices and doing everything recommended.  I did a tutorial to help me recognize the new features and the one that's supposed to be there for my device just isn't.
    Help?

    I've had the same problem. Go in and unplug all devices.Go to Control panel> Uninstall programs> Uninstall all programs accotiated with Mac ****If you are Windows**** (Itunes,Itunes update,Ipod touble shoot). Just go into list a separt by Developer and click on each and uninstall each by apple/ Macintosh, what ever yours says. Restart Download the newest version of itunes then. It should work.
    P.S. Where are you from? ( What state?)

  • Itunes won't recognize my ipod old or new one

    Itunes won't recognize my Ipod classic. It woudn't recognize the old one, Apple store said it was the Ipod so I bought a new one but it won't recognizethat one either

    Hello crickettspeed,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    iPod not appearing in iTunes
    http://support.apple.com/kb/ts3716
    iPod: Appears in Windows but not in iTunes
    http://support.apple.com/kb/TS1363
    Try the iPod troubleshooting assistant:
    If you haven't already done so, try the steps in the iPod Troubleshooting Assistant (choose your iPod model from the list).
    If the issue remains after following your iPod's troubleshooting assistant, follow the steps below.
    2. Restart the iPod Service
    3. Restart the Apple Mobile Device Service
    4. Empty your Temp directory and restart
    5. Verify that the Apple Mobile Device USB Driver is installed
    6. Change your iPod's drive letter
    7. Remove and reinstall iTunes
    8. Disable conflicting System Services and Startup Items
    9. Update, Reconfigure, Disable, or Remove Security Software
    10. Deleting damaged or incorrect registry keys
    Best of luck,
    Mario

  • My computer won't detect my ipod 4g when it is plugged in and it won't sync with itunes, what should I do???

    My computer won't detect my ipod 4g when it is plugged in and it won't sync with itunes, what should I do???

    Did you already try the troubleshooting mentioned in this article? iOS: Device not recognized in iTunes for Windows

Maybe you are looking for

  • Windows Storage Server 2008 R2 Client restore for UEFI Bios Error

    My surface pro 3 has been backing up successfully to a Windows Storage Server 2008 R2 Essentials for months now.  I now need to restore the Surface Pro 3 to backup created last week.  However I cannot get  the Surface Pro3 to boot from the Recovery s

  • Horizontal Vertical and logo is not printed in dot matrix printer

    Hi All i am printing a smartform in dot matrix printer the form has horizontal vertical line table lines , and logo but when i print in Dot matrix printer the line and logo is not display Please say me how i design for it wheather It is printer or sm

  • Motion track in PPro CS4 tutorial

    hi - i found this tutorial: http://www.youtube.com/watch?v=DUX61MZip-A because i cannot hear the dialogue, i cannot figure out how he is making many many edit parameters as the little yellow block moves around the screen.  when i try it and drag a bo

  • 60fps footage in 30fps timeline plays with artifacts problem

    I have to types of footage for a project: 720P 60fps shot in avchd and 1080P 30 shot with an HDV camera. I am trying to combine the clips in the Premiere pro CS 4.1 AVHD 720P30 sequence preset. I do have to resize the 1080P footage but that is fine.

  • Internal order and Purchase order

    Hi, I created an Internal order for one company code CC01, then I created a Purchase order for another company code CC02 in which I assigned the order of CC01, the system accept this without error ! Please how to restrict this assignement? that means