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