View Full Version : Firewire iPod gets reassigned when plugged in...
natrix
2005-02-13, 01:10 PM CST
Hi!
I'm in the process of getting my ipod to work with FC3. It works great with gtkpod, but I have some mounting/unmounting/ejecting problems.
When I re-boot with the ipod attatched, it's assigned to /dev/sda2. So i mount it to /mnt/ipod, and all is well. However if i unmount, and eject the ipod, then plug it back in, it gets assigned as /dev/sdc2 or /dev/sdd2 depending on how many times its been unmounted... So then in order to mount it as my user's name i have to edit /etc/fstab to look for the new device assignment.
Is there any way to get the computer to assign it to /dev/sda2 every time i plug it in? Or will I be editing my fstab every time I want to use my ipod? I hate to say it, but as far as portable .mp3 players go, XP sure was easier!
Cheers,
n8
SuperNu
2005-02-13, 03:14 PM CST
I believe that with udev, it will automatically assign a device in /dev like /dev/ipod. Unplug your ipod, check /dev, plug in your ipod and see if any new devices were added. You could also open a terminal and type tail -f /var/log/messages and this should also tell you what device is added to /dev. You might need to be root in order to view /var/log/messages. Then, edit /etc/fstab and change you ipod from /dev/hdX2 to /dev/ipod and everything should work out fine for you.
--SN
natrix
2005-02-13, 06:10 PM CST
Hi..
I checked that out, and the only thing that's added to my /dev/ is /dev/sdX , /dev/sdX1 and /dev/sdX2 , "X" being whichever letter it decides to assign, depending on how many times i've ejected my ipod. i really don't mind the extra steps, but i'm sure it will get to be a pain in the butt after a while... I wouldn't mind mounting/unmounting it every time but having to edit fstab is really the pain i'm looking to avoid. Thanks for the response!
n8
SuperNu
2005-02-13, 08:28 PM CST
My only other suggestions would be make sure you have udev up to date and do a google search on writing udev rules. They aren't too hard to figure out. I managed to get my memory card reader to connect to my system by using my own udev rule. Good luck.
--SN
imdeemvp
2005-02-13, 08:47 PM CST
Some had experience problems using firewire I suggest you to use the usb port and I honestly dont see any speeds issues.
natrix
2005-02-13, 11:32 PM CST
See, this is what I love about Linux - that when you have a problem, there are tons of different solutions. In my case it was this:
http://mountapp.sourceforge.net/
It's a dockapp that I use on my fluxbox desktop that has a mount/umount button for all devices! It works great every time, and it even ejects the ipod! very useful tool! I just started using fluxbox, and I'm in love! It's what I always wanted in my PC - The computer does nothing unless I tell it to do something! I'll still use Gnome for some stuff, like config GUI's, but for day-to-day ops fluxbox can't be beat!
n8
imdeemvp
2005-02-14, 12:22 AM CST
You can also use rhythem box to import or play your ipod music.
natrix
2005-02-14, 03:58 AM CST
Yeah, I thought about using the USB cable but I don't want to have to have a seperate cord to charge. MUST MAKE IT WORK!!!
I am all good so long as the Ipod isn't plugged in when I reboot.... But still tweaking to get a perfect setup. In root mode, the gtkpod program will both unmount & eject the iPod automagically, but I can't seem to get that same effect in any other login. I've tried editing /etc/sudoers to give myself permission to eject it, but it's always "busy" as a normal user. Problem is that it's a different /dev/sdX every time I plug it in, so I can't seem to bind anything to it! Oh well, there's a will, so there must be a way. I'll keep at it, and I appreciate all the suggestions!
n8
natrix
2005-02-15, 12:50 AM CST
***SOLVED****
here's how: (assuming you have gtkpod, and you have been able to manually mount/unmount your ipod, and assuming your ipod is a Windows formatted model using the ieee1394 interface (firewire.) Also, you should be using FC3 with the latest kernel installed. I can't guaranty this will work for everyone, and I don't assume liability if you screw up your machine! :D
1: edit (as root) /usr/share/hal/fdi/90defaultpolicy/storage-policy.fdi :
-change the following values from "true" to "false" to tell hal not to automount your iPod:
<!-- Use selinux mount options for hotpluggable and removable
volumes -->
<match key="/org/freedesktop/Hal/devices/computer:linux.is_selinux_enabled" bool="true">
<match key="@block.storage_device:storage.hotpluggable" bool="true">
<merge key="volume.policy.mount_option.fscontext=system_u:obje ct_r:removable_t" type="bool">false</merge>
</match>
<match key="@block.storage_device:storage.removable" bool="true">
<merge key="volume.policy.mount_option.fscontext=system_u:obje ct_r:removable_t" type="bool">false</merge>
</match>
</match>
save, and exit.
2: edit /etc/udev/rules.d/50-dev.rules - add the following at the bottom:
KERNEL="sd[a-z]2", BUS="scsi", SYSFS{model}="iPod", SYMLINK="ipod"
this tells udev to create /dev/ipod when you plug your ipod into the firewire cable. save, and exit.
3: login to a console as root, and run the command "visudo" (sudo should be installed w/FC3 by default.)
add the following line to the bottom of the file:
%group ALL= NOPASSWD: /usr/bin/eject
group should be the name of the group the iPod's user belongs to.... This will allow you to eject the iPod without being logged in as "root".
4: Reboot system, plug in iPod, and voila! Now if you want gtkpod to mount, unmount, and eject the iPod, you must create the following file: ~/.gtkpod/gtkpod.out
in the file, add the line:
sudo eject /dev/ipod
Save, and exit. This is a script that will tell gtkpod to run the eject command using the permissions you created in /etc/sudoers.
I found this info scattered all over the place, but had to patch a bunch of different items together from different websites to get this to work, so I thought I'd contribute the total process for all to enjoy, since this seems to be a common issue!
Thanks to those who helped!
n8
vBulletin® v3.8.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.