Re: I really need some help here udev/hotplug/usb/usbmount etc etc.
- From: The Natural Philosopher <a@xxx>
- Date: Sun, 13 Aug 2006 11:23:18 +0100
Bob Hauck wrote:
On Sat, 12 Aug 2006 05:18:23 +0100, The Natural Philosopher <a@xxx> wrote:Nah. THIS version of udev ignores usbmount. I tried the udev PROGRAM command, but it executes before the symlink is set up..ALL I want to do is get a known USB mass storage device to automountapt-get usbmount
to a fixed point depending on what its ID is.
Should be all you need unless you've gone and done something dumb, but
personally, I just mount my USB devices by hand.
Because you have mixed versions of one or more parts of this subsystem. Of course it doesn't work right. I told you it wouldn't. You need to
get everything back to a common baseline and try again.
Actually what I have now does work, and yes, usbmount and hotplug are both now obsoleted by udev.
My udev handles all change of device events, and although it has stub calls to link to historical hotplug stuff, usbmount has been utterly ignored.
Once I had a working system with a udev that worked with the kernel, it was a trivial issue.
Create a new rule in /etc/udev
This file is called 0.Nikon.rules
BUS=="scsi", SYSFS{model}=="NIKON DSC E775 ", SYMLINK+="Nikon"
BUS=="scsi", SYSFS{model}=="NIKON DSC E775 ", ACTION=="add" \ RUN+="/bin/mount /dev/Nikon /media/camera"
and is symlinked to /etc/udev/rules.d/0.Nikon.rules
Provided usb-storage is loaded (I think udev does this as part of its startup, which is why the broken udev/kernel relationship didn't load it) the plugging in of the camera will generate a udev event that has (amongst a lot of other stuff) a Scsi event involving the camera as uniquely ID'ed ..this rule is unique to that, and both sets up a symlink to a reliable device point for the formatted device..(I suspect it makes and breaks a link to the raw device as well actually..maybe NAME=="sd?1" would sort that?) and the second line (could that be concatenated with the first?) using RUN rather than PROGRAM (PROGRAM runs BEFORE the symlink. RUN commands are grouped and run AFTER the main work of udev) mounts the device just where I want it.
Investigation shows that all removable block devices are unmounted post removal by the HAL subsystem, (see /etc/hal/* and /etc/udev/hal.rules) so I haven't bothered to explicitly dismount it. A quick test seems to show its unmounted after switching the camera off.
I probably have some perms to fix up to allow the pictures to be erased. and maybe some sync issues as well - USB flash doesn't like lots of writes...but the basic problem is resolved.
I can see the camera via a samba mount and my wife can see it via a appletalk mount.
Which is, after all, all I wanted..
Look. I'm sorry, but I just typed apt-get intsall udev, and it pulled
in a version that needed a 2.6.15 kernel, and broke everything.
If you were running stable, and only stable, it would not have done
that.
It DID. I e-mail Marco, and he swore blind it wouldn't, but it did.
The startup file explicitly checks the kernel and aborts if its lower than that.
However the package install did not abort when I grabbed and installed it.
Search the net and you will find that this is not an isolated occurrence with this package...;-)
You have modified your apt setup in an unsupported way, or
manually downloaded and installed something from unstable, and you
do not know enough to do that correctly.
No, I didn't. I did not know enough to do that, then. Until I explicitly downloaded an unstable kernel and used teh crude method to install it. Which FIXED the problem,
You will continue to have troubles until you get that fundamental problem straightened out.
I did. There is, or *was* till I sent an email, a brorken dependency situation on the debian stable udev package.
.
- Follow-Ups:
- References:
- I really need some help here udev/hotplug/usb/usbmount etc etc.
- From: The Natural Philosopher
- Re: I really need some help here udev/hotplug/usb/usbmount etc etc.
- From: Bob Hauck
- Re: I really need some help here udev/hotplug/usb/usbmount etc etc.
- From: The Natural Philosopher
- Re: I really need some help here udev/hotplug/usb/usbmount etc etc.
- From: Bob Hauck
- I really need some help here udev/hotplug/usb/usbmount etc etc.
- Prev by Date: Re: I really need some help here udev/hotplug/usb/usbmount etc etc.
- Next by Date: Re: disto dvd
- Previous by thread: Re: I really need some help here udev/hotplug/usb/usbmount etc etc.
- Next by thread: Re: I really need some help here udev/hotplug/usb/usbmount etc etc.
- Index(es):
Relevant Pages
|