grub.po 15 KB

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