LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   removable (usb-)devices mount points (https://www.linuxquestions.org/questions/slackware-14/removable-usb-devices-mount-points-449130/)

zlin50 05-27-2006 04:29 PM

removable (usb-)devices mount points
 
Hi,

I'm using slackware-10.2 with kernel 2.4.32 in combination with serveral removable devices: mp3-player, camera, external hard-disk,...

hotplug assigns these devices to /dev/sd[bcd]? according to the sequence of connection (which is variable, actually). Therefore it is not possible to define "fixed" mount points in /etc/fstab.

As far as I understand, with kernel 2.6 this problem is handled by udev.

Do you know a similar solution for kernel 2.4?
At the moment, I'm using hotplug as a black-box; can I configure hotplug to do that job for the above mentioned devices?

Thanks in advance,
Markus

drkstr 05-27-2006 10:20 PM

Hello, welcome to LQ.

I was under the impression that udev works with the 2.4 kernel as well since it ships default with Slackware (which uses the 2.4 kernel).

What are you experiencing when you try to use udev?

regards,
...drkstr

Bruce Hill 05-28-2006 03:10 AM

Welcome to LQ!

Or you can setup /etc/fstab with generic mount point names, and then either manually mount them or use the "System > Storage Media > Removable Device (sdx1)" choices from the KDE desktop. These are two mount points:
Code:

mingdao@silas:~/kernel/linux-2.6.16.18$ cat /etc/fstab
/dev/sdc1        /usb        vfat        noauto,users,rw,umask=1000  0  0
/dev/sdd1        /usb1        vfat        noauto,users,rw,umask=1000  0  0

I only made 2 because I don't use more than 2 removable devices at a time. And it matters not to me what they're called, therefore, the scheme.

I have two SATA drives which permanently get /dev/sda and /dev/sdb.

zlin50 05-28-2006 05:30 AM

@all: basically, my system is running - I just want to optimize it....

@drkstr:

> What are you experiencing when you try to use udev?

$ head -n 9 /usr/doc/udev-064/README | tail -1
- You must be running a 2.6 version of the Linux kernel.

--> I didn't try....

@Chinaman:
- yes - this is an option - but still I would have to "think about" wich /dev/s?? I have to use, when I connect any devices.

Actually, I'm looking for something like
/dev/camera /mnt/camera vfat noauto,users,.....
where /dev/camera gets linked to /dev/s?? by any (hotplug?) automatism.

Thanks,
Markus

Bruce Hill 05-28-2006 06:07 AM

Markus,

You don't have to think about anything if you're running KDE, just make yourself 4 mount points, plug in the device, and then use what I told you before. You click on the icon and it mounts.

Of course, udev is supposed to assign the same mount point to devices if you write udev rules properly. But udev is still a buggy issue, and only certain versions work with certain kernels. See the ChangeLog.txt of Slackware -current for more info.

zlin50 05-29-2006 12:59 PM

Hi Chinaman,

I see - unfortunately, I'm not running KDE but fvmw2. :-(

Yes, I know: lots of "I'm not..."! :-)

I thought about using any functionality inside hotplug,
so I'll search google for that topic.

Thanks, anyway!
Markus

Bruce Hill 05-29-2006 04:34 PM

Markus,

You're only going to get the functionality you want with udev.
At the present time, that's going to require a lot of work on
your part, probably 'hit and miss' at that. Did you read?
Code:

mingdao@silas:~$ less /usr/doc/udev-071/README
udev - userspace device management

For more information see the files in the docs/ directory.

Important Note:
  Integrating udev in the system is a whole lot of work, has complex dependencies
  and differs a lot from distro to distro. All reasonable distros use udev these
  days, the major ones make it mandatory and the system will not work without it.

  The upstream udev project does not support or recomend to replace a distro's udev
  installation with the upstream version. The installation of a unmodified upstream
  version may render your system unusable! There is no "default" setup or a set
  of "default" rules provided by the upstream udev version.
<snip>

And since I had enough trouble with udev just running,
without writing any udev rules, I'm not even sure if what you
are saying is possible. I think udev still uses device names,
but translates those into specific mount points.


All times are GMT -5. The time now is 12:13 PM.