[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 |
---|
[058a417] | 28 | one you can go to the following link for alternative bootloaders |
---|
[24b004c] | 29 | and the instructions to use them. |
---|
[e318995] | 30 | <ulink url="http://trac.clfs.org/wiki/bootloaders"/></para> |
---|
[407772b] | 31 | </note> |
---|
| 32 | |
---|
[4e60ea5] | 33 | <note os="n2"> |
---|
| 34 | <para>This package is known to have issues when its default optimization |
---|
[b5142bd] | 35 | flags (including the <option>-march</option> and <option>-mtune</option> |
---|
[4e60ea5] | 36 | options) are changed. If any environment variables that override default |
---|
| 37 | optimizations have been defined, such as <envar>CFLAGS</envar> and |
---|
| 38 | <envar>CXXFLAGS</envar>, unset them when building GRUB.</para> |
---|
| 39 | </note> |
---|
[1ebba95] | 40 | |
---|
[d785e9d] | 41 | <para os="s1">Glibc-&glibc-version; does not declare gets():</para> |
---|
[6e70753] | 42 | |
---|
| 43 | <screen os="s2"><userinput>sed -i -e '/gets is a/d' grub-core/gnulib/stdio.in.h</userinput></screen> |
---|
| 44 | |
---|
[4e60ea5] | 45 | <para os="a">Prepare GRUB for compilation:</para> |
---|
[1ebba95] | 46 | |
---|
[4e60ea5] | 47 | <screen os="b"><userinput>./configure --prefix=/usr \ |
---|
[2218c5e] | 48 | --sysconfdir=/etc --disable-werror</userinput></screen> |
---|
[37ba094c] | 49 | |
---|
[4e60ea5] | 50 | <para os="c">Compile the package:</para> |
---|
[1ebba95] | 51 | |
---|
[4e60ea5] | 52 | <screen os="d"><userinput>make</userinput></screen> |
---|
[1ebba95] | 53 | |
---|
[686839b] | 54 | <para os="e">To test GRUB you must have QEMU installed and then, issue:</para> |
---|
| 55 | |
---|
| 56 | <screen os="d2"><userinput remap="test">make check</userinput></screen> |
---|
[37ba094c] | 57 | |
---|
[4e60ea5] | 58 | <para os="f">Install the package:</para> |
---|
[ca9712f] | 59 | |
---|
[4e60ea5] | 60 | <screen os="g"><userinput>make install</userinput></screen> |
---|
[ca9712f] | 61 | |
---|
[4e60ea5] | 62 | </sect2> |
---|
[3f8be484] | 63 | |
---|
[4e60ea5] | 64 | <sect2 id="conf-grub" role="configuration"> |
---|
| 65 | <title>Configuring GRUB</title> |
---|
[3f8be484] | 66 | |
---|
[4e60ea5] | 67 | <indexterm zone="conf-grub"> |
---|
| 68 | <primary sortas="a-GRUB">GRUB</primary> |
---|
| 69 | <secondary>configuring</secondary></indexterm> |
---|
[3f8be484] | 70 | |
---|
[4e60ea5] | 71 | <indexterm zone="conf-grub"> |
---|
| 72 | <primary sortas="e-/etc/default/grub">/etc/default/grub</primary> |
---|
| 73 | </indexterm> |
---|
[3f8be484] | 74 | |
---|
[4e60ea5] | 75 | <para>Now that grub is installed, we need to configure the defaults that |
---|
| 76 | will be used to generate the configuration after we install the kernel. |
---|
| 77 | Create this file with the following:</para> |
---|
[3f8be484] | 78 | |
---|
[4e60ea5] | 79 | <screen><userinput>install -m755 -dv /etc/default |
---|
| 80 | cat > /etc/default/grub << "EOF" |
---|
| 81 | <literal># Begin /etc/default/grub |
---|
[3f8be484] | 82 | |
---|
[4e60ea5] | 83 | GRUB_DEFAULT=0 |
---|
| 84 | #GRUB_SAVEDEFAULT=true |
---|
| 85 | GRUB_HIDDEN_TIMEOUT= |
---|
| 86 | GRUB_HIDDEN_TIMEOUT_QUIET=false |
---|
| 87 | GRUB_TIMEOUT=10 |
---|
| 88 | GRUB_DISTRIBUTOR=Cross-LFS |
---|
| 89 | |
---|
| 90 | GRUB_CMDLINE_LINUX="" |
---|
| 91 | GRUB_CMDLINE_LINUX_DEFAULT="" |
---|
| 92 | |
---|
| 93 | #GRUB_TERMINAL=console |
---|
| 94 | #GRUB_GFXMODE=640x480 |
---|
[bc1efc44] | 95 | #GRUB_GFXPAYLOAD_LINUX=keep |
---|
[4e60ea5] | 96 | |
---|
| 97 | #GRUB_DISABLE_LINUX_UUID=true |
---|
| 98 | #GRUB_DISABLE_LINUX_RECOVERY=true |
---|
[3f8be484] | 99 | |
---|
[4e60ea5] | 100 | #GRUB_INIT_TUNE="480 440 1" |
---|
| 101 | |
---|
| 102 | #GRUB_DISABLE_OS_PROBER=true |
---|
| 103 | |
---|
| 104 | # End /etc/default/grub</literal> |
---|
| 105 | EOF</userinput></screen> |
---|
| 106 | |
---|
| 107 | <variablelist> |
---|
| 108 | <title>The meaning of the above options and possible alternate |
---|
| 109 | values:</title> |
---|
| 110 | |
---|
| 111 | <varlistentry> |
---|
| 112 | <term><parameter>GRUB_DEFAULT=</parameter></term> |
---|
| 113 | <listitem> |
---|
| 114 | <para>Write Me</para> |
---|
| 115 | </listitem> |
---|
| 116 | </varlistentry> |
---|
| 117 | |
---|
| 118 | <varlistentry> |
---|
| 119 | <term><parameter>GRUB_SAVEDEFAULT=</parameter></term> |
---|
| 120 | <listitem> |
---|
| 121 | <para>Write Me</para> |
---|
| 122 | </listitem> |
---|
| 123 | </varlistentry> |
---|
| 124 | |
---|
| 125 | <varlistentry> |
---|
| 126 | <term><parameter>GRUB_HIDDEN_TIMEOUT=</parameter></term> |
---|
| 127 | <listitem> |
---|
| 128 | <para>Write Me</para> |
---|
| 129 | </listitem> |
---|
| 130 | </varlistentry> |
---|
| 131 | |
---|
| 132 | <varlistentry> |
---|
| 133 | <term><parameter>GRUB_HIDDEN_TIMEOUT_QUIET=</parameter></term> |
---|
| 134 | <listitem> |
---|
| 135 | <para>Write Me</para> |
---|
| 136 | </listitem> |
---|
| 137 | </varlistentry> |
---|
| 138 | |
---|
| 139 | <varlistentry> |
---|
| 140 | <term><parameter>GRUB_TIMEOUT=</parameter></term> |
---|
| 141 | <listitem> |
---|
| 142 | <para>Write Me</para> |
---|
| 143 | </listitem> |
---|
| 144 | </varlistentry> |
---|
| 145 | |
---|
| 146 | <varlistentry> |
---|
| 147 | <term><parameter>GRUB_DISTRIBUTOR=</parameter></term> |
---|
| 148 | <listitem> |
---|
| 149 | <para>Write Me</para> |
---|
| 150 | </listitem> |
---|
| 151 | </varlistentry> |
---|
| 152 | |
---|
| 153 | <varlistentry> |
---|
| 154 | <term><parameter>GRUB_CMDLINE_LINUX=</parameter></term> |
---|
| 155 | <listitem> |
---|
| 156 | <para>Write Me</para> |
---|
| 157 | </listitem> |
---|
| 158 | </varlistentry> |
---|
| 159 | |
---|
| 160 | <varlistentry> |
---|
| 161 | <term><parameter>GRUB_CMDLINE_LINUX_DEFAULT=</parameter></term> |
---|
| 162 | <listitem> |
---|
| 163 | <para>Write Me</para> |
---|
| 164 | </listitem> |
---|
| 165 | </varlistentry> |
---|
| 166 | |
---|
| 167 | <varlistentry> |
---|
| 168 | <term><parameter>GRUB_TERMINAL=</parameter></term> |
---|
| 169 | <listitem> |
---|
| 170 | <para>Write Me</para> |
---|
| 171 | </listitem> |
---|
| 172 | </varlistentry> |
---|
| 173 | |
---|
| 174 | <varlistentry> |
---|
| 175 | <term><parameter>GRUB_GFXMODE=</parameter></term> |
---|
| 176 | <listitem> |
---|
| 177 | <para>Write Me</para> |
---|
| 178 | </listitem> |
---|
| 179 | </varlistentry> |
---|
| 180 | |
---|
[bc1efc44] | 181 | <varlistentry> |
---|
| 182 | <term><parameter>GRUB_GFXPAYLOAD_LINUX=</parameter></term> |
---|
| 183 | <listitem> |
---|
| 184 | <para>Write Me</para> |
---|
| 185 | </listitem> |
---|
| 186 | </varlistentry> |
---|
| 187 | |
---|
[4e60ea5] | 188 | <varlistentry> |
---|
| 189 | <term><parameter>GRUB_DEFAULT=</parameter></term> |
---|
| 190 | <listitem> |
---|
| 191 | <para>Write Me</para> |
---|
| 192 | </listitem> |
---|
| 193 | </varlistentry> |
---|
| 194 | |
---|
| 195 | <varlistentry> |
---|
| 196 | <term><parameter>GRUB_DISABLE_LINUX_UUID=</parameter></term> |
---|
| 197 | <listitem> |
---|
| 198 | <para>Write Me</para> |
---|
| 199 | </listitem> |
---|
| 200 | </varlistentry> |
---|
| 201 | |
---|
| 202 | <varlistentry> |
---|
| 203 | <term><parameter>GRUB_DISABLE_LINUX_RECOVERY=</parameter></term> |
---|
| 204 | <listitem> |
---|
| 205 | <para>Write Me</para> |
---|
| 206 | </listitem> |
---|
| 207 | </varlistentry> |
---|
| 208 | |
---|
| 209 | <varlistentry> |
---|
| 210 | <term><parameter>GRUB_INIT_TUNE=</parameter></term> |
---|
| 211 | <listitem> |
---|
| 212 | <para>Write Me</para> |
---|
| 213 | </listitem> |
---|
| 214 | </varlistentry> |
---|
| 215 | |
---|
| 216 | <varlistentry> |
---|
| 217 | <term><parameter>GRUB_DISABLE_OS_PROBER=</parameter></term> |
---|
| 218 | <listitem> |
---|
| 219 | <para>Write Me</para> |
---|
| 220 | </listitem> |
---|
| 221 | </varlistentry> |
---|
| 222 | |
---|
| 223 | </variablelist> |
---|
[3f8be484] | 224 | |
---|
| 225 | </sect2> |
---|
| 226 | |
---|
| 227 | <sect2 id="contents-grub" role="content"> |
---|
| 228 | <title>Contents of GRUB</title> |
---|
| 229 | |
---|
| 230 | <segmentedlist> |
---|
| 231 | <segtitle>Installed programs</segtitle> |
---|
[61ad0b7f] | 232 | <segtitle>Installed directories</segtitle> |
---|
[3f8be484] | 233 | |
---|
| 234 | <seglistitem> |
---|
[e29fb58] | 235 | <seg>grub, grub-install, grub-md5-crypt, grub-set-default, grub-terminfo, and mbchk</seg> |
---|
[61ad0b7f] | 236 | <seg>/usr/lib/grub, /boot/grub</seg> |
---|
[3f8be484] | 237 | </seglistitem> |
---|
| 238 | </segmentedlist> |
---|
| 239 | |
---|
| 240 | <variablelist> |
---|
| 241 | <bridgehead renderas="sect3">Short Descriptions</bridgehead> |
---|
| 242 | <?dbfo list-presentation="list"?> |
---|
| 243 | <?dbhtml list-presentation="table"?> |
---|
| 244 | |
---|
| 245 | <varlistentry id="grub"> |
---|
| 246 | <term><command>grub</command></term> |
---|
| 247 | <listitem> |
---|
| 248 | <para>The Grand Unified Bootloader's command shell</para> |
---|
| 249 | <indexterm zone="ch-system-grub grub"> |
---|
| 250 | <primary sortas="b-grub">grub</primary> |
---|
| 251 | </indexterm> |
---|
| 252 | </listitem> |
---|
| 253 | </varlistentry> |
---|
| 254 | |
---|
| 255 | <varlistentry id="grub-install"> |
---|
| 256 | <term><command>grub-install</command></term> |
---|
| 257 | <listitem> |
---|
| 258 | <para>Installs GRUB on the given device</para> |
---|
| 259 | <indexterm zone="ch-system-grub grub-install"> |
---|
| 260 | <primary sortas="b-grub-install">grub-install</primary> |
---|
| 261 | </indexterm> |
---|
| 262 | </listitem> |
---|
| 263 | </varlistentry> |
---|
| 264 | |
---|
| 265 | <varlistentry id="grub-md5-crypt"> |
---|
| 266 | <term><command>grub-md5-crypt</command></term> |
---|
| 267 | <listitem> |
---|
| 268 | <para>Encrypts a password in MD5 format</para> |
---|
| 269 | <indexterm zone="ch-system-grub grub-md5-crypt"> |
---|
| 270 | <primary sortas="b-grub-md5-crypt">grub-md5-crypt</primary> |
---|
| 271 | </indexterm> |
---|
| 272 | </listitem> |
---|
| 273 | </varlistentry> |
---|
| 274 | |
---|
[e29fb58] | 275 | <varlistentry id="grub-set-default"> |
---|
| 276 | <term><command>grub-set-default</command></term> |
---|
| 277 | <listitem> |
---|
| 278 | <para>Sets the default boot entry for GRUB</para> |
---|
| 279 | <indexterm zone="ch-system-grub grub-set-default"> |
---|
| 280 | <primary sortas="b-grub-set-default">grub-set-default</primary> |
---|
| 281 | </indexterm> |
---|
| 282 | </listitem> |
---|
| 283 | </varlistentry> |
---|
| 284 | |
---|
[3f8be484] | 285 | <varlistentry id="grub-terminfo"> |
---|
| 286 | <term><command>grub-terminfo</command></term> |
---|
| 287 | <listitem> |
---|
| 288 | <para>Generates a terminfo command from a terminfo name; it can be |
---|
| 289 | employed if an unknown terminal is being used</para> |
---|
| 290 | <indexterm zone="ch-system-grub grub-terminfo"> |
---|
| 291 | <primary sortas="b-grub-terminfo">grub-terminfo</primary> |
---|
| 292 | </indexterm> |
---|
| 293 | </listitem> |
---|
| 294 | </varlistentry> |
---|
| 295 | |
---|
| 296 | <varlistentry id="mbchk"> |
---|
| 297 | <term><command>mbchk</command></term> |
---|
| 298 | <listitem> |
---|
| 299 | <para>Checks the format of a multi-boot kernel</para> |
---|
| 300 | <indexterm zone="ch-system-grub mbchk"> |
---|
| 301 | <primary sortas="b-mbchk">mbchk</primary> |
---|
| 302 | </indexterm> |
---|
| 303 | </listitem> |
---|
| 304 | </varlistentry> |
---|
| 305 | |
---|
| 306 | </variablelist> |
---|
| 307 | |
---|
| 308 | </sect2> |
---|
| 309 | |
---|
| 310 | </sect1> |
---|