grub.po 16 KB

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