aboutsummaryrefslogtreecommitdiff
path: root/zh_CN.GB2312/books/handbook/disks/chapter.sgml
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2006-06-03 15:34:25 +0000
committerXin LI <delphij@FreeBSD.org>2006-06-03 15:34:25 +0000
commit226a77678a3345584c78794e122aec72c922360e (patch)
tree296183b71b92f01a573d8d15a6823d21a2dc7628 /zh_CN.GB2312/books/handbook/disks/chapter.sgml
parente76e00aba4e8c2e6ea7b0399c1928e0071d73418 (diff)
Notes
Diffstat (limited to 'zh_CN.GB2312/books/handbook/disks/chapter.sgml')
-rw-r--r--zh_CN.GB2312/books/handbook/disks/chapter.sgml405
1 files changed, 90 insertions, 315 deletions
diff --git a/zh_CN.GB2312/books/handbook/disks/chapter.sgml b/zh_CN.GB2312/books/handbook/disks/chapter.sgml
index d65e250cb2..fd8dc1d175 100644
--- a/zh_CN.GB2312/books/handbook/disks/chapter.sgml
+++ b/zh_CN.GB2312/books/handbook/disks/chapter.sgml
@@ -2,7 +2,7 @@
The FreeBSD Documentation Project
The FreeBSD Simplified Chinese Project
- Original Revision: 1.257
+ Original Revision: 1.262
$FreeBSD$
-->
@@ -77,31 +77,25 @@
</thead>
<tbody>
<row>
- <entry>IDE hard drives</entry>
+ <entry>IDE 硬盘驱动器</entry>
<entry><literal>ad</literal></entry>
</row>
<row>
- <entry>IDE CDROM drives</entry>
+ <entry>IDE CDROM 驱动器</entry>
<entry><literal>acd</literal></entry>
</row>
<row>
- <entry>SCSI hard drives and USB Mass storage devices</entry>
+ <entry>SCSI 硬盘以及 USB 大容量存储设备</entry>
<entry><literal>da</literal></entry>
</row>
<row>
- <entry>SCSI CDROM drives</entry>
+ <entry>SCSI CDROM 驱动器</entry>
<entry><literal>cd</literal></entry>
</row>
<row>
- <entry>Assorted non-standard CDROM drives</entry>
- <entry><literal>mcd</literal> for Mitsumi CD-ROM,
- <literal>scd</literal> for Sony CD-ROM,
- <literal>matcd</literal> for Matsushita/Panasonic CD-ROM
- <footnote>
- <para>&man.matcd.4; 驱动已经在 2002 年 10 月 5 日从
- FreeBSD&nbsp;4.X 分支删去, FreeBSD&nbsp;5.0
- 和之后的版本不再包含此驱动。</para>
- </footnote>
+ <entry>各类非标准 CDROM 驱动器</entry>
+ <entry>用于 Mitsumi CD-ROM 的 <literal>mcd</literal> 以及用于
+ Sony CD-ROM 驱动器的 <literal>scd</literal>
</entry>
</row>
<row>
@@ -154,15 +148,14 @@
</indexterm>
<para>假设我们要给一台只有一个磁盘的机器增加一个新的 SCSI 磁盘。首先
- 需要关掉计算机,然后按操作规程来安装驱动器,控制器和驱动程序。由于
- 各厂家生产的产品各不相同,具体的安装细节不在此文档介绍之内。</para>
+ 需要关掉计算机,然后按操作规程来安装驱动器,控制器和驱动程序。由于
+ 各厂家生产的产品各不相同,具体的安装细节不在此文档介绍之内。</para>
<para>以 <username>root</username> 用户登录。安装完驱动后,检查一下
- <filename>/var/run/dmesg.boot</filename> 有没有找到新的磁盘。在我们
- 的例子中新增加的磁盘就是 <devicename>da1</devicename>,我们从
- <filename>/1</filename> 挂上它。 (如果您正添加一个 IDE 驱动器,在
- 4.0 版以前的系统里是 <devicename>wd1</devicename>,以后的版本的系
- 统里是 <devicename>ad1</devicename> )。</para>
+ <filename>/var/run/dmesg.boot</filename> 有没有找到新的磁盘。在我们
+ 的例子中新增加的磁盘就是 <devicename>da1</devicename>,我们从
+ <filename>/1</filename> 挂上它。 (如果您正添加 IDE 驱动器,
+ 则设备名应该是 <devicename>ad1</devicename>)。</para>
<indexterm><primary>
partitions</primary></indexterm>
@@ -171,22 +164,21 @@
<primary><command>fdisk</command></primary>
</indexterm>
- <para>因为 FreeBSD 运行在 IBM-PC 兼容机上,它必须遵循 PC BIOS 分区
- 规范。这与传统的 BSD 分区是不同的。一个 PC 的磁盘最高只能有四个 BIOS
- 主分区。如果磁盘只安装 FreeBSD 您可以使用 <emphasis>dedicated</emphasis>
- 模式。另外, FreeBSD 必须安装在 PC BIOS 支持的分区内。FreeBSD 把分区叫作
- <emphasis>slices</emphasis> 这可能会把人搞糊涂。您也可以在只安装
- FreeBSD 的磁盘上使用 slices,也可以在安装有其它操作系统的磁盘上使用
- slices。这不会影响其它操作系统的 <command>fdisk</command> 分区工具。
- </para>
+ <para>因为 FreeBSD 运行在 IBM-PC 兼容机上,它必须遵循 PC BIOS 分区规范。
+ 这与传统的 BSD 分区是不同的。一个 PC 的磁盘最高只能有四个 BIOS
+ 主分区。如果磁盘只安装 FreeBSD 您可以使用 <emphasis>dedicated</emphasis>
+ 模式。另外, FreeBSD 必须安装在 PC BIOS 支持的分区内。FreeBSD 把分区叫作
+ <emphasis>slices</emphasis> 这可能会把人搞糊涂。您也可以在只安装
+ FreeBSD 的磁盘上使用 slices,也可以在安装有其它操作系统的磁盘上使用
+ slices。这不会影响其它操作系统的 <command>fdisk</command> 分区工具。</para>
<para>在 slice 方式表示下,驱动器被添加到 <filename>/dev/da1s1e</filename>。
- 可以读作:SCSI 磁盘,编号为 1 (第二个SCSI 磁盘), slice 1 (PC BIOS 分区 1),
+ 可以读作:SCSI 磁盘,编号为 1 (第二个SCSI 磁盘), slice 1 (PC BIOS 分区 1),
的 BSD 分区 <filename>e</filename> 。在有些例子中,也可以简化为
<filename>/dev/da1e</filename>。</para>
- <para>由于 &man.bsdlabel.8; (在 &os;&nbsp;4.X 中叫做 &man.disklabel.8;)
- 使用 32-位 的整数来表示扇区号, 因此在多数情况下它的表现力限于每个磁盘
+ <para>由于 &man.bsdlabel.8; 使用 32-位 的整数来表示扇区号,
+ 因此在多数情况下它的表现力限于每个磁盘
2^32-1 个扇区或 2TB。 &man.fdisk.8; 格式允许的起始扇区号不能高于
2^32-1 而分区长度也不能大于 2^32-1, 通常情况下这限制了分区大小最大为
2TB 而磁盘大小则是 4TB。 &man.sunlabel.8; 格式的限制是每个分区
@@ -206,11 +198,10 @@
<step>
<title>使用 <application>Sysinstall</application></title>
- <para>您可以使用 <command>sysinstall</command> 命令
- (在 &os; 5.2 之前是 <command>/stand/sysinstall</command>),
- 选择它的使用菜单来分区和标记一个新的磁盘。需要有 root 权限,
- 或者直接使用 <username>root</username> 账户登录或者使用
- <command>su</command> 命令来切换到根用户。运行
+ <para>您可以使用 <command>sysinstall</command>
+ 命令的菜单来分区和标记一个新的磁盘。 这一操作需要有 root 权限,
+ 您可以直接使用 <username>root</username> 账户登录或者使用
+ <command>su</command> 命令来切换到 root 用户。运行
<command>sysinstall</command> ,然后选择
<literal>Configure</literal> 菜单。在
<literal>FreeBSD Configuration Menu</literal> 下,上下滚动,
@@ -279,15 +270,15 @@
<screen>&prompt.root; <userinput>dd if=/dev/zero of=/dev/da1 bs=1k count=1</userinput>
&prompt.root; <userinput>fdisk -BI da1</userinput> #初始化新磁盘
-&prompt.root; <userinput>disklabel -B -w -r da1s1 auto</userinput> #加上标签
-&prompt.root; <userinput>disklabel -e da1s1</userinput> # 现在编辑您刚才创建的磁盘分区
+&prompt.root; <userinput>bsdlabel -B -w -r da1s1 auto</userinput> #加上标签
+&prompt.root; <userinput>bsdlabel -e da1s1</userinput> # 现在编辑您刚才创建的磁盘分区
&prompt.root; <userinput>mkdir -p /1</userinput>
&prompt.root; <userinput>newfs /dev/da1s1e</userinput> # 为您创建的每个分区重复这个操作
&prompt.root; <userinput>mount /dev/da1s1e /1</userinput> # 挂上分区
&prompt.root; <userinput>vi /etc/fstab</userinput> # 完成之后,添加合适的记录到您的 <filename>/etc/fstab</filename>文件。</screen>
- <para>如果有一个 IDE 磁盘,记得要用 <filename>ad</filename>
- 来替换 <filename>da</filename>,4.X 以前的系统要用 <filename>wd</filename>。</para>
+ <para>如果有一个 IDE 磁盘,记得要用 <filename>ad</filename> 替换前面的
+ <filename>da</filename>。</para>
</sect3>
<sect3>
@@ -299,8 +290,8 @@
它不识别找到的 IBM &os2 的 <quote>appropriate</quote> 分区。</para>
<screen>&prompt.root; <userinput>dd if=/dev/zero of=/dev/da1 bs=1k count=1</userinput>
-&prompt.root; <userinput>disklabel -Brw da1 auto</userinput>
-&prompt.root; <userinput>disklabel -e da1</userinput> # 创建 `e' 分区
+&prompt.root; <userinput>bsdlabel -Brw da1 auto</userinput>
+&prompt.root; <userinput>bsdlabel -e da1</userinput> # 创建 `e' 分区
&prompt.root; <userinput>newfs -d0 /dev/da1e</userinput>
&prompt.root; <userinput>mkdir -p /1</userinput>
&prompt.root; <userinput>vi /etc/fstab</userinput> # 为 /dev/da1e添加一个记录
@@ -309,17 +300,12 @@
<para>另一种方法:</para>
<screen>&prompt.root; <userinput>dd if=/dev/zero of=/dev/da1 count=2</userinput>
-&prompt.root; <userinput>disklabel /dev/da1 | disklabel -BrR da1 /dev/stdin</userinput>
+&prompt.root; <userinput>bsdlabel /dev/da1 | bsdlabel -BrR da1 /dev/stdin</userinput>
&prompt.root; <userinput>newfs /dev/da1e</userinput>
&prompt.root; <userinput>mkdir -p /1</userinput>
&prompt.root; <userinput>vi /etc/fstab</userinput> # 为 /dev/da1e添加一个记录
&prompt.root; <userinput>mount /1</userinput></screen>
- <note><para>从 &os;&nbsp;5.1-RELEASE 版本开始, &man.bsdlabel.8; 程序代替了
- 老版本的 &man.disklabel.8; 程序。&man.bsdlabel.8; 中大量过时的选项
- 和参数也被取消。在上面的例子中选项 <option>-r</option> 可以使用
- &man.bsdlabel.8;程序来删除。更多的信息,请参考 &man.bsdlabel.8; 联机手册。
- </para></note>
</sect3>
</sect2>
</sect1>
@@ -401,38 +387,24 @@ ad3: 29333MB &lt;WDC WD307AA&gt; [59598/16/63] at ata1-slave UDMA33</programlist
连接起来。要使用 &man.ccd.4;,您需要在内核中配置 &man.ccd.4;
支持选项。把这行加入到内核配置文件中,然后重建内核:</para>
- <programlisting>pseudo-device ccd 4</programlisting>
-
- <para>在 5.X 和以后的版本中,您必须使用下面的行来代替:</para>
-
<programlisting>device ccd</programlisting>
- <note><para>在 FreeBSD&nbsp;5.X 里,不必指定一系统的 &man.ccd.4; 设备,
- &man.ccd.4; 设备将自动按需要创建新的 &mdash; 设备。</para></note>
+ <para>对 &man.ccd.4; 的支持也可以内核模块的形式载入。</para>
- <para>&man.ccd.4; 在FreeBSD 3.0 或以后的版本中也可以作为一个内核模块
- 来加载</para>
+ <para>要安装 &man.ccd.4;, 首先需要使用 &man.bsdlabel.8; 来编辑硬盘:</para>
- <para>要安装 &man.ccd.4;, 首先需要使用 &man.disklabel.8; 来编辑硬盘:</para>
+ <programlisting>bsdlabel -r -w ad1 auto
+bsdlabel -r -w ad2 auto
+bsdlabel -r -w ad3 auto</programlisting>
- <programlisting>disklabel -r -w ad1 auto
-disklabel -r -w ad2 auto
-disklabel -r -w ad3 auto</programlisting>
+ <para>此处将整个硬盘创建为 <devicename>ad1c</devicename>, <devicename>ad2c</devicename>
+ 和 <devicename>ad3c</devicename>。</para>
- <para>这儿把整个硬盘创建成 <devicename>ad1c</devicename>, <devicename>ad2c</devicename>
- 和 <devicename>ad3c</devicename> 。</para>
-
- <note><para>从 &os;&nbsp;5.1-RELEASE 开始, &man.bsdlabel.8; 程序代替
- 了老版本的 &man.disklabel.8; 程序。&man.bsdlabel.8; 中大量过时的选项
- 和参数也被取消; 在上面的例子中,选项 <option>-r</option> 应该被删掉。
- 更的信息可以参考 &man.bsdlabel.8; 手册。</para></note>
-
- <para>下一步是改变 disklable 的类型。也可以使用 &man.disklabel.8; 来编辑:
- </para>
+ <para>下一步是改变 disklable 的类型。也可以使用 &man.bsdlabel.8; 来编辑:</para>
- <programlisting>disklabel -e ad1
-disklabel -e ad2
-disklabel -e ad3</programlisting>
+ <programlisting>bsdlabel -e ad1
+bsdlabel -e ad2
+bsdlabel -e ad3</programlisting>
<para>这儿在每个已经设置了 <envar>EDITOR</envar> 环境变量的磁盘上打开了
disklable,在我我例子中使用的是 &man.vi.1;。</para>
@@ -457,15 +429,6 @@ disklabel -e ad3</programlisting>
<sect4 id="ccd-buildingfs">
<title>建立文件系统</title>
- <para><devicename>ccd0c</devicename> 的设备节点可能不存在,所以要
- 创建它,执行下面的命令:</para>
-
- <programlisting>cd /dev
-sh MAKEDEV ccd0</programlisting>
-
- <note><para>在 FreeBSD 5.0 中, &man.devfs.5; 会自动管理在 <filename>/dev</filename>
- 中的设备节点, 所以没有必要使用 <command>MAKEDEV</command> 命令。</para></note>
-
<para>现在已给每个磁盘都加上了标签,下面需要建立 &man.ccd.4;。要这样做,
需要使用 &man.ccdconfig.8; 工具,同时要提供类似下面的选项:</para>
@@ -718,22 +681,13 @@ device umass</programlisting>
&man.atapicam.4; 驱动程序。</para>
</note>
- <para>从 &os;&nbsp; 5.X 开始, 对 USB 2.0 控制器提供了内建的支持;
- 这一特性也被加入到了 &os;&nbsp;4.10-RELEASE 和其后的 4.X 版本。
- 要获取对 USB 2.0 的支持, 您需要在内核的编译配置中加入:</para>
+ <para>在 &os; 中已经提供了对 USB 2.0 控制器的内建支持;
+ 然而, 您必须在编译内核时在配置中加入:</para>
<programlisting>device ehci</programlisting>
<para>注意, 如果需要 USB 1.X 的支持, 您仍需要使用
&man.uhci.4; 和 &man.ohci.4; 驱动程序。</para>
-
- <note>
- <para>在 &os;&nbsp;4.X 上, USB daemon (&man.usbd.8;) 必须能够
- 检测到正在运行的一些 USB 设备。为了启用它,
- 添加 <literal>usbd_enable="YES"</literal> 到您的
- <filename>/etc/rc.conf</filename> 文件里,然后重新启动
- 计算机。</para>
- </note>
</sect2>
<sect2>
@@ -917,14 +871,8 @@ umass0: detached</screen>
<screen>&prompt.root; <userinput>mkisofs -R -no-emul-boot -b boot/cdboot -o /tmp/bootable.iso /tmp/myboot</userinput></screen>
- <para>如果内核中已经配置了 <devicename>vn</devicename>
- (FreeBSD&nbsp;4.X), 或 <devicename>md</devicename>
- (FreeBSD&nbsp;5.X),就可以挂上文件系统:</para>
-
- <screen>&prompt.root; <userinput>vnconfig -e vn0c /tmp/bootable.iso</userinput>
-&prompt.root; <userinput>mount -t cd9660 /dev/vn0c /mnt</userinput></screen>
-
- <para>在 FreeBSD&nbsp;4.X, 和 FreeBSD&nbsp;5.X 中:</para>
+ <para>完成这些工作之后, 如果您的内核中配置了 <devicename>md</devicename>,
+ 就可以用下列命令来挂接文件系统了:</para>
<screen>&prompt.root; <userinput>mdconfig -a -t vnode -f /tmp/bootable.iso -u 0</userinput>
&prompt.root; <userinput>mount -t cd9660 /dev/md0 /mnt</userinput></screen>
@@ -953,8 +901,7 @@ umass0: detached</screen>
<para>在 <replaceable>cddevice</replaceable> 上刻录一份
<replaceable>imagefile.iso</replaceable> 的副本。
默认的设备是
- <filename>/dev/acd0</filename> (在 &os;&nbsp;4.X 下则是
- <filename>/dev/acd0c</filename>)。
+ <filename>/dev/acd0</filename>。
请参考 &man.burncd.8; 以了解设置写入速度的参数,如何在刻录完成之后自动弹出CD,以及刻录音频数据。</para>
</sect2>
@@ -982,7 +929,7 @@ umass0: detached</screen>
<secondary>burning</secondary>
</indexterm>
<screen>&prompt.root; <userinput>cdrecord -scanbus</userinput>
-Cdrecord 1.9 (i386-unknown-freebsd4.2) Copyright (C) 1995-2000 J&ouml;rg Schilling
+Cdrecord-Clone 2.01 (i386-unknown-freebsd7.0) Copyright (C) 1995-2004 J&ouml;rg Schilling
Using libscg version 'schily-0.1'
scsibus0:
0,0,0 0) 'SEAGATE ' 'ST39236LW ' '0004' Disk
@@ -1056,15 +1003,6 @@ scsibus1:
如果您发现有某些项目缺失, 则应强制系统重新识别介质:</para>
<screen>&prompt.root; <userinput>dd if=/dev/acd0 of=/dev/null count=1</userinput></screen>
-
- <note><para>在 &os; 4.X 中, 这些项的前缀并不包括零。
- 如果发现 <filename>/dev</filename> 缺少所需的项,
- 可以用 <command>MAKEDEV</command> 来生成:</para>
-
- <screen>&prompt.root; <userinput>cd /dev</userinput>
-&prompt.root; <userinput>sh MAKEDEV acd0t99</userinput></screen>
- </note>
-
</step>
<step>
@@ -1095,10 +1033,7 @@ scsibus1:
镜像文件可以使用
&man.mkisofs.8; 创建,您可以使用这个工具复制
任何数据 CD。这里给出的例子假定您的 CDROM
- 设备 <devicename>acd0</devicename>。代替您
- 正确的 CDROM 设备。在 &os;&nbsp;4.X 下面,字符 <literal>c</literal> 必须被附加到
- 设备名的结尾处来指明是整个分区,
- 或者对于 CDROM,指明是整个光盘。</para>
+ 设备是 <devicename>acd0</devicename>, 您应将其替换为您实际使用的 CDROM 设备。</para>
<screen>&prompt.root; <userinput>dd if=/dev/acd0 of=file.iso bs=2048</userinput></screen>
@@ -1141,10 +1076,8 @@ scsibus1:
<para>用这种方法您基本可以使用任何买到的数据 CDROM。
然而某些有 ISO 9660 扩展的光盘可能会行为古怪。
例如,joliet 光盘用两个字节的 unicode 字符存储所有的文件名。
- FreeBSD 内核还不能识别
- unicode (重要!),所以非英语字符被做了有问题的标记。
- (如果您正在运行 FreeBSD 4.3 或者以后的版本,
- CD9660 驱动包含了加载合适的 unicode 换算表的方法。
+ FreeBSD 内核不能识别 Unicode (目前如此!), 因此非英语字符被做了有问题的标记。
+ (FreeBSD CD9660 驱动包含了加载合适的 Unicode 换算表的方法。
一些常用编码的模块可以通过
<filename role="package">sysutils/cd9660_unicode</filename> port 来安装。)</para>
@@ -1615,7 +1548,7 @@ cd0: Attempt to query device size failed: NOT READY, Medium not present - tray c
<title>配置</title>
<para>DVD-RAM 刻录机通常使用 SCSI 或 ATAPI
- 两种接口之一。 对于 ATAPI 设备, 还应启用 DMA 访问方式,
+ 两种接口之一。 对于 ATAPI 设备, DMA 传输模式必须手工启用。
这一工作可以通过在
<filename>/boot/loader.conf</filename> 文件中增加下述配置来完成:</para>
@@ -1628,28 +1561,25 @@ cd0: Attempt to query device size failed: NOT READY, Medium not present - tray c
<para>如本章前面的介绍所言,
DVD-RAM 可以视为一移动硬盘。 与任何其它型号的移动硬盘类似,
首次使用它之前, 应首先 <quote>初始化</quote> DVD-RAM。
- 在这个例子中, 我们将在全部空间上使用标准的 UFS2 文件系统。</para>
-
- <para>将 DVD-RAM 插入驱动器后, 以 <username>root</username>
- 的身份执行:</para>
+ 在下面的例子中, 我们将在全部空间上使用标准的 UFS2 文件系统:</para>
<screen>&prompt.root; <userinput>dd if=/dev/zero of=<replaceable>/dev/acd0</replaceable> count=2</userinput>
-&prompt.root; <userinput>disklabel -Bw <replaceable>acd0</replaceable></userinput>
+&prompt.root; <userinput>bsdlabel -Bw <replaceable>acd0</replaceable></userinput>
&prompt.root; <userinput>newfs <replaceable>/dev/acd0</replaceable></userinput></screen>
- <para>应根据您的设置来修改所用的 DVD 设备,
- <devicename>acd0</devicename>。</para>
+ <para>您应根据实际情况将 <devicename>acd0</devicename> 改为您所使用的设备名。</para>
</sect3>
<sect3>
<title>使用介质</title>
- <para>一旦在您的 DVD-RAM 上完成了前面的操作,
+ <para>一旦您在 DVD-RAM 上完成了前面的操作,
就可以像普通的硬盘一样挂接它了:</para>
<screen>&prompt.root; <userinput>mount <replaceable>/dev/acd0</replaceable> <replaceable>/mnt</replaceable></userinput></screen>
- <para>然后就可以正常地对其进行读写了。</para>
+ <para>然后就可以正常地对 DVD-RAM 进行读写了。</para>
+ </sect3>
</sect2>
</sect1>
@@ -1691,40 +1621,8 @@ cd0: Attempt to query device size failed: NOT READY, Medium not present - tray c
<para>软盘的访问像其它设备一样是通过在
<filename>/dev</filename> 中的条目来实现的。
- 访问 raw 软盘在 4.X 和更早的版本,使用
- <filename>/dev/fd<replaceable>N</replaceable></filename>,
- 这里 <replaceable>N</replaceable> 标识设备号,通常为 0 ,
- 或 <filename>/dev/fd<replaceable>NX</replaceable></filename>,
- 这里 <replaceable>X</replaceable> 标识为一个字符。</para>
-
- <para>在 5.0 或更新的版本中,简单的使用
- <filename>/dev/fd<replaceable>N</replaceable></filename>。</para>
-
- <sect4>
- <title>4.X 以及更早版本的磁盘大小</title>
-
- <para>也有 <filename>/dev/fd<replaceable>N</replaceable>.<replaceable>size</replaceable></filename>
- 这样的设备,这里 <replaceable>size</replaceable> 代表软盘的含量以 KB 为单位。
- 这个条目用在低级格式化时来确定磁盘的大小。下面的例子就是 1440kB </para>
-
- <para>有时这些条目必须在 <filename>/dev</filename> 目录中进行重建。
- 可以这样做:</para>
-
- <screen>&prompt.root; <userinput>cd /dev &amp;&amp; ./MAKEDEV "fd*"</userinput></screen>
- </sect4>
-
- <sect4>
- <title>5.0 以及更新版本的磁盘大小</title>
-
- <para>在 5.0 版本中, &man.devfs.5; 将自动管理在
- <filename>/dev</filename> 目录中的设备,所以不摧荐使用
- <command>MAKEDEV</command> 命令。</para>
-
- <para>如果期望得到确定大小的磁盘可以给 &man.fdformat.1; 传递
- <option>-f</option> 参数。 支持的大小可以在
- &man.fdcontrol.8; 联机手册中找到,
- 但推荐使用工作状态最好的 1440kB。</para>
- </sect4>
+ 直接访问软盘时, 只需简单地使用
+ <filename>/dev/fd<replaceable>N</replaceable></filename> 来表示。</para>
</sect3>
<sect3>
@@ -1742,18 +1640,7 @@ cd0: Attempt to query device size failed: NOT READY, Medium not present - tray c
磁盘的好与坏。</para>
<sect4>
- <title>在 4.X 以及更早版本中格式化</title>
-
- <para>使用
- <filename>/dev/fd<replaceable>N</replaceable>.<replaceable>size</replaceable></filename>
- 设备来格式化软盘。插入一张新的 3.5 英寸的软盘在你的设备里:</para>
-
- <screen>&prompt.root; <userinput>/usr/sbin/fdformat /dev/fd0.1440</userinput></screen>
-
- </sect4>
-
- <sect4>
- <title>在 5.0 以及更新版本中格式化</title>
+ <title>软盘的格式化</title>
<para>使用
<filename>/dev/fd<replaceable>N</replaceable></filename>
@@ -1765,8 +1652,6 @@ cd0: Attempt to query device size failed: NOT READY, Medium not present - tray c
</sect3>
</sect2>
-
-
<sect2>
<title>磁盘标签</title>
@@ -1777,16 +1662,9 @@ cd0: Attempt to query device size failed: NOT READY, Medium not present - tray c
磁盘标签的 geometry 值列在
<filename>/etc/disktab</filename>中。</para>
- <para>你能够使用 &man.disklabel.8; 像下面这样:</para>
+ <para>现在可以用下面的方法来使用 &man.bsdlabel.8; 了:</para>
- <screen>&prompt.root; <userinput>/sbin/disklabel -B -r -w /dev/fd0 fd1440</userinput></screen>
-
- <note><para>从 &os;&nbsp;5.1-RELEASE, 开始 &man.bsdlabel.8;
- 程序代替了旧版本的 &man.disklabel.8; 程序。随着
- &man.bsdlabel.8; 一起许多陈旧的选项和参数也被清除了;
- 在上面的例子中,选项
- <option>-r</option> 将被去掉。要想得到更多的信息,
- 请参考 &man.bsdlabel.8; 联机手册。</para></note>
+ <screen>&prompt.root; <userinput>/sbin/bsdlabel -B -r -w /dev/fd0 fd1440</userinput></screen>
</sect2>
@@ -1812,10 +1690,9 @@ cd0: Attempt to query device size failed: NOT READY, Medium not present - tray c
<sect2>
<title>使用软盘</title>
- <para>要使用软盘,需要先使用 &man.mount.msdos.8; (在
- 4.X 和更早的版本中) 或 &man.mount.msdosfs.8; (在 5.0 或更新
- 的版本中)。也可以使用在 ports collection
- 中的<filename role="package">emulators/mtools</filename> 程序。</para>
+ <para>要使用软盘,需要先使用 &man.mount.msdosfs.8; 挂接它。
+ 除此之外, 也可以使用在 ports 套件中的
+ <filename role="package">emulators/mtools</filename> 程序。</para>
</sect2>
</sect1>
@@ -2363,11 +2240,11 @@ sa0(ncr1:4:0): Logical unit is in process of becoming ready</screen>
<para>在遇到灾难前,只需要执行以下四个步骤:</para>
<indexterm>
- <primary><command>disklabel</command></primary>
+ <primary><command>bsdlabel</command></primary>
</indexterm>
- <para>第一,打出您的每个磁盘驱动器的磁盘标签(例如:
- <command>disklabel da0 | lpr</command>),文件系统表,
+ <para>第一,打出您的每个磁盘驱动器的磁盘标签 (例如:
+ <command>bsdlabel da0 | lpr</command>),文件系统表,
(<filename>/etc/fstab</filename>) ,以及所有启动信息,
并将其复制两份。</para>
@@ -2378,7 +2255,7 @@ sa0(ncr1:4:0): Logical unit is in process of becoming ready</screen>
如果设备都被列出,并且可以正常使用,就可以跳到第三步。</para>
<para>否则,必须建立两张传统的可启动软盘,并包含:
- <command>fdisk</command>, <command>disklabel</command>,
+ <command>fdisk</command>, <command>bsdlabel</command>,
<command>newfs</command>, <command>mount</command>, 以及所有使用的
备份程序。这些程序必须被静态的连接。如果使用的是 <command>dump</command>,
那么这张软盘就必须包含 <command>restore</command>。</para>
@@ -2416,7 +2293,7 @@ fi
# place boot blocks on the floppy
#
-disklabel -w -B /dev/fd0c fd1440
+bsdlabel -w -B /dev/fd0c fd1440
#
# newfs the one and only partition
@@ -2588,13 +2465,13 @@ echo "The floppy has been unmounted and is now ready."]]></programlisting>
</indexterm>
<indexterm><primary>root partition</primary></indexterm>
<indexterm>
- <primary><command>disklabel</command></primary>
+ <primary><command>bsdlabel</command></primary>
</indexterm>
<indexterm>
<primary><command>newfs</command></primary>
</indexterm>
<para>试着 <command>mount</command> 上您的第一个磁盘的 root 分区(例如: <command>mount /dev/da0a
- /mnt</command>)。假如这个磁盘标签已经损坏,使用 <command>disklabel</command>
+ /mnt</command>)。假如这个磁盘标签已经损坏,使用 <command>bsdlabel</command>
来重新分割并分配磁盘标签(利用您以前保留下来的数据)。使用 <command>newfs</command>
来建立文件系统,并重新挂上软盘读写的 root 分区 (<command>mount -u -o rw
/mnt</command>)。然后使用备份程序及备份磁带来修复文件系统 (例如: <command>restore vrf
@@ -2652,60 +2529,9 @@ echo "The floppy has been unmounted and is now ready."]]></programlisting>
后备文件系统和内存文件系统。</para>
<note>
- <para>FreeBSD&nbsp;4.X 用户可以使用 &man.MAKEDEV.8;
- 来创建需要的设备。 FreeBSD&nbsp;5.0 和更新的版本使用
- &man.devfs.5; 来创建设备节点,对用户来说是透明的。</para>
+ <para>系统会使用 &man.devfs.5; 来创建设备节点, 这对用户来说是透明的。</para>
</note>
- <sect2 id="disks-vnconfig">
- <title>FreeBSD 4.X 下的 File-Backed 文件系统</title>
- <indexterm>
- <primary>磁盘</primary>
- <secondary>file-backed (4.X)</secondary>
- </indexterm>
-
- <para>应用程序 &man.vnconfig.8; 可以配置和启用 vnode 伪磁盘设备。
- 一个 <firstterm>vnode</firstterm> 代表一个文件。这就意味
- 使用 &man.vnconfig.8; 可以用来创建和操作一个文件系统。
- 也可以在文件中挂接一个软盘或 CD 映像。</para>
-
- <para>要使用 &man.vnconfig.8;,你需要在内核配置文件中 &man.vn.4; 的支持:</para>
-
- <programlisting>pseudo-device vn</programlisting>
-
- <para>挂接一个存在的文件系统映像:</para>
-
- <example>
- <title>使用 vnconfig 来挂接一个存在的文件系统映像在
- FreeBSD&nbsp;4.X 系统上。</title>
-
- <screen>&prompt.root; <userinput>vnconfig vn<replaceable>0</replaceable> <replaceable>diskimage</replaceable></userinput>
-&prompt.root; <userinput>mount /dev/vn<replaceable>0</replaceable>c <replaceable>/mnt</replaceable></userinput></screen>
- </example>
-
- <para>使用 &man.vnconfig.8; 创建一个新的文件系统映像:</para>
-
- <example>
- <title>使用 <command>vnconfig</command> 创建新的文件后援磁盘</title>
-
- <screen>&prompt.root; <userinput>dd if=/dev/zero of=<replaceable>newimage</replaceable> bs=1k count=<replaceable>5</replaceable>k</userinput>
-5120+0 records in
-5120+0 records out
-&prompt.root; <userinput>vnconfig -s labels -c vn<replaceable>0</replaceable> <replaceable>newimage</replaceable></userinput>
-&prompt.root; <userinput>disklabel -r -w vn<replaceable>0</replaceable> auto</userinput>
-&prompt.root; <userinput>newfs vn<replaceable>0</replaceable>c</userinput>
-Warning: 2048 sector(s) in last cylinder unallocated
-/dev/vn0c: 10240 sectors in 3 cylinders of 1 tracks, 4096 sectors
- 5.0MB in 1 cyl groups (16 c/g, 32.00MB/g, 1280 i/g)
-super-block backups (for fsck -b #) at:
- 32
-&prompt.root; <userinput>mount /dev/vn<replaceable>0</replaceable>c <replaceable>/mnt</replaceable></userinput>
-&prompt.root; <userinput>df <replaceable>/mnt</replaceable></userinput>
-Filesystem 1K-blocks Used Avail Capacity Mounted on
-/dev/vn0c 4927 1 4532 0% /mnt</screen>
- </example>
- </sect2>
-
<sect2 id="disks-mdconfig">
<title>采用文件后端的文件系统</title>
<indexterm>
@@ -2713,7 +2539,7 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
<secondary>file-backed (采用文件作为后端)</secondary>
</indexterm>
- <para>在 FreeBSD&nbsp;5.X 和更新版本的系统中, 可以用 &man.mdconfig.8;
+ <para>在 FreeBSD 系统中, 可以用 &man.mdconfig.8;
程序来配置和启用内存磁盘, &man.md.4;。 要使用
&man.mdconfig.8;, 就需要在内核配置文件中添加 &man.md.4; 模块来支持它:</para>
@@ -2763,7 +2589,7 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
<para>应用程序 &man.mdconfig.8; 功能很强大,
但在创建采用文件后端的文件系统时需要使用许多多行命令。 为此
- FreeBSD&nbsp;5.0 也提供了一个名为 &man.mdmfs.8; 的工具, 该程序使用
+ FreeBSD 也提供了一个名为 &man.mdmfs.8; 的工具, 该程序使用
&man.mdconfig.8; 来配置 &man.md.4; 盘, 并在其上用
&man.newfs.8; 创建 UFS 文件系统, 然后用 &man.mount.8; 挂接它。 例如,
如果想创建和挂接像上面那样的文件系统映像,
@@ -2787,35 +2613,6 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
</sect2>
- <sect2 id="disks-md-freebsd4">
- <title>FreeBSD 4.X 下的内存后备式文件系统</title>
- <indexterm>
- <primary>磁盘</primary>
- <secondary>内存文件系统(4.X)</secondary>
- </indexterm>
-
- <para> &man.md.4; 驱动程序是一个简单有效的手段用来创建
- 内存文件系统在 FreeBSD&nbsp;4.X 系统上。&man.malloc.9; 被
- 用来分配内存。</para>
-
- <para>简单的获得一个文件系统你需要准备,例如:
- &man.vnconfig.8;</para>
-
- <example>
- <title>FreeBSD&nbsp;4.X 下的 md 内存磁盘</title>
-
- <screen>&prompt.root; <userinput>dd if=<replaceable>newimage</replaceable> of=/dev/md<replaceable>0</replaceable></userinput>
-5120+0 records in
-5120+0 records out
-&prompt.root; <userinput>mount /dev/md<replaceable>0c</replaceable> <replaceable>/mnt</replaceable></userinput>
-&prompt.root; <userinput>df <replaceable>/mnt</replaceable></userinput>
-Filesystem 1K-blocks Used Avail Capacity Mounted on
-/dev/md0c 4927 1 4532 0% /mnt</screen>
- </example>
-
- <para>更多的详情,请参考 &man.md.4; 联机手册。</para>
- </sect2>
-
<sect2 id="disks-md-freebsd5">
<title>以内存为后端的文件系统</title>
<indexterm>
@@ -2823,9 +2620,7 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
<secondary>内存文件系统</secondary>
</indexterm>
- <para>同样的工具既可以用来创建以文件为后端的文件系统,
- 也可以用来创建基于内存的文件系统: &man.mdconfig.8; 和 &man.mdmfs.8;。
- 一般来说在建立以内存为后端的文件系统时, 应使用 <quote>交换区作为后端
+ <para>一般来说, 在建立以内存为后端的文件系统时, 应使用 <quote>交换区作为后端
(swap backing)</quote>。 使用交换区作为后端,
并不意味着内存盘将被无条件地换出到交换区,
它只是表示将根据需要从可换出的内存池中分配内存。
@@ -2877,13 +2672,6 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
<para><command>mdconfig -l</command> 命令可以列出关于配置
&man.md.4; 设备的信息。</para>
-
- <para>在 FreeBSD&nbsp;4.X 系统中,&man.vnconfig.8; 命令用来分离设备。
- 例如分离所有的资源使用 <filename>/dev/vn4</filename> 命令:</para>
-
- <screen>&prompt.root; <userinput>vnconfig -u vn<replaceable>4</replaceable></userinput></screen>
-
-
</sect2>
</sect1>
@@ -2906,7 +2694,7 @@ Filesystem 1K-blocks Used Avail Capacity Mounted on
<secondary>快照</secondary>
</indexterm>
- <para>FreeBSD&nbsp;5.0 提供了一个和 <link linkend="soft-updates">Soft Updates</link>
+ <para>FreeBSD 提供了一个和 <link linkend="soft-updates">Soft Updates</link>
关联的新功能: 文件系统快照</para>
<para>快照允许用户创建指定文件系统的映像,并把它们当做一个文件来对待。
@@ -3227,15 +3015,6 @@ Password:</screen>
</step>
<step>
- <title>验证操作系统的版本</title>
-
- <para>&man.gbde.4; 需要 FreeBSD 5.0 或更高的版本。</para>
-
- <screen>&prompt.root; <userinput>uname -r</userinput>
-5.0-RELEASE</screen>
- </step>
-
- <step>
<title>在内核配置文件中添加对 &man.gbde.4; 的支持</title>
<para>在您的内核配置中加入下面一行:</para>
@@ -3328,13 +3107,12 @@ sector_size = 2048
<caution>
<para><application>gbde</application> lock
- 文件<emphasis>必须</emphasis>和加密分区上的内容一块备份。
- 当一个 lock 文件被独自删除时,
- 不能确定一个
- <application>gbde</application> 分区上的数据被解密过。
- 没有 lock 文件,
- 就是合法的磁盘所有者不经过大量细致的工作也将不能访问经过加密分区上的数据,
- 这是 &man.gbde.8; 在设计时整体上不支持。</para>
+ 文件 <emphasis>必须</emphasis> 和加密分区上的内容同时备份。
+ 如果发生只有 lock 文件遭到删除的情况时, 就没有办法确定
+ <application>gbde</application> 分区上的数据是否是解密过的。
+ 另外, 如果没有 lock 文件, 即使磁盘的合法主人,
+ 不经过大量细致的工作也无法访问加密分区上的数据,
+ 而这是在设计 &man.gbde.8; 时完全没有考虑过的。</para>
</caution>
</step>
@@ -3363,9 +3141,6 @@ sector_size = 2048
文件系统比初始化一个 UFS1 文件系统还要快,摧荐使用
<option>-O2</option> 选项。</para>
- <note><para><option>-O2</option> 选项在 &os;&nbsp;5.1-RELEASE
- 或更新的版本中是默认的选项。</para></note>
-
<screen>&prompt.root; <userinput>newfs -U -O2 /dev/ad4s1c.bde</userinput></screen>
<note>
@@ -3450,7 +3225,7 @@ Filesystem Size Used Avail Capacity Mounted on
<para>可以创建脚本来自动地附加、 检测, 并挂接加密分区,
然而, 处于安全考虑, 这个脚本不应包含 &man.gbde.8; 密码。
- 于此相反, 我们建议这类脚本在控制台或通过 &man.ssh.1;
+ 因而, 我们建议这类脚本在控制台或通过 &man.ssh.1;
执行并要求用户输入口令。</para>
<para>从 &os; 5.2-RELEASE 开始, 提供了一个新的 <filename>rc.d</filename> 脚本。
@@ -3591,7 +3366,7 @@ device crypto</screen>
<filename role="directory">/private</filename> 的加密 provider。
这个密钥文件将提供一些随机数据来加密主密钥。 同时,
主密钥也会使用一个口令字来保护。 Provider 的扇区尺寸为 4kB。
- 此外, 这里的讨论将描述如何挂载
+ 此外, 这里的讨论将介绍如何挂载
<command>geli</command> provider, 在其上创建文件系统,
如何挂接并在其上工作, 最后将其卸下。</para>