⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 creating-cds.html

📁 FreeBSD安装说明概述 FreeBSD 提供了一个以文字为主
💻 HTML
📖 第 1 页 / 共 2 页
字号:
class="REPLACEABLE">2,0</var> -dao -useinfo  *.wav</kbd></pre><p>Make sure that <var class="REPLACEABLE">2.0</var> is set appropriately, as describedin <a href="creating-cds.html#CDRECORD">Section 12.5.4</a>.</p></li></ol></div><div class="PROCEDURE"><p><b>ATAPI Drives</b></p><ol type="1"><li><p>The ATAPI CD driver makes each track available as <tt class="FILENAME">/dev/acd<varclass="REPLACEABLE">d</var>t<var class="REPLACEABLE">nn</var></tt>, where <varclass="REPLACEABLE">d</var> is the drive number, and <var class="REPLACEABLE">nn</var> isthe track number written with two decimal digits, prefixed with zero as needed. So thefirst track on the first disk is <tt class="FILENAME">/dev/acd0t01</tt>, the second is<tt class="FILENAME">/dev/acd0t02</tt>, the third is <ttclass="FILENAME">/dev/acd0t03</tt>, and so on.</p><p>Make sure the appropriate files exist in <tt class="FILENAME">/dev</tt>.</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbd class="USERINPUT">cd /dev</kbd><samp class="PROMPT">#</samp> <kbd class="USERINPUT">sh MAKEDEV acd0t99</kbd></pre><div class="NOTE"><blockquote class="NOTE"><p><b>Note:</b> In FreeBSD 5.0, <span class="CITEREFENTRY"><spanclass="REFENTRYTITLE">devfs</span>(5)</span> will automatically create and manage entriesin <tt class="FILENAME">/dev</tt> for you, so it is not necessary to use <ttclass="COMMAND">MAKEDEV</tt>.</p></blockquote></div></li><li><p>Extract each track using <span class="CITEREFENTRY"><spanclass="REFENTRYTITLE">dd</span>(1)</span>. You must also use a specific block size whenextracting the files.</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbdclass="USERINPUT">dd if=/dev/acd0t01 of=track1.cdr bs=2352</kbd><samp class="PROMPT">#</samp> <kbdclass="USERINPUT">dd if=/dev/acd0t02 of=track2.cdr bs=2352</kbd>...</pre></li><li><p>Burn the extracted files to disk using <tt class="COMMAND">burncd</tt>. You mustspecify that these are audio files, and that <tt class="COMMAND">burncd</tt> shouldfixate the disk when finished.</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbd class="USERINPUT">burncd -f <varclass="REPLACEABLE">/dev/acd0c</var> audio track1.cdr track2.cdr <varclass="REPLACEABLE">...</var> fixate</kbd></pre></li></ol></div></div><div class="SECT2"><h2 class="SECT2"><a id="IMAGING-CD" name="IMAGING-CD">12.5.6. Duplicating DataCDs</a></h2><p>You can copy a data CD to a image file that is functionally equivalent to the imagefile created with <ahref="http://www.FreeBSD.org/cgi/url.cgi?ports/sysutils/mkisofs/pkg-descr"><ttclass="FILENAME">sysutils/mkisofs</tt></a>, and you can use it to duplicate any data CD.The example given here assumes that your CDROM device is <ttclass="DEVICENAME">acd0</tt>. Substitute your correct CDROM device. A <varclass="LITERAL">c</var> must be appended to the end of the device name to indicate theentire partition or, in the case of CDROMs, the entire disc.</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbdclass="USERINPUT">dd if=/dev/acd0c of=file.iso bs=2048</kbd></pre><p>Now that you have an image, you can burn it to CD as described above.</p></div><div class="SECT2"><h2 class="SECT2"><a id="MOUNTING-CD" name="MOUNTING-CD">12.5.7. Using Data CDs</a></h2><p>Now that you have created a standard data CDROM, you probably want to mount it andread the data on it. By default, <span class="CITEREFENTRY"><spanclass="REFENTRYTITLE">mount</span>(8)</span> assumes that a file system is of type <varclass="LITERAL">ufs</var>. If you try something like:</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbd class="USERINPUT">mount /dev/cd0c /mnt</kbd></pre><p>you will get a complaint about ``<tt class="ERRORNAME">Incorrect super block</tt>'',and no mount. The CDROM is not a <var class="LITERAL">UFS</var> file system, so attemptsto mount it as such will fail. You just need to tell <span class="CITEREFENTRY"><spanclass="REFENTRYTITLE">mount</span>(8)</span> that the file system is of type <varclass="LITERAL">ISO9660</var>, and everything will work. You do this by specifying the<var class="OPTION">-t cd9660</var> option <span class="CITEREFENTRY"><spanclass="REFENTRYTITLE">mount</span>(8)</span>. For example, if you want to mount the CDROMdevice, <tt class="DEVICENAME">/dev/cd0c</tt>, under <tt class="FILENAME">/mnt</tt>, youwould execute:</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbd class="USERINPUT">mount -t cd9660 /dev/cd0c /mnt</kbd></pre><p>Note that your device name (<tt class="DEVICENAME">/dev/cd0c</tt> in this example)could be different, depending on the interface your CDROM uses. Also, the <varclass="OPTION">-t cd9660</var> option just executes <span class="CITEREFENTRY"><spanclass="REFENTRYTITLE">mount_cd9660</span>(8)</span>. The above example could be shortenedto:</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbd class="USERINPUT">mount_cd9660 /dev/cd0c /mnt</kbd></pre><p>You can generally use data CDROMs from any vendor in this way. Disks with certain ISO9660 extensions might behave oddly, however. For example, Joliet disks store allfilenames in two-byte Unicode characters. The FreeBSD kernel does not speak Unicode(yet!), so non-English characters show up as question marks. (If you are running FreeBSD4.3 or later, the CD9660 driver includes hooks to load an appropriate Unicode conversiontable on the fly. Modules for some of the common encodings are available via the <ahref="http://www.FreeBSD.org/cgi/url.cgi?ports/sysutils/cd9660_unicode/pkg-descr"><ttclass="FILENAME">sysutils/cd9660_unicode</tt></a> port.)</p><p>Occasionally, you might get ``<tt class="ERRORNAME">Device not configured</tt>'' whentrying to mount a CDROM. This usually means that the CDROM drive thinks that there is nodisk in the tray, or that the drive is not visible on the bus. It can take a couple ofseconds for a CDROM drive to realize that it has been fed, so be patient.</p><p>Sometimes, a SCSI CDROM may be missed because it didn't have enough time to answer thebus reset. If you have a SCSI CDROM please add the following option to your kernelconfiguration and <a href="kernelconfig-building.html">rebuild your kernel</a>.</p><pre class="PROGRAMLISTING">options SCSI_DELAY=15000</pre><p>This tells your SCSI bus to pause 15 seconds during boot, to give your CDROM driveevery possible chance to answer the bus reset.</p></div><div class="SECT2"><h2 class="SECT2"><a id="RAWDATA-CD" name="RAWDATA-CD">12.5.8. Burning Raw DataCDs</a></h2><p>You can choose to burn a file directly to CD, without creating an ISO 9660 filesystem. Some people do this for backup purposes. This runs more quickly than burning astandard CD:</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbdclass="USERINPUT">burncd -f /dev/acd1c -s 12 data archive.tar.gz fixate</kbd></pre><p>In order to retrieve the data burned to such a CD, you must read data from the rawdevice node:</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbd class="USERINPUT">tar xzvf /dev/acd1c</kbd></pre><p>You cannot mount this disk as you would a normal CDROM. Such a CDROM cannot be readunder any operating system except FreeBSD. If you want to be able to mount the CD, orshare data with another operating system, you must use <ahref="http://www.FreeBSD.org/cgi/url.cgi?ports/sysutils/mkisofs/pkg-descr"><ttclass="FILENAME">sysutils/mkisofs</tt></a> as described above.</p></div><div class="SECT2"><h2 class="SECT2"><a id="ATAPICAM" name="ATAPICAM">12.5.9. Using the ATAPI/CAMDriver</a></h2><p>This driver allows ATAPI devices (CD-ROM, CD-RW, DVD drives etc...) to be accessedthrough the SCSI subsystem, and so allows the use of applications like <ahref="http://www.FreeBSD.org/cgi/url.cgi?ports/sysutils/cdrdao/pkg-descr"><ttclass="FILENAME">sysutils/cdrdao</tt></a> or <span class="CITEREFENTRY"><spanclass="REFENTRYTITLE">cdrecord</span>(1)</span>.</p><p>To use this driver, you will need to add the following lines to your kernelconfiguration file:</p><pre class="PROGRAMLISTING">device atapicamdevice scbusdevice cddevice pass</pre><p>You also need the following lines in your kernel configuration file:</p><pre class="PROGRAMLISTING">device atadevice atapicd</pre><p>Both of which should already be present.</p><p>Then rebuild, install your new kernel, and reboot your machine. During the bootprocess, your burner should show up, like so:</p><pre class="SCREEN">acd0: CD-RW &lt;MATSHITA CD-RW/DVD-ROM UJDA740&gt; at ata1-master PIO4cd0 at ata1 bus 0 target 0 lun 0cd0: &lt;MATSHITA CDRW/DVD UJDA740 1.00&gt; Removable CD-ROM SCSI-0 devicecd0: 16.000MB/s transferscd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed</pre><p>The drive could now be accessed via the <tt class="FILENAME">/dev/cd0</tt> devicename, for example to mount a CD-ROM on <tt class="FILENAME">/mnt</tt>, just type thefollowing:</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbd class="USERINPUT">mount -t cd9660 <varclass="REPLACEABLE">/dev/cd0c</var> /mnt</kbd></pre><p>As <tt class="USERNAME">root</tt>, you can run the following command to get the SCSIaddress of the burner:</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbd class="USERINPUT">camcontrol devlist</kbd>&lt;MATSHITA CDRW/DVD UJDA740 1.00&gt;   at scbus1 target 0 lun 0 (pass0,cd0)</pre><p>So <var class="LITERAL">1,0,0</var> will be the SCSI address to use with <spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">cdrecord</span>(1)</span> and other SCSIapplication.</p><p>For more information about ATAPI/CAM and SCSI system, refer to the <spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">atapicam</span>(4)</span> and <spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">cam</span>(4)</span> manual pages.</p></div></div><div class="NAVFOOTER"><hr align="LEFT" width="100%" /><table summary="Footer navigation table" width="100%" border="0" cellpadding="0"cellspacing="0"><tr><td width="33%" align="left" valign="top"><a href="raid.html" accesskey="P">Prev</a></td><td width="34%" align="center" valign="top"><a href="index.html"accesskey="H">Home</a></td><td width="33%" align="right" valign="top"><a href="floppies.html"accesskey="N">Next</a></td></tr><tr><td width="33%" align="left" valign="top">RAID</td><td width="34%" align="center" valign="top"><a href="disks.html"accesskey="U">Up</a></td><td width="33%" align="right" valign="top">Creating and Using Floppy Disks</td></tr></table></div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -