24.10.2014, 08:42 UhrDeutsch | English
Hallo Gast [ Registrierung | Anmelden ]

Neues Thema eröffnen   Neue Antwort erstellen
Vorheriges Thema anzeigen Druckerfreundliche Version Einloggen, um private Nachrichten zu lesen Nächstes Thema anzeigen
Autor Nachricht
gardyloo
Titel: I'm not understanding:Auto-mounting of an external USB drive  BeitragVerfasst am: 17.08.2006, 17:10 Uhr



Anmeldung: 14. Apr 2006
Beiträge: 60

Hi, all,

Until yesterday or so, when I plugged in my external USB drive enclosure, the partitions would mount to (say) /media/sda2, /media/sda5, etc. This is if I clicked OK on the "New medium detected" dialogue that KDE throws up when you plug something new in. Often, of course, I'd manually mount /dev/sda2 to /media/sda2. All good.

Now, when I plug the drive in, KDE again throws up the dialogue, and if I choose to let it mount and display the partitions' contents in Konqueror, the path shown in the Location strip in Konqueror is again /media/sda2 (for example). And if I move around in that partition via Konqueror, things work fine, and things are always shown as /media/sda2/whatever.
However, if I hover the mouse over the partition icon in Konqueror, the base URL is reported as /media-disk-1. Indeed, if I try to look at the files via the command line, I can't get to them by typing in "ls /media/sda2". It must be "ls /media/disk-1". And issuing "mount" from the command line shows "/dev/sda2 on /media/disk-1 type ext3 ( etc., etc.)".

