grub.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % general-entities SYSTEM "../general.ent">
  5. %general-entities;
  6. ]>
  7. <sect1 id="ch-system-grub" role="wrap">
  8. <?dbhtml filename="grub.html"?>
  9. <sect1info condition="script">
  10. <productname>grub</productname>
  11. <productnumber>&grub-version;</productnumber>
  12. <address>&grub-url;</address>
  13. </sect1info>
  14. <title>GRUB-&grub-version;</title>
  15. <indexterm zone="ch-system-grub">
  16. <primary sortas="a-Grub">GRUB</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>GRUB 软件包包含 <quote>大统一</quote> (GRand Unified)
  21. 启动引导器。</para>
  22. <segmentedlist>
  23. <segtitle>&buildtime;</segtitle>
  24. <segtitle>&diskspace;</segtitle>
  25. <seglistitem>
  26. <seg>&grub-ch6-sbu;</seg>
  27. <seg>&grub-ch6-du;</seg>
  28. </seglistitem>
  29. </segmentedlist>
  30. </sect2>
  31. <sect2 role="installation">
  32. <title>安装 GRUB</title>
  33. <para>准备安装 GRUB:</para>
  34. <screen><userinput remap="configure">./configure --prefix=/usr \
  35. --sbindir=/sbin \
  36. --sysconfdir=/etc \
  37. --disable-efiemu \
  38. --disable-werror</userinput></screen>
  39. <variablelist>
  40. <title>新的配置选项的含义:</title>
  41. <varlistentry>
  42. <term><parameter>--disable-werror</parameter></term>
  43. <listitem>
  44. <para>该选项允许在有较新的 Flex 版本导致的警告时完成构建。</para>
  45. </listitem>
  46. </varlistentry>
  47. <varlistentry>
  48. <term><parameter>--disable-efiemu</parameter></term>
  49. <listitem>
  50. <para>该选项通过禁用 LFS 不需要的特性和测试程序,
  51. 最小化需要构建的内容。</para>
  52. </listitem>
  53. </varlistentry>
  54. </variablelist>
  55. <para>编译该软件包:</para>
  56. <screen><userinput remap="make">make</userinput></screen>
  57. <para>该软件包不包含测试套件。</para>
  58. <para>安装该软件包:</para>
  59. <screen><userinput remap="install">make install
  60. mv -v /etc/bash_completion.d/grub /usr/share/bash-completion/completions</userinput></screen>
  61. <para>使用 GRUB 引导您的 LFS 系统的方法将在
  62. <xref linkend="ch-bootable-grub"/> 中讨论。</para>
  63. </sect2>
  64. <sect2 id="contents-gRUB" role="content">
  65. <title>GRUB 的内容</title>
  66. <segmentedlist>
  67. <segtitle>安装的程序</segtitle>
  68. <segtitle>安装的目录</segtitle>
  69. <seglistitem>
  70. <seg>grub-bios-setup, grub-editenv, grub-file, grub-fstest,
  71. grub-glue-efi, grub-install, grub-kbdcomp, grub-macbless,
  72. grub-menulst2cfg, grub-mkconfig,
  73. grub-mkimage, grub-mklayout, grub-mknetdir,
  74. grub-mkpasswd-pbkdf2, grub-mkrelpath, grub-mkrescue, grub-mkstandalone,
  75. grub-ofpathname, grub-probe, grub-reboot, grub-render-label,
  76. grub-script-check,
  77. grub-set-default, grub-sparc64-setup, 以及 grub-syslinux2cfg</seg>
  78. <seg>/usr/lib/grub, /etc/grub.d, /usr/share/grub, 以及 /boot/grub (
  79. 在初次运行 grub-install 时安装)</seg>
  80. </seglistitem>
  81. </segmentedlist>
  82. <variablelist>
  83. <bridgehead renderas="sect3">简要描述</bridgehead>
  84. <?dbfo list-presentation="list"?>
  85. <?dbhtml list-presentation="table"?>
  86. <varlistentry id="grub-bios-setup">
  87. <term><command>grub-bios-setup</command></term>
  88. <listitem>
  89. <para>grub-install 使用的辅助程序</para>
  90. <indexterm zone="ch-system-grub grub-bios-setup">
  91. <primary sortas="b-grub-bios-setup">grub-bios-setup</primary>
  92. </indexterm>
  93. </listitem>
  94. </varlistentry>
  95. <varlistentry id="grub-editenv">
  96. <term><command>grub-editenv</command></term>
  97. <listitem>
  98. <para>用于编辑环境块的工具</para>
  99. <indexterm zone="ch-system-grub grub-editenv">
  100. <primary sortas="b-grub-editenv">grub-editenv</primary>
  101. </indexterm>
  102. </listitem>
  103. </varlistentry>
  104. <varlistentry id="grub-file">
  105. <term><command>grub-file</command></term>
  106. <listitem>
  107. <para>检验文件是否是给定类型</para>
  108. <indexterm zone="ch-system-grub grub-file">
  109. <primary sortas="b-grub-file">grub-file</primary>
  110. </indexterm>
  111. </listitem>
  112. </varlistentry>
  113. <varlistentry id="grub-fstest">
  114. <term><command>grub-fstest</command></term>
  115. <listitem>
  116. <para>调试文件系统驱动程序的工具</para>
  117. <indexterm zone="ch-system-grub grub-fstest">
  118. <primary sortas="b-grub-fstest">grub-fstest</primary>
  119. </indexterm>
  120. </listitem>
  121. </varlistentry>
  122. <varlistentry id="grub-glue-efi">
  123. <term><command>grub-glue-efi</command></term>
  124. <listitem>
  125. <para>处理 ia32 和 amd64 EFI 镜像,根据 Apple 格式粘合它们</para>
  126. <indexterm zone="ch-system-grub grub-glue-efi">
  127. <primary sortas="b-grub-glue-efi">grub-glue-efi</primary>
  128. </indexterm>
  129. </listitem>
  130. </varlistentry>
  131. <varlistentry id="grub-install">
  132. <term><command>grub-install</command></term>
  133. <listitem>
  134. <para>在您的驱动器上安装 GRUB</para>
  135. <indexterm zone="ch-system-grub grub-install">
  136. <primary sortas="b-grub-install">grub-install</primary>
  137. </indexterm>
  138. </listitem>
  139. </varlistentry>
  140. <varlistentry id="grub-kbdcomp">
  141. <term><command>grub-kbdcomp</command></term>
  142. <listitem>
  143. <para>将 xkb 布局转化为 GRUB 能够识别的格式的脚本</para>
  144. <indexterm zone="ch-system-grub grub-kbdcomp">
  145. <primary sortas="b-grub-kbdcomp">grub-kbdcomp</primary>
  146. </indexterm>
  147. </listitem>
  148. </varlistentry>
  149. <varlistentry id="grub-macbless">
  150. <term><command>grub-macbless</command></term>
  151. <listitem>
  152. <para>Mac 风格的 bless 命令,用于 HFS 或 HFS+ 文件系统</para>
  153. <indexterm zone="ch-system-grub grub-macbless">
  154. <primary sortas="b-grub-macbless">grub-macbless</primary>
  155. </indexterm>
  156. </listitem>
  157. </varlistentry>
  158. <varlistentry id="grub-menulst2cfg">
  159. <term><command>grub-menulst2cfg</command></term>
  160. <listitem>
  161. <para>将经典的 GRUB <filename>menu.lst</filename>
  162. 转化为 <filename>grub.cfg</filename> 以供 GRUB 2 使用</para>
  163. <indexterm zone="ch-system-grub grub-menulst2cfg">
  164. <primary sortas="b-grub-menulst2cfg">grub-menulst2cfg</primary>
  165. </indexterm>
  166. </listitem>
  167. </varlistentry>
  168. <varlistentry id="grub-mkconfig">
  169. <term><command>grub-mkconfig</command></term>
  170. <listitem>
  171. <para>生成 GRUB 配置文件</para>
  172. <indexterm zone="ch-system-grub grub-mkconfig">
  173. <primary sortas="b-grub-mkconfig">grub-mkconfig</primary>
  174. </indexterm>
  175. </listitem>
  176. </varlistentry>
  177. <varlistentry id="grub-mkimage">
  178. <term><command>grub-mkimage</command></term>
  179. <listitem>
  180. <para>创建 GRUB 可引导镜像</para>
  181. <indexterm zone="ch-system-grub grub-mkimage">
  182. <primary sortas="b-grub-mkimage">grub-mkimage</primary>
  183. </indexterm>
  184. </listitem>
  185. </varlistentry>
  186. <varlistentry id="grub-mklayout">
  187. <term><command>grub-mklayout</command></term>
  188. <listitem>
  189. <para>生成 GRUB 键盘布局文件</para>
  190. <indexterm zone="ch-system-grub grub-mklayout">
  191. <primary sortas="b-grub-mklayout">grub-mklayout</primary>
  192. </indexterm>
  193. </listitem>
  194. </varlistentry>
  195. <varlistentry id="grub-mknetdir">
  196. <term><command>grub-mknetdir</command></term>
  197. <listitem>
  198. <para>准备 GRUB 网络启动目录</para>
  199. <indexterm zone="ch-system-grub grub-mknetdir">
  200. <primary sortas="b-grub-mknetdir">grub-mknetdir</primary>
  201. </indexterm>
  202. </listitem>
  203. </varlistentry>
  204. <varlistentry id="grub-mkpasswd-pbkdf2">
  205. <term><command>grub-mkpasswd-pbkdf2</command></term>
  206. <listitem>
  207. <para>生成用于引导菜单的加密 PBKDF2 密码</para>
  208. <indexterm zone="ch-system-grub grub-mkpasswd-pbkdf2">
  209. <primary sortas="b-grub-mkpasswd-pbkdf2">grub-mkpasswd-pbkdf2</primary>
  210. </indexterm>
  211. </listitem>
  212. </varlistentry>
  213. <varlistentry id="grub-mkrelpath">
  214. <term><command>grub-mkrelpath</command></term>
  215. <listitem>
  216. <para>生成相对于根目录的系统路径名称</para>
  217. <indexterm zone="ch-system-grub grub-mkrelpath">
  218. <primary sortas="b-grub-mkrelpath">grub-mkrelpath</primary>
  219. </indexterm>
  220. </listitem>
  221. </varlistentry>
  222. <varlistentry id="grub-mkrescue">
  223. <term><command>grub-mkrescue</command></term>
  224. <listitem>
  225. <para>为软盘或 CDROM/DVD 创建 GRUB 可引导镜像</para>
  226. <indexterm zone="ch-system-grub grub-mkrescue">
  227. <primary sortas="b-grub-mkrescue">grub-mkrescue</primary>
  228. </indexterm>
  229. </listitem>
  230. </varlistentry>
  231. <varlistentry id="grub-mkstandalone">
  232. <term><command>grub-mkstandalone</command></term>
  233. <listitem>
  234. <para>生成独立(包含所有模块)的镜像</para>
  235. <indexterm zone="ch-system-grub grub-mkstandalone">
  236. <primary sortas="b-grub-mkstandalone">grub-mkstandalone</primary>
  237. </indexterm>
  238. </listitem>
  239. </varlistentry>
  240. <varlistentry id="grub-ofpathname">
  241. <term><command>grub-ofpathname</command></term>
  242. <listitem>
  243. <para>打印 GRUB 设备路径的帮助程序</para>
  244. <indexterm zone="ch-system-grub grub-ofpathname">
  245. <primary sortas="b-grub-ofpathname">grub-ofpathname</primary>
  246. </indexterm>
  247. </listitem>
  248. </varlistentry>
  249. <varlistentry id="grub-probe">
  250. <term><command>grub-probe</command></term>
  251. <listitem>
  252. <para>对给定路径或设备探测信息</para>
  253. <indexterm zone="ch-system-grub grub-probe">
  254. <primary sortas="b-grub-probe">grub-probe</primary>
  255. </indexterm>
  256. </listitem>
  257. </varlistentry>
  258. <varlistentry id="grub-reboot">
  259. <term><command>grub-reboot</command></term>
  260. <listitem>
  261. <para>仅为下次启动设置 GRUB 默认引导项</para>
  262. <indexterm zone="ch-system-grub grub-reboot">
  263. <primary sortas="b-grub-reboot">grub-reboot</primary>
  264. </indexterm>
  265. </listitem>
  266. </varlistentry>
  267. <varlistentry id="grub-render-label">
  268. <term><command>grub-render-label</command></term>
  269. <listitem>
  270. <para>为 Apple Mac 设置 Apple .disk_label</para>
  271. <indexterm zone="ch-system-grub grub-render-label">
  272. <primary sortas="b-grub-render-label">grub-render-label</primary>
  273. </indexterm>
  274. </listitem>
  275. </varlistentry>
  276. <varlistentry id="grub-script-check">
  277. <term><command>grub-script-check</command></term>
  278. <listitem>
  279. <para>在 GRUB 配置脚本中检查语法错误</para>
  280. <indexterm zone="ch-system-grub grub-script-check">
  281. <primary sortas="b-grub-script-check">grub-script-check</primary>
  282. </indexterm>
  283. </listitem>
  284. </varlistentry>
  285. <varlistentry id="grub-set-default">
  286. <term><command>grub-set-default</command></term>
  287. <listitem>
  288. <para>设置 GRUB 默认引导项</para>
  289. <indexterm zone="ch-system-grub grub-set-default">
  290. <primary sortas="b-grub-set-default">grub-set-default</primary>
  291. </indexterm>
  292. </listitem>
  293. </varlistentry>
  294. <varlistentry id="grub-sparc64-setup">
  295. <term><command>grub-sparc64-setup</command></term>
  296. <listitem>
  297. <para>grub-setup 使用的帮助程序</para>
  298. <indexterm zone="ch-system-grub grub-sparc64-setup">
  299. <primary sortas="b-grub-sparc64-setup">grub-setup</primary>
  300. </indexterm>
  301. </listitem>
  302. </varlistentry>
  303. <varlistentry id="grub-syslinux2cfg">
  304. <term><command>grub-syslinux2cfg</command></term>
  305. <listitem>
  306. <para>将 syslinux 配置文件转换为 grub.cfg 格式</para>
  307. <indexterm zone="ch-system-grub grub-syslinux2cfg">
  308. <primary sortas="b-grub-syslinux2cfg">grub-syslinux2cfg</primary>
  309. </indexterm>
  310. </listitem>
  311. </varlistentry>
  312. </variablelist>
  313. </sect2>
  314. </sect1>