pkgmgt.xml 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  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-pkgmgt">
  8. <?dbhtml filename="pkgmgt.html"?>
  9. <title>软件包管理</title>
  10. <!--para>Package Management is an often requested addition to the LFS Book. A
  11. Package Manager allows tracking the installation of files making it easy to
  12. remove and upgrade packages. As well as the binary and library files, a
  13. package manager will handle the installation of configuration files. Before
  14. you begin to wonder, NO&mdash;this section will not talk about nor recommend
  15. any particular package manager. What it provides is a roundup of the more
  16. popular techniques and how they work. The perfect package manager for you may
  17. be among these techniques or may be a combination of two or more of these
  18. techniques. This section briefly mentions issues that may arise when upgrading
  19. packages.</para-->
  20. <para>软件包管理是一个经常被人请求添加到 LFS 手册中的内容。
  21. 包管理器可以跟踪软件包安装的文件,
  22. 这样就可以很容易地删除或者更新软件包。
  23. 和二进制程序、库文件一样,包管理器也会处理软件包安装的配置文件。
  24. 在您开始想入非非的时候,不! —— 本节不会讨论或推荐任何特定的包管理器。
  25. 本节对软件包管理的流行技术及其工作原理进行综述,对您来说,
  26. 完美的包管理器可能是以下的某个技术,或者可能是几个技术的结合。
  27. 本节还将简要提到在升级软件包时可能遇到的问题。</para>
  28. <!--para>Some reasons why no package manager is mentioned in LFS or BLFS
  29. include:</para-->
  30. <para>LFS 或 BLFS 不采用任何包管理器的原因有:</para>
  31. <itemizedlist>
  32. <listitem>
  33. <!--para>Dealing with package management takes the focus away from the goals
  34. of these books&mdash;teaching how a Linux system is built.</para-->
  35. <para>处理包管理器会偏离本书的重点目标 —— 讲述如何构建 Linux 系统。
  36. </para>
  37. </listitem>
  38. <listitem>
  39. <!--para>There are multiple solutions for package management, each having
  40. its strengths and drawbacks. Including one that satisfies all audiences
  41. is difficult.</para-->
  42. <para>存在多种软件包管理的解决方案,它们各有优缺点,
  43. 很难找到一种让所有读者满意的方案。</para>
  44. </listitem>
  45. </itemizedlist>
  46. <!--para>There are some hints written on the topic of package management. Visit
  47. the <ulink url="&hints-index;">Hints Project</ulink> and see if one of them
  48. fits your need.</para-->
  49. <para>在 LFS 的 <ulink url="&hints-index;">Hints Project</ulink>
  50. 中有许多关于软件包管理的提示,您可以在其中查找,
  51. 看看有没有符合您需要的方案。</para>
  52. <sect2>
  53. <title>升级问题</title>
  54. <!--para>A Package Manager makes it easy to upgrade to newer versions when they
  55. are released. Generally the instructions in the LFS and BLFS Book can be
  56. used to upgrade to the newer versions. Here are some points that you should
  57. be aware of when upgrading packages, especially on a running system.</para-->
  58. <para>包管理器可以在软件包新版本发布后容易地完成升级。一般来说,
  59. 使用 LFS 或者 BLFS 手册中的指令即可升级软件包。
  60. 下面是您在升级时必须注意的重点,特别是升级正在运行的系统时。
  61. </para>
  62. <itemizedlist>
  63. <listitem>
  64. <!--para>If Glibc needs to be upgraded to a newer version, (e.g. from
  65. glibc-2.19 to glibc-2.20, it is safer to rebuild LFS. Though you
  66. <emphasis>may</emphasis> be able to rebuild all the packages in their
  67. dependency order, we do not recommend it. </para-->
  68. <para>如果需要升级 Glibc (例如从 Glibc-2.19 升级到 Glibc-2.20),
  69. 最安全的方法是重新构建 LFS 。尽管您<emphasis>或许</emphasis>
  70. 能按依赖顺序重新构建所有软件包,但我们不推荐这样做。</para>
  71. </listitem>
  72. <listitem>
  73. <!--para>If a package containing a shared library is updated, and if the
  74. name of the library changes, then all the packages dynamically linked
  75. to the library need to be recompiled to link against the newer library.
  76. (Note that there is no correlation between the package version and the
  77. name of the library.) For example, consider a package foo-1.2.3 that
  78. installs a shared library with name
  79. <filename class='libraryfile'>libfoo.so.1</filename>. Say you upgrade
  80. the package to a newer version foo-1.2.4 that installs a shared library
  81. with name <filename class='libraryfile'>libfoo.so.2</filename>. In this
  82. case, all packages that are dynamically linked to
  83. <filename class='libraryfile'>libfoo.so.1</filename> need to be
  84. recompiled to link against
  85. <filename class='libraryfile'>libfoo.so.2</filename>. Note that you
  86. should not remove the previous libraries until the dependent packages
  87. are recompiled.</para-->
  88. <para>如果更新了一个包含共享库的软件包,而且共享库的名称发生改变,
  89. 那么所有动态链接到这个库的软件包都需要重新编译,
  90. 以链接到新版本的库。
  91. (注意,软件包的版本和共享库的名称没有关系。)
  92. 例如,如果一个软件包 foo-1.2.3 安装了名为
  93. <filename class="libraryfile">libfoo.so.1</filename>
  94. 的共享库,您把该软件包升级到了新版本 foo-1.2.4,它安装了名为
  95. <filename class="libraryfile">libfoo.so.2</filename>
  96. 的共享库。那么,所有链接到
  97. <filename class="libraryfile">libfoo.so.1</filename>
  98. 的软件包都要重新编译以链接到
  99. <filename class="libraryfile">libfoo.so.2</filename>。
  100. 注意,在重新编译这些软件包之前,您不能删除旧版本的库。</para>
  101. <note><title>译注</title>
  102. <para>文中的<quote>共享库的名称</quote>应解释为 ELF 文件中的
  103. DT_SONAME,即 <command>ldd</command> 命令在箭头前输出的内容。
  104. 根据<ulink url="https://semver.org">语义化版本</ulink>所述,
  105. 共享库主版本号的递增表示 API 与之前版本不兼容,
  106. 故主版本号往往被包含在共享库名称中,例如
  107. <filename class="libraryfile">libfoo.so.2</filename>
  108. 中的 2 。
  109. </para>
  110. </note>
  111. </listitem>
  112. </itemizedlist>
  113. </sect2>
  114. <sect2>
  115. <title>软件包管理技术</title>
  116. <!--para>The following are some common package management techniques. Before
  117. making a decision on a package manager, do some research on the various
  118. techniques, particularly the drawbacks of the particular scheme.</para-->
  119. <para>以下是几种常见的软件包管理技术,在决定使用某种包管理器前,
  120. 请研读这些技术,特别是要了解特定技术的不足。</para>
  121. <sect3>
  122. <title>这都在我的脑袋里!</title>
  123. <!--para>Yes, this is a package management technique. Some folks do not find
  124. the need for a package manager because they know the packages intimately
  125. and know what files are installed by each package. Some users also do not
  126. need any package management because they plan on rebuilding the entire
  127. system when a package is changed.</para-->
  128. <para>您没有看错,这是一种包管理技术。有些人觉得不需要管理软件包,
  129. 因为他们十分了解软件包,知道每个软件包安装了什么文件。
  130. 有的用户则计划每次有软件包发生变动时就重新构建系统,
  131. 所以不需要管理软件包。</para>
  132. </sect3>
  133. <sect3>
  134. <title>安装到独立目录</title>
  135. <!--para>This is a simplistic package management that does not need any extra
  136. package to manage the installations. Each package is installed in a
  137. separate directory. For example, package foo-1.1 is installed in
  138. <filename class='directory'>/usr/pkg/foo-1.1</filename>
  139. and a symlink is made from <filename>/usr/pkg/foo</filename> to
  140. <filename class='directory'>/usr/pkg/foo-1.1</filename>. When installing
  141. a new version foo-1.2, it is installed in
  142. <filename class='directory'>/usr/pkg/foo-1.2</filename> and the previous
  143. symlink is replaced by a symlink to the new version.</para-->
  144. <para>这是一种最简单的软件包管理方式,
  145. 它不需要任何额外的软件来控制软件包的安装。
  146. 例如,软件包 foo-1.1 将会被安装在
  147. <filename class="directory">/usr/pkg/foo-1.1</filename>,
  148. 然后创建一个到该目录的符号链接 <filename>/usr/pkg/foo</filename>。
  149. 在安装新版本 foo-1.2 的时候,把它安装到
  150. <filename class="directory">/usr/pkg/foo-1.2</filename>,
  151. 然后把之前的符号链接替换,使其链接到新版本。</para>
  152. <!--para>Environment variables such as <envar>PATH</envar>,
  153. <envar>LD_LIBRARY_PATH</envar>, <envar>MANPATH</envar>,
  154. <envar>INFOPATH</envar> and <envar>CPPFLAGS</envar> need to be expanded to
  155. include <filename>/usr/pkg/foo</filename>. For more than a few packages,
  156. this scheme becomes unmanageable.</para-->
  157. <para><envar>PATH</envar>、<envar>LD_LIBRARY_PATH</envar>、
  158. <envar>MANPATH</envar>、<envar>INFOPATH</envar> 和
  159. <envar>CPPFLAGS</envar> 等环境变量需要被扩充,以包含
  160. <filename>/usr/pkg/foo</filename>。一旦软件包的数量较多,
  161. 这种架构就会变得无法管理。</para>
  162. </sect3>
  163. <sect3>
  164. <title>软链接风格的软件包管理</title>
  165. <!--para>This is a variation of the previous package management technique.
  166. Each package is installed similar to the previous scheme. But instead of
  167. making the symlink, each file is symlinked into the
  168. <filename class='directory'>/usr</filename> hierarchy. This removes the
  169. need to expand the environment variables. Though the symlinks can be
  170. created by the user to automate the creation, many package managers have
  171. been written using this approach. A few of the popular ones include Stow,
  172. Epkg, Graft, and Depot.</para-->
  173. <para>这是前一种软件包管理技术的变种。
  174. 将各个软件包同样安装在独立的目录中,但不建立目录的软链接,
  175. 而是把其中的每个文件链接到
  176. <filename class="directory">/usr</filename> 目录树中对应的位置,
  177. 这样就不需要修改环境变量。这些链接可以由用户自己创建,
  178. 也可以自动化进行,一些流行的包管理器如 Stow、Epkg、Graft 和
  179. Depot 使用这种管理方式。</para>
  180. <!--para>The installation needs to be faked, so that the package thinks that
  181. it is installed in <filename class="directory">/usr</filename> though in
  182. reality it is installed in the
  183. <filename class="directory">/usr/pkg</filename> hierarchy. Installing in
  184. this manner is not usually a trivial task. For example, consider that you
  185. are installing a package libfoo-1.1. The following instructions may
  186. not install the package properly:</para-->
  187. <para>安装过程需要伪装,使得软件包认为它处于
  188. <filename class="directory">/usr</filename> 中,尽管它实际上被安装
  189. 在 <filename class="directory">/usr/pkg</filename> 目录结构中。
  190. 这样安装软件包一般不是简单的任务,例如考虑安装软件包 libfoo-1.1,
  191. 下面的指令可能不能正确安装该软件包:</para>
  192. <screen role="nodump"><userinput>./configure --prefix=/usr/pkg/libfoo/1.1
  193. make
  194. make install</userinput></screen>
  195. <!--para>The installation will work, but the dependent packages may not link
  196. to libfoo as you would expect. If you compile a package that links against
  197. libfoo, you may notice that it is linked to
  198. <filename class='libraryfile'>/usr/pkg/libfoo/1.1/lib/libfoo.so.1</filename>
  199. instead of <filename class='libraryfile'>/usr/lib/libfoo.so.1</filename>
  200. as you would expect. The correct approach is to use the
  201. <envar>DESTDIR</envar> strategy to fake installation of the package. This
  202. approach works as follows:</para-->
  203. <para>尽管安装本身可以进行,
  204. 但依赖于它的软件包可能不会像你期望的那样链接 libfoo 库。
  205. 如果要编译一个依赖于 libfoo 的软件包,您可能发现它链接到了
  206. <filename class="libraryfile">/usr/pkg/libfoo/1.1/lib/libfoo.so.1</filename>
  207. 而不是您期望的 <filename class="libraryfile">/usr/lib/libfoo.so.1</filename>。
  208. 正确的做法是使用 <envar>DESTDIR</envar> 策略伪装软件包的安装过程,
  209. 就像下面这样:</para>
  210. <screen role="nodump"><userinput>./configure --prefix=/usr
  211. make
  212. make DESTDIR=/usr/pkg/libfoo/1.1 install</userinput></screen>
  213. <!--para>Most packages support this approach, but there are some which do not.
  214. For the non-compliant packages, you may either need to manually install the
  215. package, or you may find that it is easier to install some problematic
  216. packages into <filename class='directory'>/opt</filename>.</para-->
  217. <para>多数软件包可以这样安装,但有些不能。对于那些不兼容的软件包,
  218. 您要么亲自动手安装,要么更简单地把一些出问题的软件包安装在
  219. <filename class="directory">/opt</filename> 中。</para>
  220. </sect3>
  221. <sect3>
  222. <title>基于时间戳的管理</title>
  223. <!--para>In this technique, a file is timestamped before the installation of
  224. the package. After the installation, a simple use of the
  225. <command>find</command> command with the appropriate options can generate
  226. a log of all the files installed after the timestamp file was created. A
  227. package manager written with this approach is install-log.</para-->
  228. <para>在这个方案中,安装一个软件包之前,为它创建一个时间戳文件。
  229. 在安装后,用一行简单的 <command>find</command> 命令,
  230. 加上正确的参数,就能生成安装日志,
  231. 包含在时间戳文件创建以后安装的所有文件。
  232. 有一个采用这个方案的包管理器叫做 install-log 。</para>
  233. <!--para>Though this scheme has the advantage of being simple, it has two
  234. drawbacks. If, during installation, the files are installed with any
  235. timestamp other than the current time, those files will not be tracked by
  236. the package manager. Also, this scheme can only be used when one package
  237. is installed at a time. The logs are not reliable if two packages are
  238. being installed on two different consoles.</para-->
  239. <para>尽管这种方式很简单,但它有两个缺点。如果在安装过程中,
  240. 某些文件没有以当前时间作为时间戳安装,它们就不能被包管理器跟踪。
  241. 另外,只有每次只安装一个软件包时才能使用这种技术,
  242. 如果在两个终端中同时安装两个不同的软件包,
  243. 它们的安装日志就不可靠了。</para>
  244. </sect3>
  245. <sect3>
  246. <title>追踪安装脚本</title>
  247. <!--para>In this approach, the commands that the installation scripts perform
  248. are recorded. There are two techniques that one can use:</para>
  249. <para>The <envar>LD_PRELOAD</envar> environment variable can be set to
  250. point to a library to be preloaded before installation. During
  251. installation, this library tracks the packages that are being installed by
  252. attaching itself to various executables such as <command>cp</command>,
  253. <command>install</command>, <command>mv</command> and tracking the system
  254. calls that modify the filesystem. For this approach to work, all the
  255. executables need to be dynamically linked without the suid or sgid bit.
  256. Preloading the library may cause some unwanted side-effects during
  257. installation. Therefore, it is advised that one performs some tests to
  258. ensure that the package manager does not break anything and logs all the
  259. appropriate files.</para-->
  260. <para>在这种方式中,安装脚本执行的命令被记录下来。
  261. 有两种技术可以进行记录:</para>
  262. <para>在安装前设置 <envar>LD_PRELOAD</envar> 环境变量,
  263. 将其指向一个库以在安装过程中预加载它。在安装过程中,
  264. 这个库将自身附加在<command>cp</command>、
  265. <command>install</command>、<command>mv</command> 等可执行文件上,
  266. 跟踪修改文件系统的系统调用。如果要使用这种方法,
  267. 所有需要跟踪的可执行文件必须是动态链接的,且没有设定
  268. suid 和 sgid 位。预加载动态库可能在安装过程中导致不希望的副作用,
  269. 因此建议先进行一些测试,以确保包管理器不会造成破坏,
  270. 并且记录了所有应该记录的文件。
  271. </para>
  272. <!--para>The second technique is to use <command>strace</command>, which
  273. logs all system calls made during the execution of the installation
  274. scripts.</para-->
  275. <para>第二种技术是使用 <command>strace</command>,
  276. 它能够记录安装脚本执行过程中的所有系统调用。</para>
  277. </sect3>
  278. <sect3>
  279. <title>创建软件包存档</title>
  280. <!--para>In this scheme, the package installation is faked into a separate
  281. tree as described in the Symlink style package management. After the
  282. installation, a package archive is created using the installed files.
  283. This archive is then used to install the package either on the local
  284. machine or can even be used to install the package on other machines.</para-->
  285. <para>在这种架构中,软件包被伪装安装到一个独立的目录树中,
  286. 就像软链接风格的软件包管理那样。
  287. 在安装后,使用被安装的文件创建一个软件包存档,
  288. 它可以被用来在本地机器甚至其他机器上安装该软件包。</para>
  289. <!--para>This approach is used by most of the package managers found in the
  290. commercial distributions. Examples of package managers that follow this
  291. approach are RPM (which, incidentally, is required by the <ulink
  292. url="http://refspecs.linuxfoundation.org/lsb.shtml">Linux
  293. Standard Base Specification</ulink>), pkg-utils, Debian's apt, and
  294. Gentoo's Portage system. A hint describing how to adopt this style of
  295. package management for LFS systems is located at <ulink
  296. url="&hints-root;fakeroot.txt"/>.</para-->
  297. <para>大多数商业发行版的包管理器采用这种策略,例如
  298. RPM (值得一提的是,它被
  299. <ulink url="http://refspecs.linuxfoundation.org/lsb.shtml">
  300. Linux Standard Base 规则 </ulink> 所要求),pkg-utils、
  301. Debian 的 apt、Gentoo 的 Portage 系统)等。
  302. LFS Hint 中的一条提示描述了如何为 LFS 系统适用这种管理方式:
  303. <ulink url="&hints-root;fakeroot.txt"/>。</para>
  304. <!--para>Creation of package files that include dependency information is
  305. complex and is beyond the scope of LFS.</para-->
  306. <para>创建包含依赖关系信息的软件包文件十分复杂,超过了 LFS 的范畴。
  307. </para>
  308. <!--para>Slackware uses a <command>tar</command> based system for package
  309. archives. This system purposely does not handle package dependencies
  310. as more complex package managers do. For details of Slackware package
  311. management, see <ulink
  312. url="http://www.slackbook.org/html/package-management.html"/>.</para-->
  313. <para>Slackware 使用一个基于 <command>tar</command>
  314. 的系统创建软件包档案。和更复杂的包管理器不同,
  315. 该系统有意地没有涉及软件包依赖关系。
  316. 如果想了解 Slackware 包管理器的详细信息,阅读
  317. <ulink url="http://www.slackbook.org/html/package-management.html"
  318. />。</para>
  319. </sect3>
  320. <sect3>
  321. <title>基于用户的软件包管理</title>
  322. <!--para>This scheme, unique to LFS, was devised by Matthias Benkmann, and is
  323. available from the <ulink url="&hints-index;">Hints Project</ulink>. In
  324. this scheme, each package is installed as a separate user into the
  325. standard locations. Files belonging to a package are easily identified by
  326. checking the user ID. The features and shortcomings of this approach are
  327. too complex to describe in this section. For the details please see the
  328. hint at <ulink url="&hints-root;more_control_and_pkg_man.txt"/>.</para-->
  329. <para>这种架构是 LFS 特有的,由 Matthias Benkmann 提出,可以在
  330. <ulink url="&hints-index;">Hints Project</ulink> 查阅。
  331. 在该架构中,每个软件包都由一个单独的用户安装到标准位置。
  332. 只要检查文件所有者,就能找出属于一个软件包的所有文件。
  333. 它的优缺点十分复杂,不适合在本节讨论,详细信息请阅读
  334. <ulink url="&hints-root;more_control_and_pkg_man.txt"/>。</para>
  335. </sect3>
  336. </sect2>
  337. <sect2>
  338. <title>在多个系统上部署 LFS</title>
  339. <!--para>One of the advantages of an LFS system is that there are no files that
  340. depend on the position of files on a disk system. Cloning an LFS build to
  341. another computer with the same architecture as the base system is as
  342. simple as using <command>tar</command> on the LFS partition that contains
  343. the root directory (about 250MB uncompressed for a base LFS build), copying
  344. that file via network transfer or CD-ROM to the new system and expanding
  345. it. From that point, a few configuration files will have to be changed.
  346. Configuration files that may need to be updated include:-->
  347. <para>LFS 系统的一项优势是,没有依赖于磁盘系统中文件位置的文件。
  348. 将构建好的 LFS 系统复制到另一台具有相同硬件架构的计算机很简单,
  349. 只要用 <command>tar</command> 命令把包含根目录的 LFS 分区打包
  350. (未压缩的情况下,一个基本的 LFS 系统需要 250 MB),
  351. 然后通过网络传输或者刻成光盘,复制到新的系统上,再展开即可。
  352. 这时,个别配置文件需要修改,可能需要更新的配置文件有:
  353. <filename>/etc/hosts</filename>,
  354. <filename>/etc/fstab</filename>,
  355. <filename>/etc/passwd</filename>,
  356. <filename>/etc/group</filename>,
  357. <phrase revision="systemd">
  358. <filename>/etc/shadow</filename>, 以及
  359. <filename>/etc/ld.so.conf</filename>。
  360. </phrase>
  361. <phrase revision="sysv">
  362. <filename>/etc/shadow</filename>,
  363. <filename>/etc/ld.so.conf</filename>,
  364. <filename>/etc/sysconfig/rc.site</filename>,
  365. <filename>/etc/sysconfig/network</filename>, 以及
  366. <filename>/etc/sysconfig/ifconfig.eth0</filename>。
  367. </phrase>
  368. </para>
  369. <!--para>A custom kernel may need to be built for the new system depending on
  370. differences in system hardware and the original kernel
  371. configuration.</para-->
  372. <para>由于系统硬件和原始内核配置的区别,
  373. 可能需要为新系统重新配置并构建内核。</para>
  374. <note><!--para>There have been some reports of issues when copying between
  375. similar but not identical architectures. For instance, the instruction set
  376. for an Intel system is not identical with an AMD processor and later
  377. versions of some processors may have instructions that are unavailable in
  378. earlier versions.</para-->
  379. <para>有一些报告反映称,
  380. 在架构相近但不完全一致的计算机之间拷贝 LFS 系统时出现问题。
  381. 例如,Intel 系统使用的指令集和 AMD 处理器不完全相同,
  382. 且较新的处理器可能包含旧处理器没有的指令。</para>
  383. </note>
  384. <note><title>译注</title>
  385. <para>据译者所知,LFS 中默认进行机器相关优化的软件包有
  386. GMP-&gmp-version; 和 libffi-$libffi-version。
  387. 在编译它们时遵循构建指示中的
  388. <quote>注意</quote> 框,即可构建通用的库文件。
  389. 然后注意整个构建过程不要使用 <option>-march</option> 选项,
  390. 构建出的 LFS 系统就应该可以拷贝到架构相近
  391. (<userinput>uname -m</userinput> 输出相同结果)
  392. 的机器上。</para>
  393. </note>
  394. <!--para>Finally the new system has to be made bootable via <xref
  395. linkend="ch-bootable-grub"/>.</para-->
  396. <para>最后,按照 <xref linkend="ch-bootable-grub"/> 中的指示,
  397. 为新系统配置引导加载器。</para>
  398. </sect2>
  399. </sect1>