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

📄 floppies.html

📁 FreeBSD操作系统的详细使用手册
💻 HTML
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="generator" content="HTML Tidy, see www.w3.org" /><title>Creating and Using Floppy Disks</title><meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.7" /><link rel="HOME" title="FreeBSD Handbook" href="index.html" /><link rel="UP" title="Storage" href="disks.html" /><link rel="PREVIOUS" title="Creating and Using Optical Media (DVDs)"href="creating-dvds.html" /><link rel="NEXT" title="Creating and Using Data Tapes" href="backups-tapebackups.html" /><link rel="STYLESHEET" type="text/css" href="docbook.css" /></head><body class="SECT1" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#840084"alink="#0000FF"><div class="NAVHEADER"><table summary="Header navigation table" width="100%" border="0" cellpadding="0"cellspacing="0"><tr><th colspan="3" align="center">FreeBSD Handbook</th></tr><tr><td width="10%" align="left" valign="bottom"><a href="creating-dvds.html"accesskey="P">Prev</a></td><td width="80%" align="center" valign="bottom">Chapter 16 Storage</td><td width="10%" align="right" valign="bottom"><a href="backups-tapebackups.html"accesskey="N">Next</a></td></tr></table><hr align="LEFT" width="100%" /></div><div class="SECT1"><h1 class="SECT1"><a id="FLOPPIES" name="FLOPPIES">16.8 Creating and Using FloppyDisks</a></h1><i class="AUTHORGROUP"><span class="CONTRIB">Original work by</span> Julio Merino.</i> <iclass="AUTHORGROUP"><span class="CONTRIB">Rewritten by</span> Martin Karlsson.</i> <p>Storing data on floppy disks is sometimes useful, for example when one does not haveany other removable storage media or when one needs to transfer small amounts of data toanother computer.</p><p>This section will explain how to use floppy disks in FreeBSD. It will primarily coverformatting and usage of 3.5inch DOS floppies, but the concepts are similar for otherfloppy disk formats.</p><div class="SECT2"><h2 class="SECT2"><a id="AEN24518" name="AEN24518">16.8.1 Formatting Floppies</a></h2><div class="SECT3"><h3 class="SECT3"><a id="AEN24520" name="AEN24520">16.8.1.1 The Device</a></h3><p>Floppy disks are accessed through entries in <tt class="FILENAME">/dev</tt>, just likeother devices. To access the raw floppy disk in 4.X and earlier releases, one uses <ttclass="FILENAME">/dev/fd<var class="REPLACEABLE">N</var></tt>, where <varclass="REPLACEABLE">N</var> stands for the drive number, usually 0, or <ttclass="FILENAME">/dev/fd<var class="REPLACEABLE">NX</var></tt>, where <varclass="REPLACEABLE">X</var> stands for a letter.</p><p>In 5.0 or newer releases, simply use <tt class="FILENAME">/dev/fd<varclass="REPLACEABLE">N</var></tt>.</p><div class="SECT4"><h4 class="SECT4"><a id="AEN24533" name="AEN24533">16.8.1.1.1 The Disk Size in 4.X andEarlier Releases</a></h4><p>There are also <tt class="FILENAME">/dev/fd<var class="REPLACEABLE">N</var>.<varclass="REPLACEABLE">size</var></tt> devices, where <var class="REPLACEABLE">size</var> isa floppy disk size in kilobytes. These entries are used at low-level format time todetermine the disk size. 1440kB is the size that will be used in the followingexamples.</p><p>Sometimes the entries under <tt class="FILENAME">/dev</tt> will have to be(re)created. To do that, issue:</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbdclass="USERINPUT">cd /dev &#38;&#38; ./MAKEDEV "fd*"</kbd></pre></div><div class="SECT4"><h4 class="SECT4"><a id="AEN24545" name="AEN24545">16.8.1.1.2 The Disk Size in 5.0 andNewer Releases</a></h4><p>In 5.0, <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=devfs&sektion=5&manpath=FreeBSD+6-current"><span class="CITEREFENTRY"><span class="REFENTRYTITLE">devfs</span>(5)</span></a> willautomatically manage device nodes in <tt class="FILENAME">/dev</tt>, so use of <ttclass="COMMAND">MAKEDEV</tt> is not necessary.</p><p>The desired disk size is passed to <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=fdformat&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">fdformat</span>(1)</span></a> throughthe <var class="OPTION">-f</var> flag. Supported sizes are listed in <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=fdcontrol&sektion=8"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">fdcontrol</span>(8)</span></a>, but beadvised that 1440kB is what works best.</p></div></div><div class="SECT3"><h3 class="SECT3"><a id="AEN24561" name="AEN24561">16.8.1.2 Formatting</a></h3><p>A floppy disk needs to be low-level formated before it can be used. This is usuallydone by the vendor, but formatting is a good way to check media integrity. Although it ispossible to force larger (or smaller) disk sizes, 1440kB is what most floppy disks aredesigned for.</p><p>To low-level format the floppy disk you need to use <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=fdformat&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">fdformat</span>(1)</span></a>. Thisutility expects the device name as an argument.</p><p>Make note of any error messages, as these can help determine if the disk is good orbad.</p><div class="SECT4"><h4 class="SECT4"><a id="AEN24569" name="AEN24569">16.8.1.2.1 Formatting in 4.X andEarlier Releases</a></h4><p>Use the <tt class="FILENAME">/dev/fd<var class="REPLACEABLE">N</var>.<varclass="REPLACEABLE">size</var></tt> devices to format the floppy. Insert a new 3.5inchfloppy disk in your drive and issue:</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbdclass="USERINPUT">/usr/sbin/fdformat /dev/fd0.1440</kbd></pre></div><div class="SECT4"><h4 class="SECT4"><a id="AEN24578" name="AEN24578">16.8.1.2.2 Formatting in 5.0 and NewerReleases</a></h4><p>Use the <tt class="FILENAME">/dev/fd<var class="REPLACEABLE">N</var></tt> devices toformat the floppy. Insert a new 3.5inch floppy disk in your drive and issue:</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbdclass="USERINPUT">/usr/sbin/fdformat -f 1440 /dev/fd0</kbd></pre></div></div></div><div class="SECT2"><h2 class="SECT2"><a id="AEN24586" name="AEN24586">16.8.2 The Disk Label</a></h2><p>After low-level formatting the disk, you will need to place a disk label on it. Thisdisk label will be destroyed later, but it is needed by the system to determine the sizeof the disk and its geometry later.</p><p>The new disk label will take over the whole disk, and will contain all the properinformation about the geometry of the floppy. The geometry values for the disk label arelisted in <tt class="FILENAME">/etc/disktab</tt>.</p><p>You can run now <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=disklabel&sektion=8"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">disklabel</span>(8)</span></a> likeso:</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbdclass="USERINPUT">/sbin/disklabel -B -r -w /dev/fd0 fd1440</kbd></pre><div class="NOTE"><blockquote class="NOTE"><p><b>Note:</b> Since FreeBSD&nbsp;5.1-RELEASE, the <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=bsdlabel&sektion=8"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">bsdlabel</span>(8)</span></a> utilityreplaces the old <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=disklabel&sektion=8"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">disklabel</span>(8)</span></a> program.With <a href="http://www.FreeBSD.org/cgi/man.cgi?query=bsdlabel&sektion=8"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">bsdlabel</span>(8)</span></a> a numberof obsolete options and parameters have been retired; in the example above the option<var class="OPTION">-r</var> should be removed. For more information, please refer to the<a href="http://www.FreeBSD.org/cgi/man.cgi?query=bsdlabel&sektion=8"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">bsdlabel</span>(8)</span></a> manualpage.</p></blockquote></div></div><div class="SECT2"><h2 class="SECT2"><a id="AEN24613" name="AEN24613">16.8.3 The File System</a></h2><p>Now the floppy is ready to be high-level formated. This will place a new file systemon it, which will let FreeBSD read and write to the disk. After creating the new filesystem, the disk label is destroyed, so if you want to reformat the disk, you will haveto recreate the disk label.</p><p>The floppy's file system can be either UFS or FAT. FAT is generally a better choicefor floppies.</p><p>To put a new file system on the floppy, issue:</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbd class="USERINPUT">/sbin/newfs_msdos /dev/fd0</kbd></pre><p>The disk is now ready for use.</p></div><div class="SECT2"><h2 class="SECT2"><a id="AEN24622" name="AEN24622">16.8.4 Using the Floppy</a></h2><p>To use the floppy, mount it with <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=mount_msdos&sektion=8"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">mount_msdos</span>(8)</span></a> (in 4.Xand earlier releases) or <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=mount_msdosfs&sektion=8"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">mount_msdosfs</span>(8)</span></a> (in5.0 or newer releases). One can also use <ahref="http://www.FreeBSD.org/cgi/url.cgi?ports/emulators/mtools/pkg-descr"><ttclass="FILENAME">emulators/mtools</tt></a> from the ports collection.</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="creating-dvds.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="backups-tapebackups.html"accesskey="N">Next</a></td></tr><tr><td width="33%" align="left" valign="top">Creating and Using Optical Media (DVDs)</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 Data Tapes</td></tr></table></div><p align="center"><small>This, and other documents, can be downloaded from <ahref="ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/">ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/</a>.</small></p><p align="center"><small>For questions about FreeBSD, read the <ahref="http://www.FreeBSD.org/docs.html">documentation</a> before contacting &#60;<ahref="mailto:questions@FreeBSD.org">questions@FreeBSD.org</a>&#62;.<br />For questions about this documentation, e-mail &#60;<ahref="mailto:doc@FreeBSD.org">doc@FreeBSD.org</a>&#62;.</small></p></body></html>

⌨️ 快捷键说明

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