Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Desktop Environments
  • Search

[solved] Unable to unmount USB Disk/Stick as user (hal/dbus)

Problems with GUI applications? Questions about X, KDE, Gnome, Fluxbox, etc.? Come on in. NOTE: For multimedia, go up one forum
Post Reply
Advanced search
13 posts • Page 1 of 1
Author
Message
Attila
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 93
Joined: Fri Feb 28, 2003 4:13 pm

[solved] Unable to unmount USB Disk/Stick as user (hal/dbus)

  • Quote

Post by Attila » Sat Mar 31, 2007 7:41 am

Hiho,

I trie to use the hal/dbus "features" of kde to mount/unmount via KDE as normal user. So i set hal in my USE-Flags, emerge dbus and hal, add's both into the default runlevel and reemerge using --newuse. I add my user into the plugdev group and tried it ...

So ... mounting my USB Disks & Sticks works fine, but i'm not able to unmount the devices ("Safely Remove") them without the root-account.

I'm searching around for a while, but i can find any hint.

Can anybody help? - I have reproduced this problem on 3 (of 3) gentoo installations (one is a refesh one - installed from scretch a described in the KDE-Install doc).

Atti
Last edited by Attila on Sat Mar 31, 2007 7:08 pm, edited 1 time in total.
Top
Roman_Gruber
Advocate
Advocate
Posts: 3854
Joined: Tue Oct 03, 2006 8:43 am
Location: Austro Bavaria

  • Quote

Post by Roman_Gruber » Sat Mar 31, 2007 8:23 am

whats the output of lsusb and /var/log/messages when you plug in your usb stick?

You should see something like: /dev/sda or sdb or sda1 or sdb2

this is the mountpoint to mount your device.

If not I would look first in the kernel configs and recompile with the proper settings.
Top
Attila
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 93
Joined: Fri Feb 28, 2003 4:13 pm

  • Quote

Post by Attila » Sat Mar 31, 2007 10:38 am

Hiho,

Mounting works without a problem - i just can't unmount it as user.

Code: Select all

$ lsusb
Bus 003 Device 003: ID 05e3:0760 Genesys Logic, Inc. Card Reader
Bus 003 Device 002: ID 0ea0:2168 Ours Technology, Inc. Transcend JetFlash 2.0 / Astone USB Drive
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000

Code: Select all

$ cat /var/log/vereything/current
Mar 31 12:31:33 [kernel] usb 3-2: new high speed USB device using ehci_hcd and address 4
Mar 31 12:31:33 [kernel] usb 3-2: Product: Flash Disk
Mar 31 12:31:33 [kernel] usb 3-2: Manufacturer: USB
Mar 31 12:31:33 [kernel] usb 3-2: SerialNumber: 241F1E405AA6619F
Mar 31 12:31:33 [kernel] usb 3-2: configuration #1 chosen from 1 choice
Mar 31 12:31:33 [kernel] scsi2 : SCSI emulation for USB Mass Storage devices
Mar 31 12:31:38 [kernel] scsi 2:0:0:0: Direct-Access     VMAX     128MB            2.00 PQ: 0 ANSI: 2
Mar 31 12:31:39 [kernel] ready
Mar 31 12:31:39 [kernel] SCSI device sda: 256000 512-byte hdwr sectors (131 MB)
Mar 31 12:31:39 [kernel] sda: Write Protect is off
Mar 31 12:31:39 [kernel] sda: assuming drive cache: write through
Mar 31 12:31:39 [kernel] SCSI device sda: 256000 512-byte hdwr sectors (131 MB)
Mar 31 12:31:39 [kernel] sda: Write Protect is off
Mar 31 12:31:39 [kernel] sda: assuming drive cache: write through
Mar 31 12:31:39 [kernel] sd 2:0:0:0: Attached scsi removable disk sda
Mar 31 12:31:39 [kernel] sd 2:0:0:0: Attached scsi generic sg1 type 0
When i plug in a Desktop-Icon apperars! - Now i right-click on the icon and "Mount" it - everything fine.

Now i try to unmount it (Right-Click->Safely Remove) - nothing happens. I notice that i did not have the choice "unmount" in the context-menu as on the CDRom (which is a "normal" device, which i put into the fstab).

Then i mount or try to unmount ("Safely Remove") - no messages appear in the syslog. When i try to unmount it via commandline:

Code: Select all

umount: /media/disk-1 is not in the fstab (and you are not root)
Sure, this is logical for me.

Is there any Howto for those things?

Atti
Top
Attila
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 93
Joined: Fri Feb 28, 2003 4:13 pm

  • Quote

Post by Attila » Sat Mar 31, 2007 7:07 pm

Hiho,

OKay, i've solved it by try & error! ;-)

I emerge pmount and everything is fine. STrange that thare is no hint in any FAQ or Howto i found on Gentoo.

To make a short overview what i've done to enable Mounting USB Devices in KDE as normal user:

- set USE flag "hal" (i think this is already done in the "desktop"-Profile, but i put it into the make.conf to be sure)
- emerge hal & dbus (already emerged on my system, but sure is sure ;-) )
- "rc-update add dbus default"
- "rc-update add hald default"
- emerge pmount
- Enabling the device-Icons in the kde (Control Center->Desktop->Behavior->Device Icons)
- Plug in a USB-Stick and have fun! :-)

Atti
Top
Bobnoxous
Apprentice
Apprentice
User avatar
Posts: 240
Joined: Tue May 03, 2005 2:00 am

  • Quote

Post by Bobnoxous » Wed Apr 04, 2007 10:32 pm

Thanks for providing the fix. I'm having trouble unmounting my USB stick (it mounts fine). I'm emerging pmount now, so hopefully that fixes it.
"The problem with the world is that fools and fanatics are always so sure of themselves while wiser people are so full of doubt."
- Bertrand Russell
Top
trawler
n00b
n00b
Posts: 70
Joined: Sun Jan 07, 2007 11:52 am

  • Quote

Post by trawler » Tue Apr 10, 2007 9:18 pm

Attila wrote: OKay, i've solved it by try & error! ;-)
I emerge pmount and everything is fine.
Wow, thank you so very much for this thread - I've looked everywhere for a solution and couldn't find anything, but your solution did the trick instantly!
Good job, and thanks! :)
Top
VinzC
Watchman
Watchman
User avatar
Posts: 5100
Joined: Sat Apr 17, 2004 1:51 pm
Location: Dark side of the mood

  • Quote

Post by VinzC » Wed May 09, 2007 7:12 pm

May I take the opportunity to ask why on earth pmount is needed for just unmounting plugable devices although KDE alone succeeds in mounting them? Is it a bug in KDE/HAL/DBus?

(I've run into the same situation and your post sure helped - thanks a lot. However I can't be satisfied as I'm puzzled.)
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Top
albright
Advocate
Advocate
User avatar
Posts: 2588
Joined: Sun Nov 16, 2003 6:36 pm
Location: Near Toronto

  • Quote

Post by albright » Wed May 09, 2007 7:24 pm

at the risk of muddying the waters, I have no trouble mounting
and unmounting usb sticks/drives etc. and I do NOT have
pmount installed.

I think there is another problem lurking here (are you sure you
have the right kde services running?).
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Top
VinzC
Watchman
Watchman
User avatar
Posts: 5100
Joined: Sat Apr 17, 2004 1:51 pm
Location: Dark side of the mood

  • Quote

Post by VinzC » Wed May 09, 2007 8:14 pm

albright wrote:at the risk of muddying the waters, I have no trouble mounting
and unmounting usb sticks/drives etc. and I do NOT have
pmount installed.
I do believe you as I have another KDE machine which unmounts fine without pmount... But I didn't want to pour gas where water is needed ;-) .
albright wrote:I think there is another problem lurking here (are you sure you
have the right kde services running?).
I wish I knew which ones... :roll:
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Top
janiskr
n00b
n00b
User avatar
Posts: 56
Joined: Sun May 09, 2004 3:38 pm
Location: Riga, Latvia

  • Quote

Post by janiskr » Wed May 09, 2007 8:56 pm

i changed some udev rules, as result i have mounting and unmounting working very well :roll:

dunno if it is good solution but works like a charm
umm... amd64 then...
Top
VinzC
Watchman
Watchman
User avatar
Posts: 5100
Joined: Sat Apr 17, 2004 1:51 pm
Location: Dark side of the mood

  • Quote

Post by VinzC » Wed May 09, 2007 9:06 pm

janiskr wrote:i changed some udev rules, as result i have mounting and unmounting working very well :roll:

dunno if it is good solution but works like a charm
Look, I like that way as I perceive the current evolution of plugable devices to be independent from fstab. What are the rules that you have changed and what are these changes?
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Top
Bobnoxous
Apprentice
Apprentice
User avatar
Posts: 240
Joined: Tue May 03, 2005 2:00 am

  • Quote

Post by Bobnoxous » Wed May 23, 2007 4:18 pm

My setup still isn't working quite right, but I've worked around it. When I stick in a USB device, I can see it in rhythmbox, but if I just drag files over, the files get corrupted. I'll start to play a file, and it'll suddenly switch to an old file, as if the complete file didn't get written. Strange. And, I cannot unmount the device in rhythmbox.

But, if I mount the flash manually, remove old files and add new ones, and then unmount it, it works fine, so it only seems to be a problem when it's "mounted" automagically by rhythmbox, or whatever it is that actually handles accessing the device. I just don't know enough of what goes on underneath to troubleshoot this.
"The problem with the world is that fools and fanatics are always so sure of themselves while wiser people are so full of doubt."
- Bertrand Russell
Top
VinzC
Watchman
Watchman
User avatar
Posts: 5100
Joined: Sat Apr 17, 2004 1:51 pm
Location: Dark side of the mood

  • Quote

Post by VinzC » Thu May 24, 2007 8:25 am

Bobnoxous wrote:My setup still isn't working quite right, but I've worked around it. When I stick in a USB device, I can see it in rhythmbox, but if I just drag files over, the files get corrupted. I'll start to play a file, and it'll suddenly switch to an old file, as if the complete file didn't get written. Strange. And, I cannot unmount the device in rhythmbox.

But, if I mount the flash manually, remove old files and add new ones, and then unmount it, it works fine, so it only seems to be a problem when it's "mounted" automagically by rhythmbox, or whatever it is that actually handles accessing the device. I just don't know enough of what goes on underneath to troubleshoot this.
You could run fuser -m <path to the mount point of your USB drive> to see which process uses files on the drive. Typically, used files prevent any mounted filesystem from being dismounted.
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Top
Post Reply

13 posts • Page 1 of 1

Return to “Desktop Environments”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic