Mailinglist Archive: opensuse (4547 mails)

< Previous Next >
Re: [SLE] Why does USB drive mount automagically?
  • From: "Jerome R. Westrick" <jerry@xxxxxxxxxxxx>
  • Date: Sat, 22 May 2004 15:32:32 +0200
  • Message-id: <1085232751.21523.30.camel@xxxxxxxxxxxxxxxxxxxxxxxx>
On Sat, 2004-05-22 at 14:32, David Johanson wrote:
> > Please see http://portal.suse.com/sdb/de/2004/05/hmeyer_91_revert_from_subfs.html,

> Anyone willing to translate this to english. Three install so far and none of
> them see the USB devices at all. All clean installs.
>
> dave
Here a quick and dirty translation....
pasted in html format.
maybe someone at SuSE can put it up on thier web...





<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
<TITLE></TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 1.1.1 (Linux)">
<META NAME="CREATED" CONTENT="20040522;15264700">
<META NAME="CHANGED" CONTENT="20040522;15272300">
</HEAD>
<BODY LANG="en-US" DIR="LTR">
<P><BR><BR>
</P>
<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>
<COL WIDTH=2*>
<COL WIDTH=254*>
<TR VALIGN=TOP>
<TD WIDTH=1%>
<P ALIGN=LEFT><IMG SRC="../../images/x.gif" NAME="Graphic9"
ALIGN=BOTTOM WIDTH=10 HEIGHT=52 BORDER=0><!-- BO Ad-Section --><!--
BEGIN: AdSolution-Tag 3.3beta: AdSpot-Code Fullbanner Rest -->
</P>
</TD>
<TD WIDTH=99%>
<H2 ALIGN=LEFT><SCRIPT LANGUAGE="javascript">
<!--

Ads_kid=0;Ads_bid=0;Ads_xl=468;Ads_yl=60;Ads_xp='';Ads_yp='';Ads_opt=0;Ads_wrd=''
// -->

</SCRIPT><SCRIPT LANGUAGE="javascript"
SRC="http://falk.speedera.net/dat/cjf/00/00/85/36.js";></SCRIPT><!-- END:
AdSolution-Tag 3.3beta: AdSpot-Code --><!-- EO Ad-Section --><!-- BO
Print-Section -->9.1:
Using the classical mount instead of subfs
</H2>
<P ALIGN=LEFT><B>relates to:</B> SUSE LINUX 9.1
</P>
<H3 ALIGN=LEFT>Description</H3>
<P ALIGN=LEFT>You do not need (or like) the automatic mount
functionality (for Floppy, CD, DVD and hotplug devices), as
implemented as of 9.1. Therefore you wish to revert to the
&quot;Classical&quot; method of mounting.</P>
<H3 ALIGN=LEFT>Procedure</H3>
<P ALIGN=LEFT>For Floppy, CD- and DVD-drives you simply need to
edit the <CODE>/etc/fstab.</CODE> There you simple change the
appropriate lines (here an example for DVD and Floppies).</P>
<PRE STYLE="text-align: left">/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</PRE><P ALIGN=LEFT>
to
</P>
<PRE STYLE="text-align: left">/dev/dvd /media/dvd auto
ro,noauto,user,exec,iocharset=utf8 0 0
/dev/fd0 /media/floppy auto
noauto,user,exec,sync 0 0</PRE><P ALIGN=LEFT>
<B>Important:</B> please make a backup of your
<CODE>/etc/fstab</CODE>
!
</P>
<P ALIGN=LEFT>For Hot Plug devices (like USB-Sticks), which are
bound via the Hotplug-Mechanism things are a little more
complicated since 9.1 nolonger places an entry in <CODE>/etc/fstab.
</CODE>Instead the device is bound in the Hotplug-Scripts. This
is done by submount/subfs. In order to turn this off you can
“misuse” the file <CODE>/etc/hotplug/hotplug.subfs.functions</CODE>
by changing it to no longer call the submount/subfs as shown in
the diff below:
</P>
<PRE STYLE="text-align: left">linux:/etc/hotplug # diff
hotplug.subfs.functions.orig hotplug.subfs.functions
135,136c135,136
&lt; mount $device $MP -t subfs \
&lt; -o
&quot;${fstype}nodev,nosuid,procuid,$fsoptions&quot;
---
&gt; mount $device $MP -t auto \
&gt; -o
&quot;nodev,nosuid,procuid,$fsoptions&quot;
166c166
&lt; umount $device -t subfs
---
&gt; umount $device -t auto
188c188
&lt; /bin/grep -v '^#' /etc/fstab | /bin/awk '$3 ~ /subfs/ { print
$1&quot; &quot;$2 }' \
---
&gt; /bin/grep -v '^#' /etc/fstab | /bin/awk '$3 ~ /auto/ { print
$1&quot; &quot;$2 }' \</PRE><P ALIGN=LEFT>
Instead of making the changes sourself, you can download the
modified file from our FTP-Server:
</P>
<P ALIGN=LEFT><A
HREF="ftp://ftp.suse.com/pub/people/hvogel/hotplug.subfs.functions";>ftp://ftp.suse.com/pub/people/hvogel/hotplug.subfs.functions</A>
</P>
<P ALIGN=LEFT>Please make a backup of this file also!
</P>
<P ALIGN=LEFT><B>Please Note:</B> That these changes could be
overwritten by future updates of the <CODE>hotplug</CODE>
Package. After such an update you would have to reapply the
patches. The patch (above) is based on the original
<CODE>hotplug</CODE>
Package of 9.1.
</P>
<P ALIGN=LEFT>With this patch, Hotplug continues to create the
directories for newly recognized devices under the
<CODE>/media</CODE>
directory. Wither or not you choose to use these directories is
left for you to decide. To mount a device is then done as usual
(for example)
</P>
<PRE STYLE="margin-bottom: 0.2in; text-align: left"> mount /dev/sda1
/media/usb-storage-4710765066451:0:0:0p1.</PRE>
<HR SIZE=2 NOSHADE>
<P ALIGN=LEFT><B>Keywords:</B> mount, mounten,subfs,cd,dvd
</P>
<HR SIZE=2 NOSHADE>
<P ALIGN=LEFT><!-- EO Print-Section --><IMG SRC="../../images/x.gif"
NAME="Graphic10" ALIGN=BOTTOM WIDTH=2 HEIGHT=20 BORDER=0>
</P>
</TD>
</TR>
<TR>
<TD COLSPAN=2 WIDTH=100% VALIGN=TOP></TD>
</TR>
</TABLE>
<P STYLE="margin-bottom: 0in"><BR>
</P>
</BODY>
</HTML>


< Previous Next >