Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
clean unmounting an iPod without rmmod'ing the sbp2 module
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
MiniMoose
n00b
n00b


Joined: 22 Sep 2004
Posts: 33
Location: Seattle, WA

PostPosted: Thu Apr 07, 2005 5:47 pm    Post subject: clean unmounting an iPod without rmmod'ing the sbp2 module Reply with quote

FYI, I discovered that you don't need to rmmod the sbp2 module to get an iPod to switch to the "Ok to Disconnect" mode. The "eject" command seems to work. In verbose mode it looks like it sends the iPod the SCSI command for eject that is normally sent to SCSI CD-ROMS. The iPod responds to the SCSI eject command by switching into the "Ok to Disconnect" mode.

In KDE, I was able to hack the *.desktop file for my iPod device icon so that it offers the "eject" option in the right-click context menu. But when I select it, I get a message that says that the device cannot be opened. The error is caused by the fact that I must be root to run the eject command on the iPod device. I've tried setting up sudo, and tweaking the perms on the iPod device but I can't seem to get it to work.

Does anybody have any ideas?
Back to top
View user's profile Send private message
diastelo
Guru
Guru


Joined: 23 Feb 2004
Posts: 521

PostPosted: Thu Apr 07, 2005 6:30 pm    Post subject: Reply with quote

How are you mounting the ipod in the first place? If you are mounting it as root, you should probably try to mount it as a user instead. If you have a line in /etc/fstab for your ipod, please list it here. I want to see what options you are using to mount the ipod.
_________________
"No question is so difficult to answer as that to which the answer is obvious" -- George Bernard Shaw
Back to top
View user's profile Send private message
scoobydu
Veteran
Veteran


Joined: 16 Feb 2003
Posts: 1076
Location: 'Mind the Gap'

PostPosted: Thu Apr 07, 2005 9:52 pm    Post subject: Reply with quote

It nearly works for me.

I can mount and unmount my ipod as a user, but eject will only remove the warning message on the ipod when root ejects it ..... eject throws an error as well, but does remove the warning message on the ipod.
_________________
Tyan Tiger K8W, 2xOpteron 240,Powerbook5,6 15" 1.5g, Macbook Black 2g, Mac Mini 1g, Ipod P60g.
| Linux - From a windows user perspective|
Back to top
View user's profile Send private message
bruda
Guru
Guru


Joined: 06 May 2004
Posts: 376
Location: Sherbrooke, QC, Canada

PostPosted: Fri Apr 08, 2005 1:26 am    Post subject: Reply with quote

I don't know about iPods, but my Firewire enclosures are good to go after a simple umount, without ejecting or rmmod-ing sbp2 (as was needed with older kernels). Since the iPod is a mass storage device under Linux I would assume things are similar.
_________________
Quid latine dictum sit altum videtur
Back to top
View user's profile Send private message
diastelo
Guru
Guru


Joined: 23 Feb 2004
Posts: 521

PostPosted: Fri Apr 08, 2005 3:40 am    Post subject: Reply with quote

iPods are finicky creatures. It's best not to unplug them until they're ready. They have sort of OS or system software on them that no doubt complicates matters.

Eject is a sort of wrapper for umount, so it probably has a few tricks up its sleeve that can even fool iPods into behaving. I'm glad to hear it does work, even if it does spit out a few errors. I have the somewhat more challenging problem of stubbornly holding onto my HFS+ formatted iPod. I have a Powerbook running iTunes, so I don't have any pressing need or desire to work that hard to get it to work in Linux.

Instead of using sudo, have you checked to see if you are using the "users" option in your /etc/fstab? That'll let you unmount partitions as a different user than whatever it was mounted under, presumably even if root was responsible. The "user" option is a little more restrictive. Of course, I still don't know what you're doing to mount it in the first place.
_________________
"No question is so difficult to answer as that to which the answer is obvious" -- George Bernard Shaw
Back to top
View user's profile Send private message
MiniMoose
n00b
n00b


Joined: 22 Sep 2004
Posts: 33
Location: Seattle, WA

PostPosted: Fri Apr 08, 2005 2:49 pm    Post subject: Reply with quote

Yes, my fstab has "user" in it. That's how I can mount my iPod without switching to root. Here's my fstab line for my iPod:

/dev/sda2 /mnt/ipod vfat sync,nodev,uid=1000,gid=100,user,noauto 0 0

I haven't tried to set up automounting yet. I just want to get the mount/umount/eject operations working correctly first.
Back to top
View user's profile Send private message
diastelo
Guru
Guru


Joined: 23 Feb 2004
Posts: 521

PostPosted: Fri Apr 08, 2005 3:05 pm    Post subject: Reply with quote

The "user" and "users" options are not the same, though they are similar.

I don't think automounting is going to fix your umounting problem, unfortunately.

The eject option that you added to your KDE menu, is that a built in command or a link to an executable? If it's just a link, you can change it to point to a wrapper that could give you root. That's a little complicated though.

Right before you try to eject the device, why don't you check the permissions on the mount point and the device itself? I assume you can still eject from the command line, even when KDE balks? If so, you should be able to write your own custom menu option or at least a launcher that will work.
_________________
"No question is so difficult to answer as that to which the answer is obvious" -- George Bernard Shaw
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum