[3f8be484] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[aa18ac0] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[3f8be484] | 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 |
|
---|
| 10 | <title>GRUB-&grub-version;</title>
|
---|
| 11 |
|
---|
| 12 | <indexterm zone="ch-system-grub">
|
---|
| 13 | <primary sortas="a-GRUB">GRUB</primary>
|
---|
| 14 | </indexterm>
|
---|
| 15 |
|
---|
| 16 | <sect2 role="package">
|
---|
| 17 | <title/>
|
---|
| 18 |
|
---|
| 19 | <para>The GRUB package contains the GRand Unified Bootloader.</para>
|
---|
| 20 |
|
---|
| 21 | </sect2>
|
---|
| 22 |
|
---|
| 23 | <sect2 role="installation">
|
---|
| 24 | <title>Installation of GRUB</title>
|
---|
| 25 |
|
---|
[407772b] | 26 | <note os="n1">
|
---|
| 27 | <para>If you would like use a different bootloader than this
|
---|
| 28 | one you can go to the following link for alterative bootloaders
|
---|
| 29 | and the instructions to use them.
|
---|
| 30 | <ulink url="http://trac.cross-lfs.org/wiki/bootloaders"/></para>
|
---|
| 31 | </note>
|
---|
| 32 |
|
---|
[1ebba95] | 33 | <para os="p1">GRUB has an issue that can cause it to segfault when you
|
---|
| 34 | try to configure a drive to utilize GRUB on x86_64 and building machines. The following
|
---|
| 35 | patch fixes this problem:</para>
|
---|
| 36 |
|
---|
| 37 | <screen os="p2"><userinput>patch -Np1 -i ../&grub-use_mmap-patch;</userinput></screen>
|
---|
| 38 |
|
---|
| 39 | <para os="p3">GRUB has an issue where it sometimes doesn't detect
|
---|
[ca9712f] | 40 | the disk geometry correctly when used with Linux 2.6, resulting
|
---|
| 41 | in the error message <literal>Error 24: Attempt to access block outside
|
---|
| 42 | partition</literal>. The following patch contains a fix for this issue
|
---|
| 43 | as well as various fixes for raid controllers and support for the
|
---|
| 44 | new Intel Mac:</para>
|
---|
[37ba094c] | 45 |
|
---|
[1ebba95] | 46 | <screen os="p4"><userinput>patch -Np1 -i ../&grub-fixes-patch;</userinput></screen>
|
---|
| 47 |
|
---|
| 48 | <para os="p5">By default, GRUB doesn't support ext2 filesystems with 256-byte inodes. Fix this by applying the following patch:</para>
|
---|
| 49 |
|
---|
| 50 | <screen os="p6"><userinput>patch -Np1 -i ../&grub-256byte_inode-patch;</userinput></screen>
|
---|
[37ba094c] | 51 |
|
---|
[1ebba95] | 52 | <para os="p7">By default, GRUB doesn't support ext4 filesystems. Fix this by applying the following patch:</para>
|
---|
[ca9712f] | 53 |
|
---|
[1ebba95] | 54 | <screen os="p8"><userinput>patch -Np1 -i ../&grub-ext4-patch;</userinput></screen>
|
---|
[ca9712f] | 55 |
|
---|
[3f8be484] | 56 | <para os="a">This package is known to have issues when its default optimization
|
---|
| 57 | flags (including the <option>-march</option> and <option>-mcpu</option>
|
---|
| 58 | options) are changed. If any environment variables that override default
|
---|
| 59 | optimizations have been defined, such as <envar>CFLAGS</envar> and
|
---|
| 60 | <envar>CXXFLAGS</envar>, unset them when building GRUB.</para>
|
---|
| 61 |
|
---|
| 62 | <para os="b">Prepare GRUB for compilation:</para>
|
---|
| 63 |
|
---|
| 64 | <screen><userinput>./configure --prefix=/usr</userinput></screen>
|
---|
| 65 |
|
---|
| 66 | <para os="c">Compile the package:</para>
|
---|
| 67 |
|
---|
| 68 | <screen os="d"><userinput>make</userinput></screen>
|
---|
| 69 |
|
---|
| 70 | <para os="e">To test the results, issue:
|
---|
[e3a1e522] | 71 | <userinput>make check</userinput>.</para>
|
---|
[3f8be484] | 72 |
|
---|
[e3a1e522] | 73 | <para os="f">Install the package:</para>
|
---|
[3f8be484] | 74 |
|
---|
[e3a1e522] | 75 | <screen os="g"><userinput>make install
|
---|
[c1fe1fee] | 76 | mkdir -pv /boot/grub
|
---|
[040521bc] | 77 | cp -v /usr/lib/grub/*/stage{1,2} /boot/grub</userinput></screen>
|
---|
[3f8be484] | 78 |
|
---|
[040521bc] | 79 | <para os="h">The directory in
|
---|
| 80 | <filename class="directory">/usr/lib/grub</filename> (its name depends
|
---|
| 81 | on your arch) contains a number of <filename>*stage1_5</filename> files,
|
---|
| 82 | different ones for different file systems. Review the files available and
|
---|
| 83 | copy the appropriate ones to the <filename
|
---|
[3f8be484] | 84 | class="directory">/boot/grub</filename> directory. Most users will
|
---|
| 85 | copy the <filename>e2fs_stage1_5</filename> and/or
|
---|
| 86 | <filename>reiserfs_stage1_5</filename> files.</para>
|
---|
| 87 |
|
---|
| 88 | </sect2>
|
---|
| 89 |
|
---|
| 90 | <sect2 id="contents-grub" role="content">
|
---|
| 91 | <title>Contents of GRUB</title>
|
---|
| 92 |
|
---|
| 93 | <segmentedlist>
|
---|
| 94 | <segtitle>Installed programs</segtitle>
|
---|
[61ad0b7f] | 95 | <segtitle>Installed directories</segtitle>
|
---|
[3f8be484] | 96 |
|
---|
| 97 | <seglistitem>
|
---|
[e29fb58] | 98 | <seg>grub, grub-install, grub-md5-crypt, grub-set-default, grub-terminfo, and mbchk</seg>
|
---|
[61ad0b7f] | 99 | <seg>/usr/lib/grub, /boot/grub</seg>
|
---|
[3f8be484] | 100 | </seglistitem>
|
---|
| 101 | </segmentedlist>
|
---|
| 102 |
|
---|
| 103 | <variablelist>
|
---|
| 104 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 105 | <?dbfo list-presentation="list"?>
|
---|
| 106 | <?dbhtml list-presentation="table"?>
|
---|
| 107 |
|
---|
| 108 | <varlistentry id="grub">
|
---|
| 109 | <term><command>grub</command></term>
|
---|
| 110 | <listitem>
|
---|
| 111 | <para>The Grand Unified Bootloader's command shell</para>
|
---|
| 112 | <indexterm zone="ch-system-grub grub">
|
---|
| 113 | <primary sortas="b-grub">grub</primary>
|
---|
| 114 | </indexterm>
|
---|
| 115 | </listitem>
|
---|
| 116 | </varlistentry>
|
---|
| 117 |
|
---|
| 118 | <varlistentry id="grub-install">
|
---|
| 119 | <term><command>grub-install</command></term>
|
---|
| 120 | <listitem>
|
---|
| 121 | <para>Installs GRUB on the given device</para>
|
---|
| 122 | <indexterm zone="ch-system-grub grub-install">
|
---|
| 123 | <primary sortas="b-grub-install">grub-install</primary>
|
---|
| 124 | </indexterm>
|
---|
| 125 | </listitem>
|
---|
| 126 | </varlistentry>
|
---|
| 127 |
|
---|
| 128 | <varlistentry id="grub-md5-crypt">
|
---|
| 129 | <term><command>grub-md5-crypt</command></term>
|
---|
| 130 | <listitem>
|
---|
| 131 | <para>Encrypts a password in MD5 format</para>
|
---|
| 132 | <indexterm zone="ch-system-grub grub-md5-crypt">
|
---|
| 133 | <primary sortas="b-grub-md5-crypt">grub-md5-crypt</primary>
|
---|
| 134 | </indexterm>
|
---|
| 135 | </listitem>
|
---|
| 136 | </varlistentry>
|
---|
| 137 |
|
---|
[e29fb58] | 138 | <varlistentry id="grub-set-default">
|
---|
| 139 | <term><command>grub-set-default</command></term>
|
---|
| 140 | <listitem>
|
---|
| 141 | <para>Sets the default boot entry for GRUB</para>
|
---|
| 142 | <indexterm zone="ch-system-grub grub-set-default">
|
---|
| 143 | <primary sortas="b-grub-set-default">grub-set-default</primary>
|
---|
| 144 | </indexterm>
|
---|
| 145 | </listitem>
|
---|
| 146 | </varlistentry>
|
---|
| 147 |
|
---|
[3f8be484] | 148 | <varlistentry id="grub-terminfo">
|
---|
| 149 | <term><command>grub-terminfo</command></term>
|
---|
| 150 | <listitem>
|
---|
| 151 | <para>Generates a terminfo command from a terminfo name; it can be
|
---|
| 152 | employed if an unknown terminal is being used</para>
|
---|
| 153 | <indexterm zone="ch-system-grub grub-terminfo">
|
---|
| 154 | <primary sortas="b-grub-terminfo">grub-terminfo</primary>
|
---|
| 155 | </indexterm>
|
---|
| 156 | </listitem>
|
---|
| 157 | </varlistentry>
|
---|
| 158 |
|
---|
| 159 | <varlistentry id="mbchk">
|
---|
| 160 | <term><command>mbchk</command></term>
|
---|
| 161 | <listitem>
|
---|
| 162 | <para>Checks the format of a multi-boot kernel</para>
|
---|
| 163 | <indexterm zone="ch-system-grub mbchk">
|
---|
| 164 | <primary sortas="b-mbchk">mbchk</primary>
|
---|
| 165 | </indexterm>
|
---|
| 166 | </listitem>
|
---|
| 167 | </varlistentry>
|
---|
| 168 |
|
---|
| 169 | </variablelist>
|
---|
| 170 |
|
---|
| 171 | </sect2>
|
---|
| 172 |
|
---|
| 173 | </sect1>
|
---|