grub.po 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. msgid ""
  2. msgstr ""
  3. "Project-Id-Version: PACKAGE VERSION\n"
  4. "POT-Creation-Date: 2020-08-30 02:41+0800\n"
  5. "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
  6. "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  7. "Language-Team: LANGUAGE <LL@li.org>\n"
  8. "Language: zh_CN\n"
  9. "MIME-Version: 1.0\n"
  10. "Content-Type: text/plain; charset=UTF-8\n"
  11. "Content-Transfer-Encoding: 8bit\n"
  12. "X-Generator: Translate Toolkit 2.2.5\n"
  13. #. type: Content of: <sect1><sect1info><address>
  14. #, no-wrap
  15. msgid "&grub-url;"
  16. msgstr "&grub-url;"
  17. #. type: Content of: <sect1><sect1info>
  18. msgid ""
  19. "<productname>grub</productname> <productnumber>&grub-version;</"
  20. "productnumber> <placeholder type=\"address\" id=\"0\"/>"
  21. msgstr ""
  22. "<productname>grub</productname> <productnumber>&grub-version;</"
  23. "productnumber> <placeholder type=\"address\" id=\"0\"/>"
  24. #. type: Content of: <sect1><title>
  25. msgid "Using GRUB to Set Up the Boot Process"
  26. msgstr "使用 GRUB 设定引导过程"
  27. #. type: Content of: <sect1><sect2><title>
  28. msgid "Introduction"
  29. msgstr "概述"
  30. #. type: Content of: <sect1><sect2><warning><para>
  31. msgid ""
  32. "Configuring GRUB incorrectly can render your system inoperable without an "
  33. "alternate boot device such as a CD-ROM or bootable USB drive. This section "
  34. "is not required to boot your LFS system. You may just want to modify your "
  35. "current boot loader, e.g. Grub-Legacy, GRUB2, or LILO."
  36. msgstr ""
  37. "如果您不小心错误地配置了 GRUB,可能导致您的系统完全无法使用,除非使用 CD-ROM "
  38. "或可引导的 USB 存储器等备用引导设备。本节不是引导您的 LFS 系统的唯一方案,您"
  39. "可能只要修改现有的启动加载器 (如 Grub-Legacy、GRUB2 或 LILO) 配置即可引导 "
  40. "LFS。"
  41. #. type: Content of: <sect1><sect2><para>
  42. msgid ""
  43. "Ensure that an emergency boot disk is ready to <quote>rescue</quote> the "
  44. "computer if the computer becomes unusable (un-bootable). If you do not "
  45. "already have a boot device, you can create one. In order for the procedure "
  46. "below to work, you need to jump ahead to BLFS and install "
  47. "<userinput>xorriso</userinput> from the <ulink url=\"&blfs-book;multimedia/"
  48. "libisoburn.html\"> libisoburn</ulink> package."
  49. msgstr ""
  50. "您务必保证自己拥有一个紧急引导磁盘,它在计算机不可用 (无法引导) 时能够 "
  51. "<quote>抢修</quote> 计算机。如果您现在还没有引导设备,您可以执行以下命令创建"
  52. "一个。在运行下列命令前,您需要跳到 BLFS,安装包含 <userinput>xorriso</"
  53. "userinput> 的 <ulink url=\"&blfs-book;multimedia/libisoburn.html"
  54. "\">libisoburn</ulink> 软件包:"
  55. #. type: Content of: <sect1><sect2><screen>
  56. #, no-wrap
  57. msgid ""
  58. "<userinput>cd /tmp \n"
  59. "grub-mkrescue --output=grub-img.iso \n"
  60. "xorriso -as cdrecord -v dev=/dev/cdrw blank=as_needed grub-img.iso</userinput>"
  61. msgstr ""
  62. "<userinput>cd /tmp \n"
  63. "grub-mkrescue --output=grub-img.iso \n"
  64. "xorriso -as cdrecord -v dev=/dev/cdrw blank=as_needed grub-img.iso</userinput>"
  65. #. type: Content of: <sect1><sect2><note><para>
  66. msgid ""
  67. "To boot LFS on host systems that have UEFI enabled, the kernel needs to have "
  68. "been built with the CONFIG_EFI_STUB capability described in the previous "
  69. "section. However, LFS can be booted using GRUB2 without such an addition. "
  70. "To do this, the UEFI Mode and Secure Boot capabilities in the host system's "
  71. "BIOS need to be turned off. For details, see <ulink url=\"&hints-root;lfs-"
  72. "uefi.txt\"> the lfs-uefi.txt hint</ulink> at &hints-root;lfs-uefi.txt."
  73. msgstr ""
  74. "为了在使用 UEFI 的宿主系统上引导 LFS,在构建内核时,需要启用 CONFIG_EFI_STUB "
  75. "功能,正如上一节所述。不过,可以使用 GRUB2 在没有该功能的情况下引导 LFS,前提"
  76. "是在系统 BIOS 设定中关闭 UEFI 模式和安全引导 (Secure Boot) 功能。关于在 UEFI "
  77. "环境下引导 LFS 的的详细信息,可以参阅 <ulink url=\"&hints-root;lfs-uefi.txt"
  78. "\">lfs-uefi.txt hint</ulink>,它位于 &hints-root;lfs-uefi.txt。"
  79. #. type: Content of: <sect1><sect2><title>
  80. msgid "GRUB Naming Conventions"
  81. msgstr "GRUB 命名惯例"
  82. #. type: Content of: <sect1><sect2><para>
  83. msgid ""
  84. "GRUB uses its own naming structure for drives and partitions in the form of "
  85. "<emphasis>(hdn,m)</emphasis>, where <emphasis>n</emphasis> is the hard drive "
  86. "number and <emphasis>m</emphasis> is the partition number. The hard drive "
  87. "number starts from zero, but the partition number starts from one for normal "
  88. "partitions and five for extended partitions. Note that this is different "
  89. "from earlier versions where both numbers started from zero. For example, "
  90. "partition <filename class=\"partition\">sda1</filename> is "
  91. "<emphasis>(hd0,1)</emphasis> to GRUB and <filename class=\"partition\">sdb3</"
  92. "filename> is <emphasis>(hd1,3)</emphasis>. In contrast to Linux, GRUB does "
  93. "not consider CD-ROM drives to be hard drives. For example, if using a CD on "
  94. "<filename class=\"partition\">hdb</filename> and a second hard drive on "
  95. "<filename class=\"partition\">hdc</filename>, that second hard drive would "
  96. "still be <emphasis>(hd1)</emphasis>."
  97. msgstr ""
  98. "GRUB 使用一种独特的命名结构,为驱动器和分区命名。分区名的形式为 "
  99. "<emphasis>(hdn,m)</emphasis>,这里 <emphasis>n</emphasis> 是硬盘驱动器编号,"
  100. "<emphasis>m</emphasis> 是分区编号。硬盘驱动器编号从 0 开始,但分区号对于主分"
  101. "区来说从 1 开始,而对于扩展分区来说从 5 开始。例如,分区 <filename class="
  102. "\"partition\">sda1</filename> 在 GRUB 中的名字是 <emphasis>(hd0, 1)</"
  103. "emphasis>,而 <filename class=\"partition\">sda3</filename> 的名字是 "
  104. "<emphasis>(hd1, 3)</emphasis>。和 Linux 不同,GRUB 不认为 CD-ROM 驱动器属于硬"
  105. "盘驱动器。例如,如果在 <filename class=\"partition\">hdb</filename> 上有一个 "
  106. "CD-ROM 驱动器,而 <filename class=\"partition\">hdc</filename> 上有第二个硬盘"
  107. "驱动器,则第二个硬盘驱动器仍然名为 <emphasis>hd1</emphasis>。"
  108. #. type: Content of: <sect1><sect2><title>
  109. msgid "Setting Up the Configuration"
  110. msgstr "设定 GRUB 配置"
  111. #. type: Content of: <sect1><sect2><para>
  112. msgid ""
  113. "GRUB works by writing data to the first physical track of the hard disk. "
  114. "This area is not part of any file system. The programs there access GRUB "
  115. "modules in the boot partition. The default location is /boot/grub/."
  116. msgstr ""
  117. "GRUB 的工作方式是,将数据写入硬盘的第一个物理磁道。这里不属于任何文件系统,在"
  118. "启动时,第一个物理磁道中的程序从引导分区加载 GRUB 模块,默认在 /boot/grub 中"
  119. "查找模块。"
  120. #. type: Content of: <sect1><sect2><para>
  121. msgid ""
  122. "The location of the boot partition is a choice of the user that affects the "
  123. "configuration. One recommendation is to have a separate small (suggested "
  124. "size is 200 MB) partition just for boot information. That way each build, "
  125. "whether LFS or some commercial distro, can access the same boot files and "
  126. "access can be made from any booted system. If you choose to do this, you "
  127. "will need to mount the separate partition, move all files in the current "
  128. "<filename class=\"directory\">/boot</filename> directory (e.g. the linux "
  129. "kernel you just built in the previous section) to the new partition. You "
  130. "will then need to unmount the partition and remount it as <filename class="
  131. "\"directory\">/boot</filename>. If you do this, be sure to update "
  132. "<filename>/etc/fstab</filename>."
  133. msgstr ""
  134. "引导分区的位置由负责进行配置的用户自己决定,作者推荐创建一个小的 (建议大小为 "
  135. "200 MB) 分区,专门存放引导信息。这样,不同的 Linux 系统 (无论是 LFS 还是商业"
  136. "发行版) 在启动时和启动后都能访问相同的引导文件。如果您选择这样做,您需要挂载"
  137. "这个单独的分区,将 <filename class=\"directory\">/boot</filename> 中已有的文"
  138. "件 (例如上一节中构建的内核) 移动到新的分区中。之后,解除该分区的挂载,并将它"
  139. "挂载为 <filename class=\"directory\">/boot</filename>。另外,还要注意更新 "
  140. "<filename>/etc/fstab</filename>。"
  141. #. type: Content of: <sect1><sect2><para>
  142. msgid ""
  143. "Using the current lfs partition will also work, but configuration for "
  144. "multiple systems is more difficult."
  145. msgstr "直接使用 LFS 分区也是可以的,但这样在配置多系统启动时比较麻烦。"
  146. #. type: Content of: <sect1><sect2><para>
  147. msgid ""
  148. "Using the above information, determine the appropriate designator for the "
  149. "root partition (or boot partition, if a separate one is used). For the "
  150. "following example, it is assumed that the root (or separate boot) partition "
  151. "is <filename class=\"partition\">sda2</filename>."
  152. msgstr ""
  153. "根据以上信息,确定 LFS 根分区 (或 boot 分区,如果使用了独立的 boot 分区) 的名"
  154. "称。下面假设 LFS 根分区 (或 boot 分区) 是 <filename class=\"partition"
  155. "\">sda2</filename>。"
  156. #. type: Content of: <sect1><sect2><para>
  157. msgid ""
  158. "Install the GRUB files into <filename class=\"directory\">/boot/grub</"
  159. "filename> and set up the boot track:"
  160. msgstr ""
  161. "将 GRUB 文件安装到<filename class=\"directory\">/boot/grub</filename> 并设定"
  162. "引导磁道:"
  163. #. type: Content of: <sect1><sect2><warning><para>
  164. msgid ""
  165. "The following command will overwrite the current boot loader. Do not run the "
  166. "command if this is not desired, for example, if using a third party boot "
  167. "manager to manage the Master Boot Record (MBR)."
  168. msgstr ""
  169. "以下命令会覆盖当前启动引导器,如果这不是您希望的,不要运行该命令。例如,如果"
  170. "您使用第三方启动引导器管理主引导记录 (MBR)。"
  171. #. type: Content of: <sect1><sect2><screen>
  172. #, no-wrap
  173. msgid "<userinput>grub-install /dev/sda</userinput>"
  174. msgstr "<userinput>grub-install /dev/sda</userinput>"
  175. #. type: Content of: <sect1><sect2><note><para>
  176. msgid ""
  177. "If the system has been booted using UEFI, <command>grub-install</command> "
  178. "will try to install files for the <emphasis>x86_64-efi</emphasis> target, "
  179. "but those files have not been installed in chapter 6. If this is the case, "
  180. "add <option>--target i386-pc</option> to the command above."
  181. msgstr ""
  182. "如果系统是使用 UEFI 引导的,<command>grub-install</command> 会试图为 "
  183. "<emphasis>x86_64-efi</emphasis> 目标安装文件,但它们并未在第 6 章中安装。如果"
  184. "出现了这类问题,请在以上命令中添加 <option>--target i386-pc</option> 选项。"
  185. #. type: Content of: <sect1><sect2><title>
  186. msgid "Creating the GRUB Configuration File"
  187. msgstr "创建 GRUB 配置文件"
  188. #. type: Content of: <sect1><sect2><para>
  189. msgid "Generate <filename>/boot/grub/grub.cfg</filename>:"
  190. msgstr "生成 <filename>/boot/grub/grub.cfg</filename>:"
  191. #. type: Content of: <sect1><sect2><screen>
  192. #, no-wrap
  193. msgid ""
  194. "<userinput>cat &gt; /boot/grub/grub.cfg &lt;&lt; \"EOF\"\n"
  195. "<literal># Begin /boot/grub/grub.cfg\n"
  196. "set default=0\n"
  197. "set timeout=5\n"
  198. "\n"
  199. "insmod ext2\n"
  200. "set root=(hd0,2)\n"
  201. "\n"
  202. "menuentry \"GNU/Linux, Linux &linux-version;-lfs-&version;\" {\n"
  203. " linux /boot/vmlinuz-&linux-version;-lfs-&version; root=/dev/sda2 ro\n"
  204. "}</literal>\n"
  205. "EOF</userinput>"
  206. msgstr ""
  207. "<userinput>cat &gt; /boot/grub/grub.cfg &lt;&lt; \"EOF\"\n"
  208. "<literal># Begin /boot/grub/grub.cfg\n"
  209. "set default=0\n"
  210. "set timeout=5\n"
  211. "\n"
  212. "insmod ext2\n"
  213. "set root=(hd0,2)\n"
  214. "\n"
  215. "menuentry \"GNU/Linux, Linux &linux-version;-lfs-&version;\" {\n"
  216. " linux /boot/vmlinuz-&linux-version;-lfs-&version; root=/dev/sda2 ro\n"
  217. "}</literal>\n"
  218. "EOF</userinput>"
  219. #. type: Content of: <sect1><sect2><screen>
  220. #, no-wrap
  221. msgid ""
  222. "<userinput>cat &gt; /boot/grub/grub.cfg &lt;&lt; \"EOF\"\n"
  223. "<literal># Begin /boot/grub/grub.cfg\n"
  224. "set default=0\n"
  225. "set timeout=5\n"
  226. "\n"
  227. "insmod ext2\n"
  228. "set root=(hd0,2)\n"
  229. "\n"
  230. "menuentry \"GNU/Linux, Linux &linux-version;-lfs-&versiond;\" {\n"
  231. " linux /boot/vmlinuz-&linux-version;-lfs-&versiond; root=/dev/sda2 ro\n"
  232. "}</literal>\n"
  233. "EOF</userinput>"
  234. msgstr ""
  235. "<userinput>cat &gt; /boot/grub/grub.cfg &lt;&lt; \"EOF\"\n"
  236. "<literal># Begin /boot/grub/grub.cfg\n"
  237. "set default=0\n"
  238. "set timeout=5\n"
  239. "\n"
  240. "insmod ext2\n"
  241. "set root=(hd0,2)\n"
  242. "\n"
  243. "menuentry \"GNU/Linux, Linux &linux-version;-lfs-&versiond;\" {\n"
  244. " linux /boot/vmlinuz-&linux-version;-lfs-&versiond; root=/dev/sda2 ro\n"
  245. "}</literal>\n"
  246. "EOF</userinput>"
  247. #. type: Content of: <sect1><sect2><note><para>
  248. msgid ""
  249. "From <application>GRUB</application>'s perspective, the kernel files are "
  250. "relative to the partition used. If you used a separate /boot partition, "
  251. "remove /boot from the above <emphasis>linux</emphasis> line. You will also "
  252. "need to change the <emphasis>set root</emphasis> line to point to the boot "
  253. "partition."
  254. msgstr ""
  255. "从 <application>GRUB</application>的视角来看,内核文件的位置相对于它使用的分"
  256. "区。如果您使用了单独的 /boot 分区,需要从上面的 <emphasis>linux</emphasis> 行"
  257. "删除 /boot,然后修改 <emphasis>set root</emphasis> 行,指向 /boot 分区。"
  258. #. type: Content of: <sect1><sect2><para>
  259. msgid ""
  260. "GRUB is an extremely powerful program and it provides a tremendous number of "
  261. "options for booting from a wide variety of devices, operating systems, and "
  262. "partition types. There are also many options for customization such as "
  263. "graphical splash screens, playing sounds, mouse input, etc. The details of "
  264. "these options are beyond the scope of this introduction."
  265. msgstr ""
  266. "GRUB 是一个很强大的程序,它提供了非常多的选项,可以支持多种设备、操作系统和分"
  267. "区类型,还有很多用于定制启动屏幕、声音、鼠标输入等的选项。这些选项的细节超过"
  268. "了本书的范围,不予讨论。"
  269. #. type: Content of: <sect1><sect2><caution><para>
  270. msgid ""
  271. "There is a command, <application>grub-mkconfig</application>, that can write "
  272. "a configuration file automatically. It uses a set of scripts in /etc/grub."
  273. "d/ and will destroy any customizations that you make. These scripts are "
  274. "designed primarily for non-source distributions and are not recommended for "
  275. "LFS. If you install a commercial Linux distribution, there is a good chance "
  276. "that this program will be run. Be sure to back up your grub.cfg file."
  277. msgstr ""
  278. "有一个命令 <application>grub-mkconfig</application> 被用于自动创建配置文件。"
  279. "它使用 /etc/grub.d 中的脚本创建新配置文件,这会覆盖您手动编写的 grub.cfg。这"
  280. "些脚本主要是为非源代码发行版设计的,在 LFS 中不推荐使用。但是,如果您安装了商"
  281. "业发行版,它很可能在发行版中被运行,记得备份 grub.cfg 以防它被覆盖。"