grub.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370
  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</userinput></screen>
  60. <para>使用 GRUB 引导您的 LFS 系统的方法将在
  61. <xref linkend="ch-bootable-grub"/> 中讨论。</para>
  62. </sect2>
  63. <sect2 id="contents-gRUB" role="content">
  64. <title>GRUB 的内容</title>
  65. <segmentedlist>
  66. <segtitle>安装的程序</segtitle>
  67. <segtitle>安装的目录</segtitle>
  68. <seglistitem>
  69. <seg>grub-bios-setup, grub-editenv, grub-file, grub-fstest,
  70. grub-glue-efi, grub-install, grub-kbdcomp, grub-macbless,
  71. grub-menulst2cfg, grub-mkconfig,
  72. grub-mkimage, grub-mklayout, grub-mknetdir,
  73. grub-mkpasswd-pbkdf2, grub-mkrelpath, grub-mkrescue, grub-mkstandalone,
  74. grub-ofpathname, grub-probe, grub-reboot, grub-render-label,
  75. grub-script-check,
  76. grub-set-default, grub-sparc64-setup, 以及 grub-syslinux2cfg</seg>
  77. <seg>/usr/lib/grub, /etc/grub.d, /usr/share/grub, 以及 boot/grub (
  78. 在初次运行 grub-install 时安装)</seg>
  79. </seglistitem>
  80. </segmentedlist>
  81. <variablelist>
  82. <bridgehead renderas="sect3">简要描述</bridgehead>
  83. <?dbfo list-presentation="list"?>
  84. <?dbhtml list-presentation="table"?>
  85. <varlistentry id="grub-bios-setup">
  86. <term><command>grub-bios-setup</command></term>
  87. <listitem>
  88. <para>grub-install 使用的辅助程序</para>
  89. <indexterm zone="ch-system-grub grub-bios-setup">
  90. <primary sortas="b-grub-bios-setup">grub-bios-setup</primary>
  91. </indexterm>
  92. </listitem>
  93. </varlistentry>
  94. <varlistentry id="grub-editenv">
  95. <term><command>grub-editenv</command></term>
  96. <listitem>
  97. <para>用于编辑环境块的工具</para>
  98. <indexterm zone="ch-system-grub grub-editenv">
  99. <primary sortas="b-grub-editenv">grub-editenv</primary>
  100. </indexterm>
  101. </listitem>
  102. </varlistentry>
  103. <varlistentry id="grub-file">
  104. <term><command>grub-file</command></term>
  105. <listitem>
  106. <para>检验文件是否是给定类型</para>
  107. <indexterm zone="ch-system-grub grub-file">
  108. <primary sortas="b-grub-file">grub-file</primary>
  109. </indexterm>
  110. </listitem>
  111. </varlistentry>
  112. <varlistentry id="grub-fstest">
  113. <term><command>grub-fstest</command></term>
  114. <listitem>
  115. <para>调试文件系统驱动程序的工具</para>
  116. <indexterm zone="ch-system-grub grub-fstest">
  117. <primary sortas="b-grub-fstest">grub-fstest</primary>
  118. </indexterm>
  119. </listitem>
  120. </varlistentry>
  121. <varlistentry id="grub-glue-efi">
  122. <term><command>grub-glue-efi</command></term>
  123. <listitem>
  124. <para>处理 ia32 和 amd64 EFI 镜像,根据 Apple 格式粘合它们</para>
  125. <indexterm zone="ch-system-grub grub-glue-efi">
  126. <primary sortas="b-grub-glue-efi">grub-glue-efi</primary>
  127. </indexterm>
  128. </listitem>
  129. </varlistentry>
  130. <varlistentry id="grub-install">
  131. <term><command>grub-install</command></term>
  132. <listitem>
  133. <para>在您的驱动器上安装 GRUB</para>
  134. <indexterm zone="ch-system-grub grub-install">
  135. <primary sortas="b-grub-install">grub-install</primary>
  136. </indexterm>
  137. </listitem>
  138. </varlistentry>
  139. <varlistentry id="grub-kbdcomp">
  140. <term><command>grub-kbdcomp</command></term>
  141. <listitem>
  142. <para>将 xkb 布局转化为 GRUB 能够识别的格式的脚本</para>
  143. <indexterm zone="ch-system-grub grub-kbdcomp">
  144. <primary sortas="b-grub-kbdcomp">grub-kbdcomp</primary>
  145. </indexterm>
  146. </listitem>
  147. </varlistentry>
  148. <varlistentry id="grub-macbless">
  149. <term><command>grub-macbless</command></term>
  150. <listitem>
  151. <para>Mac 风格的 bless 命令,用于 HFS 或 HFS+ 文件系统</para>
  152. <indexterm zone="ch-system-grub grub-macbless">
  153. <primary sortas="b-grub-macbless">grub-macbless</primary>
  154. </indexterm>
  155. </listitem>
  156. </varlistentry>
  157. <varlistentry id="grub-menulst2cfg">
  158. <term><command>grub-menulst2cfg</command></term>
  159. <listitem>
  160. <para>将经典的 GRUB <filename>menu.lst</filename>
  161. 转化为 <filename>grub.cfg</filename> 以供 GRUB 2 使用</para>
  162. <indexterm zone="ch-system-grub grub-menulst2cfg">
  163. <primary sortas="b-grub-menulst2cfg">grub-menulst2cfg</primary>
  164. </indexterm>
  165. </listitem>
  166. </varlistentry>
  167. <varlistentry id="grub-mkconfig">
  168. <term><command>grub-mkconfig</command></term>
  169. <listitem>
  170. <para>生成 GRUB 配置文件</para>
  171. <indexterm zone="ch-system-grub grub-mkconfig">
  172. <primary sortas="b-grub-mkconfig">grub-mkconfig</primary>
  173. </indexterm>
  174. </listitem>
  175. </varlistentry>
  176. <varlistentry id="grub-mkimage">
  177. <term><command>grub-mkimage</command></term>
  178. <listitem>
  179. <para>创建 GRUB 可引导镜像</para>
  180. <indexterm zone="ch-system-grub grub-mkimage">
  181. <primary sortas="b-grub-mkimage">grub-mkimage</primary>
  182. </indexterm>
  183. </listitem>
  184. </varlistentry>
  185. <varlistentry id="grub-mklayout">
  186. <term><command>grub-mklayout</command></term>
  187. <listitem>
  188. <para>生成 GRUB 键盘布局文件</para>
  189. <indexterm zone="ch-system-grub grub-mklayout">
  190. <primary sortas="b-grub-mklayout">grub-mklayout</primary>
  191. </indexterm>
  192. </listitem>
  193. </varlistentry>
  194. <varlistentry id="grub-mknetdir">
  195. <term><command>grub-mknetdir</command></term>
  196. <listitem>
  197. <para>准备 GRUB 网络启动目录</para>
  198. <indexterm zone="ch-system-grub grub-mknetdir">
  199. <primary sortas="b-grub-mknetdir">grub-mknetdir</primary>
  200. </indexterm>
  201. </listitem>
  202. </varlistentry>
  203. <varlistentry id="grub-mkpasswd-pbkdf2">
  204. <term><command>grub-mkpasswd-pbkdf2</command></term>
  205. <listitem>
  206. <para>生成用于引导菜单的加密 PBKDF2 密码</para>
  207. <indexterm zone="ch-system-grub grub-mkpasswd-pbkdf2">
  208. <primary sortas="b-grub-mkpasswd-pbkdf2">grub-mkpasswd-pbkdf2</primary>
  209. </indexterm>
  210. </listitem>
  211. </varlistentry>
  212. <varlistentry id="grub-mkrelpath">
  213. <term><command>grub-mkrelpath</command></term>
  214. <listitem>
  215. <para>生成相对于根目录的系统路径名称</para>
  216. <indexterm zone="ch-system-grub grub-mkrelpath">
  217. <primary sortas="b-grub-mkrelpath">grub-mkrelpath</primary>
  218. </indexterm>
  219. </listitem>
  220. </varlistentry>
  221. <varlistentry id="grub-mkrescue">
  222. <term><command>grub-mkrescue</command></term>
  223. <listitem>
  224. <para>为软盘或 CDROM/DVD 创建 GRUB 可引导镜像</para>
  225. <indexterm zone="ch-system-grub grub-mkrescue">
  226. <primary sortas="b-grub-mkrescue">grub-mkrescue</primary>
  227. </indexterm>
  228. </listitem>
  229. </varlistentry>
  230. <varlistentry id="grub-mkstandalone">
  231. <term><command>grub-mkstandalone</command></term>
  232. <listitem>
  233. <para>生成独立(包含所有模块)的镜像</para>
  234. <indexterm zone="ch-system-grub grub-mkstandalone">
  235. <primary sortas="b-grub-mkstandalone">grub-mkstandalone</primary>
  236. </indexterm>
  237. </listitem>
  238. </varlistentry>
  239. <varlistentry id="grub-ofpathname">
  240. <term><command>grub-ofpathname</command></term>
  241. <listitem>
  242. <para>打印 GRUB 设备路径的帮助程序</para>
  243. <indexterm zone="ch-system-grub grub-ofpathname">
  244. <primary sortas="b-grub-ofpathname">grub-ofpathname</primary>
  245. </indexterm>
  246. </listitem>
  247. </varlistentry>
  248. <varlistentry id="grub-probe">
  249. <term><command>grub-probe</command></term>
  250. <listitem>
  251. <para>对给定路径或设备探测信息</para>
  252. <indexterm zone="ch-system-grub grub-probe">
  253. <primary sortas="b-grub-probe">grub-probe</primary>
  254. </indexterm>
  255. </listitem>
  256. </varlistentry>
  257. <varlistentry id="grub-reboot">
  258. <term><command>grub-reboot</command></term>
  259. <listitem>
  260. <para>仅为下次启动设置 GRUB 默认引导项</para>
  261. <indexterm zone="ch-system-grub grub-reboot">
  262. <primary sortas="b-grub-reboot">grub-reboot</primary>
  263. </indexterm>
  264. </listitem>
  265. </varlistentry>
  266. <varlistentry id="grub-render-label">
  267. <term><command>grub-render-label</command></term>
  268. <listitem>
  269. <para>为 Apple Mac 设置 Apple .disk_label</para>
  270. <indexterm zone="ch-system-grub grub-render-label">
  271. <primary sortas="b-grub-render-label">grub-render-label</primary>
  272. </indexterm>
  273. </listitem>
  274. </varlistentry>
  275. <varlistentry id="grub-script-check">
  276. <term><command>grub-script-check</command></term>
  277. <listitem>
  278. <para>在 GRUB 配置脚本中检查语法错误</para>
  279. <indexterm zone="ch-system-grub grub-script-check">
  280. <primary sortas="b-grub-script-check">grub-script-check</primary>
  281. </indexterm>
  282. </listitem>
  283. </varlistentry>
  284. <varlistentry id="grub-set-default">
  285. <term><command>grub-set-default</command></term>
  286. <listitem>
  287. <para>设置 GRUB 默认引导项</para>
  288. <indexterm zone="ch-system-grub grub-set-default">
  289. <primary sortas="b-grub-set-default">grub-set-default</primary>
  290. </indexterm>
  291. </listitem>
  292. </varlistentry>
  293. <varlistentry id="grub-sparc64-setup">
  294. <term><command>grub-sparc64-setup</command></term>
  295. <listitem>
  296. <para>grub-setup 使用的帮助程序</para>
  297. <indexterm zone="ch-system-grub grub-sparc64-setup">
  298. <primary sortas="b-grub-sparc64-setup">grub-setup</primary>
  299. </indexterm>
  300. </listitem>
  301. </varlistentry>
  302. <varlistentry id="grub-syslinux2cfg">
  303. <term><command>grub-syslinux2cfg</command></term>
  304. <listitem>
  305. <para>将 syslinux 配置文件转换为 grub.cfg 格式</para>
  306. <indexterm zone="ch-system-grub grub-syslinux2cfg">
  307. <primary sortas="b-grub-syslinux2cfg">grub-syslinux2cfg</primary>
  308. </indexterm>
  309. </listitem>
  310. </varlistentry>
  311. </variablelist>
  312. </sect2>
  313. </sect1>