usb-keys

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since we've heard no more from this guy; here's the attributed docbook
version, 


-- 
Regards DaveP.
XSLT&Docbook  FAQ
http://www.dpawson.co.uk/xsl

<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V4.1//EN"
 "/sgml/oasis/docbookx.dtd" [

<!ENTITY RH "Red Hat"> <!--The generic term "Red Hat" -->
<!ENTITY RHL "Red Hat Linux"> <!--The generic term "Red Hat Linux" -->
<!ENTITY RHEL "Red Hat Enterprise Linux"> <!--The generic term "Red Hat Enterprise Linux" -->
<!ENTITY RHN "Red Hat Network"> <!--The generic term "Red Hat Network" -->
<!ENTITY FORMAL-RHI "&RH;, Inc."> <!--The generic term "Red Hat, Inc. -->
<!ENTITY PROJECT "Fedora project"> <!-- Set the project name -->
<!ENTITY NAME-TITLE "Fedora Project"> <!-- Set the project name, use for titles -->
<!ENTITY DISTRO "Fedora Core"> <!-- Set the distro name -->
<!ENTITY BOOKID "jargon-buster-1.8 (2004-01-30)"> <!-- change version of manual and date here -->

<!ENTITY LEGALNOTICE SYSTEM "../common/legalnotice-en.xml">

]>
<article>
  <title>Autofs, USB keys and Fedora Core 2</title>
  <articleinfo>
    <revhistory>
      <revision>
	<revnumber>1.0</revnumber>
	<date>8 Aug 2004</date>
	<authorinitials>Kanwar Sandhu </authorinitials>

	<revdescription>
	  <para>Initial Release</para>
	  <para>	Edited, DaveP</para> </revdescription>
	

	

      </revision>
  
  

  
    </revhistory>

    &LEGALNOTICE;

  </articleinfo>
  
  <sect1>

    <title>Autofs, USB keys and Fedora Core 2</title>

    <sect2>
    <title>Instructions for automatically mounting USB keys on a PC running Fedora Core 2/Gnome 2.6.</title>
    
        
    
        
<!--            
  By: Kanwar Sandhu ksandhu@xxxxxxxxxxxxxxxxxx
Date: June 30, 2004
-->
<para>   USB memory keys are a great replacement for the old 3.5"
  floppy disk, but if mailing lists are any indication, not
  everyone is having an easy time getting their USB memory keys
  to work with their favourite Linux distribution.&nbsp; There
  are various solutions from many different people, but they do
  not always work and for no apparent reason.&nbsp;</para>
      <para>
	After doing much searching, reading and experimenting to get
  a USB memory key working in our office, I decided to write a
  How-To.&nbsp; I hope that others find this useful and can
  finally use their USB memory keys.&nbsp; </para>


<para>
   I have kept this How-To general and not specific to the
  hardware I used.&nbsp; Although the type of hardware used can
  affect the configuration, the general instructions provided
  here should work with any USB memory key.</para>
      <para>
	Finally, if you notice any mistakes in this How-To, do tell u
  and we will promptly make the appropriate changes.
</para>

   

  
   
	  <para>Plug your USB memory key into a free USB port.</para>

   <para>Open the Hardware Browser application.&nbsp; You can find
   this in the Gnome menu under "System Tools".</para>


    <para>You will be prompted to enter your Root password.&nbsp;
   After you enter the password, the Hardware Browser will
   require several seconds to scan your system.</para>

    <para>When the scan is complete, you will be presented with a
   new window listing the hardware it found on your
   computer.</para>
   

   
	  <para>Click on "Hard Drives" in the list on the left side of
   the window.
</para><para>
    The important thing to note here is what the DEVICE is for
   your USB memory key.&nbsp; Your USB memory key will be
   assigned a device depending on how your hardware is
   configured.&nbsp; The device is important and will be
   required later, so write it down.</para>

    <para>Close the Hardware Browser.</para>

    <para>Open a terminal window.</para>



   <para>You will have to be root to continue, so enter the
   following at the prompt: <command>su - root</command>.&nbsp; After you
   have logged in as the root user, your prompt will change
   accordingly.&nbsp; For example:</para>

<screen>
    $ su - root
    Password: <emphasis>&lt;enter your password here, and press
   enter&gt;</emphasis>
   [root@laptop root]#
</screen>
    <para>You now have to edit some files under
   <filename>/etc</filename> to have the USB memory key automatically
   mounted each time it is inserted, and unmounted when you remove
   it.</para>


   <para>Create a new directory in <filename>/mnt</filename> named
   <filename>removable</filename>. For example:</para>


      <screen>    $ mkdir /mnt/removable</screen>

<para>
    The directory will be required for the auto mounting of your
   USB memory key to function properly.
   </para>

   <para>Using your favourite text editor, create a new file under
   the <filename>/etc</filename> directory, and name it
   <command>auto.removable</command>. For example, I like using
   vi:</para>

      <screen>  $ vi /etc/auto.removable</screen>
