/[gentoo]/xml/htdocs/doc/en/handbook/hb-install-x86+amd64-bootloader.xml
Gentoo

Diff of /xml/htdocs/doc/en/handbook/hb-install-x86+amd64-bootloader.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 Revision 1.2
2<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> 2<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3 3
4<!-- The content of this document is licensed under the CC-BY-SA license --> 4<!-- The content of this document is licensed under the CC-BY-SA license -->
5<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 5<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
6 6
7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-x86+amd64-bootloader.xml,v 1.1 2006/08/02 21:15:02 neysx Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-x86+amd64-bootloader.xml,v 1.2 2006/08/02 21:15:52 neysx Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<version>2.13</version> 11<version>3.0</version>
12<date>2006-05-28</date> 12<date>2006-07-26</date>
13 13
14<section> 14<section>
15<title>Making your Choice</title> 15<title>Making your Choice</title>
16<subsection> 16<subsection>
17<title>Introduction</title> 17<title>Introduction</title>
19 19
20<p> 20<p>
21Now that your kernel is configured and compiled and the necessary system 21Now that your kernel is configured and compiled and the necessary system
22configuration files are filled in correctly, it is time to install a 22configuration files are filled in correctly, it is time to install a
23program that will fire up your kernel when you start the system. Such a 23program that will fire up your kernel when you start the system. Such a
24program is called a <e>bootloader</e>. For x86, Gentoo Linux provides <uri 24program is called a <e>bootloader</e>.
25</p>
26
27<p test="func:keyval('arch')='x86'">
28For x86, Gentoo Linux provides <uri
25link="#grub">GRUB</uri> and <uri link="#lilo">LILO</uri>. But before we 29link="#grub">GRUB</uri> and <uri link="#lilo">LILO</uri>.
26install one of these two bootloaders, we inform you how to configure framebuffer 30</p>
27(assuming you want it of course). With framebuffer you can run the Linux command 31
32<p>
33But before we install the bootloader, we inform you how to configure
34framebuffer (assuming you want it of course). With framebuffer you can run the
28line with (limited) graphical features (such as using the nice bootsplash 35Linux command line with (limited) graphical features (such as using the nice
29image Gentoo provides). 36bootsplash image Gentoo provides).
30</p> 37</p>
31 38
32</body> 39</body>
33</subsection> 40</subsection>
34<subsection> 41<subsection>
35<title>Optional: Framebuffer</title> 42<title>Optional: Framebuffer</title>
36<body> 43<body>
37 44
38<p> 45<p>
39<e>If</e> you have configured your kernel with framebuffer support (or you used 46<e>If</e> you have configured your kernel with framebuffer support (or you used
40<c>genkernel</c>'s default kernel configuration), you can activate it by adding 47<c>genkernel</c> default kernel configuration), you can activate it by adding a
41a <c>vga</c> and/or a <c>video</c> statement to your bootloader configuration 48<c>vga</c> and/or a <c>video</c> statement to your bootloader configuration
42file. 49file.
43</p> 50</p>
44 51
45<p> 52<p test="func:keyval('arch')='x86'">
46First of all you need to know what type of framebuffer device you're using. If 53First of all, you need to know what type of framebuffer device you're using. If
47you use a Gentoo patched kernel tree (such as <c>gentoo-sources</c>) you will 54you use a Gentoo patched kernel tree (such as <c>gentoo-sources</c>) you will
48have had the possibility of selecting <c>vesafb-tng</c> as the <e>VESA driver 55have had the possibility of selecting <c>vesafb-tng</c> as the <e>VESA driver
49type</e> (which is default for these kernel sources). If this is the case, you 56type</e> (which is default for these kernel sources). If this is the case, you
50are using <c>vesafb-tng</c> and do not need to set a <c>vga</c> statement. 57are using <c>vesafb-tng</c> and <e>do not need</e> to set a <c>vga</c>
51Otherwise you are using the <c>vesafb</c> driver and need to set the <c>vga</c> 58statement. Otherwise you are using the <c>vesafb</c> driver and <e>need</e> to
59set the <c>vga</c> statement.
60</p>
61
62<p test="func:keyval('arch')='AMD64'">
6364-bit systems must use the the <c>vesafb</c> driver, and need the <c>vga</c>
52statement. 64statement.
53</p> 65</p>
54 66
55<p> 67<p>
56The <c>vga</c> statement controls the resolution and color depth of your 68The <c>vga</c> statement controls the resolution and color depth of your
57framebuffer screen for <c>vesafb</c>. As stated in 69framebuffer screen for <c>vesafb</c>. As stated in
58<path>/usr/src/linux/Documentation/fb/vesafb.txt</path> (which gets installed 70<path>/usr/src/linux/Documentation/fb/vesafb.txt</path> (which gets installed
59when you install a kernel source package), you need to pass the VESA number 71when you install a kernel source package), you need to pass the VESA number
60corresponding to the requested resolution and color depth to it. 72corresponding to the requested resolution and color depth to it.
61</p> 73</p>
62 74
63<p> 75<p>
64The following table lists the available resolutions and colordepths and matches 76The following table lists the available resolutions and color depths and
65those against the value that you need to pass on to the <c>vga</c> statement. 77matches those against the value that you need to pass on to the <c>vga</c>
78statement.
66</p> 79</p>
67 80
68<table> 81<table>
69<tr> 82<tr>
70 <ti></ti> 83 <ti></ti>
105 118
106<p> 119<p>
107The <c>video</c> statement controls framebuffer display options. It needs to be 120The <c>video</c> statement controls framebuffer display options. It needs to be
108given the framebuffer driver (<c>vesafb</c> for 2.6 kernels, or <c>vesa</c> for 121given the framebuffer driver (<c>vesafb</c> for 2.6 kernels, or <c>vesa</c> for
1092.4 kernels) followed by the control statements you wish to enable. All 1222.4 kernels) followed by the control statements you wish to enable. All
110variables are listed in <path>/usr/src/linux/Documentation/fb/vesafb.txt</path>, 123variables are listed in
111but we'll inform you about three most-used options: 124<path>/usr/src/linux/Documentation/fb/vesafb.txt</path>. The most-used options
125are:
112</p> 126</p>
113 127
114<table> 128<table>
115<tr> 129<tr>
116 <th>Control</th> 130 <th>Control</th>
124 </ti> 138 </ti>
125</tr> 139</tr>
126<tr> 140<tr>
127 <ti>mtrr:n</ti> 141 <ti>mtrr:n</ti>
128 <ti> 142 <ti>
129 Setup MTRR registers. <c>n</c> can be: 143 Setup MTRR registers. <c>n</c> can be:<br/>
130 0 - disabled 144 0 - disabled<br/>
131 1 - uncachable 145 1 - uncachable<br/>
132 2 - write-back 146 2 - write-back<br/>
133 3 - write-combining 147 3 - write-combining<br/>
134 4 - write-through 148 4 - write-through
135 </ti> 149 </ti>
136</tr> 150</tr>
137<tr> 151<tr test="func:keyval('arch')='x86'">
138 <ti><c>mode</c></ti> 152 <ti><c>mode</c></ti>
139 <ti> 153 <ti>
140 (<c>vesafb-tng</c> only)<br/> 154 (<c>vesafb-tng</c> only)<br/>
141 Set up the resolution, color depth and refresh rate. For instance, 155 Set up the resolution, color depth and refresh rate. For instance,
142 <c>1024x768-32@85</c> for a resolution of 1024x768, 32 bit color depth and a 156 <c>1024x768-32@85</c> for a resolution of 1024x768, 32 bit color depth and a
143 refresh rate of 85 Hz. 157 refresh rate of 85 Hz.
144 </ti> 158 </ti>
145</tr> 159</tr>
146</table> 160</table>
147 161
162</body>
163<body test="func:keyval('arch')='AMD64'">
164
165<p>
166The result of those two statements could be something like <c>vga=0x318
167video=vesafb:mtrr:3,ywrap</c>. Write this setting down; you will need it
168shortly.
169</p>
170
171<p>
172While LILO does work on AMD64, Gentoo only supports using GRUB. Now continue by
173its <uri link="#grub">installation</uri>.
174</p>
175
176</body>
177<body test="func:keyval('arch')='x86'">
178
148<p> 179<p>
149The result of those two statements could be something like <c>vga=0x318 180The result of those two statements could be something like <c>vga=0x318
150video=vesafb:mtrr:3,ywrap</c> or 181video=vesafb:mtrr:3,ywrap</c> or
151<c>video=vesafb:mtrr:3,ywrap,1024x768-32@85</c>. Remember (or write down) this 182<c>video=vesafb:mtrr:3,ywrap,1024x768-32@85</c>. Write this setting down; you
152setting; you will need it shortly. 183will need it shortly.
153</p> 184</p>
154 185
155<p> 186<p>
156Now continue by installing <uri link="#grub">GRUB</uri> <e>or</e> <uri 187Now continue by installing <uri link="#grub">GRUB</uri> <e>or</e> <uri
157link="#lilo">LILO</uri>. 188link="#lilo">LILO</uri>.
169<p> 200<p>
170The most critical part of understanding GRUB is getting comfortable with how 201The most critical part of understanding GRUB is getting comfortable with how
171GRUB refers to hard drives and partitions. Your Linux partition 202GRUB refers to hard drives and partitions. Your Linux partition
172<path>/dev/hda1</path> (for IDE drives) or <path>/dev/sda1</path> (for 203<path>/dev/hda1</path> (for IDE drives) or <path>/dev/sda1</path> (for
173SATA/SCSI drives) will most likely be called <path>(hd0,0)</path> under GRUB. 204SATA/SCSI drives) will most likely be called <path>(hd0,0)</path> under GRUB.
174Notice the parenthesis around the <path>hd0,0</path> - they are required. 205Notice the parentheses around the <path>hd0,0</path> - they are required.
175</p>
176
177<p> 206</p>
207
208<p>
178Hard drives count from zero rather than "a" and partitions start at zero 209Hard drives count from zero rather than "a" and partitions start at zero
179rather than one. Be aware too that with the hd devices, only hard drives are 210rather than one. Be aware too that with the hd devices, only hard drives are
180counted, not atapi-ide devices such as cdrom players and burners. Also, the 211counted, not atapi-ide devices such as cdrom players and burners. Also, the
181same construct is used with SCSI drives. (Normally they get higher numbers 212same construct is used with SCSI drives. (Normally they get higher numbers
182than IDE drives except when the BIOS is configured to boot from SCSI devices.) 213than IDE drives except when the BIOS is configured to boot from SCSI devices.)
183When you ask the BIOS to boot from a different hard disk (for instance your 214When you ask the BIOS to boot from a different hard disk (for instance your
184primary slave), <e>that</e> harddisk is seen as <path>hd0</path>. 215primary slave), <e>that</e> harddisk is seen as <path>hd0</path>.
185</p> 216</p>
186 217
187<p> 218<p>
188Assuming you have a hard drive on <path>/dev/hda</path>, a cdrom player on 219Assuming you have a hard drive on <path>/dev/hda</path>, a cdrom player on
189<path>/dev/hdb</path>, a burner on <path>/dev/hdc</path>, a second hard drive 220<path>/dev/hdb</path>, a burner on <path>/dev/hdc</path>, a second hard drive
190on <path>/dev/hdd</path> and no SCSI hard drive, <path>/dev/hdd7</path> gets 221on <path>/dev/hdd</path> and no SCSI hard drive, <path>/dev/hdd7</path> gets
191translated to <path>(hd1,6)</path>. It might sound tricky and tricky it is 222translated to <path>(hd1,6)</path>. It might sound tricky and tricky it is
192indeed, but as we will see, GRUB offers a tab completion mechanism 223indeed, but as we will see, GRUB offers a tab completion mechanism
193that comes handy for those of you having a lot of hard drives and 224that comes handy for those of you having a lot of hard drives and
194partitions and who are a little lost in the GRUB numbering scheme. 225partitions and who are a little lost in the GRUB numbering scheme.
195</p> 226</p>
196 227
212# <i>emerge grub</i> 243# <i>emerge grub</i>
213</pre> 244</pre>
214 245
215<p> 246<p>
216Although GRUB is now installed, we still need to write up a 247Although GRUB is now installed, we still need to write up a
217configuration file for it and place GRUB in our MBR so that GRUB automatically 248configuration file for it and place GRUB in our MBR so that GRUB automatically
218boots your newly created kernel. Create <path>/boot/grub/grub.conf</path> with 249boots your newly created kernel. Create <path>/boot/grub/grub.conf</path> with
219<c>nano</c> (or, if applicable, another editor): 250<c>nano</c> (or, if applicable, another editor):
220</p> 251</p>
221 252
222<pre caption="Creating /boot/grub/grub.conf"> 253<pre caption="Creating /boot/grub/grub.conf">
223# <i>nano -w /boot/grub/grub.conf</i> 254# <i>nano -w /boot/grub/grub.conf</i>
224</pre> 255</pre>
225 256
226<p> 257<p>
227Now we are going to write up a <path>grub.conf</path>. Below you'll 258Now we are going to write up a <path>grub.conf</path>. Below you'll find two
228find two possible <path>grub.conf</path> for the partitioning example we use 259possible <path>grub.conf</path> for the partitioning example we use in this
229in this guide. We've
230only extensively commented the first <path>grub.conf</path>. Make sure you use 260guide. We've only extensively commented the first <path>grub.conf</path>. Make
231<e>your</e> kernel image filename and, if appropriate, <e>your</e> initrd image 261sure you use <e>your</e> kernel image filename and, if appropriate, <e>your</e>
232filename. 262initrd image filename.
233</p> 263</p>
234 264
235<ul> 265<ul>
236 <li> 266 <li>
237 The first <path>grub.conf</path> is for people who have not used 267 The first <path>grub.conf</path> is for people who have not used
238 <c>genkernel</c> to build their kernel 268 <c>genkernel</c> to build their kernel
239 </li> 269 </li>
240 <li> 270 <li>
241 The second <path>grub.conf</path> is for people who have used 271 The second <path>grub.conf</path> is for people who have used
242 <c>genkernel</c> to build their kernel 272 <c>genkernel</c> to build their kernel
255timeout 30 285timeout 30
256<comment># Nice, fat splash-image to spice things up :) 286<comment># Nice, fat splash-image to spice things up :)
257# Comment out if you don't have a graphics card installed</comment> 287# Comment out if you don't have a graphics card installed</comment>
258splashimage=(hd0,0)/boot/grub/splash.xpm.gz 288splashimage=(hd0,0)/boot/grub/splash.xpm.gz
259 289
260title=Gentoo Linux 2.6.12-r10 290title=Gentoo Linux <keyval id="kernel-version"/>
261<comment># Partition where the kernel image (or operating system) is located</comment> 291<comment># Partition where the kernel image (or operating system) is located</comment>
262root (hd0,0) 292root (hd0,0)
263kernel /boot/kernel-2.6.12-gentoo-r10 root=/dev/hda3 293kernel /boot/<keyval id="kernel-name"/> root=/dev/hda3
264 294
265<comment># The next four lines are only if you dualboot with a Windows system.</comment> 295<comment># The next four lines are only if you dualboot with a Windows system.</comment>
266<comment># In this case, Windows is hosted on /dev/hda6.</comment> 296<comment># In this case, Windows is hosted on /dev/hda6.</comment>
267title=Windows XP 297title=Windows XP
268rootnoverify (hd0,5) 298rootnoverify (hd0,5)
273<pre caption="grub.conf for genkernel users"> 303<pre caption="grub.conf for genkernel users">
274default 0 304default 0
275timeout 30 305timeout 30
276splashimage=(hd0,0)/boot/grub/splash.xpm.gz 306splashimage=(hd0,0)/boot/grub/splash.xpm.gz
277 307
278title=Gentoo Linux 2.6.12-r10 308title=Gentoo Linux <keyval id="kernel-version"/>
279root (hd0,0) 309root (hd0,0)
280kernel /boot/kernel-genkernel-x86-2.6.12-gentoo-r10 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev 310kernel /boot/<keyval id="genkernel-name"/> root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev
281initrd /boot/initramfs-genkernel-x86-2.6.12-gentoo-r10 311initrd /boot/<keyval id="genkernel-initrd"/>
282 312
283<comment># Only in case you want to dual-boot</comment> 313<comment># Only in case you want to dual-boot</comment>
284title=Windows XP 314title=Windows XP
285rootnoverify (hd0,5) 315rootnoverify (hd0,5)
286makeactive 316makeactive
312</p> 342</p>
313 343
314<p> 344<p>
315If you need to pass any additional options to the kernel, simply add 345If you need to pass any additional options to the kernel, simply add
316them to the end of the kernel command. We're already passing one option 346them to the end of the kernel command. We're already passing one option
317(<c>root=/dev/hda3</c> or <c>real_root=/dev/hda3</c>), but you can pass others 347(<c>root=/dev/hda3</c> or <c>real_root=/dev/hda3</c>), but you can pass others
318as well, such as the <c>video</c> and/or <c>vga</c> statements for framebuffer 348as well, such as the <c>video</c> and/or <c>vga</c> statements for framebuffer
319as we discussed previously. 349as we discussed previously.
320</p> 350</p>
321 351
322<p> 352<p>
323If you're using a 2.6.7 or higher kernel and you jumpered your harddrive 353If you're using a 2.6.7 or higher kernel and you jumpered your harddrive
330as is used for the Installation CD. For instance, if you have SCSI devices, you 360as is used for the Installation CD. For instance, if you have SCSI devices, you
331should add <c>doscsi</c> as kernel option. 361should add <c>doscsi</c> as kernel option.
332</p> 362</p>
333 363
334<p> 364<p>
335Now save the <path>grub.conf</path> file and exit. You still need to install 365Now save the <path>grub.conf</path> file and exit. You still need to install
336GRUB in the MBR (Master Boot Record) so that GRUB is automatically executed when 366GRUB in the MBR (Master Boot Record) so that GRUB is automatically executed when
337you boot your system. 367you boot your system.
338</p> 368</p>
339 369
340<p> 370<p>
377# <i>grub-install /dev/hda</i> 407# <i>grub-install /dev/hda</i>
378</pre> 408</pre>
379 409
380<p> 410<p>
381If you have more questions regarding GRUB, please consult the <uri 411If you have more questions regarding GRUB, please consult the <uri
382link="http://www.gnu.org/software/grub/grub-faq.html">GRUB FAQ</uri> or the <uri 412link="http://www.gnu.org/software/grub/grub-faq.html">GRUB FAQ</uri> or the
383link="http://www.gnu.org/software/grub/manual/">GRUB Manual</uri>. 413<uri link="http://www.gnu.org/software/grub/manual/">GRUB Manual</uri>.
384</p> 414</p>
385 415
386<p> 416<p>
387Continue with <uri link="#reboot">Rebooting the System</uri>. 417Continue with <uri link="#reboot">Rebooting the System</uri>.
388</p> 418</p>
393<title>Alternative: Setting up GRUB using manual instructions</title> 423<title>Alternative: Setting up GRUB using manual instructions</title>
394<body> 424<body>
395 425
396<p> 426<p>
397To start configuring GRUB, you type in <c>grub</c>. You'll be presented 427To start configuring GRUB, you type in <c>grub</c>. You'll be presented
398with the <path>grub&gt;</path> grub command-line prompt. Now, you need to type 428with the <path>grub&gt;</path> grub command-line prompt. Now, you need to type
399in the right commands to install the GRUB boot record onto your hard drive. 429in the right commands to install the GRUB boot record onto your hard drive.
400</p> 430</p>
401 431
402<pre caption="Starting the GRUB shell"> 432<pre caption="Starting the GRUB shell">
403# <i>grub</i> 433# <i>grub</i>
404</pre> 434</pre>
405 435
406<note> 436<note>
407If your system does not have any floppy drives, add the <c>--no-floppy</c> 437If your system does not have any floppy drives, add the <c>--no-floppy</c>
408option to the above command to prevent grub from probing the (non-existing) 438option to the above command to prevent grub from probing the (non-existing)
409floppy drives. 439floppy drives.
410</note> 440</note>
411 441
412<p> 442<p>
413In the example configuration we want to install GRUB so that it reads its 443In the example configuration we want to install GRUB so that it reads its
414information from the boot-partition <path>/dev/hda1</path>, and installs the 444information from the boot partition <path><keyval id="/boot"/></path>, and
415GRUB boot record on the hard drive's MBR (master boot record) so that the first 445installs the GRUB boot record on the hard drive's MBR (master boot record) so
416thing we see when we turn on the computer is the GRUB prompt. Of course, if you 446that the first thing we see when we turn on the computer is the GRUB prompt. Of
417haven't followed the example configuration during the installation, 447course, if you haven't followed the example configuration during the
418change the commands accordingly. 448installation, change the commands accordingly.
419</p> 449</p>
420 450
421<p> 451<p>
422The tab completion mechanism of GRUB can be used from within GRUB. 452The tab completion mechanism of GRUB can be used from within GRUB.
423For instance, if you type in "<c>root (</c>" followed by a TAB, you will 453For instance, if you type in "<c>root (</c>" followed by a TAB, you will
430By using the tab completion, setting up GRUB should be not that hard. 460By using the tab completion, setting up GRUB should be not that hard.
431Now go on, configure GRUB, shall we? :-) 461Now go on, configure GRUB, shall we? :-)
432</p> 462</p>
433 463
434<pre caption="Installing GRUB in the MBR"> 464<pre caption="Installing GRUB in the MBR">
435grub&gt; <i>root (hd0,0)</i> <comment>(Specify where your /boot partition resides)</comment> 465grub&gt; <i>root (hd0,0)</i> <comment>(Specify where your /boot partition resides)</comment>
436grub&gt; <i>setup (hd0)</i> <comment>(Install GRUB in the MBR)</comment> 466grub&gt; <i>setup (hd0)</i> <comment>(Install GRUB in the MBR)</comment>
437grub&gt; <i>quit</i> <comment>(Exit the GRUB shell)</comment> 467grub&gt; <i>quit</i> <comment>(Exit the GRUB shell)</comment>
438</pre> 468</pre>
439 469
440<note> 470<note>
441If you want to install GRUB in a certain partition instead of the MBR, 471If you want to install GRUB in a certain partition instead of the MBR,
442you have to alter the <c>setup</c> command so it points to the right 472you have to alter the <c>setup</c> command so it points to the right
449If you have more questions regarding GRUB, please consult the <uri 479If you have more questions regarding GRUB, please consult the <uri
450link="http://www.gnu.org/software/grub/grub-faq.html">GRUB FAQ</uri> or the <uri 480link="http://www.gnu.org/software/grub/grub-faq.html">GRUB FAQ</uri> or the <uri
451link="http://www.gnu.org/software/grub/manual/">GRUB Manual</uri>. 481link="http://www.gnu.org/software/grub/manual/">GRUB Manual</uri>.
452</p> 482</p>
453 483
454<note>
455When you reinstall a kernel, you do not need to copy over the files anymore.
456Just run <c>make install</c> after compiling the kernel; it will automatically
457copy the necessary files and adjust the GRUB configuration.
458</note>
459
460<p> 484<p>
461Continue with <uri link="#reboot">Rebooting the System</uri>. 485Continue with <uri link="#reboot">Rebooting the System</uri>.
462</p> 486</p>
463 487
464</body> 488</body>
465</subsection> 489</subsection>
466</section> 490</section>
467<section id="lilo"> 491<section id="lilo" test="func:keyval('arch')='x86'">
468<title>Alternative: Using LILO</title> 492<title>Alternative: Using LILO</title>
469<subsection> 493<subsection>
470<title>Installing LILO</title> 494<title>Installing LILO</title>
471<body> 495<body>
472 496
482 506
483<p> 507<p>
484Installing LILO is a breeze; just use <c>emerge</c>. 508Installing LILO is a breeze; just use <c>emerge</c>.
485</p> 509</p>
486 510
487<pre caption = "Installing LILO"> 511<pre caption="Installing LILO">
488# <i>emerge lilo</i> 512# <i>emerge lilo</i>
489</pre> 513</pre>
490 514
491</body> 515</body>
492</subsection> 516</subsection>
498To configure LILO, you must create <path>/etc/lilo.conf</path>. Fire up 522To configure LILO, you must create <path>/etc/lilo.conf</path>. Fire up
499your favorite editor (in this handbook we use <c>nano</c> for 523your favorite editor (in this handbook we use <c>nano</c> for
500consistency) and create the file. 524consistency) and create the file.
501</p> 525</p>
502 526
503<pre caption = "Creating /etc/lilo.conf"> 527<pre caption="Creating /etc/lilo.conf">
504# <i>nano -w /etc/lilo.conf</i> 528# <i>nano -w /etc/lilo.conf</i>
505</pre> 529</pre>
506 530
507<p> 531<p>
508Some sections ago we have asked you to remember the kernel-image name 532Some sections ago we have asked you to remember the kernel-image name
509you have created. In the next example <path>lilo.conf</path> we use the 533you have created. In the next example <path>lilo.conf</path> we use the
510example partitioning scheme. There are two separate parts: 534example partitioning scheme. There are two separate parts:
511</p> 535</p>
512 536
513<ul> 537<ul>
514 <li> 538 <li>
515 One for those who have not used <c>genkernel</c> to build their kernel 539 One for those who have not used <c>genkernel</c> to build their kernel
524<e>your</e> initrd image filename. 548<e>your</e> initrd image filename.
525</p> 549</p>
526 550
527<note> 551<note>
528If your root filesystem is JFS, you <e>must</e> add a <c>append="ro"</c> 552If your root filesystem is JFS, you <e>must</e> add a <c>append="ro"</c>
529line after each boot item since JFS needs to replay its log before it allows 553line after each boot item since JFS needs to replay its log before it allows
530read-write mounting. 554read-write mounting.
531</note> 555</note>
532 556
533<pre caption = "Example /etc/lilo.conf"> 557<pre caption="Example /etc/lilo.conf">
534boot=/dev/hda <comment># Install LILO in the MBR</comment> 558boot=/dev/hda <comment># Install LILO in the MBR</comment>
535prompt <comment># Give the user the chance to select another section</comment> 559prompt <comment># Give the user the chance to select another section</comment>
536timeout=50 <comment># Wait 5 (five) seconds before booting the default section</comment> 560timeout=50 <comment># Wait 5 (five) seconds before booting the default section</comment>
537default=gentoo <comment># When the timeout has passed, boot the "gentoo" section</comment> 561default=gentoo <comment># When the timeout has passed, boot the "gentoo" section</comment>
538 562
539<comment># For non-genkernel users</comment> 563<comment># For non-genkernel users</comment>
540image=/boot/kernel-2.6.12-gentoo-r10 564image=/boot/<keyval id="kernel-name"/>
541 label=gentoo <comment># Name we give to this section</comment> 565 label=gentoo <comment># Name we give to this section</comment>
542 read-only <comment># Start with a read-only root. Do not alter!</comment> 566 read-only <comment># Start with a read-only root. Do not alter!</comment>
543 root=/dev/hda3 <comment># Location of the root filesystem</comment> 567 root=/dev/hda3 <comment># Location of the root filesystem</comment>
544 568
545<comment># For genkernel users</comment> 569<comment># For genkernel users</comment>
546image=/boot/kernel-genkernel-x86-2.6.12-gentoo-r10 570image=/boot/<keyval id="genkernel-name"/>
547 label=gentoo 571 label=gentoo
548 read-only 572 read-only
549 root=/dev/ram0 573 root=/dev/ram0
550 append="init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev" 574 append="init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev"
551 initrd=/boot/initramfs-genkernel-2.6.12-gentoo-r10 575 initrd=/boot/<keyval id="genkernel-initrd"/>
552 576
553<comment># The next two lines are only if you dualboot with a Windows system.</comment> 577<comment># The next two lines are only if you dualboot with a Windows system.</comment>
554<comment># In this case, Windows is hosted on /dev/hda6.</comment> 578<comment># In this case, Windows is hosted on /dev/hda6.</comment>
555other=/dev/hda6 579other=/dev/hda6
556 label=windows 580 label=windows
571If you need to pass any additional options to the kernel, add an 595If you need to pass any additional options to the kernel, add an
572<c>append</c> statement to the section. As an example, we add the 596<c>append</c> statement to the section. As an example, we add the
573<c>video</c> statement to enable framebuffer: 597<c>video</c> statement to enable framebuffer:
574</p> 598</p>
575 599
576<pre caption = "Using append to add kernel options"> 600<pre caption="Using append to add kernel options">
577image=/boot/kernel-2.6.12-gentoo-r10 601image=/boot/<keyval id="kernel-name"/>
578 label=gentoo 602 label=gentoo
579 read-only 603 read-only
580 root=/dev/hda3 604 root=/dev/hda3
581 <i>append="video=vesafb:mtrr,ywrap,1024x768-32@85"</i> 605 <i>append="video=vesafb:mtrr,ywrap,1024x768-32@85"</i>
582</pre> 606</pre>
591<c>genkernel</c> users should know that their kernels use the same boot options 615<c>genkernel</c> users should know that their kernels use the same boot options
592as is used for the Installation CD. For instance, if you have SCSI devices, you 616as is used for the Installation CD. For instance, if you have SCSI devices, you
593should add <c>doscsi</c> as kernel option. 617should add <c>doscsi</c> as kernel option.
594</p> 618</p>
595 619
596
597<p> 620<p>
598Now save the file and exit. To finish up, you have to run <c>/sbin/lilo</c> so 621Now save the file and exit. To finish up, you have to run <c>/sbin/lilo</c> so
599LILO can apply the <path>/etc/lilo.conf</path> to your system (i.e. install 622LILO can apply the <path>/etc/lilo.conf</path> to your system (i.e. install
600itself on the disk). Keep in mind that you'll also have to rerun 623itself on the disk). Keep in mind that you'll also have to run
601<c>/sbin/lilo</c> every time you install a new kernel or make any changes to 624<c>/sbin/lilo</c> every time you install a new kernel or make any changes to
602the menu. 625the menu.
603</p> 626</p>
604 627
605<pre caption = "Finishing the LILO installation"> 628<pre caption="Finishing the LILO installation">
606# <i>/sbin/lilo</i> 629# <i>/sbin/lilo</i>
607</pre> 630</pre>
608 631
609<note> 632<p>
610When you reinstall a kernel, you do not need to copy over the files anymore. 633If you have more questions regarding LILO, please consult its <uri
611Just run <c>make install</c> after compiling the kernel; it will automatically 634link="http://en.wikipedia.org/wiki/LILO_(boot_loader)">wikipedia page</uri>.
612copy the necessary files and adjust the LILO configuration. 635</p>
613</note>
614 636
615<p> 637<p>
616You can now continue with <uri link="#reboot">Rebooting the System</uri>. 638You can now continue with <uri link="#reboot">Rebooting the System</uri>.
617</p> 639</p>
618 640
623<title>Rebooting the System</title> 645<title>Rebooting the System</title>
624<subsection> 646<subsection>
625<body> 647<body>
626 648
627<p> 649<p>
628Exit the chrooted environment and unmount all mounted partitions. Then type in 650Exit the chrooted environment and unmount all mounted partitions. Then type in
629that one magical command you have been waiting for: <c>reboot</c>. 651that one magical command you have been waiting for: <c>reboot</c>.
630</p> 652</p>
631 653
632<pre caption="Unmounting all partitions and rebooting"> 654<pre caption="Unmounting all partitions and rebooting">
633# <i>exit</i> 655# <i>exit</i>

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.20