White space fix only. Translators can ignore.

Sponsored by:	iXsystems
This commit is contained in:
Dru Lavigne 2014-04-23 20:27:03 +00:00
parent 7655cacc8e
commit 62fd2d07c9
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=44639

View file

@ -432,24 +432,24 @@ super-block backups (for fsck -b #) at:
<para>Many external storage solutions, such as hard drives, <para>Many external storage solutions, such as hard drives,
<acronym>USB</acronym> thumbdrives, and <acronym>CD</acronym> <acronym>USB</acronym> thumbdrives, and <acronym>CD</acronym>
and <acronym>DVD</acronym> burners, use the and <acronym>DVD</acronym> burners, use the Universal Serial Bus
Universal Serial Bus (<acronym>USB</acronym>). &os; provides (<acronym>USB</acronym>). &os; provides support for
support for <acronym>USB</acronym> 1.x, 2.0, and 3.0 devices.</para> <acronym>USB</acronym> 1.x, 2.0, and 3.0 devices.</para>
<note> <note>
<para><acronym>USB</acronym> 3.0 support is not compatible with <para><acronym>USB</acronym> 3.0 support is not compatible with
some hardware, including Haswell (Lynx point) chipsets. If some hardware, including Haswell (Lynx point) chipsets. If
&os; boots with a <errorname>failed with error 19</errorname> &os; boots with a <errorname>failed with error 19</errorname>
message, disable xHCI/USB3 in the system message, disable xHCI/USB3 in the system
<acronym>BIOS</acronym>.</para> <acronym>BIOS</acronym>.</para>
</note> </note>
<para>Support for <acronym>USB</acronym> storage devices
is built into the <filename>GENERIC</filename>
kernel. For a custom kernel, be sure that the following
lines are present in the kernel configuration file:</para>
<programlisting>device scbus # SCSI bus (required for ATA/SCSI) <para>Support for <acronym>USB</acronym> storage devices is built
into the <filename>GENERIC</filename> kernel. For a custom
kernel, be sure that the following lines are present in the
kernel configuration file:</para>
<programlisting>device scbus # SCSI bus (required for ATA/SCSI)
device da # Direct Access (disks) device da # Direct Access (disks)
device pass # Passthrough device (direct ATA/SCSI access) device pass # Passthrough device (direct ATA/SCSI access)
device uhci # provides USB 1.x support device uhci # provides USB 1.x support
@ -460,15 +460,15 @@ device usb # USB Bus (required)
device umass # Disks/Mass storage - Requires scbus and da device umass # Disks/Mass storage - Requires scbus and da
device cd # needed for CD and DVD burners</programlisting> device cd # needed for CD and DVD burners</programlisting>
<para>&os; uses the &man.umass.4; driver which uses the <para>&os; uses the &man.umass.4; driver which uses the
<acronym>SCSI</acronym> subsystem to access <acronym>SCSI</acronym> subsystem to access
<acronym>USB</acronym> storage devices. Since any <acronym>USB</acronym> storage devices. Since any
<acronym>USB</acronym> device will be seen as a <acronym>USB</acronym> device will be seen as a
<acronym>SCSI</acronym> device by the system, <acronym>SCSI</acronym> device by the system, if the
if the <acronym>USB</acronym> device is a <acronym>USB</acronym> device is a <acronym>CD</acronym> or
<acronym>CD</acronym> or <acronym>DVD</acronym> burner, do <acronym>DVD</acronym> burner, do <emphasis>not</emphasis>
<emphasis>not</emphasis> include <option>device atapicam</option> include <option>device atapicam</option> in a custom kernel
in a custom kernel configuration file.</para> configuration file.</para>
<para>The rest of this section demonstrates how to verify that a <para>The rest of this section demonstrates how to verify that a
<acronym>USB</acronym> storage device is recognized by &os; and <acronym>USB</acronym> storage device is recognized by &os; and
@ -480,15 +480,15 @@ device cd # needed for CD and DVD burners</programlisting>
<para>To test the <acronym>USB</acronym> configuration, plug in <para>To test the <acronym>USB</acronym> configuration, plug in
the <acronym>USB</acronym> device. Use the <acronym>USB</acronym> device. Use
<command>dmesg</command> to confirm that the drive appears in <command>dmesg</command> to confirm that the drive appears in
the system message buffer. It should look something the system message buffer. It should look something like
like this:</para> this:</para>
<screen>umass0: &lt;STECH Simple Drive, class 0/0, rev 2.00/1.04, addr 3&gt; on usbus0 <screen>umass0: &lt;STECH Simple Drive, class 0/0, rev 2.00/1.04, addr 3&gt; on usbus0
umass0: SCSI over Bulk-Only; quirks = 0x0100 umass0: SCSI over Bulk-Only; quirks = 0x0100
umass0:4:0:-1: Attached to scbus4 umass0:4:0:-1: Attached to scbus4
da0 at umass-sim0 bus 0 scbus4 target 0 lun 0 da0 at umass-sim0 bus 0 scbus4 target 0 lun 0
da0: &lt;STECH Simple Drive 1.04&gt; Fixed Direct Access SCSI-4 device da0: &lt;STECH Simple Drive 1.04&gt; Fixed Direct Access SCSI-4 device
da0: Serial Number WD-WXE508CAN263 da0: Serial Number WD-WXE508CAN263
da0: 40.000MB/s transfers da0: 40.000MB/s transfers
da0: 152627MB (312581808 512 byte sectors: 255H 63S/T 19457C) da0: 152627MB (312581808 512 byte sectors: 255H 63S/T 19457C)
da0: quirks=0x2&lt;NO_6_BYTE&gt;</screen> da0: quirks=0x2&lt;NO_6_BYTE&gt;</screen>
@ -511,36 +511,36 @@ da0: quirks=0x2&lt;NO_6_BYTE&gt;</screen>
<screen>&prompt.root; <userinput>usbconfig</userinput> <screen>&prompt.root; <userinput>usbconfig</userinput>
ugen0.3: &lt;Simple Drive STECH&gt; at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (2mA)</screen> ugen0.3: &lt;Simple Drive STECH&gt; at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (2mA)</screen>
<para>If the device has not been formatted, <para>If the device has not been formatted, refer to <xref
refer to <xref linkend="disks-adding"/> for instructions on linkend="disks-adding"/> for instructions on how to format
how to format and create partitions on the and create partitions on the <acronym>USB</acronym> drive. If
<acronym>USB</acronym> drive. If the drive comes with a file the drive comes with a file system, it can be mounted by
system, it can be mounted by <systemitem <systemitem class="username">root</systemitem> using the
class="username">root</systemitem> using the
instructions in <xref linkend="mount-unmount"/>.</para> instructions in <xref linkend="mount-unmount"/>.</para>
<warning> <warning>
<para>Allowing untrusted users to mount arbitrary media, by <para>Allowing untrusted users to mount arbitrary media, by
enabling <varname>vfs.usermount</varname> as enabling <varname>vfs.usermount</varname> as described
described below, should not be considered safe from a below, should not be considered safe from a security point
security point of view. Most file systems were not of view. Most file systems were not built to safeguard
built to safeguard against malicious devices.</para> against malicious devices.</para>
</warning> </warning>
<para>To make the device mountable as a normal user, one <para>To make the device mountable as a normal user, one
solution is to make all users of the device a member of the solution is to make all users of the device a member of the
<systemitem class="groupname">operator</systemitem> group <systemitem class="groupname">operator</systemitem> group
using &man.pw.8;. Next, ensure that <systemitem using &man.pw.8;. Next, ensure that <systemitem
class="groupname">operator</systemitem> is able to class="groupname">operator</systemitem> is able to read and
read and write the device by adding these lines to write the device by adding these lines to
<filename>/etc/devfs.rules</filename>:</para> <filename>/etc/devfs.rules</filename>:</para>
<programlisting>[localrules=5] <programlisting>[localrules=5]
add path 'da*' mode 0660 group operator</programlisting> add path 'da*' mode 0660 group operator</programlisting>
<note> <note>
<para>If internal <acronym>SCSI</acronym> disks are also installed in the <para>If internal <acronym>SCSI</acronym> disks are also
system, change the second line as follows:</para> installed in the system, change the second line as
follows:</para>
<programlisting>add path 'da[<replaceable>3</replaceable>-9]*' mode 0660 group operator</programlisting> <programlisting>add path 'da[<replaceable>3</replaceable>-9]*' mode 0660 group operator</programlisting>
@ -558,9 +558,8 @@ add path 'da*' mode 0660 group operator</programlisting>
<programlisting>devfs_system_ruleset="localrules"</programlisting> <programlisting>devfs_system_ruleset="localrules"</programlisting>
<para>Then, instruct the system to allow regular users <para>Then, instruct the system to allow regular users to mount
to mount file systems by adding the file systems by adding the following line to
following line to
<filename>/etc/sysctl.conf</filename>:</para> <filename>/etc/sysctl.conf</filename>:</para>
<programlisting>vfs.usermount=1</programlisting> <programlisting>vfs.usermount=1</programlisting>
@ -568,7 +567,7 @@ add path 'da*' mode 0660 group operator</programlisting>
<para>Since this only takes effect after the next reboot, use <para>Since this only takes effect after the next reboot, use
<command>sysctl</command> to set this variable now:</para> <command>sysctl</command> to set this variable now:</para>
<screen>&prompt.root; <userinput>sysctl vfs.usermount=1</userinput> <screen>&prompt.root; <userinput>sysctl vfs.usermount=1</userinput>
vfs.usermount: 0 -&gt; 1</screen> vfs.usermount: 0 -&gt; 1</screen>
<para>The final step is to create a directory where the file <para>The final step is to create a directory where the file
@ -587,19 +586,18 @@ vfs.usermount: 0 -&gt; 1</screen>
<para>Suppose a <acronym>USB</acronym> thumbdrive is plugged in, <para>Suppose a <acronym>USB</acronym> thumbdrive is plugged in,
and a device <filename>/dev/da0s1</filename> appears. If the and a device <filename>/dev/da0s1</filename> appears. If the
device is formatted with a <acronym>FAT</acronym> file system, the user can device is formatted with a <acronym>FAT</acronym> file system,
mount it using:</para> the user can mount it using:</para>
<screen>&prompt.user; <userinput>mount -t msdosfs -o -m=644,-M=755 /dev/da0s1 /mnt/<replaceable>username</replaceable></userinput></screen> <screen>&prompt.user; <userinput>mount -t msdosfs -o -m=644,-M=755 /dev/da0s1 /mnt/<replaceable>username</replaceable></userinput></screen>
<para>Before the device can be unplugged, it <para>Before the device can be unplugged, it
<emphasis>must</emphasis> be unmounted first:</para> <emphasis>must</emphasis> be unmounted first:</para>
<screen>&prompt.user; <userinput>umount /mnt/<replaceable>username</replaceable></userinput></screen> <screen>&prompt.user; <userinput>umount /mnt/<replaceable>username</replaceable></userinput></screen>
<para>After device <para>After device removal, the system message buffer will show
removal, the system message buffer will show messages similar messages similar to the following:</para>
to the following:</para>
<screen>umass0: at uhub3, port 2, addr 3 (disconnected) <screen>umass0: at uhub3, port 2, addr 3 (disconnected)
da0 at umass-sim0 bus 0 scbus4 target 0 lun 0 da0 at umass-sim0 bus 0 scbus4 target 0 lun 0
@ -629,14 +627,16 @@ da0: &lt;STECH Simple Drive 1.04&gt; s/n WD-WXE508CAN263 detached
</indexterm> </indexterm>
<para><acronym>CD</acronym> media provide a number of features <para><acronym>CD</acronym> media provide a number of features
that differentiate them from conventional disks. They are designed so that that differentiate them from conventional disks. They are
they can be read continuously without delays to move the head designed so that they can be read continuously without delays to
between tracks. While <acronym>CD</acronym> media do have tracks, these refer move the head between tracks. While <acronym>CD</acronym> media
to a section of data to be read continuously, and not a physical do have tracks, these refer to a section of data to be read
property of the disk. The <acronym>ISO</acronym> 9660 file system was designed to deal with these continuously, and not a physical property of the disk. The
differences.</para> <acronym>ISO</acronym> 9660 file system was designed to deal
with these differences.</para>
<indexterm><primary><acronym>ISO</acronym> 9660</primary></indexterm> <indexterm><primary><acronym>ISO</acronym>
9660</primary></indexterm>
<indexterm> <indexterm>
<primary>file systems</primary> <primary>file systems</primary>
<secondary>ISO 9660</secondary> <secondary>ISO 9660</secondary>
@ -652,10 +652,10 @@ da0: &lt;STECH Simple Drive 1.04&gt; s/n WD-WXE508CAN263 detached
Which tool to use to burn a <acronym>CD</acronym> depends Which tool to use to burn a <acronym>CD</acronym> depends
on whether the <acronym>CD</acronym> burner is an on whether the <acronym>CD</acronym> burner is an
<acronym>ATAPI</acronym>, <acronym>SCSI</acronym>, or <acronym>ATAPI</acronym>, <acronym>SCSI</acronym>, or
<acronym>USB</acronym> device. This chapter demonstrates the use <acronym>USB</acronym> device. This chapter demonstrates the
of several command line utilities. For <acronym>CD</acronym> use of several command line utilities. For
burning software with a graphical, consider installing the <acronym>CD</acronym> burning software with a graphical,
<package>sysutils/xcdroast</package> or consider installing the <package>sysutils/xcdroast</package> or
<package>sysutils/k3b</package> packages or ports.</para> <package>sysutils/k3b</package> packages or ports.</para>
<sect2 xml:id="atapicam"> <sect2 xml:id="atapicam">
@ -713,23 +713,23 @@ device umass # Disks/Mass storage - Requires scbus and da</programlisting>
<programlisting>device ata # Legacy ATA/SATA controllers <programlisting>device ata # Legacy ATA/SATA controllers
device scbus # SCSI bus (required for ATA/SCSI) device scbus # SCSI bus (required for ATA/SCSI)
device pass # Passthrough device (direct ATA/SCSI access) device pass # Passthrough device (direct ATA/SCSI access)
device cd # needed for CD and DVD burners device cd # needed for CD and DVD burners</programlisting>
</programlisting>
<note> <note>
<para>On &os; versions prior to 10.x, this line is also <para>On &os; versions prior to 10.x, this line is also
needed in the kernel configuration file if the burner is an needed in the kernel configuration file if the burner is an
<acronym>ATAPI</acronym> device:</para> <acronym>ATAPI</acronym> device:</para>
<programlisting>device atapicam</programlisting> <programlisting>device atapicam</programlisting>
<para>Alternately, this driver can be loaded at boot time by adding the following line to <para>Alternately, this driver can be loaded at boot time by
<filename>/boot/loader.conf</filename>:</para> adding the following line to
<filename>/boot/loader.conf</filename>:</para>
<programlisting>atapicam_load="YES"</programlisting> <programlisting>atapicam_load="YES"</programlisting>
<para>This will require a reboot of the system as this driver <para>This will require a reboot of the system as this driver
can only be loaded at boot time.</para> can only be loaded at boot time.</para>
</note> </note>
<para>To verify that &os; recognizes the device, run <para>To verify that &os; recognizes the device, run
@ -740,27 +740,25 @@ device cd # needed for CD and DVD burners
<screen>&prompt.user; <userinput>dmesg | grep cd</userinput> <screen>&prompt.user; <userinput>dmesg | grep cd</userinput>
cd0 at ahcich1 bus 0 scbus1 target 0 lun 0 cd0 at ahcich1 bus 0 scbus1 target 0 lun 0
cd0: &lt;HL-DT-ST DVDRAM GU70N LT20&gt; Removable CD-ROM SCSI-0 device cd0: &lt;HL-DT-ST DVDRAM GU70N LT20&gt; Removable CD-ROM SCSI-0 device
cd0: Serial Number M3OD3S34152 cd0: Serial Number M3OD3S34152
cd0: 150.000MB/s transfers (SATA 1.x, UDMA6, ATAPI 12bytes, PIO 8192bytes) cd0: 150.000MB/s transfers (SATA 1.x, UDMA6, ATAPI 12bytes, PIO 8192bytes)
cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed</screen>
</screen>
</sect2> </sect2>
<sect2 xml:id="cdrecord"> <sect2 xml:id="cdrecord">
<title>Burning a <acronym>CD</acronym></title> <title>Burning a <acronym>CD</acronym></title>
<para>In &os;, <command>cdrecord</command> can <para>In &os;, <command>cdrecord</command> can be used to burn
be used to burn <acronym>CD</acronym>s. This command is <acronym>CD</acronym>s. This command is installed with the
installed with the
<package>sysutils/cdrtools</package> package or port.</para> <package>sysutils/cdrtools</package> package or port.</para>
<note> <note>
<para>&os; 8.x includes the built-in <para>&os; 8.x includes the built-in
<command>burncd</command> utility for burning <command>burncd</command> utility for burning
<acronym>CD</acronym>s using an <acronym>ATAPI</acronym> <acronym>CD</acronym>s using an <acronym>ATAPI</acronym>
<acronym>CD</acronym> burner. Refer to the manual page for <acronym>CD</acronym> burner. Refer to the manual page for
<command>burncd</command> for usage examples.</para> <command>burncd</command> for usage examples.</para>
</note> </note>
<para>While <command>cdrecord</command> has many options, basic <para>While <command>cdrecord</command> has many options, basic
@ -809,9 +807,10 @@ scsibus1:
easier ways to specify this value and for information on easier ways to specify this value and for information on
writing audio tracks and controlling the write speed.</para> writing audio tracks and controlling the write speed.</para>
<para>Alternately, as <systemitem class="username">root</systemitem>, run the <para>Alternately, as <systemitem
following command to get the <acronym>SCSI</acronym> address class="username">root</systemitem>, run the following
of the burner:</para> command to get the <acronym>SCSI</acronym> address of the
burner:</para>
<screen>&prompt.root; <userinput>camcontrol devlist</userinput> <screen>&prompt.root; <userinput>camcontrol devlist</userinput>
&lt;MATSHITA CDRW/DVD UJDA740 1.00&gt; at scbus1 target 0 lun 0 (pass0,cd0)</screen> &lt;MATSHITA CDRW/DVD UJDA740 1.00&gt; at scbus1 target 0 lun 0 (pass0,cd0)</screen>
@ -824,12 +823,14 @@ scsibus1:
<sect2 xml:id="mkisofs"> <sect2 xml:id="mkisofs">
<title>Creating an <acronym>ISO</acronym> File System</title> <title>Creating an <acronym>ISO</acronym> File System</title>
<para>In order to produce a data <acronym>CD</acronym>, the data files that are <para>In order to produce a data <acronym>CD</acronym>, the data
going to make up the tracks on the <acronym>CD</acronym> must be prepared then files that are going to make up the tracks on the
written to the <acronym>CD</acronym>. In &os;, the <package>sysutils/cdrtools</package> <acronym>CD</acronym> must be prepared then written to the
package or port installs <command>mkisofs</command>, which produces an ISO 9660 <acronym>CD</acronym>. In &os;, the
file system that is an image of a directory tree in the &unix; <package>sysutils/cdrtools</package> package or port installs
file system name space. The simplest usage is:</para> <command>mkisofs</command>, which produces an ISO 9660 file
system that is an image of a directory tree in the &unix; file
system name space. The simplest usage is:</para>
<screen>&prompt.root; <userinput>mkisofs -o <replaceable>imagefile.iso</replaceable> <replaceable>/path/to/tree</replaceable></userinput></screen> <screen>&prompt.root; <userinput>mkisofs -o <replaceable>imagefile.iso</replaceable> <replaceable>/path/to/tree</replaceable></userinput></screen>
@ -2027,7 +2028,7 @@ Update example for cdrecord
include a rescue shell. For this version, instead include a rescue shell. For this version, instead
download and burn a Livefs <acronym>CD</acronym> image from download and burn a Livefs <acronym>CD</acronym> image from
<uri <uri
xlink:href="ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/&arch.i386;/ISO-IMAGES/&rel2.current;/&os;-&rel2.current;-RELEASE-&arch.i386;-livefs.iso">ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/&arch.i386;/ISO-IMAGES/&rel2.current;/&os;-&rel2.current;-RELEASE-&arch.i386;-livefs.iso</uri>.</para> xlink:href="ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/&arch.i386;/ISO-IMAGES/&rel2.current;/&os;-&rel2.current;-RELEASE-&arch.i386;-livefs.iso">ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/&arch.i386;/ISO-IMAGES/&rel2.current;/&os;-&rel2.current;-RELEASE-&arch.i386;-livefs.iso</uri>.</para>
</note> </note>
<para>Next, test the rescue shell and the backups. Make notes <para>Next, test the rescue shell and the backups. Make notes