diff options
author | Fukang Chen <loader@FreeBSD.org> | 2007-10-23 02:08:23 +0000 |
---|---|---|
committer | Fukang Chen <loader@FreeBSD.org> | 2007-10-23 02:08:23 +0000 |
commit | d58e3b71be97a2e0f2c7df8a16c1625030a5bfd5 (patch) | |
tree | 7f22139431f1311109bb6291e668c84b5fae26ea /zh_CN.GB2312/books/handbook/disks/chapter.sgml | |
parent | 87a6889455df0cf98c9a96c8cf676ab25dcbfaf2 (diff) |
Notes
Diffstat (limited to 'zh_CN.GB2312/books/handbook/disks/chapter.sgml')
-rw-r--r-- | zh_CN.GB2312/books/handbook/disks/chapter.sgml | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/zh_CN.GB2312/books/handbook/disks/chapter.sgml b/zh_CN.GB2312/books/handbook/disks/chapter.sgml index 3e1af01de9..d3cd89e62f 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.274 + Original Revision: 1.277 $FreeBSD$ --> @@ -270,7 +270,7 @@ <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>bsdlabel -B -w -r da1s1 auto</userinput> #加上标签 +&prompt.root; <userinput>bsdlabel -B -w da1s1 auto</userinput> #加上标签 &prompt.root; <userinput>bsdlabel -e da1s1</userinput> # 现在编辑您刚才创建的磁盘分区 &prompt.root; <userinput>mkdir -p /1</userinput> &prompt.root; <userinput>newfs /dev/da1s1e</userinput> # 为您创建的每个分区重复这个操作 @@ -290,7 +290,7 @@ 它不识别找到的 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>bsdlabel -Brw da1 auto</userinput> +&prompt.root; <userinput>bsdlabel -Bw 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> @@ -300,7 +300,7 @@ <para>另一种方法:</para> <screen>&prompt.root; <userinput>dd if=/dev/zero of=/dev/da1 count=2</userinput> -&prompt.root; <userinput>bsdlabel /dev/da1 | bsdlabel -BrR da1 /dev/stdin</userinput> +&prompt.root; <userinput>bsdlabel /dev/da1 | bsdlabel -BR 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添加一个记录 @@ -393,9 +393,9 @@ ad3: 29333MB <WDC WD307AA> [59598/16/63] at ata1-slave UDMA33</programlist <para>要安装 &man.ccd.4;, 首先需要使用 &man.bsdlabel.8; 来编辑硬盘:</para> - <programlisting>bsdlabel -r -w ad1 auto -bsdlabel -r -w ad2 auto -bsdlabel -r -w ad3 auto</programlisting> + <programlisting>bsdlabel -w ad1 auto +bsdlabel -w ad2 auto +bsdlabel -w ad3 auto</programlisting> <para>此处将整个硬盘创建为 <devicename>ad1c</devicename>, <devicename>ad2c</devicename> 和 <devicename>ad3c</devicename>。</para> @@ -766,7 +766,7 @@ add path 'da*' mode 0660 group operator</programlisting> <filename>/dev/da0s1</filename>, 由于这些设备通常是 FAT 文件系统, 用户可以这样挂接它们:</para> - <screen>&prompt.user; <userinput>mount_msdosfs -m 644 -M 755 /dev/da0s1 /mnt/<replaceable>$USER</replaceable></userinput></screen> + <screen>&prompt.user; <userinput>mount -t msdosfs -m 644 -M 755 /dev/da0s1 /mnt/<replaceable>$USER</replaceable></userinput></screen> <para>如果拔出设备 (必须首先将其对应的磁盘卷卸下), 则您会在系统消息缓冲区中看到类似下面的信息:</para> @@ -1733,7 +1733,7 @@ cd0: Attempt to query device size failed: NOT READY, Medium not present - tray c <para>现在可以用下面的方法来使用 &man.bsdlabel.8; 了:</para> - <screen>&prompt.root; <userinput>/sbin/bsdlabel -B -r -w /dev/fd0 fd1440</userinput></screen> + <screen>&prompt.root; <userinput>/sbin/bsdlabel -B -w /dev/fd0 fd1440</userinput></screen> </sect2> @@ -3308,8 +3308,8 @@ Filesystem Size Used Avail Capacity Mounted on 这个脚本的参数可以通过 &man.rc.conf.5; 来指定, 例如:</para> - <screen>gbde_autoattach_all="YES" -gbde_devices="ad4s1c"</screen> + <programlisting>gbde_autoattach_all="YES" +gbde_devices="ad4s1c"</programlisting> <para>在启动时将要求输入 <application>gbde</application> 的口令。 在输入正确的口令之后, <application>gbde</application> @@ -3363,7 +3363,7 @@ gbde_devices="ad4s1c"</screen> <para>从 &os; 6.0 开始提供了一个新的密码学 GEOM class — <command>geli</command>。 它目前由 - &a.pjd; 开发。 <command>Geli</command> 与 + &a.pjd; 开发。 <command>Geli</command> 工具与 <command>gbde</command> 不同; 它提供了一些不同的功能, 并采用了不同的方式来进行密码学运算。</para> @@ -3406,9 +3406,8 @@ gbde_devices="ad4s1c"</screen> <para>下面的步骤介绍了如何启用 &os; 内核中的 <command>geli</command> 支持, - 并解释了如何创建新的 <command>geli</command> 加密 provider。 - 最后, 还将对如何利用 <command>geli</command> - 创建加密的交换分区加以演示。</para> + 并解释了如何创建新和使用 <command>geli</command> + 加密 provider。</para> <para>要使用 <command>geli</command>, 您必须运行 &os; 6.0-RELEASE 或更新版本。 由于需要修改内核, @@ -3416,12 +3415,12 @@ gbde_devices="ad4s1c"</screen> <procedure> <step> - <title>在内核配置文件中加入 <command>geli</command> 支持</title> + <title>在内核中加入 <command>geli</command> 支持</title> <para>在内核配置文件中加入下面两行:</para> - <screen>options GEOM_ELI -device crypto</screen> + <programlisting>options GEOM_ELI +device crypto</programlisting> <para>按照 <xref linkend="kernelconfig"> 介绍的步骤重新编译并安装内核。</para> @@ -3429,7 +3428,7 @@ device crypto</screen> <para>另外, <command>geli</command> 也可以在系统引导时加载。 这是通过在 <filename>/boot/loader.conf</filename> 中增加下面的配置来实现的:</para> - <para><literal>geom_eli_load="YES"</literal></para> + <programlisting>geom_eli_load="YES"</programlisting> <para>&man.geli.8; 现在应该已经为内核所支持了。</para> </step> @@ -3488,7 +3487,7 @@ Enter passphrase:</screen> &prompt.root; <userinput>mount /dev/da2.eli /private</userinput></screen> <para>现在加密的文件系统应该已经可以被 &man.df.1; 看到, - 并处于可用状态了。</para> + 并处于可用状态了:</para> <screen>&prompt.root; <userinput>df -H</userinput> Filesystem Size Used Avail Capacity Mounted on @@ -3523,15 +3522,16 @@ Filesystem Size Used Avail Capacity Mounted on 它可以用于简化 <command>geli</command> 的使用。 通过 &man.rc.conf.5; 配置 <command>geli</command> 的方法如下:</para> - <screen>geli_devices="da2" -geli_da2_flags="-p -k /root/da2.key"</screen> + <programlisting>geli_devices="da2" +geli_da2_flags="-p -k /root/da2.key"</programlisting> <para>这将把 <filename>/dev/da2</filename> 配置为一个 <command>geli</command> provider, 其主密钥文件位于 <filename>/root/da2.key</filename>, 而 <command>geli</command> 在连接 provider 时将不使用口令字 - (注意只有在 <command>geli</command> init 阶段使用了 -P 才可以这样做)。 - 系统将在关闭之前将 <command>geli</command> provider 断开。</para> + (注意只有在 <command>geli</command> init 阶段使用了 + <option>-P</option> 才可以这样做)。 + 系统将在关闭之前将 <literal>geli</literal> provider 断开。</para> <para>关于如何配置 <filename>rc.d</filename> 的详细信息可以在使用手册的 <link linkend="configtuning-rcd">rc.d</link> 一节中找到。</para> @@ -3602,10 +3602,10 @@ geli_da2_flags="-p -k /root/da2.key"</screen> 中与交换区对应的行中, 设备名应追加 <literal>.bde</literal> 后缀:</para> - <screen> + <programlisting> # Device Mountpoint FStype Options Dump Pass# /dev/ad0s1b.bde none swap sw 0 0 - </screen> + </programlisting> <para>对于 &os; 6.0-RELEASE 之前的版本, 还需要在 <filename>/etc/rc.conf</filename> 中加入:</para> @@ -3621,10 +3621,10 @@ geli_da2_flags="-p -k /root/da2.key"</screen> 中交换区对应的行中, 设备名应追加 <literal>.eli</literal> 后缀:</para> - <screen> + <programlisting> # Device Mountpoint FStype Options Dump Pass# /dev/ad0s1b.eli none swap sw 0 0 - </screen> + </programlisting> <para>&man.geli.8; 默认情况下使用密钥长度为 256-位的 <acronym>AES</acronym> 加密算法。</para> |