Description of problem:
I used hotplug with FC2 to automagically mount my pen drive.
Although it is executed, the hotplug script /etc/hotplug/usb/usb-storage doesn't
work anymore, and the console shows:
mount: you must specify the filesystem type
I tried to replace the command
mount /media/key >& /dev/console
in the script /etc/hotplug/usb/usb-storage by the command
mount -t ext3 /dev/sda1 /media/key >& /dev/console
but then the console says:
mount: special device /dev/sda1 does not exist
Of course it does, and the same both commands at the console mount the pen drive
without any error. Interestingly, unmounting when the pen drive is unplugged
while mounted works.
Version-Release number of selected component (if applicable):
FC4 fully updated, 2.6.12-1.1387_FC4, hotplug-2004_09_23-7.
Same result with the original FC4 kernel 2.6.11-1.1369.
Always. Just plugging the pen drive.
Pen drive not mounted.
Pen drive mounted.
I suspect it's racing with udev which is creating the device nodes.
HAL already exists and has hooks for mounting removable storage; assigning there.
I think it is not because a 'race'.
The mount error appears after the device was created.
In addition, just in case, I added a "sleep 30 seconds"
right before the mount command to be sure the device was
created. Same results.
Are Fedora bugs being processed?
I mean: is Fedora alive?
Hotplug doesn't handle key mounting anymore. That is done with HAL in FC4 (and
in FC5 hotplug will be removed). Did you upgrade or do a fresh install? Please
attach the output of the lshal command and the contents of /etc/fstab with the
key plugged in. Thanks.
Created attachment 122115 [details]
Created attachment 122116 [details]
I never do upgrades to versions of Fedora, only to packages.
So, FC4 was a fresh install.
I have had tons of problems with HAL.
So hotplug doesn't work here most likely because the script is being run before
the node is created by udev. Not really a bug since hotplug shouldn't be used
for this. Your solutions are to let HAL and gnome-volume-manager to handle it
(gnome-volume-manager is what does the mounting) or you can write a HAL callout
to do it or just run the autofs or automounter daemon (amd) which will mount
drives in fstab when you try to access them. BTW hardcoding /dev/sda1 /dev/sdb1
etc. could run you into some problems as you never know which device will get
which node name from kernel to kernel.
To see how HAL does things check out the fdi files in /usr/share/hal/fdi. You
should see a storage-policy fdi file in there that adds the fstab-sync callout.
Beyond that go to the hal website at http://freedesktop.org/wiki/Software/hal