Finish editorial review of CD chapter.

Sponsored by:	iXsystems
This commit is contained in:
Dru Lavigne 2014-04-24 15:32:08 +00:00
parent a90c196ae0
commit d6ab797f42
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=44644

View file

@ -917,46 +917,23 @@ scsibus1:
<sect2 xml:id="mounting-cd"> <sect2 xml:id="mounting-cd">
<title>Using Data <acronym>CD</acronym>s</title> <title>Using Data <acronym>CD</acronym>s</title>
<para>The drive can now be accessed via the <para>Once an <acronym>ISO</acronym> has been burned to a
<filename>/dev/cd0</filename> device name. For example, to <acronym>CD</acronym>, it can be mounted by specifying the
mount a <acronym>CD-ROM</acronym> on file system type, the name of the device containing the
<filename>/mnt</filename>, type the following:</para> <acronym>CD</acronym>, and an existing mount point:</para>
<screen>&prompt.root; <userinput>mount -t cd9660 <replaceable>/dev/cd0</replaceable> /mnt</userinput></screen> <screen>&prompt.root; <userinput>mount -t cd9660 <replaceable>/dev/cd0</replaceable> <replaceable>/mnt</replaceable></userinput></screen>
<para>It is possible to mount and read the data on a standard <para>Since <command>mount</command> assumes
data <acronym>CD</acronym>. By default, &man.mount.8; assumes that a file system is of type <literal>ufs</literal>, a
that a file system is of type <literal>ufs</literal>. Running <errorname>Incorrect super block</errorname> error will occur
this command:</para> if <literal>-t cd9660</literal> is not included when mounting
a data <acronym>CD</acronym>.</para>
<screen>&prompt.root; <userinput>mount /dev/cd0 /mnt</userinput></screen> <para>While any data <acronym>CD</acronym> can
be mounted this way, disks with certain <acronym>ISO</acronym> 9660 extensions
<para>will generate an error about <errorname>Incorrect super
block</errorname>, and will fail to mount the
<acronym>CD</acronym>. The <acronym>CD</acronym> does not use
the <literal>UFS</literal> file system, so attempts to mount
it as such will fail. Instead, tell &man.mount.8; that the
file system is of type <literal>ISO9660</literal> by
specifying <option>-t cd9660</option> to &man.mount.8;. For
example, to mount the <acronym>CD-ROM</acronym> device,
<filename>/dev/cd0</filename>, under
<filename>/mnt</filename>, use:</para>
<screen>&prompt.root; <userinput>mount -t cd9660 /dev/cd0 /mnt</userinput></screen>
<para>Replace <filename>/dev/cd0</filename> with the device
name for the <acronym>CD</acronym> device. Also,
<option>-t cd9660</option> executes &man.mount.cd9660.8;,
meaning the above command is equivalent to:</para>
<screen>&prompt.root; <userinput>mount_cd9660 /dev/cd0 /mnt</userinput></screen>
<para>While data <acronym>CD-ROM</acronym>s from any vendor can
be mounted this way, disks with certain ISO 9660 extensions
might behave oddly. For example, Joliet disks store all might behave oddly. For example, Joliet disks store all
filenames in two-byte Unicode characters. The &os; kernel filenames in two-byte Unicode characters. If some non-English
does not speak Unicode, but the &os; CD9660 driver is able to
convert Unicode characters on the fly. If some non-English
characters show up as question marks, specify the local characters show up as question marks, specify the local
charset with <option>-C</option>. For more information, refer charset with <option>-C</option>. For more information, refer
to &man.mount.cd9660.8;.</para> to &man.mount.cd9660.8;.</para>
@ -971,54 +948,51 @@ scsibus1:
<programlisting>cd9660_iconv_load="YES"</programlisting> <programlisting>cd9660_iconv_load="YES"</programlisting>
<para>and then rebooting the machine, or by directly loading <para>and then rebooting the machine, or by directly loading
the module with &man.kldload.8;.</para> the module with <command>kldload</command>.</para>
</note> </note>
<para>Occasionally, <errorname>Device not configured</errorname> <para>Occasionally, <errorname>Device not configured</errorname>
will be displayed when trying to mount a will be displayed when trying to mount a data
<acronym>CD-ROM</acronym>. This usually means that the <acronym>CD</acronym>. This usually means that the
<acronym>CD-ROM</acronym> drive thinks that there is no disk <acronym>CD</acronym> drive thinks that there is no disk
in the tray, or that the drive is not visible on the bus. It in the tray, or that the drive is not visible on the bus. It
can take a couple of seconds for a <acronym>CD-ROM</acronym> can take a couple of seconds for a <acronym>CD</acronym>
drive to realize that a media is present, so be drive to realize that a media is present, so be
patient.</para> patient.</para>
<para>Sometimes, a <acronym>SCSI</acronym> <para>Sometimes, a <acronym>SCSI</acronym>
<acronym>CD-ROM</acronym> may be missed because it did not <acronym>CD</acronym> drive may be missed because it did not
have enough time to answer the bus reset. To resolve this, have enough time to answer the bus reset. To resolve this,
add the following option to the kernel configuration and a custom kernel can be created which increases the default
<link linkend="kernelconfig-building">rebuild the <acronym>SCSI</acronym> delay. Add the following option to
kernel</link>.</para> the custom kernel configuration file and rebuild the kernel
using the instructions in <xref
linkend="kernelconfig-building"/>:</para>
<programlisting>options SCSI_DELAY=15000</programlisting> <programlisting>options SCSI_DELAY=15000</programlisting>
<para>This tells the <acronym>SCSI</acronym> bus to pause 15 <para>This tells the <acronym>SCSI</acronym> bus to pause 15
seconds during boot, to give the <acronym>CD-ROM</acronym> seconds during boot, to give the <acronym>CD</acronym>
drive every possible chance to answer the bus reset.</para> drive every possible chance to answer the bus reset.</para>
<note> <note>
<para>It is possible to burn a file directly to <para>It is possible to burn a file directly to
<acronym>CD</acronym>, without creating an ISO 9660 file <acronym>CD</acronym>, without creating an <acronym>ISO</acronym> 9660 file
system. This is known as burning a raw data system. This is known as burning a raw data
<acronym>CD</acronym>. Some people do this for backup purposes. This <acronym>CD</acronym> and some people do this for backup purposes.</para>
command runs more quickly than burning a standard
<acronym>CD</acronym>.</para> <para>This type of disk can not be mounted as a normal data
<!-- <acronym>CD</acronym>. In order to retrieve the data burned to such a
Update example for cdrecord
<screen>&prompt.root; <userinput>burncd -f /dev/acd1 -s 12 data archive.tar.gz fixate</userinput></screen>
-->
<para>In order to retrieve the data burned to such a
<acronym>CD</acronym>, the data must be read from the raw <acronym>CD</acronym>, the data must be read from the raw
device node:</para> device node. For example, this command will extract a
compressed tar file located on the second <acronym>CD</acronym>
device into the current working directory:</para>
<screen>&prompt.root; <userinput>tar xzvf /dev/acd1</userinput></screen> <screen>&prompt.root; <userinput>tar xzvf /dev/<replaceable>cd1</replaceable></userinput></screen>
<para>This type of disk can not be mounted as a normal <para> In order to mount a data
<acronym>CD-ROM</acronym> and the data cannot be read under <acronym>CD</acronym>, the data must be written using
any operating system except &os;. In order to mount the <command>mkisofs</command>.</para>
<acronym>CD</acronym>, or to share the data with another
operating system, &man.mkisofs.8; must be used as described
above.</para>
</note> </note>
</sect2> </sect2>
@ -1027,18 +1001,32 @@ Update example for cdrecord
<para>To duplicate an audio <acronym>CD</acronym>, extract the <para>To duplicate an audio <acronym>CD</acronym>, extract the
audio data from the <acronym>CD</acronym> to a series of audio data from the <acronym>CD</acronym> to a series of
files, then write these files to a blank files, then write these files to a blank
<acronym>CD</acronym>. The process is slightly different for <acronym>CD</acronym>.</para>
<acronym>ATAPI</acronym> and <acronym>SCSI</acronym>
drives.</para>
<procedure> <para><xref linkend="using-cdrecord"/> describes how to
<title><acronym>SCSI</acronym> Drives</title> duplicate and burn an audio <acronym>CD</acronym>. If the
&os; version is less than 10.0 and the device is
<acronym>ATAPI</acronym>, the <option>atapicam</option> module
must be first loaded using the instructions in <xref
linkend="atapicam"/>.</para>
<procedure xml:id="using-cdrecord">
<title>Duplicating an Audio <acronym>CD</acronym></title>
<step> <step>
<para>Use <command>cdda2wav</command> to extract the <para>The <package>sysutils/cdrecord</package> package or
audio:</para> port installs <command>cdda2wav</command>. This command
can be used to extract all of the audio tracks, with each
track written to a separate <acronym>WAV</acronym>
file in the current working directory:</para>
<screen>&prompt.user; <userinput>cdda2wav -vall -D2,0 -B -Owav</userinput></screen> <screen>&prompt.user; <userinput>cdda2wav -vall -B -Owav</userinput></screen>
<para>A device name does not need to be specified if there
is only one <acronym>CD</acronym> device on the system.
Refer to the <command>cdda2wav</command> manual page for
instructions on how to specify a device and to learn more
about the other options available for this command.</para>
</step> </step>
<step> <step>
@ -1052,59 +1040,6 @@ Update example for cdrecord
linkend="cdrecord"/>.</para> linkend="cdrecord"/>.</para>
</step> </step>
</procedure> </procedure>
<procedure>
<title><acronym>ATAPI</acronym> Drives</title>
<note>
<para>With the help of the <link
linkend="atapicam">ATAPI/CAM module</link>,
<command>cdda2wav</command> can also be used on
<acronym>ATAPI</acronym> drives. This tool is usually a
better choice for most of users, as it supports jitter
correction and endianness, than the method proposed
below.</para>
</note>
<step>
<para>The <acronym>ATAPI</acronym> <acronym>CD</acronym>
driver makes each track available as
<filename>/dev/acd<replaceable>d</replaceable>t<replaceable>nn</replaceable></filename>,
where <replaceable>d</replaceable> is the drive number,
and <replaceable>nn</replaceable> is the track number
written with two decimal digits, prefixed with zero as
needed. So the first track on the first disk is
<filename>/dev/acd0t01</filename>, the second is
<filename>/dev/acd0t02</filename>, the third is
<filename>/dev/acd0t03</filename>, and so on.</para>
<para>Make sure the appropriate files exist in
<filename>/dev</filename>. If the entries are missing,
force the system to retaste the media:</para>
<screen>&prompt.root; <userinput>dd if=/dev/acd0 of=/dev/null count=1</userinput></screen>
</step>
<step>
<para>Extract each track using &man.dd.1;, making sure to
specify a block size when extracting the files:</para>
<screen>&prompt.root; <userinput>dd if=/dev/acd0t01 of=track1.cdr bs=2352</userinput>
&prompt.root; <userinput>dd if=/dev/acd0t02 of=track2.cdr bs=2352</userinput>
...</screen>
</step>
<step>
<para>Burn the extracted files to disk using
<command>cdrecord</command>. Specify that these are audio
files, and that <command>cdrecord</command> should fixate
the disk when finished:</para>
<!--
Update example for cdrecord
<screen>&prompt.root; <userinput>burncd -f <replaceable>/dev/acd0</replaceable> audio track1.cdr track2.cdr <replaceable>...</replaceable> fixate</userinput></screen>
-->
</step>
</procedure>
</sect2> </sect2>
</sect1> </sect1>