Mailinglist Archive: opensuse (4547 mails)

< Previous Next >
Re: [SLE] Why does USB drive mount automagically?
  • From: Chris Carlen <crcarle@xxxxxxxxxx>
  • Date: Mon, 24 May 2004 13:33:01 -0700
  • Message-id: <40B25BFD.7090203@xxxxxxxxxx>
Sjoerd Hiemstra wrote:
For media such as USB-sticks, that are connected through the hotplug
mechanism, the case is somewhat more complicated, because since 9.1, no
entry in /etc/fstab is added for these devices any more. Instead, these
devices are connected through the hotplug scripts. Here, again,
submount/subfs is used. If you would like to avoid this, you could edit
the file /etc/hotplug/hotplug.subfs.functions in such a way that the
hotplug mechanism does not connect these devices via submount/subfs any

linux:/etc/hotplug # diff hotplug.subfs.functions.orig
hotplug.subfs.functions 135,136c135,136
< mount $device $MP -t subfs \
< -o "${fstype}nodev,nosuid,procuid,$fsoptions"
> mount $device $MP -t auto \
> -o "nodev,nosuid,procuid,$fsoptions"
< umount $device -t subfs
> umount $device -t auto
< /bin/grep -v '^#' /etc/fstab | /bin/awk '$3 ~ /subfs/ { print
$1" "$2 }' \
> /bin/grep -v '^#' /etc/fstab | /bin/awk '$3 ~ /auto/ { print
$1" "$2 }' \

Instead of making these changes yourself, you could copy this alterated
file from our ftp server:

Thank you for your input.

I have tried this, and it is not a solution I can use. The hotplug scripts still make the dir in /media, but since no entry is made in /etc/fstab, the user cannot mount. Nor can the user determine what the device name is to mount, without cat-ing /proc/partitions.

The automounting is better, though I still don't like it. Actually, it's Ok, but there really needs to be some configuration options in Yast for such an important capability as handling of removable/hotpluggable devices.

Actually, everything would be fine if I could simply unmount the devices I have plugged in.

But they can't be unmounted by a user!

So how can one know if they are synced before unplugging?

I will likely start another thread about this issue.

Good day!

Christopher R. Carlen
Principal Laser/Optical Technologist
Sandia National Laboratories CA USA

< Previous Next >