4301 lines
76 KiB
HTML
4301 lines
76 KiB
HTML
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>USB Flash Memory HOWTO</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
|
|
><BODY
|
|
CLASS="article"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="ARTICLE"
|
|
><DIV
|
|
CLASS="TITLEPAGE"
|
|
><H1
|
|
CLASS="title"
|
|
><A
|
|
NAME="AEN2"
|
|
></A
|
|
>USB Flash Memory HOWTO</H1
|
|
><H3
|
|
CLASS="author"
|
|
><A
|
|
NAME="AEN4"
|
|
> Niko Sauer</A
|
|
></H3
|
|
><DIV
|
|
CLASS="affiliation"
|
|
><SPAN
|
|
CLASS="orgname"
|
|
> Unit of Advanced Study<BR></SPAN
|
|
><SPAN
|
|
CLASS="orgdiv"
|
|
> University of Pretoria, South Africa<BR></SPAN
|
|
><DIV
|
|
CLASS="address"
|
|
><P
|
|
CLASS="address"
|
|
><br>
|
|
<TT
|
|
CLASS="email"
|
|
><<A
|
|
HREF="mailto: nikos@friedrichs.up.ac.za"
|
|
> nikos@friedrichs.up.ac.za</A
|
|
>></TT
|
|
><br>
|
|
</P
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="revhistory"
|
|
><TABLE
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
><TR
|
|
><TH
|
|
ALIGN="LEFT"
|
|
VALIGN="TOP"
|
|
COLSPAN="3"
|
|
><B
|
|
>Revision History</B
|
|
></TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
ALIGN="LEFT"
|
|
>Revision 0.06</TD
|
|
><TD
|
|
ALIGN="LEFT"
|
|
>2004-03-10</TD
|
|
><TD
|
|
ALIGN="LEFT"
|
|
>Revised by: ns</TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
ALIGN="LEFT"
|
|
COLSPAN="3"
|
|
>Added section on Linux-2.6.</TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
ALIGN="LEFT"
|
|
>Revision 0.05</TD
|
|
><TD
|
|
ALIGN="LEFT"
|
|
>2003-12-26</TD
|
|
><TD
|
|
ALIGN="LEFT"
|
|
>Revised by: ejh</TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
ALIGN="LEFT"
|
|
COLSPAN="3"
|
|
>Technical review.</TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
ALIGN="LEFT"
|
|
>Revision 0.04</TD
|
|
><TD
|
|
ALIGN="LEFT"
|
|
>2003-12-11</TD
|
|
><TD
|
|
ALIGN="LEFT"
|
|
>Revised by: ns</TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
ALIGN="LEFT"
|
|
COLSPAN="3"
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
ALIGN="LEFT"
|
|
>Revision 0.03</TD
|
|
><TD
|
|
ALIGN="LEFT"
|
|
>2003-12-02</TD
|
|
><TD
|
|
ALIGN="LEFT"
|
|
>Revised by: ejh</TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
ALIGN="LEFT"
|
|
COLSPAN="3"
|
|
>Technical review.</TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
ALIGN="LEFT"
|
|
>Revision 0.02</TD
|
|
><TD
|
|
ALIGN="LEFT"
|
|
>2003-10-30</TD
|
|
><TD
|
|
ALIGN="LEFT"
|
|
>Revised by: ns</TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
ALIGN="LEFT"
|
|
COLSPAN="3"
|
|
>Changed 2003-11-20</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
><DIV
|
|
><DIV
|
|
CLASS="abstract"
|
|
><A
|
|
NAME="AEN37"
|
|
></A
|
|
><P
|
|
></P
|
|
><P
|
|
> This document describes procedures for installing USB Flash
|
|
Memory devices and the way of formatting them for various file
|
|
systems such as vfat (the way they usually come) and ext2 (the
|
|
way they fit in better with Linux). It is also described how to
|
|
partition the device in two sections with different file types.
|
|
</P
|
|
><P
|
|
></P
|
|
></DIV
|
|
></DIV
|
|
><HR></DIV
|
|
><DIV
|
|
CLASS="TOC"
|
|
><DL
|
|
><DT
|
|
><B
|
|
>Table of Contents</B
|
|
></DT
|
|
><DT
|
|
>1. <A
|
|
HREF="#purpose"
|
|
>Purpose</A
|
|
></DT
|
|
><DT
|
|
>2. <A
|
|
HREF="#physical"
|
|
>Physical devices</A
|
|
></DT
|
|
><DT
|
|
>3. <A
|
|
HREF="#buying"
|
|
>Buying a memory stick</A
|
|
></DT
|
|
><DT
|
|
>4. <A
|
|
HREF="#reading"
|
|
>Reading</A
|
|
></DT
|
|
><DT
|
|
>5. <A
|
|
HREF="#hardware"
|
|
>Hardware and kernel</A
|
|
></DT
|
|
><DD
|
|
><DL
|
|
><DT
|
|
>5.1. <A
|
|
HREF="#setup"
|
|
>Setup</A
|
|
></DT
|
|
><DT
|
|
>5.2. <A
|
|
HREF="#kernel"
|
|
>Kernel options</A
|
|
></DT
|
|
><DT
|
|
>5.3. <A
|
|
HREF="#notes"
|
|
>Notes</A
|
|
></DT
|
|
></DL
|
|
></DD
|
|
><DT
|
|
>6. <A
|
|
HREF="#basics"
|
|
>Some basic concepts</A
|
|
></DT
|
|
><DD
|
|
><DL
|
|
><DT
|
|
>6.1. <A
|
|
HREF="#proc"
|
|
>The /proc filesystem</A
|
|
></DT
|
|
><DT
|
|
>6.2. <A
|
|
HREF="#scsidev"
|
|
>SCSI devices</A
|
|
></DT
|
|
><DT
|
|
>6.3. <A
|
|
HREF="#usbfs"
|
|
>The USB device filesystem</A
|
|
></DT
|
|
><DT
|
|
>6.4. <A
|
|
HREF="#ext2fs"
|
|
>The ext2 filesystem</A
|
|
></DT
|
|
><DT
|
|
>6.5. <A
|
|
HREF="#vfatfs"
|
|
>The vfat filesystem</A
|
|
></DT
|
|
><DT
|
|
>6.6. <A
|
|
HREF="#options"
|
|
>Explanation of command options</A
|
|
></DT
|
|
></DL
|
|
></DD
|
|
><DT
|
|
>7. <A
|
|
HREF="#verifications"
|
|
>Basic verifications</A
|
|
></DT
|
|
><DD
|
|
><DL
|
|
><DT
|
|
>7.1. <A
|
|
HREF="#quick"
|
|
>A quick check</A
|
|
></DT
|
|
><DT
|
|
>7.2. <A
|
|
HREF="#proc-probe"
|
|
>Probing the /proc filesystem</A
|
|
></DT
|
|
><DT
|
|
>7.3. <A
|
|
HREF="#mounting"
|
|
>Mounting the USB filesystem</A
|
|
></DT
|
|
><DT
|
|
>7.4. <A
|
|
HREF="#tests"
|
|
>Tests -- vfat</A
|
|
></DT
|
|
></DL
|
|
></DD
|
|
><DT
|
|
>8. <A
|
|
HREF="#ext2"
|
|
>Setting up an Ext2 filesystem</A
|
|
></DT
|
|
><DD
|
|
><DL
|
|
><DT
|
|
>8.1. <A
|
|
HREF="#partition"
|
|
>Partitioning</A
|
|
></DT
|
|
><DT
|
|
>8.2. <A
|
|
HREF="#making-ext2"
|
|
>Making an ext2 device</A
|
|
></DT
|
|
><DT
|
|
>8.3. <A
|
|
HREF="#tests4"
|
|
>Tests -- ext2</A
|
|
></DT
|
|
></DL
|
|
></DD
|
|
><DT
|
|
>9. <A
|
|
HREF="#mixed"
|
|
>Setting up a dual partition</A
|
|
></DT
|
|
><DD
|
|
><DL
|
|
><DT
|
|
>9.1. <A
|
|
HREF="#double-partition"
|
|
>Partitioning</A
|
|
></DT
|
|
><DT
|
|
>9.2. <A
|
|
HREF="#both"
|
|
>Making a dual ext2/vfat system</A
|
|
></DT
|
|
><DT
|
|
>9.3. <A
|
|
HREF="#mixed-tests"
|
|
>Tests -- ext2 and vfat</A
|
|
></DT
|
|
><DT
|
|
>9.4. <A
|
|
HREF="#config-linux"
|
|
>Configuring Linux for the dual partition</A
|
|
></DT
|
|
></DL
|
|
></DD
|
|
><DT
|
|
>10. <A
|
|
HREF="#users"
|
|
>Making the memory stick accessible to users</A
|
|
></DT
|
|
><DT
|
|
>11. <A
|
|
HREF="#maintain"
|
|
>Maintenance</A
|
|
></DT
|
|
><DD
|
|
><DL
|
|
><DT
|
|
>11.1. <A
|
|
HREF="#fs-inspect"
|
|
>Filesystem inspection</A
|
|
></DT
|
|
><DT
|
|
>11.2. <A
|
|
HREF="#and-then"
|
|
>And then?</A
|
|
></DT
|
|
></DL
|
|
></DD
|
|
><DT
|
|
>12. <A
|
|
HREF="#linux-2.6"
|
|
>The Linux-2.6 kernel</A
|
|
></DT
|
|
><DD
|
|
><DL
|
|
><DT
|
|
>12.1. <A
|
|
HREF="#What-is-new"
|
|
>What is new?</A
|
|
></DT
|
|
><DT
|
|
>12.2. <A
|
|
HREF="#kernel-options"
|
|
>Kernel options</A
|
|
></DT
|
|
><DT
|
|
>12.3. <A
|
|
HREF="#notes-2.6"
|
|
>Notes</A
|
|
></DT
|
|
><DT
|
|
>12.4. <A
|
|
HREF="#hotplug"
|
|
>Hotplugging and Naming</A
|
|
></DT
|
|
></DL
|
|
></DD
|
|
><DT
|
|
>13. <A
|
|
HREF="#formal"
|
|
>Formalities</A
|
|
></DT
|
|
><DD
|
|
><DL
|
|
><DT
|
|
>13.1. <A
|
|
HREF="#copyright"
|
|
>Copyright Information</A
|
|
></DT
|
|
><DT
|
|
>13.2. <A
|
|
HREF="#disclaimer"
|
|
>Disclaimer</A
|
|
></DT
|
|
><DT
|
|
>13.3. <A
|
|
HREF="#credits"
|
|
>Credits</A
|
|
></DT
|
|
><DT
|
|
>13.4. <A
|
|
HREF="#feedback"
|
|
>Feedback</A
|
|
></DT
|
|
></DL
|
|
></DD
|
|
></DL
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect1"
|
|
><H1
|
|
CLASS="sect1"
|
|
><A
|
|
NAME="purpose"
|
|
></A
|
|
>1. Purpose</H1
|
|
><P
|
|
> The purpose of this document is to describe procedures for
|
|
implementing USB flash memory devices (memory sticks) on
|
|
Linux. This entails the following:
|
|
</P
|
|
><P
|
|
></P
|
|
><UL
|
|
><LI
|
|
><P
|
|
> making over-the-counter devices, pre-formatted for the MS
|
|
Windows system, work on Linux;
|
|
</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
> formatting the device in the ext2 filesystem on a single
|
|
partition and making it work. This is intended for situations
|
|
where the device will be used exclusively on Linux machines;
|
|
</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
> formatting the device on a dual partition in the ext2 and
|
|
vfat filesystems and making it work. The purpose of this
|
|
is for situations where Linux + Linux and Linux + Windows are
|
|
possible;
|
|
</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
> making the device more user friendly;
|
|
</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
> maintaining the filesystem of the device;
|
|
</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
> using additional features of Linux-2.6.x.
|
|
</P
|
|
></LI
|
|
></UL
|
|
><P
|
|
> The procedures described in this document should work on
|
|
any USB memory stick device which can be operated as a read-write
|
|
device. Read-only devices do not fall in this category. The
|
|
procedures will not work if the write facility of the device is
|
|
disabled (i.e. if the write protect switch is on).
|
|
</P
|
|
><P
|
|
> The procedures described for formatting and maintenance in
|
|
particular filesystems may (in principle) be adapted for other
|
|
filesystems such as ext3 and reiserfs. These have not been tried
|
|
and tested. Neither has any attention been paid to adaptation of
|
|
the procedures to other related operating systems.
|
|
</P
|
|
><DIV
|
|
CLASS="warning"
|
|
><P
|
|
></P
|
|
><TABLE
|
|
CLASS="warning"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="25"
|
|
ALIGN="CENTER"
|
|
VALIGN="TOP"
|
|
><IMG
|
|
SRC="../images/warning.gif"
|
|
HSPACE="5"
|
|
ALT="Warning"></TD
|
|
><TD
|
|
ALIGN="LEFT"
|
|
VALIGN="TOP"
|
|
><P
|
|
> It may be dangerous to re-format the flash memory
|
|
intended for a digital camera. The camera may then be unable to
|
|
understand it. Use the camera's built-in menu system to do this
|
|
reformatting for you.
|
|
|
|
</P
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect1"
|
|
><HR><H1
|
|
CLASS="sect1"
|
|
><A
|
|
NAME="physical"
|
|
></A
|
|
>2. Physical devices</H1
|
|
><P
|
|
> Flash memory devices come mainly in the form of small, portable
|
|
devices often referred to as <EM
|
|
>memory sticks</EM
|
|
> or
|
|
<EM
|
|
>keychains</EM
|
|
>, and as part of digital
|
|
cameras. They are <EM
|
|
>non-volatile devices</EM
|
|
> which
|
|
operate on the principle that electric charges are used to
|
|
represent data in binary format. These charges can remain
|
|
unchanged almost indefinitely, but changes (such as writing to the
|
|
device) limit the life span of the device (100000 writes of 8MB
|
|
each).
|
|
</P
|
|
><P
|
|
>
|
|
Memory sticks plug directly into a USB-port at the back of your
|
|
computer. The power it needs is supplied by the USB-port. It is
|
|
sometimes convenient to use a USB-extension cable to bring the
|
|
device within easy reach.
|
|
</P
|
|
><P
|
|
> Memory sticks usually have <EM
|
|
>write protect
|
|
switches</EM
|
|
> which should be turned off if you want to use
|
|
it as read-write device. If the switch is in the <SPAN
|
|
CLASS="QUOTE"
|
|
>"on"</SPAN
|
|
> position,
|
|
the device is <EM
|
|
>read-only</EM
|
|
>. The devices are
|
|
usually equipped with a led (light emitting diode), which
|
|
indicates that the device is operational. The led also flickers
|
|
while data is being transferred to or from the device.
|
|
</P
|
|
><P
|
|
> Digital cameras use flash memory for image storage. These are
|
|
powered by the camera and connected to the computer's USB-port via
|
|
an electronic interface. To be able to connect to the computer,
|
|
the camera's power must be turned on for the duration of the
|
|
interfacing, and should only be turned off after the device had
|
|
been unmounted from the computer. It is important to remember that
|
|
the device takes power from the camera's battery. The operation
|
|
should therefore be terminated as soon as possible.
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect1"
|
|
><HR><H1
|
|
CLASS="sect1"
|
|
><A
|
|
NAME="buying"
|
|
></A
|
|
>3. Buying a memory stick</H1
|
|
><P
|
|
> Important considerations when buying a memory stick are the
|
|
following:
|
|
</P
|
|
><P
|
|
></P
|
|
><DIV
|
|
CLASS="variablelist"
|
|
><DL
|
|
><DT
|
|
><STRONG
|
|
>The size of the memory</STRONG
|
|
></DT
|
|
><DD
|
|
><P
|
|
> This will depend on whatever use you have in mind. 128MB seems to be
|
|
a popular choice.
|
|
</P
|
|
></DD
|
|
><DT
|
|
><STRONG
|
|
>Is it known to work on Linux?</STRONG
|
|
></DT
|
|
><DD
|
|
><P
|
|
> The established brands have web sites in which this may be stated
|
|
explicitly. Alternatively, ask the supplier. But beware: the sales
|
|
person may not know what you are talking about. The instruction
|
|
leaflet may also mention something like: Works on Linux-2.4, or
|
|
may have a picture of the Linux penguin. If these inquiries fail, it
|
|
may be wise not to buy.
|
|
</P
|
|
></DD
|
|
><DT
|
|
><STRONG
|
|
>Extension cable and keychain</STRONG
|
|
></DT
|
|
><DD
|
|
><P
|
|
> Memory sticks usually are packaged with an extension cable
|
|
(<A
|
|
HREF="#physical"
|
|
>Section 2</A
|
|
>) and a keychain. The latter provides
|
|
a safe and with-it way of transporting the device. Make sure that
|
|
these are included. You may need an additional extension cable,
|
|
depending on circumstances. Laptop and notebook computers usually
|
|
don't need them.
|
|
</P
|
|
></DD
|
|
><DT
|
|
><STRONG
|
|
>File system</STRONG
|
|
></DT
|
|
><DD
|
|
><P
|
|
> Over-the-counter memory sticks are usually formatted in vfat
|
|
(msdos), and this will work in Linux, but you will not have the
|
|
strength and versatility of the standard ext2 (or other) file
|
|
system. This is not a problem. It can be endowed with other file
|
|
systems as will be described later in this document.
|
|
</P
|
|
></DD
|
|
><DT
|
|
><STRONG
|
|
>Cost</STRONG
|
|
></DT
|
|
><DD
|
|
><P
|
|
> Prices of memory sticks of a given size may vary considerably. It
|
|
is a good idea to find out what that range is. The internet is
|
|
excellent for the purpose.
|
|
</P
|
|
></DD
|
|
></DL
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect1"
|
|
><HR><H1
|
|
CLASS="sect1"
|
|
><A
|
|
NAME="reading"
|
|
></A
|
|
>4. Reading</H1
|
|
><P
|
|
>
|
|
Users of this document might want to acquaint themselves with
|
|
the following:
|
|
<A
|
|
NAME="AEN104"
|
|
HREF="#FTN.AEN104"
|
|
><SPAN
|
|
CLASS="footnote"
|
|
>[1]</SPAN
|
|
></A
|
|
>
|
|
</P
|
|
><P
|
|
></P
|
|
><UL
|
|
COMPACT="COMPACT"
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
> Manual pages of the following tools:
|
|
<SPAN
|
|
CLASS="application"
|
|
>mount</SPAN
|
|
>,
|
|
<SPAN
|
|
CLASS="application"
|
|
>umount</SPAN
|
|
>, <SPAN
|
|
CLASS="application"
|
|
>fdisk</SPAN
|
|
>, <SPAN
|
|
CLASS="application"
|
|
>mke2fs</SPAN
|
|
>, <SPAN
|
|
CLASS="application"
|
|
>mkdosfs</SPAN
|
|
>,
|
|
<SPAN
|
|
CLASS="application"
|
|
>dumpe2fs</SPAN
|
|
>> and <SPAN
|
|
CLASS="application"
|
|
>fsck.ext2</SPAN
|
|
>.
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
> <A
|
|
HREF="http://www.tldp.org"
|
|
TARGET="_top"
|
|
> Linux documentation project
|
|
</A
|
|
>
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
> <A
|
|
HREF="http://www.tldp.org/HOWTO/USB-Digital-Camera-HOWTO"
|
|
TARGET="_top"
|
|
> USB-Digital Camera HOWTO
|
|
</A
|
|
>*
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
> <A
|
|
HREF="http://www.tldp.org/HOWTO/Partition"
|
|
TARGET="_top"
|
|
> The Linux
|
|
Partition HOWTO
|
|
</A
|
|
>*
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
> <A
|
|
HREF="http://www.tldp.org/HOWTO/The Linux SCSI-2.4-HOWTO"
|
|
TARGET="_top"
|
|
> The Linux 2.4 SCSI subsystem HOWTO
|
|
</A
|
|
>
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
> <A
|
|
HREF="http://www.tldp.org/HOWTO/Kernel-HOWTO"
|
|
TARGET="_top"
|
|
> The Linux Kernel HOWTO
|
|
</A
|
|
>
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
> <A
|
|
HREF="http://www.linux-usb.org/USB-guide/book1.html"
|
|
TARGET="_top"
|
|
> The Linux USB subsystem
|
|
</A
|
|
>*
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
> <A
|
|
HREF="http://www.tldp.org/guides.html"
|
|
TARGET="_top"
|
|
> Linux filesystem hierarchy
|
|
</A
|
|
>
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
> <A
|
|
HREF="http://www.tldp.org/guides.html"
|
|
TARGET="_top"
|
|
> The Linux Kernel
|
|
</A
|
|
>
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
> Linux Kernel 2.4.xx/Documentation (should be in
|
|
<TT
|
|
CLASS="filename"
|
|
> /usr/src/linux/Documentation</TT
|
|
> )
|
|
</SPAN
|
|
></LI
|
|
></UL
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect1"
|
|
><HR><H1
|
|
CLASS="sect1"
|
|
><A
|
|
NAME="hardware"
|
|
></A
|
|
>5. Hardware and kernel</H1
|
|
><DIV
|
|
CLASS="sect2"
|
|
><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="setup"
|
|
></A
|
|
>5.1. Setup</H2
|
|
><P
|
|
> This is a description of the salient features of the setup used to
|
|
develop the procedures described below. All the procedures have
|
|
been tried and tested, also for Linux-2.6. The screen-like
|
|
displays are precise copies of what appeared on my screen.
|
|
</P
|
|
><P
|
|
></P
|
|
><UL
|
|
COMPACT="COMPACT"
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
> Hardware: Intel (R) Celeron (TM) 1100 MHz
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
> Distribution: RedHat Linux 7.0 (extensively modified)
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
> Kernel: Linux-2.4.20 (from www.kernel.org). See also
|
|
<A
|
|
HREF="#linux-2.6"
|
|
>Section 12</A
|
|
> for Linux-2.6.x.
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
> Tools: util-linux-2.11z (<SPAN
|
|
CLASS="application"
|
|
>mount</SPAN
|
|
>, <SPAN
|
|
CLASS="application"
|
|
>umount</SPAN
|
|
>, <SPAN
|
|
CLASS="application"
|
|
>fdisk</SPAN
|
|
>);
|
|
e2fsprogs-1.32 (<SPAN
|
|
CLASS="application"
|
|
>mke2fs</SPAN
|
|
>, <SPAN
|
|
CLASS="application"
|
|
>dumpe2fs</SPAN
|
|
>, <SPAN
|
|
CLASS="application"
|
|
>fsck.ext2</SPAN
|
|
>);
|
|
mkdosfs-2.2
|
|
</SPAN
|
|
></LI
|
|
></UL
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="kernel"
|
|
></A
|
|
>5.2. Kernel options</H2
|
|
><P
|
|
> It is uncertain if USB-support is sufficient in kernels earlier
|
|
than 2.4.xx. The following support, relevant to this document, was
|
|
compiled into the kernel. A modular approach may also be followed.
|
|
</P
|
|
><DIV
|
|
CLASS="sect3"
|
|
><HR><H3
|
|
CLASS="sect3"
|
|
><A
|
|
NAME="scsi"
|
|
></A
|
|
>5.2.1. SCSI support</H3
|
|
><P
|
|
></P
|
|
><UL
|
|
COMPACT="COMPACT"
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
> SCSI support (CONFIG_SCSI scsi_mod.o)</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
> SCSI disk support (CONFIG_BLK_DEV_SD sd_mod.o)</SPAN
|
|
></LI
|
|
></UL
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect3"
|
|
><HR><H3
|
|
CLASS="sect3"
|
|
><A
|
|
NAME="fss"
|
|
></A
|
|
>5.2.2. File systems</H3
|
|
><P
|
|
></P
|
|
><UL
|
|
COMPACT="COMPACT"
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
> DOS FAT fs support (CONFIG_FAT_FS fat.o)</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
> MSDOS fs support (CONFIG_MSDOS_FS msdos.o)</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
>
|
|
VFAT (Windows 95) fs support (CONFIG_VFAT_FS vfat.o)
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
> /proc filesystem (CONFIG_PROC_FS)</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
>
|
|
Second extended fs support (ext2fs) (CONFIG_EXT2_FS ext2.o)
|
|
</SPAN
|
|
></LI
|
|
></UL
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect3"
|
|
><HR><H3
|
|
CLASS="sect3"
|
|
><A
|
|
NAME="usb"
|
|
></A
|
|
>5.2.3. USB support</H3
|
|
><P
|
|
></P
|
|
><UL
|
|
COMPACT="COMPACT"
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
> Support for USB (CONFIG_USB usbcore.o)</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
>
|
|
Preliminary USB device filesystem (CONFIG_USB_DEVICEFS)
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
>
|
|
USB Mass Storage support (CONFIG_USB_STORAGE usb-storage.o)
|
|
</SPAN
|
|
></LI
|
|
></UL
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="notes"
|
|
></A
|
|
>5.3. Notes</H2
|
|
><P
|
|
> In the lists above the entities in uppercase refer to the
|
|
variable names to be found in the <TT
|
|
CLASS="filename"
|
|
>.config</TT
|
|
>
|
|
file in the upper level directory of the kernel source (<TT
|
|
CLASS="filename"
|
|
>/usr/src/linux/</TT
|
|
>). The entities
|
|
<TT
|
|
CLASS="filename"
|
|
>xxx.o</TT
|
|
> refer to the modules created when a
|
|
modular approach is followed. When there is no reference to a
|
|
module, the option can only be hard-compiled into the kernel.
|
|
</P
|
|
><P
|
|
> Different kernel versions may have different indications of
|
|
options when, for example, <EM
|
|
>make menuconfig</EM
|
|
>
|
|
or <EM
|
|
> make xconfig</EM
|
|
> are run. Variables such
|
|
as CONFIG_USB, which can be gleaned from the various <EM
|
|
> help</EM
|
|
> options, may be a more reliable indication.
|
|
</P
|
|
><P
|
|
> Very recent Linux distributions such as
|
|
<EM
|
|
>RedHat</EM
|
|
> and <EM
|
|
>SuSE</EM
|
|
>
|
|
probably have the appropriate kernel options compiled in.
|
|
</P
|
|
><P
|
|
> Under USB-support, options for a number of digital cameras are
|
|
available.
|
|
</P
|
|
><P
|
|
> Please consult the relevant texts as set out in
|
|
<A
|
|
HREF="#reading"
|
|
>Section 4</A
|
|
> if you consider (re)compiling your
|
|
kernel.
|
|
</P
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect1"
|
|
><HR><H1
|
|
CLASS="sect1"
|
|
><A
|
|
NAME="basics"
|
|
></A
|
|
>6. Some basic concepts</H1
|
|
><P
|
|
> In this section we discuss in a very brief manner, some basic
|
|
Linux concepts which should contribute to an understanding of the
|
|
procedures described below.
|
|
</P
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="proc"
|
|
></A
|
|
>6.1. The /proc filesystem</H2
|
|
><P
|
|
> The /proc filesystem serves as a window through which we can see
|
|
the workings of a Linux setup. The objects of most interest for
|
|
this document are the directories<TT
|
|
CLASS="filename"
|
|
>/proc/bus/usb/</TT
|
|
> and <TT
|
|
CLASS="filename"
|
|
>/proc/scsi/</TT
|
|
>. These will be used to
|
|
verify that the kernel had been set up properly for our purpose
|
|
(<A
|
|
HREF="#proc-probe"
|
|
>Section 7.2</A
|
|
>).
|
|
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="scsidev"
|
|
></A
|
|
>6.2. SCSI devices</H2
|
|
><P
|
|
> Your memory stick will be considered as a USB mass storage device
|
|
posing as a removable SCSI disk (sd). SCSI disk devices are
|
|
mapped to the <TT
|
|
CLASS="filename"
|
|
> /dev</TT
|
|
>
|
|
(devices) directory under <TT
|
|
CLASS="filename"
|
|
> /dev/sda</TT
|
|
> , <TT
|
|
CLASS="filename"
|
|
> /dev/sdb</TT
|
|
> , ... When different disk devices are present,
|
|
they will be mapped to <TT
|
|
CLASS="filename"
|
|
>/dev/sda</TT
|
|
>,
|
|
<TT
|
|
CLASS="filename"
|
|
>/dev/sdb</TT
|
|
>, etc. If, for example, a memory
|
|
stick and a digital camera are plugged in, the one would be mapped
|
|
to <TT
|
|
CLASS="filename"
|
|
>/dev/sda</TT
|
|
> and the other to
|
|
<TT
|
|
CLASS="filename"
|
|
>/dev/sdb</TT
|
|
>. Tests have indicated that the first
|
|
device to be detected is mapped to <TT
|
|
CLASS="filename"
|
|
>sda</TT
|
|
> and
|
|
represented in the directory <TT
|
|
CLASS="filename"
|
|
>/proc/scsi/usb-storage-0</TT
|
|
>. The second
|
|
will be mapped to <TT
|
|
CLASS="filename"
|
|
>sdb</TT
|
|
> and represented in
|
|
<TT
|
|
CLASS="filename"
|
|
>/proc/scsi/usb-storage-0</TT
|
|
>.
|
|
What will happen when both devices are present at boot-up, is not
|
|
known. An overview of the partitions relevant to this document,
|
|
the file <TT
|
|
CLASS="filename"
|
|
>/proc/partitions</TT
|
|
> may be consulted.
|
|
Look for entries like <TT
|
|
CLASS="filename"
|
|
>sda, sda1, sdb</TT
|
|
>. Under
|
|
the Linux-2.6 series of kernels this problem may be very neatly
|
|
resolved (<A
|
|
HREF="#linux-2.6"
|
|
>Section 12</A
|
|
>).
|
|
|
|
|
|
</P
|
|
><P
|
|
> In the descriptions further on, it will be assumed that only one
|
|
memory stick is present, and therefore mapped to
|
|
<TT
|
|
CLASS="filename"
|
|
>/dev/sda</TT
|
|
>.
|
|
</P
|
|
><P
|
|
> In most distributions these points exist in abundance. You should
|
|
check that this is the case in your setup
|
|
(<TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>ls</B
|
|
> /dev/sda*</B
|
|
></TT
|
|
>. If there are none you can create them by
|
|
doing (as root, indicated by the hash).
|
|
</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> <TT
|
|
CLASS="prompt"
|
|
>#</TT
|
|
> <TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>mknod</B
|
|
> /dev/sda b 8 0</B
|
|
></TT
|
|
>
|
|
<TT
|
|
CLASS="prompt"
|
|
>#</TT
|
|
> <TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>mknod</B
|
|
> /dev/sda1 b 8 1</B
|
|
></TT
|
|
>
|
|
<TT
|
|
CLASS="prompt"
|
|
>#</TT
|
|
> <TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>mknod</B
|
|
> /dev/sda2 b 8 2</B
|
|
></TT
|
|
>
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
> etc, up to <TT
|
|
CLASS="filename"
|
|
>/dev/sda15</TT
|
|
> if necessary. The
|
|
device as a whole is mapped to <TT
|
|
CLASS="filename"
|
|
>/dev/sda</TT
|
|
>,
|
|
while <TT
|
|
CLASS="filename"
|
|
>/dev/sdax (x = 1 ... 15)</TT
|
|
> represent
|
|
the various partitions of the device. We shall describe, later on,
|
|
how to create different partitions for different file systems (see
|
|
<A
|
|
HREF="#ext2"
|
|
>Section 8</A
|
|
> and <A
|
|
HREF="#mixed"
|
|
>Section 9</A
|
|
> ). If you
|
|
intend to use your memory stick with a single partition
|
|
(filesystem), <TT
|
|
CLASS="filename"
|
|
>/dev/sda1</TT
|
|
> is sufficient.
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="usbfs"
|
|
></A
|
|
>6.3. The USB device filesystem</H2
|
|
><P
|
|
> This dynamically generated filesystem should be mounted at
|
|
<TT
|
|
CLASS="filename"
|
|
>/proc/bus/usb/</TT
|
|
>. It is
|
|
therefore essential that this mount point exists. Once it is
|
|
mounted, there should be more to be seen in <TT
|
|
CLASS="filename"
|
|
>/proc/bus/usb/</TT
|
|
> and in <TT
|
|
CLASS="filename"
|
|
>/proc/scsi/</TT
|
|
> (<A
|
|
HREF="#mounting"
|
|
>Section 7.3</A
|
|
>). To find out which USB devices are
|
|
present, read the file <TT
|
|
CLASS="filename"
|
|
>/proc/bus/usb/devices</TT
|
|
>
|
|
(<B
|
|
CLASS="command"
|
|
> less /proc/bus/usb/devices</B
|
|
>). It takes a
|
|
small effort to interpret the writing on the screen, but it is
|
|
not difficult. A memory stick is indicated by <EM
|
|
>Mass
|
|
Storage Device</EM
|
|
>.
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="ext2fs"
|
|
></A
|
|
>6.4. The ext2 filesystem</H2
|
|
><P
|
|
> The ext2 (second extended) filesystem still is the most prevalent
|
|
in Linux setups. It is most versatile and sophisticated, carrying
|
|
with it permissions (read-write-execute, who is permitted to do
|
|
what), ownership (user, group, others), a timestamp (when last
|
|
modified), etc. Moreover, tools for the proper maintenance of a
|
|
device endowed with ext2, exist (<A
|
|
HREF="#maintain"
|
|
>Section 11</A
|
|
>). If
|
|
a flash memory device is to be used exclusively within Linux
|
|
setups, it is therefore desirable to format it in ext2 (see <A
|
|
HREF="#ext2"
|
|
>Section 8</A
|
|
>).
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="vfatfs"
|
|
></A
|
|
>6.5. The vfat filesystem</H2
|
|
><P
|
|
> Enabling vfat in the kernel makes it possible to mount
|
|
filesystems created under Dos/Windows to be mounted in a Linux
|
|
system. Most memory sticks are formatted for direct use on
|
|
Windows and should therefore be considered as vfat-formatted. The
|
|
vfat filesystem is less sophisticated than ext2 and will
|
|
therefore be more economic as far as memory space is
|
|
concerned. It does not carry permissions in the same way as ext2
|
|
with the result that an ext2-file saved in vfat will re-appear
|
|
with its permissions changed. Nonetheless, if a memory stick is
|
|
to be used for the purpose of carrying data between Linux and
|
|
Windows machines, it is best to keep it in the vfat format. A
|
|
compromise is to partition the memory stick in two parts: one in
|
|
vfat and the other in ext2. At least the Linux machine should be
|
|
able to handle both. This is described in <A
|
|
HREF="#mixed"
|
|
>Section 9</A
|
|
>
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="options"
|
|
></A
|
|
>6.6. Explanation of command options</H2
|
|
><P
|
|
> Here is a short list of command options that occur in this
|
|
document:
|
|
</P
|
|
><P
|
|
></P
|
|
><UL
|
|
COMPACT="COMPACT"
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
>
|
|
<TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>mount</B
|
|
> -t ext2 /dev/sda1 /mnt/memstick</B
|
|
></TT
|
|
>
|
|
Mount in filetype ext2, device sda1 at mountpoint /mnt/memstick
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
>
|
|
<TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>ls</B
|
|
> -l</B
|
|
></TT
|
|
>
|
|
Make a complete list (modes, ownerships, etc.)
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
>
|
|
<TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>mkdosfs</B
|
|
> -F 32 /dev/sda1</B
|
|
></TT
|
|
>
|
|
Create an ms-dos filesystem, FAT-size 32, on the
|
|
partition /dev/sda1
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
>
|
|
<TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>ln</B
|
|
> -s /dev/sda1 /dev/flash</B
|
|
></TT
|
|
>
|
|
link, symbolically, the existing /dev/sda1 to
|
|
the symbolic /dev/flash
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
>
|
|
<TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>mkdir</B
|
|
> -m 777
|
|
/mnt/memstick/superdir</B
|
|
></TT
|
|
>
|
|
create a new directory with mode rwx for user, group and others
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
>
|
|
<TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>dumpe2fs</B
|
|
> -h /dev/sda1</B
|
|
></TT
|
|
>
|
|
Show the header of the ext2 partition /dev/sda1
|
|
</SPAN
|
|
></LI
|
|
></UL
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect1"
|
|
><HR><H1
|
|
CLASS="sect1"
|
|
><A
|
|
NAME="verifications"
|
|
></A
|
|
>7. Basic verifications</H1
|
|
><DIV
|
|
CLASS="important"
|
|
><P
|
|
></P
|
|
><TABLE
|
|
CLASS="important"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="25"
|
|
ALIGN="CENTER"
|
|
VALIGN="TOP"
|
|
><IMG
|
|
SRC="../images/important.gif"
|
|
HSPACE="5"
|
|
ALT="Important"></TD
|
|
><TD
|
|
ALIGN="LEFT"
|
|
VALIGN="TOP"
|
|
><P
|
|
> In order to make sure that the device you look at and write on is
|
|
the one intended, it is best to remove similar devices from
|
|
the USB-bus before starting these procedures.
|
|
</P
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="quick"
|
|
></A
|
|
>7.1. A quick check</H2
|
|
><P
|
|
> It is possible that your system is already set up for handling a
|
|
USB-flash memory device. To check this, simply issue the command
|
|
<TT
|
|
CLASS="prompt"
|
|
>$ </TT
|
|
><TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>mount</B
|
|
></B
|
|
></TT
|
|
> from an X-terminal. If something like
|
|
</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> none on /proc/bus/usb type usbfs (rw)
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
> appears among the output, you are ready to go to
|
|
<A
|
|
HREF="#tests"
|
|
>Section 7.4</A
|
|
> and proceed from there. It may be
|
|
virtuous, however, to glance through the intervening sections.
|
|
If the test is unsuccessful, all is not lost. Please read on.
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="proc-probe"
|
|
></A
|
|
>7.2. Probing the /proc filesystem</H2
|
|
><P
|
|
> A few things in the <TT
|
|
CLASS="filename"
|
|
> /proc</TT
|
|
>
|
|
directory can be checked so see if the kernel options have been
|
|
properly included or the appropriate modules properly inserted. As
|
|
a first check, see if the directory <TT
|
|
CLASS="filename"
|
|
>/proc/bus/usb</TT
|
|
> exists. If it does,
|
|
your kernel supports the USB-subsystem correctly. If this is not
|
|
the case the kernel has to be re-compiled with appropriate USB
|
|
support (see <A
|
|
HREF="#usb"
|
|
>Section 5.2.3</A
|
|
>) or the kernel has to be
|
|
updated. Next, check if the directory <TT
|
|
CLASS="filename"
|
|
>/proc/scsi</TT
|
|
> exists. If it does, you're
|
|
well-away. If it doesn't, SCSI support has not been compiled into
|
|
your kernel (see <A
|
|
HREF="#scsi"
|
|
>Section 5.2.1</A
|
|
>).
|
|
</P
|
|
><P
|
|
> In <TT
|
|
CLASS="filename"
|
|
> /proc</TT
|
|
> there should be
|
|
provision for a mount point for the USB filesystem. That point is
|
|
<TT
|
|
CLASS="filename"
|
|
> /proc/bus/usb</TT
|
|
>. If it
|
|
exists, the kernel is correctly set up.
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="mounting"
|
|
></A
|
|
>7.3. Mounting the USB filesystem</H2
|
|
><P
|
|
> If the verifications of the previous sections were positive, the
|
|
next step is to mount the USB filesystem. This is issued from root
|
|
as follows:
|
|
</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> <TT
|
|
CLASS="prompt"
|
|
># </TT
|
|
><TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>mount</B
|
|
> -t usbfs none /proc/bus/usb </B
|
|
></TT
|
|
>
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><DIV
|
|
CLASS="note"
|
|
><P
|
|
></P
|
|
><TABLE
|
|
CLASS="note"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="25"
|
|
ALIGN="CENTER"
|
|
VALIGN="TOP"
|
|
><IMG
|
|
SRC="../images/note.gif"
|
|
HSPACE="5"
|
|
ALT="Note"></TD
|
|
><TD
|
|
ALIGN="LEFT"
|
|
VALIGN="TOP"
|
|
><P
|
|
> In older kernel versions the mount command above may have to
|
|
be changed by replacing <TT
|
|
CLASS="parameter"
|
|
><I
|
|
>usbfs</I
|
|
></TT
|
|
> with
|
|
<TT
|
|
CLASS="parameter"
|
|
><I
|
|
>usbdevfs</I
|
|
></TT
|
|
>. In Linux-2.4.20 both forms work.
|
|
</P
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
><P
|
|
> If there are no complaints, do some more tests. The first is the
|
|
quick test (<A
|
|
HREF="#quick"
|
|
>Section 7.1</A
|
|
>). A deeper probe would be to
|
|
issue the command <TT
|
|
CLASS="prompt"
|
|
># </TT
|
|
><TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>ls</B
|
|
> -l /proc/bus/usb</B
|
|
></TT
|
|
> . This
|
|
should give something similar to
|
|
</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> dr-xr-xr-x 1 root root 0 Sep 19 14:21 001
|
|
dr-xr-xr-x 1 root root 0 Sep 19 14:21 002
|
|
-r--r--r-- 1 root root 0 Sep 19 22:30 devices
|
|
-r--r--r-- 1 root root 0 Sep 19 22:30 drivers
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
> The path <TT
|
|
CLASS="filename"
|
|
> /proc/scsi/usb-storage-0/</TT
|
|
> should now exist and one of
|
|
the files at the end will show this. In my setup the command
|
|
<TT
|
|
CLASS="prompt"
|
|
>$ </TT
|
|
><TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>less</B
|
|
> /proc/scsi/usb-storage-0/1</B
|
|
></TT
|
|
> gives
|
|
</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> Host scsi1: usb-storage
|
|
Vendor: Generic
|
|
Product: Mass Storage Device
|
|
Serial Number: None
|
|
Protocol: Transparent SCSI
|
|
Transport: Bulk
|
|
GUID: 0ed166800000000000000000
|
|
Attached: Yes/No
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
> If the flashdrive is present, the last line will have the entry
|
|
"Yes". If it is not plugged in, the entry will be "No".
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="tests"
|
|
></A
|
|
>7.4. Tests -- vfat</H2
|
|
><P
|
|
> You are now ready to find out if the memory stick is
|
|
working. Let us suppose that you bought it over the counter. Its
|
|
instruction leaflet will most likely tell you how to set it up for
|
|
Windows. That is an indication that it is formatted in vfat. Before
|
|
you try to mount it, create a mount point for it. Do something like
|
|
<TT
|
|
CLASS="prompt"
|
|
># </TT
|
|
><TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>mkdir</B
|
|
> -m 777
|
|
/mnt/memstick</B
|
|
></TT
|
|
>. The mounting command would most likely
|
|
be
|
|
</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> <TT
|
|
CLASS="prompt"
|
|
># </TT
|
|
><TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>mount</B
|
|
> -t vfat /dev/sda1 /mnt/memstick</B
|
|
></TT
|
|
>
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
>
|
|
If everything went smoothly, you should be able to see the device:
|
|
<TT
|
|
CLASS="prompt"
|
|
># </TT
|
|
><TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>ls</B
|
|
>
|
|
/mnt/memstick</B
|
|
></TT
|
|
>.
|
|
</P
|
|
><P
|
|
>
|
|
Now try some standard things like making a directory on the device
|
|
and copying a favourite text file to it:
|
|
</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> <TT
|
|
CLASS="prompt"
|
|
># </TT
|
|
><TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>mkdir</B
|
|
> /mnt/memstick/apollo </B
|
|
></TT
|
|
>
|
|
<TT
|
|
CLASS="prompt"
|
|
># </TT
|
|
><TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>cp</B
|
|
> /home/myname/myfavourite_file /mnt/memstick/apollo/.</B
|
|
></TT
|
|
>
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
>
|
|
List again (<TT
|
|
CLASS="prompt"
|
|
># </TT
|
|
><TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>ls</B
|
|
> -l /mnt/memstick</B
|
|
></TT
|
|
> ) and
|
|
pay attention to the permissions.
|
|
</P
|
|
><P
|
|
>
|
|
Unmount the device (<TT
|
|
CLASS="prompt"
|
|
>#
|
|
</TT
|
|
><TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>umount</B
|
|
>
|
|
/dev/sda1</B
|
|
></TT
|
|
> ) and mount it again as above. List again
|
|
and check the permissions. Most likely your favourite text file
|
|
will now have an x-permission. It became executable. That is
|
|
normal in the vfat filesystem. If you are happy with that,
|
|
unmount the device and skip to <A
|
|
HREF="#users"
|
|
>Section 10</A
|
|
> .
|
|
</P
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect1"
|
|
><HR><H1
|
|
CLASS="sect1"
|
|
><A
|
|
NAME="ext2"
|
|
></A
|
|
>8. Setting up an Ext2 filesystem</H1
|
|
><P
|
|
> The procedures described here will give the entire flash memory
|
|
device a single partition endowed with the ext2 filesystem. This
|
|
will make the device more suitable for use between Linux machines.
|
|
Don't do this if the device is supposed to operate between
|
|
Linux and Windows machines.
|
|
</P
|
|
><DIV
|
|
CLASS="important"
|
|
><P
|
|
></P
|
|
><TABLE
|
|
CLASS="important"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="25"
|
|
ALIGN="CENTER"
|
|
VALIGN="TOP"
|
|
><IMG
|
|
SRC="../images/important.gif"
|
|
HSPACE="5"
|
|
ALT="Important"></TD
|
|
><TD
|
|
ALIGN="LEFT"
|
|
VALIGN="TOP"
|
|
><P
|
|
> The device associated with <TT
|
|
CLASS="filename"
|
|
>/dev/sda</TT
|
|
> will be
|
|
re-formatted. Any data present on it will be destroyed. To make
|
|
sure that the device you work with is the one intended, remove
|
|
similar devices from the USB-bus before starting these procedures.
|
|
</P
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="partition"
|
|
></A
|
|
>8.1. Partitioning</H2
|
|
><P
|
|
> It is assumed that the flash memory is mapped to <TT
|
|
CLASS="filename"
|
|
> /dev/sda</TT
|
|
>. In this section we treat the situation where
|
|
the whole flash memory device will become devoted to a single ext2
|
|
partition. In the example procedure shown below, a 128MB flash
|
|
memory was formatted for ext2. That is why figures like 131MB and
|
|
888 cylinders appear. The fdisk tool, which is used, simply reads
|
|
that from the device.
|
|
</P
|
|
><P
|
|
>
|
|
All operations are done by root. The single partition will be
|
|
created on <TT
|
|
CLASS="filename"
|
|
> /dev/sda</TT
|
|
>
|
|
(please note: not <TT
|
|
CLASS="filename"
|
|
> /dev/sda1</TT
|
|
> ) The procedure is described in a series of
|
|
steps with comments. The standard prompt of
|
|
<SPAN
|
|
CLASS="application"
|
|
>fdisk</SPAN
|
|
> is <TT
|
|
CLASS="prompt"
|
|
> Command (m for
|
|
help):</TT
|
|
> and you can, at any stage enter
|
|
<TT
|
|
CLASS="userinput"
|
|
><B
|
|
>m</B
|
|
></TT
|
|
> to see the available commands. If you do
|
|
that the result would be
|
|
</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> Command action
|
|
a toggle a bootable flag
|
|
b edit bsd disklabel
|
|
c toggle the dos compatibility flag
|
|
d delete a partition
|
|
l list known partition types
|
|
m print this menu
|
|
n add a new partition
|
|
o create a new empty DOS partition table
|
|
p print the partition table
|
|
q quit without saving changes
|
|
s create a new empty Sun disklabel
|
|
t change a partition's system id
|
|
u change display/entry units
|
|
v verify the partition table
|
|
w write table to disk and exit
|
|
x extra functionality (experts only)
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
> Your memory stick must be plugged in, but not mounted. Take care
|
|
that write protect is off.
|
|
</P
|
|
><P
|
|
> Here goes:</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> <TT
|
|
CLASS="prompt"
|
|
>#</TT
|
|
><TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
> fdisk</B
|
|
> /dev/sda</B
|
|
></TT
|
|
>
|
|
Command (m for help):<TT
|
|
CLASS="userinput"
|
|
><B
|
|
>d</B
|
|
></TT
|
|
> {enter }
|
|
Selected partition 1
|
|
Command (m for help):<TT
|
|
CLASS="userinput"
|
|
><B
|
|
>n</B
|
|
></TT
|
|
> {enter}
|
|
Command action
|
|
e extended
|
|
p primary partition (1-4)
|
|
<TT
|
|
CLASS="userinput"
|
|
><B
|
|
>p</B
|
|
></TT
|
|
> {enter}
|
|
Partition number (1-4):<TT
|
|
CLASS="userinput"
|
|
><B
|
|
>1</B
|
|
></TT
|
|
> {enter}
|
|
First cylinder (1-888, default 1): {press enter}
|
|
Using default value 1
|
|
Last cylinder ... (1-888, default 888): {press enter}
|
|
Using default value 888
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
>
|
|
Now is a good time to verify that all went well by printing out
|
|
the partition details and table.
|
|
</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> Command (m for help): <TT
|
|
CLASS="userinput"
|
|
><B
|
|
>p</B
|
|
></TT
|
|
>
|
|
Disk /dev/sda: 131 MB, 131072000 bytes
|
|
9 heads, 32 sectors/track, 888 cylinders
|
|
Units = cylinders of 288 * 512 = 147456 bytes
|
|
|
|
Device Boot Start End Blocks Id System
|
|
|
|
/dev/sda1 1 888 127856 83 Linux
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
> Make sure that the partition is not set up as bootable. There
|
|
should not be an asterisk under the heading "Boot" in the
|
|
partition table. Furthermore, the headings "Id" and "System"
|
|
should be as they are in the printout shown above. That indicates
|
|
that you can format the device in ext2 (next section). These are
|
|
the defaults. If they are not, they can be changed by
|
|
</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> Command (m for help): <TT
|
|
CLASS="userinput"
|
|
><B
|
|
>a</B
|
|
></TT
|
|
> [toggle a bootable flag]
|
|
Command (m for help): <TT
|
|
CLASS="userinput"
|
|
><B
|
|
>t</B
|
|
></TT
|
|
> [change a partition's system id]
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
>
|
|
If (or when) the partition table is correct, you can conclude the
|
|
procedure with
|
|
</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> Command (m for help): <TT
|
|
CLASS="userinput"
|
|
><B
|
|
>w</B
|
|
></TT
|
|
> [write table to disk and exit]
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
> That's it!</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="making-ext2"
|
|
></A
|
|
>8.2. Making an ext2 device</H2
|
|
><P
|
|
>
|
|
Having completed the partition part, we go straight on to
|
|
"formatting" the device in ext2. For this we use the tool
|
|
mke2fs. This is straightforward.
|
|
</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> <TT
|
|
CLASS="prompt"
|
|
>#</TT
|
|
> <TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>mke2fs</B
|
|
> /dev/sda1</B
|
|
></TT
|
|
>
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
> You might like to watch the led on your memory stick flicker
|
|
while this is happening. When it stops, the job is done.
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="tests4"
|
|
></A
|
|
>8.3. Tests -- ext2</H2
|
|
><P
|
|
>
|
|
To see if you were successful, essentially repeat the procedures
|
|
described in <A
|
|
HREF="#mounting"
|
|
>Section 7.3</A
|
|
> and <A
|
|
HREF="#tests"
|
|
>Section 7.4</A
|
|
>
|
|
with two exceptions of detail. In the first place the mount
|
|
command should be
|
|
</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> <TT
|
|
CLASS="prompt"
|
|
>#</TT
|
|
> <TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>mount</B
|
|
> -t ext2 /dev/sda1 /mnt/memstick</B
|
|
></TT
|
|
>
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
>
|
|
The second exception is that the permissions on your favourite
|
|
text file should not change anymore.
|
|
</P
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect1"
|
|
><HR><H1
|
|
CLASS="sect1"
|
|
><A
|
|
NAME="mixed"
|
|
></A
|
|
>9. Setting up a dual partition</H1
|
|
><DIV
|
|
CLASS="sect2"
|
|
><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="double-partition"
|
|
></A
|
|
>9.1. Partitioning</H2
|
|
><P
|
|
> The procedures described here will partition the flash memory device
|
|
in two pieces -- one of the partitions will be formatted in ext2 and
|
|
the other in vfat. This may be handy when the device is to be used
|
|
to transport data between two (or more) Linux machines (ext2) and between Linux
|
|
and Windows machines (vfat)
|
|
</P
|
|
><DIV
|
|
CLASS="important"
|
|
><P
|
|
></P
|
|
><TABLE
|
|
CLASS="important"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="25"
|
|
ALIGN="CENTER"
|
|
VALIGN="TOP"
|
|
><IMG
|
|
SRC="../images/important.gif"
|
|
HSPACE="5"
|
|
ALT="Important"></TD
|
|
><TD
|
|
ALIGN="LEFT"
|
|
VALIGN="TOP"
|
|
><P
|
|
> The device mapped to <TT
|
|
CLASS="filename"
|
|
>/dev/sda</TT
|
|
> will be
|
|
re-formatted. Any data present on it will be destroyed. To make
|
|
sure that the device you work with is the one intended, remove
|
|
similar devices from the USB-bus before starting these procedures.
|
|
</P
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
><P
|
|
>
|
|
In this section we describe how to set up a dual partition for
|
|
the memory stick: One half of the device will be
|
|
devoted to the vfat filesystem, and the other will be ext2. In
|
|
this way your device will be more versatile, but also a little
|
|
shattered. The procedure will be given in somewhat less detailed
|
|
than in <A
|
|
HREF="#partition"
|
|
>Section 8.1</A
|
|
> . Note that the procedure
|
|
of the previous section is repeated and that the hex code for
|
|
each file type is explicitly entered (lines following the entry
|
|
"t": Win95 = b; Linux = 83). When the partition will only be for
|
|
Linux, this is unnecessary -- Linux is the default. Also note that
|
|
the vfat partition goes on first -- that is the way Windows would
|
|
have it.
|
|
</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> <TT
|
|
CLASS="prompt"
|
|
>#</TT
|
|
> <TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>fdisk</B
|
|
> /dev/sda</B
|
|
></TT
|
|
>
|
|
|
|
<TT
|
|
CLASS="prompt"
|
|
>Command (m for help):</TT
|
|
> <TT
|
|
CLASS="userinput"
|
|
><B
|
|
>d</B
|
|
></TT
|
|
>
|
|
<TT
|
|
CLASS="computeroutput"
|
|
>Selected partition 1</TT
|
|
>
|
|
|
|
<TT
|
|
CLASS="prompt"
|
|
>Command (m for help):</TT
|
|
> <TT
|
|
CLASS="userinput"
|
|
><B
|
|
>n</B
|
|
></TT
|
|
>
|
|
<TT
|
|
CLASS="computeroutput"
|
|
>Command action
|
|
e extended
|
|
p primary partition (1-4)</TT
|
|
>
|
|
<TT
|
|
CLASS="userinput"
|
|
><B
|
|
>p</B
|
|
></TT
|
|
>
|
|
<TT
|
|
CLASS="prompt"
|
|
>Partition number (1-4):</TT
|
|
> <TT
|
|
CLASS="userinput"
|
|
><B
|
|
>1</B
|
|
></TT
|
|
>
|
|
<TT
|
|
CLASS="prompt"
|
|
>First cylinder (1-888, default 1): </TT
|
|
>
|
|
<TT
|
|
CLASS="computeroutput"
|
|
>Using default value 1</TT
|
|
>
|
|
<TT
|
|
CLASS="prompt"
|
|
>Last cylinder or +size or +sizeM or +sizeK (1-888,
|
|
default 888):</TT
|
|
><TT
|
|
CLASS="userinput"
|
|
><B
|
|
>444</B
|
|
></TT
|
|
>
|
|
<TT
|
|
CLASS="prompt"
|
|
>Command (m for help):</TT
|
|
> <TT
|
|
CLASS="userinput"
|
|
><B
|
|
>t</B
|
|
></TT
|
|
>
|
|
<TT
|
|
CLASS="computeroutput"
|
|
>Selected partition 1</TT
|
|
>
|
|
<TT
|
|
CLASS="prompt"
|
|
>Hex code (type L to list codes):</TT
|
|
> <TT
|
|
CLASS="userinput"
|
|
><B
|
|
>b</B
|
|
></TT
|
|
>
|
|
<TT
|
|
CLASS="computeroutput"
|
|
> Changed system type of partition 1 to b (Win95 FAT32)
|
|
</TT
|
|
>
|
|
<TT
|
|
CLASS="prompt"
|
|
>Command (m for help):</TT
|
|
> <TT
|
|
CLASS="userinput"
|
|
><B
|
|
>n</B
|
|
></TT
|
|
>
|
|
<TT
|
|
CLASS="computeroutput"
|
|
>Command action
|
|
e extended
|
|
p primary partition (1-4)</TT
|
|
>
|
|
<TT
|
|
CLASS="userinput"
|
|
><B
|
|
>p</B
|
|
></TT
|
|
>
|
|
<TT
|
|
CLASS="prompt"
|
|
>Partition number (1-4):</TT
|
|
> <TT
|
|
CLASS="userinput"
|
|
><B
|
|
>2</B
|
|
></TT
|
|
>
|
|
<TT
|
|
CLASS="prompt"
|
|
>First cylinder (445-888, default 445): </TT
|
|
>
|
|
<TT
|
|
CLASS="computeroutput"
|
|
>Using default value 445</TT
|
|
>
|
|
<TT
|
|
CLASS="prompt"
|
|
> Last cylinder or +size or +sizeM or +sizeK (445-888,
|
|
default 888):
|
|
</TT
|
|
>
|
|
<TT
|
|
CLASS="computeroutput"
|
|
>Using default value 888</TT
|
|
>
|
|
|
|
<TT
|
|
CLASS="prompt"
|
|
>Command (m for help):</TT
|
|
> <TT
|
|
CLASS="userinput"
|
|
><B
|
|
>t</B
|
|
></TT
|
|
>
|
|
<TT
|
|
CLASS="prompt"
|
|
>Partition number (1-4):</TT
|
|
> <TT
|
|
CLASS="userinput"
|
|
><B
|
|
>2</B
|
|
></TT
|
|
>
|
|
<TT
|
|
CLASS="prompt"
|
|
>Hex code (type L to list codes):</TT
|
|
> <TT
|
|
CLASS="userinput"
|
|
><B
|
|
>83</B
|
|
></TT
|
|
>
|
|
|
|
<TT
|
|
CLASS="prompt"
|
|
>Command (m for help):</TT
|
|
> <TT
|
|
CLASS="userinput"
|
|
><B
|
|
>p</B
|
|
></TT
|
|
>
|
|
|
|
<TT
|
|
CLASS="computeroutput"
|
|
> Disk /dev/sda: 131 MB, 131072000 bytes
|
|
9 heads, 32 sectors/track, 888 cylinders
|
|
Units = cylinders of 288 * 512 = 147456 bytes
|
|
|
|
Device Boot Start End Blocks Id System
|
|
/dev/sda1 1 444 63920 b Win95 FAT32
|
|
/dev/sda2 445 888 63936 83 Linux
|
|
</TT
|
|
>
|
|
|
|
<TT
|
|
CLASS="prompt"
|
|
>Command (m for help):</TT
|
|
><TT
|
|
CLASS="userinput"
|
|
><B
|
|
>w</B
|
|
></TT
|
|
>
|
|
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><DIV
|
|
CLASS="note"
|
|
><P
|
|
></P
|
|
><TABLE
|
|
CLASS="note"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="25"
|
|
ALIGN="CENTER"
|
|
VALIGN="TOP"
|
|
><IMG
|
|
SRC="../images/note.gif"
|
|
HSPACE="5"
|
|
ALT="Note"></TD
|
|
><TD
|
|
ALIGN="LEFT"
|
|
VALIGN="TOP"
|
|
><P
|
|
> Note that we went on with the second partition before writing.
|
|
</P
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
><P
|
|
> The choice of splitting the device right in the middle (1--444;
|
|
445--888 for a 128 MB memory stick) is arbitrary. Any other
|
|
well-conceived splitting would be fine.
|
|
</P
|
|
><P
|
|
> If you had more than one partition to begin with, the "delete"
|
|
part of the procedure would have to be repeated.
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="both"
|
|
></A
|
|
>9.2. Making a dual ext2/vfat system</H2
|
|
><P
|
|
>
|
|
This step is a repetition of <A
|
|
HREF="#making-ext2"
|
|
>Section 8.2</A
|
|
>. The first step
|
|
makes the dos partition, the second makes the Linux ext2 partition.
|
|
</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> <TT
|
|
CLASS="prompt"
|
|
>#</TT
|
|
> <TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>mkdosfs</B
|
|
> -F 32 /dev/sda1</B
|
|
></TT
|
|
>
|
|
<TT
|
|
CLASS="prompt"
|
|
>#</TT
|
|
> <TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>mke2fs</B
|
|
> /dev/sda2</B
|
|
></TT
|
|
>
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="mixed-tests"
|
|
></A
|
|
>9.3. Tests -- ext2 and vfat</H2
|
|
><P
|
|
>
|
|
Simply carry out the tests of <A
|
|
HREF="#tests"
|
|
>Section 7.4</A
|
|
> and <A
|
|
HREF="#tests4"
|
|
>Section 8.3</A
|
|
> on the two devices separately. The mount commands
|
|
would be
|
|
</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> <TT
|
|
CLASS="prompt"
|
|
>#</TT
|
|
> <TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>mount</B
|
|
> -t vfat /dev/sda1 /mnt/fatstick </B
|
|
></TT
|
|
>
|
|
<TT
|
|
CLASS="prompt"
|
|
># </TT
|
|
><TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>mount</B
|
|
> -t ext2 /dev/sda2 /mnt/memstick</B
|
|
></TT
|
|
>
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
> to mount both partitions on your device.
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="config-linux"
|
|
></A
|
|
>9.4. Configuring Linux for the dual partition</H2
|
|
><P
|
|
> The Linux machine you did the partitioning on, will be
|
|
configured for the dual partition. Evidently you need to carry the
|
|
keychain to another Linux machine. There you will find that it only
|
|
sees <TT
|
|
CLASS="filename"
|
|
>/dev/sda1</TT
|
|
>. This is, perhaps, a shortcoming
|
|
of the kernel. The workaround is as follows: On the new host
|
|
machine do (keychain plugged in but not mounted)
|
|
</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> <TT
|
|
CLASS="prompt"
|
|
>#</TT
|
|
> <TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>fdisk</B
|
|
> /dev/sda</B
|
|
></TT
|
|
>
|
|
<TT
|
|
CLASS="computeroutput"
|
|
>Choose p; check partition table
|
|
If satisfied, choose w</TT
|
|
>
|
|
<TT
|
|
CLASS="prompt"
|
|
>#</TT
|
|
> <TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>less</B
|
|
> /proc/partitions</B
|
|
></TT
|
|
>
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
> Your device with its partitions should be there. Data on your
|
|
keychain should be untouched. For a single partition this is not
|
|
necessary.
|
|
</P
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect1"
|
|
><HR><H1
|
|
CLASS="sect1"
|
|
><A
|
|
NAME="users"
|
|
></A
|
|
>10. Making the memory stick accessible to users</H1
|
|
><P
|
|
>
|
|
What we have described so far, are simply the procedures of setting
|
|
up the system and formatting memory sticks. We have to make the
|
|
mounting of the USB filesystem more permanent, and we have to make
|
|
mounting of such a device easier for non-root users. There are
|
|
only a few things to be done.
|
|
</P
|
|
><P
|
|
> The procedure described below is for the more complex situation of
|
|
a memory stick with a dual partition (<A
|
|
HREF="#mixed"
|
|
>Section 9</A
|
|
>). If
|
|
the partition is a single ext2, the procedure should be simplified
|
|
by leaving out the line referring to the vfat part and changing
|
|
<TT
|
|
CLASS="filename"
|
|
>sda2</TT
|
|
> to <TT
|
|
CLASS="filename"
|
|
>sda1</TT
|
|
>.
|
|
</P
|
|
><P
|
|
>
|
|
Suppose that the mount points <TT
|
|
CLASS="filename"
|
|
> /mnt/memstick</TT
|
|
>
|
|
and <TT
|
|
CLASS="filename"
|
|
> /mnt/fatstick</TT
|
|
> have been created. You do
|
|
not have to use those words and they don't even have to be
|
|
sub-directories of <TT
|
|
CLASS="filename"
|
|
> /mnt</TT
|
|
>
|
|
</P
|
|
><P
|
|
>
|
|
To make remembering easier, create the following symbolic links:
|
|
</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>
|
|
<TT
|
|
CLASS="prompt"
|
|
>#</TT
|
|
> <TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>ln</B
|
|
> -s /dev/sda1 /dev/fatflash</B
|
|
></TT
|
|
>
|
|
<TT
|
|
CLASS="prompt"
|
|
>#</TT
|
|
> <TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>ln</B
|
|
> -s /dev/sda2 /dev/flash</B
|
|
></TT
|
|
>
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
>
|
|
For smoother and easier mounting add the following lines to
|
|
<TT
|
|
CLASS="filename"
|
|
> /etc/fstab</TT
|
|
> : (<EM
|
|
> See NOTE at the end of
|
|
</EM
|
|
> <A
|
|
HREF="#mounting"
|
|
>Section 7.3</A
|
|
> )</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> none /proc/bus/usb usbfs defaults 0 0
|
|
/dev/flash /mnt/memstick ext2,vfat rw,user,noauto 0 0
|
|
/dev/fatflash /mnt/fatstick vfat rw,user,noauto 0 0
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
>
|
|
The middle line enables mounting either in ext2 or vfat.
|
|
The last two lines make it possible for any user to mount the
|
|
device by the command
|
|
</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> <TT
|
|
CLASS="prompt"
|
|
>$</TT
|
|
><TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
> mount</B
|
|
> /dev/flash</B
|
|
></TT
|
|
> [for ext2 or vfat]
|
|
<TT
|
|
CLASS="prompt"
|
|
>$</TT
|
|
><TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
> mount</B
|
|
> /dev/fatflash</B
|
|
></TT
|
|
> [for vfat]
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
>
|
|
It is possible to mount both partitions simultaneously. See <A
|
|
HREF="#mixed"
|
|
>Section 9</A
|
|
>.
|
|
</P
|
|
><P
|
|
>
|
|
In the case of an ext2-formatted device it does not seem possible
|
|
for a user (other than root) to mount in read-write mode. The
|
|
solution is to create a directory on the memory stick owned by the
|
|
particular user with complete permissions. Root should do that:
|
|
</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> <TT
|
|
CLASS="prompt"
|
|
>#</TT
|
|
> <TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>mount </B
|
|
>/dev/flash </B
|
|
></TT
|
|
>
|
|
<TT
|
|
CLASS="prompt"
|
|
># </TT
|
|
><TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>mkdir</B
|
|
> -m 777 /mnt/memstick/superdir </B
|
|
></TT
|
|
>
|
|
<TT
|
|
CLASS="prompt"
|
|
># </TT
|
|
><TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>chown</B
|
|
> charles:charles /mnt/memstick/superdir </B
|
|
></TT
|
|
>
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
> If the device is in the vfat format, this step is unnecessary.
|
|
</P
|
|
><P
|
|
>
|
|
In conclusion, here is a small script I use to mount and unmount
|
|
my (ext2) flash drive:
|
|
</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="programlisting"
|
|
> #!/bin/bash
|
|
EXCODE="keepit"
|
|
green='\033[0;32m'
|
|
yellow='\033[0;33m'
|
|
## ___________________________
|
|
## Function to echo in colours
|
|
echo_in_color ()
|
|
{
|
|
message=$2
|
|
message1=$4
|
|
color=$1
|
|
color1=$3
|
|
echo -e -n $color
|
|
echo -n $message
|
|
echo -e -n $color1 " "
|
|
echo -n $message1 " "
|
|
tput sgr0
|
|
return
|
|
}
|
|
## ___________________________
|
|
clear
|
|
mount /dev/flash
|
|
echo_in_color $green "Flash drive mounted"
|
|
sleep 2
|
|
while [ $EXCODE != "flexit" ]
|
|
do
|
|
clear
|
|
echo_in_color $yellow "Enter [flexit] to unmount and exit:"
|
|
read EXCODE
|
|
done
|
|
umount /dev/flash
|
|
exit
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
>
|
|
I call this from an FVWM menu by <TT
|
|
CLASS="userinput"
|
|
><B
|
|
> Exec exec xterm
|
|
-geometry 43x2+1250+0 -e /home/nikos/bin/flashdrive</B
|
|
></TT
|
|
>
|
|
which places it on a tiny x-term in one corner of the screen. The
|
|
horizontal displacement of 1250 may have to be modified according
|
|
to the horizontal resolution of your screen.
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect1"
|
|
><HR><H1
|
|
CLASS="sect1"
|
|
><A
|
|
NAME="maintain"
|
|
></A
|
|
>11. Maintenance</H1
|
|
><DIV
|
|
CLASS="sect2"
|
|
><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="fs-inspect"
|
|
></A
|
|
>11.1. Filesystem inspection</H2
|
|
><P
|
|
> It is a virtuous habit to inspect your ext2 filesystem on the
|
|
flash memory regularly. To do this, the tool
|
|
<SPAN
|
|
CLASS="application"
|
|
>dumpe2fs</SPAN
|
|
> may be used in the following way:
|
|
<TT
|
|
CLASS="prompt"
|
|
># </TT
|
|
><TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>dumpe2fs</B
|
|
> -h /dev/sda1</B
|
|
></TT
|
|
> (you must be root and
|
|
the device should not be mounted). The result should be similar to
|
|
the following:
|
|
</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> Filesystem volume name: <none>
|
|
Last mounted on: <not available>
|
|
Filesystem UUID: c42a6963-5e6a-4cd2-b7d7-c8f09dca6c52
|
|
Filesystem magic number: 0xEF53
|
|
Filesystem revision #: 1 (dynamic)
|
|
Filesystem features: dir_index filetype sparse_super
|
|
Default mount options: (none)
|
|
Filesystem state: clean
|
|
Errors behavior: Continue
|
|
Filesystem OS type: Linux
|
|
Inode count: 32000
|
|
Block count: 127856
|
|
Reserved block count: 6392
|
|
Free blocks: 116456
|
|
Free inodes: 31922
|
|
First block: 1
|
|
Block size: 1024
|
|
Fragment size: 1024
|
|
Blocks per group: 8192
|
|
Fragments per group: 8192
|
|
Inodes per group: 2000
|
|
Inode blocks per group: 250
|
|
Filesystem created: Sat Sep 20 12:43:00 2003
|
|
Last mount time: Tue Oct 28 14:13:03 2003
|
|
Last write time: Tue Oct 28 14:28:27 2003
|
|
Mount count: 13
|
|
Maximum mount count: 35
|
|
Last checked: Sat Oct 18 11:28:26 2003
|
|
Check interval: 15552000 (6 months)
|
|
Next check after: Thu Apr 15 11:28:26 2004
|
|
Reserved blocks uid: 0 (user root)
|
|
Reserved blocks gid: 0 (group root)
|
|
First inode: 11
|
|
Inode size: 128
|
|
Default directory hash: tea
|
|
Directory Hash Seed: 118bee0a-efa5-4771-967e-41a0badd0355
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
> A few important aspects need to be pointed out.
|
|
</P
|
|
><P
|
|
></P
|
|
><UL
|
|
><LI
|
|
><P
|
|
> When the ext2 filesystem is created, it is by default
|
|
given maximal usage before it has to be checked. These can
|
|
be seen <EM
|
|
> Maximum mount count </EM
|
|
> (35) and
|
|
<EM
|
|
> Check interval</EM
|
|
> (expiry date).
|
|
</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
> The usage so far: <EM
|
|
> Mount count</EM
|
|
> and
|
|
<EM
|
|
> Last checked</EM
|
|
> .
|
|
</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
> The existence of corrupted files (bad blocks):
|
|
<EM
|
|
> Filesystem state</EM
|
|
> .
|
|
</P
|
|
></LI
|
|
></UL
|
|
><P
|
|
> You might get warnings about these things when you mount the
|
|
device or when you try the read files from the device.
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="and-then"
|
|
></A
|
|
>11.2. And then?</H2
|
|
><P
|
|
> When the usage allocation has been spent, or there is evidence of
|
|
file corruption, the thing to do is to run <TT
|
|
CLASS="prompt"
|
|
>#</TT
|
|
> <TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>fsck.ext2</B
|
|
> /dev/sda1</B
|
|
></TT
|
|
> with the device unmounted. After that, usage
|
|
parameters will be freshly allocated and bad blocks will be gone.
|
|
</P
|
|
><DIV
|
|
CLASS="note"
|
|
><P
|
|
></P
|
|
><TABLE
|
|
CLASS="note"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="25"
|
|
ALIGN="CENTER"
|
|
VALIGN="TOP"
|
|
><IMG
|
|
SRC="../images/note.gif"
|
|
HSPACE="5"
|
|
ALT="Note"></TD
|
|
><TD
|
|
ALIGN="LEFT"
|
|
VALIGN="TOP"
|
|
><P
|
|
>
|
|
When dealing with the vfat system, the <SPAN
|
|
CLASS="application"
|
|
> dump</SPAN
|
|
> does not seem to exist. The command
|
|
<TT
|
|
CLASS="prompt"
|
|
>#</TT
|
|
> <TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>dumpe2fs</B
|
|
> -f /dev/sda1</B
|
|
></TT
|
|
> for filesystems
|
|
other than ext2 does not work for vfat. The tool <SPAN
|
|
CLASS="application"
|
|
> dosfsck</SPAN
|
|
> exists (it is still Alpha), and may be
|
|
risky to use on a device you have not formatted yourself.
|
|
</P
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect1"
|
|
><HR><H1
|
|
CLASS="sect1"
|
|
><A
|
|
NAME="linux-2.6"
|
|
></A
|
|
>12. The Linux-2.6 kernel</H1
|
|
><DIV
|
|
CLASS="sect2"
|
|
><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="What-is-new"
|
|
></A
|
|
>12.1. What is new?</H2
|
|
><P
|
|
>
|
|
Setting up your system as described above for the Linux-2.4.x
|
|
kernels will be perfectly good, but with the Linux-2.6.x kernels
|
|
(x = 0, 1, 2, 3 at the time of this writing) much more is possible:
|
|
</P
|
|
><P
|
|
></P
|
|
><UL
|
|
><LI
|
|
><P
|
|
> USB Hotplugging of devices has been improved immensely. This
|
|
means that it has become possible to attach and remove a
|
|
device from the USB port with full cognisance of the
|
|
system. If a device is attached, it will show in the /proc
|
|
filesystem. Once it is removed, it will not show anymore.
|
|
</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
> The <EM
|
|
>sysfs</EM
|
|
> system has been
|
|
introduced. By using this facility, a very tight grip on
|
|
attached devices, their attributes and nodes of attachment
|
|
is possible.
|
|
</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
> Utilities for handling hotplugging have been improved or
|
|
became available. With the aid of these it is possible to
|
|
easily distinguish between attached devices irrespective of
|
|
the order in which they were attached.
|
|
</P
|
|
></LI
|
|
></UL
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="kernel-options"
|
|
></A
|
|
>12.2. Kernel options</H2
|
|
><P
|
|
> Kernel configuration options are very much the same as described
|
|
in <A
|
|
HREF="#kernel"
|
|
>Section 5.2</A
|
|
>. The configuration menu
|
|
(<TT
|
|
CLASS="prompt"
|
|
>#</TT
|
|
><TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
> make </B
|
|
>
|
|
menuconfig</B
|
|
></TT
|
|
>) has been organized differently
|
|
and more systematically. Here are the relevant choices:
|
|
</P
|
|
><DIV
|
|
CLASS="sect3"
|
|
><HR><H3
|
|
CLASS="sect3"
|
|
><A
|
|
NAME="bus-options"
|
|
></A
|
|
>12.2.1. Bus options</H3
|
|
><P
|
|
></P
|
|
><UL
|
|
COMPACT="COMPACT"
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
> Support for hot-pluggable devices (CONFIG_HOTPLUG)
|
|
</SPAN
|
|
></LI
|
|
></UL
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect3"
|
|
><HR><H3
|
|
CLASS="sect3"
|
|
><A
|
|
NAME="device-drivers"
|
|
></A
|
|
>12.2.2. Device drivers</H3
|
|
><P
|
|
></P
|
|
><UL
|
|
COMPACT="COMPACT"
|
|
><LI
|
|
STYLE="list-style-type: disc"
|
|
><SPAN
|
|
> <STRONG
|
|
> SCSI device support</STRONG
|
|
>
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
> SCSI device support (CONFIG_SCSI scsi_mod)
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
>
|
|
legacy /proc/scsi support (CONFIG_SCSI_PROC_FS)
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
>
|
|
SCSI disk support (CONFIG_BLK_DEV_SD sd_mod)
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><P
|
|
> </P
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: disc"
|
|
><SPAN
|
|
> <STRONG
|
|
> USB support</STRONG
|
|
>
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
> Support for USB (CONFIG_USB usbcore)
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
> USB device filesystem (CONFIG_USB_DEVICEFS)
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
> UHCI HCD support (CONFIG_USB_UHCI_HCD uhci_hcd)
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
> USB Mass Storage support (CONFIG_USB_STORAGE usb_storage)
|
|
</SPAN
|
|
></LI
|
|
></UL
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect3"
|
|
><HR><H3
|
|
CLASS="sect3"
|
|
><A
|
|
NAME="fss-2.6"
|
|
></A
|
|
>12.2.3. File systems</H3
|
|
><P
|
|
></P
|
|
><UL
|
|
COMPACT="COMPACT"
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
>
|
|
Second extended (CONFIG_EXT2_FS ext2)
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><P
|
|
> </P
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: disc"
|
|
><SPAN
|
|
>
|
|
<STRONG
|
|
> DOS/FAT/NT filesystems</STRONG
|
|
>
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
>
|
|
DOS FAT fs support (CONFIG_FAT_FS fat)
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
>
|
|
MSDOS fs support (CONFIG_MSDOS_FS msdos)
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
>
|
|
VFAT (Windows 95) fs support (CONFIG_VFAT_FS vfat)
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><P
|
|
> </P
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: disc"
|
|
><SPAN
|
|
> <STRONG
|
|
> Pseudo filesystems</STRONG
|
|
>
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
STYLE="list-style-type: none"
|
|
><SPAN
|
|
>
|
|
/proc file system support (CONFIG_PROC_FS)
|
|
</SPAN
|
|
></LI
|
|
></UL
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="notes-2.6"
|
|
></A
|
|
>12.3. Notes</H2
|
|
><P
|
|
> It may be in your interest to consult
|
|
<A
|
|
HREF="http://thomer.com/linux/migrate-to-2.6.html"
|
|
TARGET="_top"
|
|
> Migrating to Linux Kernel 2.6</A
|
|
>,
|
|
but it is not necessary to follow steps that cannot be followed.
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="hotplug"
|
|
></A
|
|
>12.4. Hotplugging and Naming</H2
|
|
><P
|
|
> In <A
|
|
HREF="#scsidev"
|
|
>Section 6.2</A
|
|
> the situation of two USB
|
|
devices plugged in at the same time was discussed. The
|
|
difficulty is that it becomes hard for the user to
|
|
distinguish the two devices. Progress recently made in the
|
|
<A
|
|
HREF="http://sourceforge.net/search/"
|
|
TARGET="_top"
|
|
>Linux Hotplug
|
|
Project </A
|
|
> (search for hotplug) and implemented in the
|
|
2.6-series of kernels, has made it possible to address this
|
|
problem efficiently. For implementation some utilities are
|
|
needed:
|
|
</P
|
|
><P
|
|
></P
|
|
><UL
|
|
COMPACT="COMPACT"
|
|
><LI
|
|
><SPAN
|
|
> sysfs -- compiled by default into Linux-2.6.x
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
><SPAN
|
|
> <A
|
|
HREF="http://linux-diag.sourceforge.net/Sysfsutils.html"
|
|
TARGET="_top"
|
|
> sysfsutils-0.4.0 or later</A
|
|
>
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
><SPAN
|
|
>
|
|
<A
|
|
HREF="http://sourceforge.net/projects/linux-hotplug"
|
|
TARGET="_top"
|
|
> hotplug-2004_01_05 or later</A
|
|
>
|
|
</SPAN
|
|
></LI
|
|
><LI
|
|
><SPAN
|
|
> <A
|
|
HREF="http://www.kernel.org/pub/linux/utils/kernel/hotplug"
|
|
TARGET="_top"
|
|
> udev-016 or later</A
|
|
>
|
|
</SPAN
|
|
></LI
|
|
></UL
|
|
><DIV
|
|
CLASS="sect3"
|
|
><HR><H3
|
|
CLASS="sect3"
|
|
><A
|
|
NAME="installation"
|
|
></A
|
|
>12.4.1. Installation</H3
|
|
><DIV
|
|
CLASS="formalpara"
|
|
><P
|
|
><B
|
|
>The sysfs filesystem. </B
|
|
></P
|
|
></DIV
|
|
><P
|
|
> The <EM
|
|
>sysfs</EM
|
|
> filesystem is intrinsic to
|
|
the Linux-2.6 kernel series. It is used by
|
|
<EM
|
|
>udev</EM
|
|
> and
|
|
<EM
|
|
>sysfstools</EM
|
|
> to obtain information
|
|
about kernel objects (devices, etc.), their attributes
|
|
and mutual linkages. Activation is according to the
|
|
following procedure:
|
|
</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> <TT
|
|
CLASS="prompt"
|
|
># </TT
|
|
><TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>cd</B
|
|
></B
|
|
></TT
|
|
> /
|
|
<TT
|
|
CLASS="prompt"
|
|
># </TT
|
|
><TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>mkdir</B
|
|
></B
|
|
></TT
|
|
> sys
|
|
<TT
|
|
CLASS="prompt"
|
|
># </TT
|
|
><TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>mount</B
|
|
></B
|
|
></TT
|
|
> -t sysfs none /sys
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
>
|
|
|
|
If you do <TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
> ls </B
|
|
> -F
|
|
/sys</B
|
|
></TT
|
|
>, a whole directory structure
|
|
with entries like <EM
|
|
>block/</EM
|
|
>,
|
|
<EM
|
|
>bus/</EM
|
|
>, ... will be shown. You were
|
|
successful. The mounting should now be made permanent by
|
|
adding the following line to
|
|
<TT
|
|
CLASS="filename"
|
|
>/etc/fstab</TT
|
|
>:
|
|
</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> none /sys sysfs defaults 0 0
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><DIV
|
|
CLASS="formalpara"
|
|
><P
|
|
><B
|
|
>Sysfsutils. </B
|
|
></P
|
|
></DIV
|
|
><P
|
|
> This is installed in one of the usual ways without having
|
|
to make special configuration options. Instructions in
|
|
the README file are very clear. You should, however,
|
|
first make sure that the entry
|
|
<TT
|
|
CLASS="filename"
|
|
>/usr/local/lib</TT
|
|
> is entered in
|
|
<TT
|
|
CLASS="filename"
|
|
>/etc/ld.so.conf</TT
|
|
> so that the
|
|
<TT
|
|
CLASS="filename"
|
|
>libsysfs.so</TT
|
|
> libraries will be
|
|
recognisable by the system. After installation, check
|
|
that the utilities <TT
|
|
CLASS="filename"
|
|
>/usr/local/bin/lsbus</TT
|
|
>
|
|
and <TT
|
|
CLASS="filename"
|
|
>/usr/local/bin/systool</TT
|
|
> have been
|
|
installed. Also check that the libraries mentioned above
|
|
have been properly linked in
|
|
(<TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>ldconfig </B
|
|
>-p | grep
|
|
libsysfs</B
|
|
></TT
|
|
>).
|
|
</P
|
|
><DIV
|
|
CLASS="formalpara"
|
|
><P
|
|
><B
|
|
>Hotplug. </B
|
|
></P
|
|
></DIV
|
|
><P
|
|
> Next install the <TT
|
|
CLASS="filename"
|
|
>hotplug</TT
|
|
>
|
|
scripts. The first thing to do is to check that
|
|
hotplugging will work on your system. Do:
|
|
<TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
> less </B
|
|
>
|
|
/proc/sys/kernel/hotplug</B
|
|
></TT
|
|
>. The
|
|
result should be
|
|
<TT
|
|
CLASS="computeroutput"
|
|
>/sbin/hotplug</TT
|
|
>. If it is
|
|
not so, you should add the line <TT
|
|
CLASS="filename"
|
|
> echo
|
|
"/sbin/hotplug" > /proc/sys/kernel/hotplug</TT
|
|
> to
|
|
an appropriate initialization script,
|
|
e.g. <TT
|
|
CLASS="filename"
|
|
>/etc/rc.d/rc.local</TT
|
|
>. This
|
|
command could also be given (as root) before checking
|
|
that everything works. Installation is extremely
|
|
simple. Do: <TT
|
|
CLASS="prompt"
|
|
># </TT
|
|
><TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
> make
|
|
</B
|
|
> install</B
|
|
></TT
|
|
>. Check afterwards that the
|
|
script <TT
|
|
CLASS="filename"
|
|
>/sbin/hotplug</TT
|
|
> exists.
|
|
</P
|
|
><DIV
|
|
CLASS="formalpara"
|
|
><P
|
|
><B
|
|
>Udev. </B
|
|
></P
|
|
></DIV
|
|
><P
|
|
> This is the last installation. Study the README file and
|
|
follow the instructions necessary to be able to run
|
|
<TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>make </B
|
|
>
|
|
USE_KLIBC=true</B
|
|
></TT
|
|
>. If you have
|
|
compiled the Linux-2.6.x kernel, this should not be too
|
|
difficult. A quick check would be to find out if
|
|
<TT
|
|
CLASS="filename"
|
|
>/sbin/udev</TT
|
|
> and
|
|
<TT
|
|
CLASS="filename"
|
|
>/sbin/udevinfo</TT
|
|
> exist. There are
|
|
other occurences as well, a very important one being
|
|
<TT
|
|
CLASS="filename"
|
|
>/etc/udev/udev.rules</TT
|
|
>. If you have a
|
|
working setup for memory sticks (as described above) and
|
|
a memory stick plugged in you could try
|
|
<TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>ls </B
|
|
>/udev</B
|
|
></TT
|
|
>, you
|
|
should see the device (sda, sda1, ...). If it is there,
|
|
unplug the device and list again. It should be gone!
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect3"
|
|
><HR><H3
|
|
CLASS="sect3"
|
|
><A
|
|
NAME="names"
|
|
></A
|
|
>12.4.2. Naming memory sticks</H3
|
|
><P
|
|
> With the <EM
|
|
>udev</EM
|
|
> utility in place, it
|
|
is possible to identify a memory stick on the basis of
|
|
some built-in attribute. One that works, is the
|
|
<EM
|
|
>vendor</EM
|
|
> identity. To find this for an
|
|
attached device, do <TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>systool
|
|
</B
|
|
> -vb scsi | grep vendor</B
|
|
></TT
|
|
>. This
|
|
should give a list of attached SCSI devices (remember
|
|
that your memory stick poses as a SCSI device <A
|
|
HREF="#scsidev"
|
|
>Section 6.2</A
|
|
>). Let us suppose that you have two
|
|
memory sticks plugged in at the same time and found (as I
|
|
did) two vendor Id's, namely "UFD" and "STORAGE". Then
|
|
add to the file <TT
|
|
CLASS="filename"
|
|
>/etc/udev/udev.rules</TT
|
|
>
|
|
the following lines (at the top if you like):
|
|
</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> ## Flash Memory 1
|
|
BUS="scsi", SYSFS_vendor="UFD*", NAME="namib%n"
|
|
|
|
## Flash Memory 2
|
|
BUS="scsi", SYSFS_vendor="STORAGE*", NAME="kalahari%n"
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
> The vendor-identities may have trailing blank spaces, and
|
|
therefore the wildcard asterisks have a purpose. Do not
|
|
ignore them. Remove and replace the memory sticks, then
|
|
do <TT
|
|
CLASS="userinput"
|
|
><B
|
|
><B
|
|
CLASS="command"
|
|
>ls </B
|
|
>
|
|
/udev</B
|
|
></TT
|
|
>. Instead of the impersonal
|
|
<TT
|
|
CLASS="filename"
|
|
>sda</TT
|
|
>, <TT
|
|
CLASS="filename"
|
|
>sda1</TT
|
|
>,
|
|
etc. there should now be <TT
|
|
CLASS="filename"
|
|
>kalahari</TT
|
|
>,
|
|
<TT
|
|
CLASS="filename"
|
|
>kalahari1</TT
|
|
>,
|
|
<TT
|
|
CLASS="filename"
|
|
>namib</TT
|
|
> and
|
|
<TT
|
|
CLASS="filename"
|
|
>namib1</TT
|
|
>. The devices have been named
|
|
according to the "vendor" information in them. Thus we
|
|
can identify the device, no matter where it was
|
|
mapped. All that remains to be done is to creat
|
|
appropriate mount points like
|
|
<TT
|
|
CLASS="filename"
|
|
>/mnt/namib</TT
|
|
> and
|
|
<TT
|
|
CLASS="filename"
|
|
>kalahari</TT
|
|
> and make entries like
|
|
</P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> /udev/namib1 /mnt/namib vfat,ext2 user,noauto,rw 0 0
|
|
/udev/kalahari1 /mnt/kalahari vfat,ext2 user,noauto,rw 0 0
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><P
|
|
> in <TT
|
|
CLASS="filename"
|
|
>/etc/fstab</TT
|
|
> to enable mounting
|
|
from other places.
|
|
</P
|
|
><P
|
|
> This is great fun ... and remember, there are other
|
|
deserts on the planet.
|
|
</P
|
|
></DIV
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect1"
|
|
><HR><H1
|
|
CLASS="sect1"
|
|
><A
|
|
NAME="formal"
|
|
></A
|
|
>13. Formalities</H1
|
|
><DIV
|
|
CLASS="sect2"
|
|
><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="copyright"
|
|
></A
|
|
>13.1. Copyright Information</H2
|
|
><P
|
|
> This document is copyrighted (c) 2003 Niko Sauer and is
|
|
distributed under the terms of the Linux Documentation Project
|
|
(LDP) license, stated below.
|
|
</P
|
|
><P
|
|
> Unless otherwise stated, Linux HOWTO documents are
|
|
copyrighted by their respective authors. Linux HOWTO documents may
|
|
be reproduced and distributed in whole or in part, in any medium
|
|
physical or electronic, as long as this copyright notice is
|
|
retained on all copies. Commercial redistribution is allowed and
|
|
encouraged; however, the author would like to be notified of any
|
|
such distributions.
|
|
</P
|
|
><P
|
|
> All translations, derivative works, or aggregate works
|
|
incorporating any Linux HOWTO documents must be covered under this
|
|
copyright notice. That is, you may not produce a derivative work
|
|
from a HOWTO and impose additional restrictions on its
|
|
distribution. Exceptions to these rules may be granted under
|
|
certain conditions; please contact the Linux HOWTO coordinator at
|
|
the address given below.
|
|
</P
|
|
><P
|
|
> In short, we wish to promote dissemination of this
|
|
information through as many channels as possible. However, we do
|
|
wish to retain copyright on the HOWTO documents, and would like to
|
|
be notified of any plans to redistribute the HOWTOs.
|
|
</P
|
|
><P
|
|
> If you have any questions, please contact
|
|
<TT
|
|
CLASS="email"
|
|
><<A
|
|
HREF="mailto:nikos@friedrichs.up.ac.za "
|
|
>nikos@friedrichs.up.ac.za </A
|
|
>></TT
|
|
>
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="disclaimer"
|
|
></A
|
|
>13.2. Disclaimer</H2
|
|
><P
|
|
> No liability for the contents of this documents can be accepted.
|
|
Use the concepts, examples and other content at your own risk.
|
|
As this is a new document, there may be errors
|
|
and inaccuracies, that may of course be damaging to your system.
|
|
Proceed with caution, and although this is highly unlikely,
|
|
the author do not take any responsibility for that.
|
|
</P
|
|
><P
|
|
> All copyrights are held by their by their respective owners, unless
|
|
specifically noted otherwise. Use of a term in this document
|
|
should not be regarded as affecting the validity of any trademark
|
|
or service mark.
|
|
</P
|
|
><P
|
|
> Naming of particular products or brands should not be seen
|
|
as endorsements.
|
|
</P
|
|
><P
|
|
> You are strongly recommended to take a backup of your system
|
|
before major installation and backups at regular intervals.
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="credits"
|
|
></A
|
|
>13.3. Credits</H2
|
|
><P
|
|
> I wish to express my deep gratitude towards my sons Paul and
|
|
Philip who in 1995 persuaded me to move to Linux. Philip gave me
|
|
profound advice and insights which made this project a pleasant
|
|
learning experience.
|
|
</P
|
|
><P
|
|
> Emma Jane Hogbin, in her review, raised a number of important
|
|
questions which served to improve this document immensely. My
|
|
sincerest thanks to her.
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="sect2"
|
|
><HR><H2
|
|
CLASS="sect2"
|
|
><A
|
|
NAME="feedback"
|
|
></A
|
|
>13.4. Feedback</H2
|
|
><P
|
|
> Users of this document are most welcome to email me with
|
|
suggestions on the improvement of the presentation and possible
|
|
additions to the scope of it.
|
|
</P
|
|
></DIV
|
|
></DIV
|
|
></DIV
|
|
><H3
|
|
CLASS="FOOTNOTES"
|
|
>Notes</H3
|
|
><TABLE
|
|
BORDER="0"
|
|
CLASS="FOOTNOTES"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
ALIGN="LEFT"
|
|
VALIGN="TOP"
|
|
WIDTH="5%"
|
|
><A
|
|
NAME="FTN.AEN104"
|
|
HREF="#AEN104"
|
|
><SPAN
|
|
CLASS="footnote"
|
|
>[1]</SPAN
|
|
></A
|
|
></TD
|
|
><TD
|
|
ALIGN="LEFT"
|
|
VALIGN="TOP"
|
|
WIDTH="95%"
|
|
><P
|
|
> This document leans heavily on the texts marked with an asterisk
|
|
</P
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></BODY
|
|
></HTML
|
|
> |