Is this just a result of the new mounting schemes recently released? Will it stay this way (so that paths reported in Konqueror don't correspond to the paths reported---and used---via the cmd line)?
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
severin
Titel: BeitragVerfasst am: 18.08.2006, 08:50 Uhr



Anmeldung: 18. Mar 2004
Beiträge: 3417

I think I can clarify on *some* issues: konqueror uses some kio-slave. If you check its adress bar, I'm pretty sure it shows "devices:/media/sda2", while "df" will show you your drive is actually mounted on /media/sda2 (which - as opposed to the kio-thingy - is a real path). The funny thing is: how come your drive doesn't get mounted on /media/sda2? I once had an issue about /dev/USB-Maxtor getting mounted to /media/USB-Maxtor-1, which turned out to be due to some (dot) file having been created in /media/USB-Maxtor while *not* in use. Hence after pumount-ing USB-Maxtor, my machine didn't dare to delete the path; hence when pmount-ing the drive the next time, my machine realised "whoa, there is some content in /media/USB-Maxtor, which would get hidden if I simply mounted on top of it" and mounted to /media/USB-Maxtor-1.
So I suggest you check your /media/sda2 for (maybe hidden dot) files and delete them.
By the way: how come you're not using udev rules to keep your device names consistent? They might help you out on some trouble...

_________________
Kein Wort verstanden? Auf http://kanotix.com/index.php?module=pnW ... uerDummies
gibt's ein Glossar.

No clue what I'm talking about? New to Linux? Check http://kanotix.com/index.php?module=pnW ... ForDummies for a glossary.
 
 Benutzer-Profile anzeigen Private Nachricht senden Website dieses Benutzers besuchen ICQ-Nummer 
Antworten mit Zitat Nach oben
gardyloo
Titel:   BeitragVerfasst am: 18.08.2006, 18:15 Uhr



Anmeldung: 14. Apr 2006
Beiträge: 60

Thanks for the reply, severin. I haven't found a resolution (nor even a way of understanding the issue!), but here are some responses to you:

Zitat:
I think I can clarify on *some* issues: konqueror uses some kio-slave. If you check its adress bar, I'm pretty sure it shows "devices:/media/sda2", while "df" will show you your drive is actually mounted on /media/sda2 (which - as opposed to the kio-thingy - is a real path).


Yes, you're right--partially. If I clean out all of the old mount points in my /media, then plug in a usb key, Konqueror and its KIO slaves mount and display the key correctly, and Konqueror's address bar has "system:/media/sda1". If I do an "ls" in the command line, it says there's a newly created "usbdisk" there, and I can list files via "ls /media/usbdisk", but NOT with "ls /media/sda1" (gets me a "No such file or directory".
"df" and "mount" both show me "/dev/sda1 on /media/usbdisk [...]", and I can unmount (as root) the thing with "umount /media/usbdisk".


Zitat:
I once had an issue about /dev/USB-Maxtor getting mounted to /media/USB-Maxtor-1, which turned out to be due to some (dot) file having been created in /media/USB-Maxtor while *not* in use. Hence after pumount-ing USB-Maxtor, my machine didn't dare to delete the path; hence when pmount-ing the drive the next time, my machine realised "whoa, there is some content in /media/USB-Maxtor, which would get hidden if I simply mounted on top of it" and mounted to /media/USB-Maxtor-1.
So I suggest you check your /media/sda2 for (maybe hidden dot) files and delete them.


Yep! That happens to me. The devices created within /media each have a ".created_by_pmount" file withing them AFTER they're unmounted.
A slight clarification: If I choose "safely unmount" in Konqueror, the device seems to be totally unmounted, and the listing of the device in the /media directory totally disappears. If I unmount the device via the command line using "umount", the ".created_by_pmount" file remains, as does (of course), the /media/usbdisk device.

Zitat:
By the way: how come you're not using udev rules to keep your device names consistent? They might help you out on some trouble...


Excellent question. How do I do it? I could revert my system to its state several days ago (before recent dist-upgrades) but I'd rather not Smilie
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
h2
Titel:   BeitragVerfasst am: 18.08.2006, 18:59 Uhr



Anmeldung: 12. Mar 2005
Beiträge: 1005

The latest kde 3.5.4 and maybe hal upgrades changed the default auto drive mounting point.

This is confusing, especially since the auto open konqueror of the firewire/usb drive shows the old location.

Default now is /media/disk; /media/disk1; and so on.

That's what you'll see in konqueror in the regular display, but, oddly enough, the konqueror that opens when the drive is automounted, will show this: system:/media/sda1 just like it did before. You can access the drive from that tab/konqeror, but if you go into the standard konqueror file browser, it won't be there under that, it will be listed as /media/disk/ etc

This was clearly an oversight on kde/konqueror's part, since it makes no logical sense, and will probably get cleaned up in the future.

The surprising thing to me is that this is the first posting commenting on this. I should have posted this issue when I discovered it after the 3.5.4 upgrade, or hal upgrade, can't remember which it was.

_________________
Read more on dist-upgrades using du-fixes-h2.sh script.
New: rdiff-backup script
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
gardyloo
Titel:   BeitragVerfasst am: 18.08.2006, 20:42 Uhr



Anmeldung: 14. Apr 2006
Beiträge: 60

Could this *possibly* be related to the same issue that rdiff-backup has had (that is, putting python modules in "strange" places)? The reason I ask this is that I just tried running "hal-device-manager" from the command line (which I've never done, and I'm not even sure if one is ever supposed to), and it complained with a traceback, and
"ImportError: No module named pygtk".
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
wh7qq
Titel:   BeitragVerfasst am: 18.08.2006, 22:26 Uhr



Anmeldung: 04. Jul 2005
Beiträge: 67
Wohnort: Hawaii
Having same problem with a fresh upgrade of Easter...error message "mount point /media/sda1 does not exist despite the following fstab:

/etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
usbfs /proc/bus/usb usbfs devmode=0666 0 0
/dev/hda1 / reiserfs defaults 0 1
/dev/hda2 none swap sw 0 0
/dev/sda1 /media/sda1 vfat auto,users,exec,umask=000,shortname=mixed,quiet 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0

It happens for all users inc. root. My other box, updated several weeks ago, is fine.

When I look in the /media directory, I find only directories for cdrom0 and floppy0.

Paul
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
h2
Titel:   BeitragVerfasst am: 18.08.2006, 22:32 Uhr



Anmeldung: 12. Mar 2005
Beiträge: 1005

comment out the fstab entry for usb device, reboot, insert usb device. automount dialogue should come up, and device in konqueror will appear as I noted above, /media/disk

I'm trying to remember if there is more to that but I think it's it, this just happened, as I noted, in the last 10 days or so, I think it was the kde 3.5.4 upgrade

_________________
Read more on dist-upgrades using du-fixes-h2.sh script.
New: rdiff-backup script
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
h2
Titel:   BeitragVerfasst am: 18.08.2006, 22:36 Uhr



Anmeldung: 12. Mar 2005
Beiträge: 1005

gardyloo, check your python 2.3 and 2.4 directories for that hal-device-manager in /usr/lib/python2.3/site-packages

if hal device.. appears in 2.3, and not in 2.4, copy it over to 2.4/site-packages

that was the rdiff fix, before rdiff in sid was updated yesterday. rdiff no longer requires that fix. Maybe hal-device manager does

_________________
Read more on dist-upgrades using du-fixes-h2.sh script.
New: rdiff-backup script
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
gardyloo
Titel:   BeitragVerfasst am: 18.08.2006, 23:25 Uhr



Anmeldung: 14. Apr 2006
Beiträge: 60

In /usr/lib/python2.3/site-packages (on my machine, anyway) is "pygtk.pyc", which I copied to /usr/lib/python2.4/site-packages. However, now running "hal-device-manager" complains of
"ImportError: Bad magic number in /usr/lib/python2.4/pygtk.pyc".

I guess the two modules aren't quite compatible across the python versions. Perhaps. As pygtk.pyc isn't really human-readable (for this human!) maybe I should try installing hal-device-manager from source?

Not a pressing problem! This'll probably get fixed very soon.

Cheers,
gardyloo
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
slh
Titel:   BeitragVerfasst am: 18.08.2006, 23:39 Uhr



Anmeldung: 16. Aug 2004
Beiträge: 1905

*.pyc files are byte compiled in postinst upon installation, missing stuff needs to be fixed on the packaging side (following the new python policy), just copying stuff around is wrong.
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
h2
Titel:   BeitragVerfasst am: 18.08.2006, 23:46 Uhr



Anmeldung: 12. Mar 2005
Beiträge: 1005

good information, copy worked in the case of rdiff backup, but should have realized there's more to this stuff than meets the eye.

_________________
Read more on dist-upgrades using du-fixes-h2.sh script.
New: rdiff-backup script
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
wh7qq
Titel:   BeitragVerfasst am: 19.08.2006, 20:31 Uhr



Anmeldung: 04. Jul 2005
Beiträge: 67
Wohnort: Hawaii
h2, I commented out that line in fstab and rebooted and put in the usb stick and got the automount dialog but still got the "media/sda1 does not exist" error.

I tried changing the "/dev/sda1 /media/sda1 vfat auto,users,exec,umask=000,shortname=mixed,quiet 0 0 " line to "/dev/sda1 /media/disk...." but no help. There is still no "disk" or "sda1" entry in /media...just cdrom0 and floppy0.

BTW, have used your du-fixes-h2 script 3 times now on 2 machines without a hitch...very nice work! Thanks.

Paul
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
h2
Titel:   BeitragVerfasst am: 19.08.2006, 23:59 Uhr



Anmeldung: 12. Mar 2005
Beiträge: 1005

There should be no line in /etc/fstab for the automount of usb stick if I understand it correctly, unless you want to mount it by label.

So everything should be running through hal automatically at this point, and does on every install I've tested on so far.

Try undoing everything you've done to make it work, make sure no /etc/fstab items remain for mounting usb sticks as /dev/sda1 , comment them all out. Then reboot so your correct /etc/fstab settings take hold.
Also:
Run: apt-get install pmount
just to be on the safe side [that is now run by the script automatically just to be sure] as of today.

At that point if it doesn't automount correctly there is a problem, but it depends on what you've done so far.

once you click on the usb stick icon on your desktop, the 'disk' item should automatically appear, and disappear when you've removed the drive

This is the correct behavior. It doesn't require that you do or add anything currently, assuming you have upgraded system and kernel to reasonably new versions.

glad the scripts worked for you.

_________________
Read more on dist-upgrades using du-fixes-h2.sh script.
New: rdiff-backup script
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
wh7qq
Titel:   BeitragVerfasst am: 20.08.2006, 03:01 Uhr



Anmeldung: 04. Jul 2005
Beiträge: 67
Wohnort: Hawaii
h2, That got it...thanks very much. pmount was already updated. To summarize, I commented out lines in fstab referencing usb and sda1 as below:

/etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
#usbfs /proc/bus/usb usbfs devmode=0666 0 0
/dev/hda1 / reiserfs defaults 0 1
/dev/hda2 none swap sw 0 0
#/dev/sda1 /media/sda1 vfat auto,users,exec,umask=000,shortname=mixed,quiet 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0

Could I please ask you to tell me where that information came from so that I can educate myself on the topic?

Thanks again,

Paul

PS: Now the USB Camera interface works much nicer too...seems this was an upgrade that needed a configuration change to work.
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
h2
Titel:   BeitragVerfasst am: 20.08.2006, 06:26 Uhr



Anmeldung: 12. Mar 2005
Beiträge: 1005

usb mounting has been in a state of flux but has now I believe settled somewhat.

I got the information from here, irc, forums etc, mostly kanotix irc

plus trial and error of course, debugging stuff, test installs, all that fun stuff

_________________
Read more on dist-upgrades using du-fixes-h2.sh script.
New: rdiff-backup script
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
gardyloo
Titel:   BeitragVerfasst am: 20.08.2006, 21:36 Uhr



Anmeldung: 14. Apr 2006
Beiträge: 60

Hm. Commenting out the usb entry in my fstab didn't do it. I only have references to proc (mounted to /proc), some /dev/hdaX partitions, and /dev/cdrom now.

Rebooting with this new fstab made no difference to the usb-mounting issue. Pmount is and was updated Smilie
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
Kano
Titel:   BeitragVerfasst am: 20.08.2006, 22:23 Uhr



Anmeldung: 17. Dez 2003
Beiträge: 16275

dpkg --force-all --purge hal
apt-get install hal
reboot
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
gardyloo
Titel:   BeitragVerfasst am: 21.08.2006, 00:48 Uhr



Anmeldung: 14. Apr 2006
Beiträge: 60

Zitat:
dpkg --force-all --purge hal
apt-get install hal
reboot


Thanks for the input Kano. I'm still stymied:
Konqueror reports the usbkey (for example) as /media/sda1, but it's mounted as /media/usbdisk, and can only be referred to on the command line as /media/usbdisk.

Out of curiosity, I tried browsing things in midnight commander (with the same results as the command line, as you'd expect) and thunar. Thunar, similarly to konqueror, reports the thing as being "/media/sda1" in the sidebar, but as "usbdisk" in the main filesystem browser.

Except for the annoying ".created_by_pmount" files left in the directories after they're automounted, this problem is no longer that much of a concern to me.

[Edit] I'm guessing it's just how things are automounted. If I mount the usbkey (or external drive partitions or whatever), close Konqueror, and then browse to the /media directory via Konqueror, things are reported (in both a mouseover on the icon of the drives, or in the address bar) as "usbdisk-xxx". Just oversight on KDE's developer's part? Probably.[/Edit]
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
Kano
Titel:   BeitragVerfasst am: 21.08.2006, 13:36 Uhr



Anmeldung: 17. Dez 2003
Beiträge: 16275

You can use volume names for your USB devices. These are then the mount point names below /media.
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
wh7qq
Titel:   BeitragVerfasst am: 26.08.2006, 06:39 Uhr



Anmeldung: 04. Jul 2005
Beiträge: 67
Wohnort: Hawaii
I'm still having problems with this: with the usb items commented out in fstab and kano's suggestion to update hal done, the usb key shows up on the desktop and the kde daemon comes up and asks what I want to do but then when the window opens I get the following error from kio: "

A security policy in place prevents this sender from sending this message to this recipient, see message bus configuration file (rejected message had interface "org.freedesktop.Hal.Device.Volume" member "Mount" error name "(unset)" destination "org.freedesktop.Hal")"


Later:
Per devil, doing "adduser "group" plugdev" and rebooting has the usb stick working fine now.
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
klausmerger
Titel:   BeitragVerfasst am: 18.12.2008, 22:16 Uhr



Anmeldung: 30. Nov 2004
Beiträge: 112
Wohnort: Germany > Wuppertal
Hi all,
I have alas 'bettered' my System by updating e.g. hal, udev, pmount.
Now I have no automatic icons of my drives anymore on the desktop. I have created them manually. So no big problem.
But my usb-drive won't oblige. 'media' shows
Code:
.hal-mtab-lock
and in the WD Passport directory I have:
Code:
.created_by-pmount
Clicking on these messages/files, I get: ´ keine ausreichende Berechtigung für das Lesen des files ...'.
Btw, I have already tried Kanos counsel from 2006:
Kano hat folgendes geschrieben::
dpkg --force-all --purge hal
apt-get install hal
reboot

Help would make me happy Smilie

_________________
Kanotix Hellfire 3.2.0-030200rc7-generic i686
Quad AMD Phenom II Galliu 0.4 on
ATI Cedar PRO [Radeon HD 5450] X.Org 1.7.7
'Nur zögerndes Wissen zählt' (Canetti)
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
Kano
Titel:   BeitragVerfasst am: 19.12.2008, 00:14 Uhr



Anmeldung: 17. Dez 2003
Beiträge: 16275

You may not have /etc/fstab entries for usb devices. Also you should update the kernel, look at !kernel in the IRC.
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
klausmerger
Titel:   BeitragVerfasst am: 19.12.2008, 15:14 Uhr



Anmeldung: 30. Nov 2004
Beiträge: 112
Wohnort: Germany > Wuppertal
Kano hat folgendes geschrieben::
You may not have /etc/fstab entries for usb devices.

I have simply the line
Code:
usbfs           /proc/bus/usb   usbfs   devmode=0666    0       0

New KERNEL: Ay, Ay!
And thanks a lot.

_________________
Kanotix Hellfire 3.2.0-030200rc7-generic i686
Quad AMD Phenom II Galliu 0.4 on
ATI Cedar PRO [Radeon HD 5450] X.Org 1.7.7
'Nur zögerndes Wissen zählt' (Canetti)
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
Beiträge vom vorherigen Thema anzeigen:     
Gehe zu:  
Alle Zeiten sind GMT + 1 Stunde
Neues Thema eröffnen   Neue Antwort erstellen
Vorheriges Thema anzeigen Druckerfreundliche Version Einloggen, um private Nachrichten zu lesen Nächstes Thema anzeigen
PNphpBB2 © 2003-2007 
 
Deutsch | English
Logos and trademarks are the property of their respective owners, comments are property of their posters, the rest is © 2004 - 2006 by Jörg Schirottke (Kano).
Consult Impressum and Legal Terms for details. Kanotix is Free Software released under the GNU/GPL license.
This CMS is powered by PostNuke, all themes used at this site are released under the GNU/GPL license. designed and hosted by w3you. Our web server is running on Kanotix64-2006.