Mailinglist Archive: opensuse (4547 mails)

< Previous Next >
Re: [SLE] Why does USB drive mount automagically?
  • From: Chris Carlen <crobc@xxxxxxxxxxxxx>
  • Date: Sat, 22 May 2004 15:26:19 -0700
  • Message-id: <40AFD38B.4050706@xxxxxxxxxxxxx>
Sjoerd Hiemstra wrote:
Applies to: SUSE LINUX 9.1

The issue

You do not like the way automatic mounting of removable media (floppy,
cd, dvd) and hotplug devices (such as USB-sticks or -HDs) is done by
default since 9.1, using submount/subfs. You prefer to revert to the
'classic' art of mounting media.

Procedure

For floppy, cd and dvd this is simply accomplished by editing
/etc/fstab. In this example, showing a dvd and floppy, you change these
lines

/dev/dvd /media/dvd subfs fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
/dev/fd0 /media/floppy subfs
fs=floppyfss,procuid,nodev,nosuid,sync 0 0

to

/dev/dvd /media/dvd auto ro,noauto,user,exec,iocharset=utf8 0 0
/dev/fd0 /media/floppy auto noauto,user,exec,sync 0 0

Important: first make a backup copy of the original /etc/fstab!

Yes, I have done this and it is a great fix to the Konqueror pausing problem.

What you mention next is new and much appreciated information:

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
more:
[snip]
Please note that these modifications would be overwritten by future
updates of the hotplug package. Hence, after such an update these
modifications have to be applied again. The modifications that are
described here, only apply to the original hotplug package in 9.1.

Yes, until something is provided in Yast to manage this stuff. Seriously, this stuff is quirky. Anything that involves a lot of automagic intelligence from the "system" is bound to cause trouble.

My only complaint at this point is that this stuff appears to be undocumented, and no configuration options exist without editing files by hand. Even the hotplug script docs in /usr/share/doc say there is no documentation!

I suppose I could read the script, but most of the Suse scripts are written with a syntactical level of BASH that is over my head.

From this point on,

You mean from version 9.1 on, correct?

hotplug will create corresponding directories under
/media, when a new device is detected via Hotplug. It remains your
choice to either utilize these automatically created directories, or to
create your own directories. In any case, mounting the device takes
place as before, for example like this:

mount /dev/sda1 /media/usb-storage-4710765066451:0:0:0p1.


Thanks for the info.

Good day!



--
_____________________
Christopher R. Carlen
crobc@xxxxxxxxxxxxx
Suse 8.1 Linux 2.4.19


< Previous Next >