<para>    In this new file, you will describe the filesystems that
   will be automatically mounted using the <command>autofs</command>
   service.&nbsp; In this case, the filesystem is the USB memory
   key in your USB port.
   </para>

   <para>With the file open in your text editor, type in the
   following:</para>

	<screen>$usbkey -fstype=vfat,umask=000
   :/dev/<emphasis>[your-usb-device]</emphasis>
</screen>

<para>    Replace <emphasis>[your-usb-device]</emphasis> with the device ID you
   wrote down in Step 5.&nbsp; For example, on my system, the
	USB memory key is always assigned <filename>/dev/sdb1</filename>. In my
	<filename>auto.removable </filename>file, I therefore use <filename>/dev/sdb</filename>, like so:</para>


      <screen>
   $ usbkey -fstype=vfat,umask=000 :/dev/sdb
</screen>
<para>    That is not a mistake.&nbsp; I intentionally use /dev/sdb
	because <filename>/dev/sdb1</filename>, as reported by the Hardware Browser, means
	the first PARTITION on the <filename>/dev/sdb</filename> hard drive.&nbsp; Since
   this is a USB memory key without any partitions, mounting
	<filename>/dev/sdb1</filename> will not work. [Please note that this is an overly
   simplified explanation.]</para>

   <para>Save the file and exit your editor.

   </para>

   <para>Now using your favourite text editor again, edit the file
   <filename>/etc/auto.master</filename>.&nbsp; For example:
</para>

      <screen>$ vi /etc/auto.master
</screen>

<para>    This file should already exist on your Fedora Core 2
   system.&nbsp; It controls what gets mounted and where by
   referencing the files specified.&nbsp; In this case, you will
   be refrencing the /etc/auto.removable file you just
   created.</para>

   <para>With the file open in your text editor, type in the
   following:</para>

      <screen>    /mnt/removable /etc/auto.removable --timeout=1
</screen>
<para>    This will tell the autofs daemon to mount the filesystem
   specified in <filename>/etc/auto.removable</filename> at the mount point
   <filename>/mnt/removable</filename> whenever it is accessed, and to unmount
   the filesystem one second after non-use.</para>

   <para>Save the file and exit the editor.</para>

   <para>Restart the autofs service.&nbsp; For example:</para>

      <screen> $ service autofs restart
</screen>

   <para> This will cause autofs to read the new parameters in
   <filename>/etc/auto.master</filename>.</para>

   <para>You should now be able to access your USB memory
   key.&nbsp; Try changing directories to the USB memory key's
   mount point by doing the following:</para>

      <screen> $ cd /mnt/removable/usbkey</screen>

    <para>If the automatic mount was successful, you should be taken
   to the USB memory key.&nbsp; Your prompt may change as well
   to signify the directory change:</para>
   
<para>
  You can now create files, directories, or do anything else
  that you would normally do with your hard disks.&nbsp; Keep in
  mind that when you change directories and are not accessing
  the USB memory key for more than one second, it will be
  automatically unmounted by autofs.&nbsp; Once it is unmounted,
  it is safe to remove the USB memory key from the USB
  port.&nbsp; The USB memory key will also be accesible by all
  users, so you do not have to login as root to use it.</para>
<para>   
   I have not fully explained what each option in the files
  above mean or do, nor have I provided alternative
  configuration options.&nbsp; I highly recommend that you use
  this How-To as a basis for your own custom setup.&nbsp; If you
  are feeling confident, or just want to learn more, I encourage
  you to spend some time reading the following man pages and
  websites.</para>

   


   <para>man Pages
   </para>

   <itemizedlist>
    
     <listitem>
      <para>autofs</para>

     </listitem>
    

    
     <listitem>
      <para>auto.master</para>
     </listitem>
    

    
     <listitem>
      <para>mount</para>
     </listitem>
    

    
     <listitem>
      <para>automount</para>

     </listitem>
    
</itemizedlist>


   <para>Web Sites</para>

   <itemizedlist>
    
     <listitem>

      <para><ulink
      url="http://www.marlow.dk/tech/usbkeys.php";>Bootable USB
      keys</ulink>
       [http://www.marlow.dk/tech/usbkeys.php]</para>

      <para><ulink
      url="http://users.actrix.co.nz/michael/usbmount.html";>Usb-mount:
      A desktop user interface to USB storage</ulink>
       [http://users.actrix.co.nz/michael/usbmount.html]</para>

      <para><ulink
      url="http://www.tldp.org/HOWTO/Flash-Memory-HOWTO/";>USB
      Flash Memory HOWTO</ulink>

       [http://www.tldp.org/HOWTO/Flash-Memory-HOWTO/]
      </para>
     </listitem>
    </itemizedlist>
<para>
  USB memory keys are great removable storage devices.&nbsp; It
  is unfortunate that sometimes it is a struggle to get them to
  work with Linux desktops.&nbsp; I hope this How-To has
  clarified some of the mystery around how to use them with
  Fedora Core 2.&nbsp; Above all, have fun!</para>
 
</sect2>
</sect1>
</article>


[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Red Hat 9]     [Yosemite News]     [KDE Users]

  Powered by Linux