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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download) (as text)
Mon May 7 18:11:41 2007 UTC (7 years, 2 months ago) by nightmorph
Branch: MAIN
Changes since 1.7: +97 -8 lines
File MIME type: application/xml
2007.0 release is here; final changes and new docs

1 <?xml version='1.0' encoding='UTF-8'?>
2 <!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3
4 <!-- The content of this document is licensed under the CC-BY-SA license -->
5 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
6
7 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-bootloader.xml,v 1.5 2007/05/02 15:27:57 neysx Exp $ -->
8
9 <sections>
10
11 <version>5.0</version>
12 <date>2007-05-07</date>
13
14 <section>
15 <title>Making your Choice</title>
16 <subsection>
17 <title>Introduction</title>
18 <body>
19
20 <p>
21 Now that your kernel is configured and compiled and the necessary system
22 configuration files are filled in correctly, it is time to install a
23 program that will fire up your kernel when you start the system. Such a
24 program is called a <e>bootloader</e>.
25 </p>
26
27 <p test="func:keyval('arch')='x86'">
28 For x86, Gentoo Linux provides <uri
29 link="#grub">GRUB</uri> and <uri link="#lilo">LILO</uri>.
30 </p>
31
32 <p>
33 But before we install the bootloader, we inform you how to configure
34 framebuffer (assuming you want it of course). With framebuffer you can run the
35 Linux command line with (limited) graphical features (such as using the nice
36 bootsplash image Gentoo provides).
37 </p>
38
39 </body>
40 </subsection>
41 <subsection>
42 <title>Optional: Framebuffer</title>
43 <body>
44
45 <p>
46 <e>If</e> you have configured your kernel with framebuffer support (or you used
47 <c>genkernel</c> default kernel configuration), you can activate it by adding a
48 <c>vga</c> and/or a <c>video</c> statement to your bootloader configuration
49 file.
50 </p>
51
52 <p test="func:keyval('arch')='x86'">
53 First of all, you need to know what type of framebuffer device you're using. If
54 you use a Gentoo patched kernel tree (such as <c>gentoo-sources</c>) you will
55 have had the possibility of selecting <c>vesafb-tng</c> as the <e>VESA driver
56 type</e> (which is default for these kernel sources). If this is the case, you
57 are using <c>vesafb-tng</c> and <e>do not need</e> to set a <c>vga</c>
58 statement. Otherwise you are using the <c>vesafb</c> driver and <e>need</e> to
59 set the <c>vga</c> statement.
60 </p>
61
62 <p test="contains('AMD64 IA64',func:keyval('arch'))">
63 64-bit systems must use the the <c>vesafb</c> driver, and need the <c>vga</c>
64 statement.
65 </p>
66
67 <p>
68 The <c>vga</c> statement controls the resolution and color depth of your
69 framebuffer screen for <c>vesafb</c>. As stated in
70 <path>/usr/src/linux/Documentation/fb/vesafb.txt</path> (which gets installed
71 when you install a kernel source package), you need to pass the VESA number
72 corresponding to the requested resolution and color depth to it.
73 </p>
74
75 <p>
76 The following table lists the available resolutions and color depths and
77 matches those against the value that you need to pass on to the <c>vga</c>
78 statement.
79 </p>
80
81 <table>
82 <tr>
83 <ti></ti>
84 <th>640x480</th>
85 <th>800x600</th>
86 <th>1024x768</th>
87 <th>1280x1024</th>
88 </tr>
89 <tr>
90 <th>256</th>
91 <ti>0x301</ti>
92 <ti>0x303</ti>
93 <ti>0x305</ti>
94 <ti>0x307</ti>
95 </tr>
96 <tr>
97 <th>32k</th>
98 <ti>0x310</ti>
99 <ti>0x313</ti>
100 <ti>0x316</ti>
101 <ti>0x319</ti>
102 </tr>
103 <tr>
104 <th>64k</th>
105 <ti>0x311</ti>
106 <ti>0x314</ti>
107 <ti>0x317</ti>
108 <ti>0x31A</ti>
109 </tr>
110 <tr>
111 <th>16M</th>
112 <ti>0x312</ti>
113 <ti>0x315</ti>
114 <ti>0x318</ti>
115 <ti>0x31B</ti>
116 </tr>
117 </table>
118
119 <p>
120 The <c>video</c> statement controls framebuffer display options. It needs to be
121 given the framebuffer driver (<c>vesafb</c> for 2.6 kernels, or <c>vesa</c> for
122 2.4 kernels) followed by the control statements you wish to enable. All
123 variables are listed in
124 <path>/usr/src/linux/Documentation/fb/vesafb.txt</path>. The most-used options
125 are:
126 </p>
127
128 <table>
129 <tr>
130 <th>Control</th>
131 <th>Description</th>
132 </tr>
133 <tr>
134 <ti>ywrap</ti>
135 <ti>
136 Assume that the graphical card can wrap around its memory (i.e. continue at
137 the beginning when it has approached the end)
138 </ti>
139 </tr>
140 <tr>
141 <ti>mtrr:n</ti>
142 <ti>
143 Setup MTRR registers. <c>n</c> can be:<br/>
144 0 - disabled<br/>
145 1 - uncachable<br/>
146 2 - write-back<br/>
147 3 - write-combining<br/>
148 4 - write-through
149 </ti>
150 </tr>
151 <tr test="func:keyval('arch')='x86'">
152 <ti><c>mode</c></ti>
153 <ti>
154 (<c>vesafb-tng</c> only)<br/>
155 Set up the resolution, color depth and refresh rate. For instance,
156 <c>1024x768-32@85</c> for a resolution of 1024x768, 32 bit color depth and a
157 refresh rate of 85 Hz.
158 </ti>
159 </tr>
160 </table>
161
162 </body>
163 <body test="contains('AMD64 IA64',func:keyval('arch'))">
164
165 <p>
166 The result of those two statements could be something like <c>vga=0x318
167 video=vesafb:mtrr:3,ywrap</c>. Write this setting down; you will need it
168 shortly.
169 </p>
170
171 <p test="func:keyval('arch')='AMD64'">
172 While LILO does work on AMD64, Gentoo only supports using GRUB. Now continue by
173 its <uri link="#grub">installation</uri>.
174 </p>
175
176 <p test="func:keyval('arch')='IA64'">
177 Now, you should install the <uri link="#elilo">elilo bootloader</uri>.
178 </p>
179
180 </body>
181 <body test="func:keyval('arch')='x86'">
182
183 <p>
184 The result of those two statements could be something like <c>vga=0x318
185 video=vesafb:mtrr:3,ywrap</c> or
186 <c>video=vesafb:mtrr:3,ywrap,1024x768-32@85</c>. Write this setting down; you
187 will need it shortly.
188 </p>
189
190 <p>
191 Now continue by installing <uri link="#grub">GRUB</uri> <e>or</e> <uri
192 link="#lilo">LILO</uri>.
193 </p>
194
195 </body>
196 </subsection>
197 </section>
198 <section id="grub" test="contains('AMD64 x86',func:keyval('arch'))">
199 <title>Default: Using GRUB</title>
200 <subsection>
201 <title>Understanding GRUB's terminology</title>
202 <body>
203
204 <p>
205 The most critical part of understanding GRUB is getting comfortable with how
206 GRUB refers to hard drives and partitions. Your Linux partition
207 <path>/dev/hda1</path> (for IDE drives) or <path>/dev/sda1</path> (for
208 SATA/SCSI drives) will most likely be called <path>(hd0,0)</path> under GRUB.
209 Notice the parentheses around the <path>hd0,0</path> - they are required.
210 </p>
211
212 <p>
213 Hard drives count from zero rather than "a" and partitions start at zero
214 rather than one. Be aware too that with the hd devices, only hard drives are
215 counted, not atapi-ide devices such as cdrom players and burners. Also, the
216 same construct is used with SCSI drives. (Normally they get higher numbers
217 than IDE drives except when the BIOS is configured to boot from SCSI devices.)
218 When you ask the BIOS to boot from a different hard disk (for instance your
219 primary slave), <e>that</e> harddisk is seen as <path>hd0</path>.
220 </p>
221
222 <p>
223 Assuming you have a hard drive on <path>/dev/hda</path>, a cdrom player on
224 <path>/dev/hdb</path>, a burner on <path>/dev/hdc</path>, a second hard drive
225 on <path>/dev/hdd</path> and no SCSI hard drive, <path>/dev/hdd7</path> gets
226 translated to <path>(hd1,6)</path>. It might sound tricky and tricky it is
227 indeed, but as we will see, GRUB offers a tab completion mechanism
228 that comes handy for those of you having a lot of hard drives and
229 partitions and who are a little lost in the GRUB numbering scheme.
230 </p>
231
232 <p>
233 Having gotten the feel for that, it is time to install GRUB.
234 </p>
235
236 </body>
237 </subsection>
238 <subsection>
239 <title>Installing GRUB</title>
240 <body>
241
242 <p>
243 To install GRUB, let's first emerge it:
244 </p>
245
246 <impo test="func:keyval('arch')='AMD64'">
247 If you are using a non-multilib <uri
248 link="?part=1&amp;chap=6#doc_chap2">profile</uri>, you should <b>not</b> emerge
249 grub, but instead you should emerge <c>grub-static</c>.
250 </impo>
251
252 <pre caption="Installing GRUB">
253 # <i>emerge grub</i>
254 </pre>
255
256 <p>
257 Although GRUB is now installed, we still need to write up a
258 configuration file for it and place GRUB in our MBR so that GRUB automatically
259 boots your newly created kernel. Create <path>/boot/grub/grub.conf</path> with
260 <c>nano</c> (or, if applicable, another editor):
261 </p>
262
263 <pre caption="Creating /boot/grub/grub.conf">
264 # <i>nano -w /boot/grub/grub.conf</i>
265 </pre>
266
267 <p>
268 Now we are going to write up a <path>grub.conf</path>. Below you'll find two
269 possible <path>grub.conf</path> for the partitioning example we use in this
270 guide. We've only extensively commented the first <path>grub.conf</path>. Make
271 sure you use <e>your</e> kernel image filename and, if appropriate, <e>your</e>
272 initrd image filename.
273 </p>
274
275 <ul>
276 <li>
277 The first <path>grub.conf</path> is for people who have not used
278 <c>genkernel</c> to build their kernel
279 </li>
280 <li>
281 The second <path>grub.conf</path> is for people who have used
282 <c>genkernel</c> to build their kernel
283 </li>
284 </ul>
285
286 <note>
287 If your root filesystem is JFS, you <e>must</e> add " ro" to the <c>kernel</c>
288 line since JFS needs to replay its log before it allows read-write mounting.
289 </note>
290
291 <pre caption="grub.conf for non-genkernel users">
292 <comment># Which listing to boot as default. 0 is the first, 1 the second etc.</comment>
293 default 0
294 <comment># How many seconds to wait before the default listing is booted.</comment>
295 timeout 30
296 <comment># Nice, fat splash-image to spice things up :)
297 # Comment out if you don't have a graphics card installed</comment>
298 splashimage=(hd0,0)/boot/grub/splash.xpm.gz
299
300 title=Gentoo Linux <keyval id="kernel-version"/>
301 <comment># Partition where the kernel image (or operating system) is located</comment>
302 root (hd0,0)
303 kernel /boot/<keyval id="kernel-name"/> root=/dev/hda3
304
305 title=Gentoo Linux <keyval id="kernel-version"/> (rescue)
306 <comment># Partition where the kernel image (or operating system) is located</comment>
307 root (hd0,0)
308 kernel /boot/<keyval id="kernel-name"/> root=/dev/hda3 init=/bin/bb
309
310 <comment># The next four lines are only if you dualboot with a Windows system.</comment>
311 <comment># In this case, Windows is hosted on /dev/hda6.</comment>
312 title=Windows XP
313 rootnoverify (hd0,5)
314 makeactive
315 chainloader +1
316 </pre>
317
318 <pre caption="grub.conf for genkernel users">
319 default 0
320 timeout 30
321 splashimage=(hd0,0)/boot/grub/splash.xpm.gz
322
323 title=Gentoo Linux <keyval id="kernel-version"/>
324 root (hd0,0)
325 kernel /boot/<keyval id="genkernel-name"/> root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev
326 initrd /boot/<keyval id="genkernel-initrd"/>
327
328 <comment># Only in case you want to dual-boot</comment>
329 title=Windows XP
330 rootnoverify (hd0,5)
331 makeactive
332 chainloader +1
333 </pre>
334
335 <note>
336 The <c>udev</c> mentioned at the end of the kernel line is needed to work around
337 a bug in some genkernel versions <e>if</e> you use udev in the first place
338 (which is the default behaviour).
339 </note>
340
341 <p>
342 If you used a different partitioning scheme and/or kernel image, adjust
343 accordingly. However, make sure that anything that follows a GRUB-device (such
344 as <path>(hd0,0)</path>) is relative to the mountpoint, not the root. In other
345 words, <path>(hd0,0)/grub/splash.xpm.gz</path> is in reality
346 <path>/boot/grub/splash.xpm.gz</path> since <path>(hd0,0)</path> is
347 <path>/boot</path>.
348 </p>
349
350 <p>
351 Besides, if you chose to use a different partitioning scheme and did not put
352 <path>/boot</path> in a separate partition, the <path>/boot</path> prefix used
353 in the above code samples is really <e>required</e>. If you followed our
354 suggested partitioning plan, the <path>/boot</path> prefix it not required, but
355 a <path>boot</path> symlink makes it work. In short, the above examples should
356 work whether you defined a separate <path>/boot</path> partition or not.
357 </p>
358
359 <p>
360 If you need to pass any additional options to the kernel, simply add
361 them to the end of the kernel command. We're already passing one option
362 (<c>root=/dev/hda3</c> or <c>real_root=/dev/hda3</c>), but you can pass others
363 as well, such as the <c>video</c> and/or <c>vga</c> statements for framebuffer
364 as we discussed previously.
365 </p>
366
367 <p>
368 If you're using a 2.6.7 or higher kernel and you jumpered your harddrive
369 because the BIOS can't handle large harddrives you'll need to append
370 <c>hdx=stroke</c>.
371 </p>
372
373 <p>
374 <c>genkernel</c> users should know that their kernels use the same boot options
375 as is used for the Installation CD. For instance, if you have SCSI devices, you
376 should add <c>doscsi</c> as kernel option.
377 </p>
378
379 <p>
380 Now save the <path>grub.conf</path> file and exit. You still need to install
381 GRUB in the MBR (Master Boot Record) so that GRUB is automatically executed when
382 you boot your system.
383 </p>
384
385 <p>
386 The GRUB developers recommend the use of <c>grub-install</c>. However, if for
387 some reason <c>grub-install</c> fails to work correctly you still have the
388 option to manually install GRUB.
389 </p>
390
391 <p>
392 Continue with <uri link="#grub-install-auto">Default: Setting up GRUB using
393 grub-install</uri> or <uri link="#grub-install-manual">Alternative: Setting up
394 GRUB using manual instructions</uri>.
395 </p>
396
397 </body>
398 </subsection>
399 <subsection id="grub-install-auto">
400 <title>Default: Setting up GRUB using grub-install</title>
401 <body>
402
403 <p>
404 To install GRUB you will need to issue the <c>grub-install</c> command.
405 However, <c>grub-install</c> won't work off-the-shelf since we are inside a
406 chrooted environment. We need to create <path>/etc/mtab</path> which lists all
407 mounted filesystems. Fortunately, there is an easy way to accomplish this -
408 just copy over <path>/proc/mounts</path> to <path>/etc/mtab</path>, excluding
409 the <c>rootfs</c> line if you haven't created a separate boot partition. The
410 following command will work in both cases:
411 </p>
412
413 <pre caption="Creating /etc/mtab">
414 # <i>grep -v rootfs /proc/mounts &gt; /etc/mtab</i>
415 </pre>
416
417 <p>
418 Now we can install GRUB using <c>grub-install</c>:
419 </p>
420
421 <pre caption="Running grub-install">
422 # <i>grub-install --no-floppy /dev/hda</i>
423 </pre>
424
425 <p>
426 If you have more questions regarding GRUB, please consult the <uri
427 link="http://www.gnu.org/software/grub/grub-faq.html">GRUB FAQ</uri> or the
428 <uri link="http://www.gnu.org/software/grub/manual/">GRUB Manual</uri>.
429 </p>
430
431 <p>
432 Continue with <uri link="#reboot">Rebooting the System</uri>.
433 </p>
434
435 </body>
436 </subsection>
437 <subsection id="grub-install-manual">
438 <title>Alternative: Setting up GRUB using manual instructions</title>
439 <body>
440
441 <p>
442 To start configuring GRUB, you type in <c>grub</c>. You'll be presented
443 with the <path>grub&gt;</path> grub command-line prompt. Now, you need to type
444 in the right commands to install the GRUB boot record onto your hard drive.
445 </p>
446
447 <pre caption="Starting the GRUB shell">
448 # <i>grub --no-floppy</i>
449 </pre>
450
451 <note>
452 If your system does not have any floppy drives, add the <c>--no-floppy</c>
453 option to the above command to prevent grub from probing the (non-existing)
454 floppy drives.
455 </note>
456
457 <p>
458 In the example configuration we want to install GRUB so that it reads its
459 information from the boot partition <path><keyval id="/boot"/></path>, and
460 installs the GRUB boot record on the hard drive's MBR (master boot record) so
461 that the first thing we see when we turn on the computer is the GRUB prompt. Of
462 course, if you haven't followed the example configuration during the
463 installation, change the commands accordingly.
464 </p>
465
466 <p>
467 The tab completion mechanism of GRUB can be used from within GRUB.
468 For instance, if you type in "<c>root (</c>" followed by a TAB, you will
469 be presented with a list of devices (such as <path>hd0</path>). If you
470 type in "<c>root (hd0,</c>" followed by a TAB, you will receive a list
471 of available partitions to choose from (such as <path>hd0,0</path>).
472 </p>
473
474 <p>
475 By using the tab completion, setting up GRUB should be not that hard.
476 Now go on, configure GRUB, shall we? :-)
477 </p>
478
479 <pre caption="Installing GRUB in the MBR">
480 grub&gt; <i>root (hd0,0)</i> <comment>(Specify where your /boot partition resides)</comment>
481 grub&gt; <i>setup (hd0)</i> <comment>(Install GRUB in the MBR)</comment>
482 grub&gt; <i>quit</i> <comment>(Exit the GRUB shell)</comment>
483 </pre>
484
485 <note>
486 If you want to install GRUB in a certain partition instead of the MBR,
487 you have to alter the <c>setup</c> command so it points to the right
488 partition. For instance, if you want GRUB installed in
489 <path>/dev/hda3</path>, then the command becomes <c>setup (hd0,2)</c>.
490 Few users however want to do this.
491 </note>
492
493 <p>
494 If you have more questions regarding GRUB, please consult the <uri
495 link="http://www.gnu.org/software/grub/grub-faq.html">GRUB FAQ</uri> or the <uri
496 link="http://www.gnu.org/software/grub/manual/">GRUB Manual</uri>.
497 </p>
498
499 <p>
500 Continue with <uri link="#reboot">Rebooting the System</uri>.
501 </p>
502
503 </body>
504 </subsection>
505 </section>
506 <section id="lilo" test="func:keyval('arch')='x86'">
507 <title>Alternative: Using LILO</title>
508 <subsection>
509 <title>Installing LILO</title>
510 <body>
511
512 <p>
513 LILO, the LInuxLOader, is the tried and true workhorse of Linux
514 bootloaders. However, it lacks some features that GRUB has (which is
515 also the reason why GRUB is currently gaining popularity). The reason
516 why LILO is still used is that, on some systems, GRUB doesn't work and
517 LILO does. Of course, it is also used because some people know LILO and
518 want to stick with it. Either way, Gentoo supports both, and apparently
519 you have chosen to use LILO.
520 </p>
521
522 <p>
523 Installing LILO is a breeze; just use <c>emerge</c>.
524 </p>
525
526 <pre caption="Installing LILO">
527 # <i>emerge lilo</i>
528 </pre>
529
530 </body>
531 </subsection>
532 <subsection>
533 <title>Configuring LILO</title>
534 <body>
535
536 <p>
537 To configure LILO, you must create <path>/etc/lilo.conf</path>. Fire up
538 your favorite editor (in this handbook we use <c>nano</c> for
539 consistency) and create the file.
540 </p>
541
542 <pre caption="Creating /etc/lilo.conf">
543 # <i>nano -w /etc/lilo.conf</i>
544 </pre>
545
546 <p>
547 Some sections ago we have asked you to remember the kernel-image name
548 you have created. In the next example <path>lilo.conf</path> we use the
549 example partitioning scheme. There are two separate parts:
550 </p>
551
552 <ul>
553 <li>
554 One for those who have not used <c>genkernel</c> to build their kernel
555 </li>
556 <li>
557 One for those who have used <c>genkernel</c> to build their kernel
558 </li>
559 </ul>
560
561 <p>
562 Make sure you use <e>your</e> kernel image filename and, if appropriate,
563 <e>your</e> initrd image filename.
564 </p>
565
566 <note>
567 If your root filesystem is JFS, you <e>must</e> add a <c>append="ro"</c>
568 line after each boot item since JFS needs to replay its log before it allows
569 read-write mounting.
570 </note>
571
572 <pre caption="Example /etc/lilo.conf">
573 boot=/dev/hda <comment># Install LILO in the MBR</comment>
574 prompt <comment># Give the user the chance to select another section</comment>
575 timeout=50 <comment># Wait 5 (five) seconds before booting the default section</comment>
576 default=gentoo <comment># When the timeout has passed, boot the "gentoo" section</comment>
577
578 <comment># For non-genkernel users</comment>
579 image=/boot/<keyval id="kernel-name"/>
580 label=gentoo <comment># Name we give to this section</comment>
581 read-only <comment># Start with a read-only root. Do not alter!</comment>
582 root=/dev/hda3 <comment># Location of the root filesystem</comment>
583
584 image=/boot/<keyval id="kernel-name"/>
585 label=gentoo.rescue <comment># Name we give to this section</comment>
586 read-only <comment># Start with a read-only root. Do not alter!</comment>
587 root=/dev/hda3 <comment># Location of the root filesystem</comment>
588 append="init=/bin/bb" <comment># Launch the Gentoo static rescue shell</comment>
589
590 <comment># For genkernel users</comment>
591 image=/boot/<keyval id="genkernel-name"/>
592 label=gentoo
593 read-only
594 root=/dev/ram0
595 append="init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev"
596 initrd=/boot/<keyval id="genkernel-initrd"/>
597
598 <comment># The next two lines are only if you dualboot with a Windows system.</comment>
599 <comment># In this case, Windows is hosted on /dev/hda6.</comment>
600 other=/dev/hda6
601 label=windows
602 </pre>
603
604 <note>
605 The <c>udev</c> mentioned at the end of the append line is needed to work around
606 a bug in some genkernel versions <e>if</e> you use udev in the first place
607 (which is the default behaviour).
608 </note>
609
610 <note>
611 If you use a different partitioning scheme and/or kernel image, adjust
612 accordingly.
613 </note>
614
615 <p>
616 If you need to pass any additional options to the kernel, add an
617 <c>append</c> statement to the section. As an example, we add the
618 <c>video</c> statement to enable framebuffer:
619 </p>
620
621 <pre caption="Using append to add kernel options">
622 image=/boot/<keyval id="kernel-name"/>
623 label=gentoo
624 read-only
625 root=/dev/hda3
626 <i>append="video=vesafb:mtrr,ywrap,1024x768-32@85"</i>
627 </pre>
628
629 <p>
630 If you're using a 2.6.7 or higher kernel and you jumpered your harddrive
631 because the BIOS can't handle large harddrives you'll need to append
632 <c>hdx=stroke</c>.
633 </p>
634
635 <p>
636 <c>genkernel</c> users should know that their kernels use the same boot options
637 as is used for the Installation CD. For instance, if you have SCSI devices, you
638 should add <c>doscsi</c> as kernel option.
639 </p>
640
641 <p>
642 Now save the file and exit. To finish up, you have to run <c>/sbin/lilo</c> so
643 LILO can apply the <path>/etc/lilo.conf</path> to your system (i.e. install
644 itself on the disk). Keep in mind that you'll also have to run
645 <c>/sbin/lilo</c> every time you install a new kernel or make any changes to
646 the menu.
647 </p>
648
649 <pre caption="Finishing the LILO installation">
650 # <i>/sbin/lilo</i>
651 </pre>
652
653 <p>
654 If you have more questions regarding LILO, please consult its <uri
655 link="http://en.wikipedia.org/wiki/LILO_(boot_loader)">wikipedia page</uri>.
656 </p>
657
658 <p>
659 You can now continue with <uri link="#reboot">Rebooting the System</uri>.
660 </p>
661
662 </body>
663 </subsection>
664 </section>
665 <section id="elilo" test="func:keyval('arch')='IA64'">
666 <title>Default: Installing elilo</title>
667 <body>
668
669 <p>
670 On the IA64 platform, the boot loader is called elilo. You may need to emerge
671 it on your machine first.
672 </p>
673
674 <pre caption="Installing elilo">
675 # <i>emerge elilo</i>
676 </pre>
677
678 <p>
679 You can find the configuration file at <path>/etc/elilo.conf</path> and a
680 sample file in the typical docs dir
681 <path>/usr/share/doc/elilo-&lt;ver&gt;/</path>. Here is another sample
682 configuration:
683 </p>
684
685 <pre caption="/etc/elilo.conf example">
686 boot=/dev/sda1
687 delay=30
688 timeout=50
689 default=Gentoo
690 append="console=ttyS0,9600"
691 prompt
692
693 image=/vmlinuz
694 label=Gentoo
695 root=/dev/sda2
696 read-only
697
698 image=/vmlinuz.old
699 label=Gentoo.old
700 root=/dev/sda2
701 read-only
702 </pre>
703
704 <p>
705 The <c>boot</c> line tells elilo the location of the boot partition (in this
706 case, <path>/dev/sda1</path>). The <c>delay</c> line sets the number of
707 10<sup>th</sup> of seconds before automatically booting the default when in
708 non-interactive mode. The <c>timeout</c> line is just like the delay line but
709 for interactive mode. The <c>default</c> line sets the default kernel entry
710 (which is defined below). The <c>append</c> line adds extra options to the
711 kernel command line. The <c>prompt</c> sets the default elilo behavior to
712 interactive.
713 </p>
714
715 <p>
716 The sections that start with <c>image</c> define different bootable images.
717 Each image has a nice <c>label</c>, a <c>root</c> filesystem, and will only
718 mount the root filesystem <c>read-only</c>.
719 </p>
720
721 <p>
722 When configuration is done, just run <c>elilo --efiboot</c>. The
723 <c>--efiboot</c> option adds a menu entry for Gentoo Linux to the EFI Boot
724 Manager.
725 </p>
726
727 <pre caption="Applying the elilo configuration">
728 # <i>elilo --efiboot</i>
729 </pre>
730
731 <p>
732 Now continue with <uri link="#reboot">Rebooting the System</uri>.
733 </p>
734
735 </body>
736 </section>
737
738 <section id="reboot">
739 <title>Rebooting the System</title>
740 <subsection>
741 <body>
742
743 <p>
744 Exit the chrooted environment and unmount all mounted partitions. Then type in
745 that one magical command you have been waiting for: <c>reboot</c>.
746 </p>
747
748 <pre caption="Unmounting all partitions and rebooting" test="func:keyval('arch')='IA64'">
749 # <i>exit</i>
750 cdimage ~# <i>cd</i>
751 cdimage ~# <i>umount /mnt/gentoo/boot /mnt/gentoo/sys /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo</i>
752 cdimage ~# <i>reboot</i>
753 </pre>
754
755 <pre caption="Unmounting all partitions and rebooting" test="not(func:keyval('arch')='IA64')">
756 # <i>exit</i>
757 cdimage ~# <i>cd</i>
758 cdimage ~# <i>umount /mnt/gentoo/boot /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo</i>
759 cdimage ~# <i>reboot</i>
760 </pre>
761
762 <p>
763 Of course, don't forget to remove the bootable CD, otherwise the CD will be
764 booted again instead of your new Gentoo system.
765 </p>
766
767 <p test="func:keyval('arch')='IA64'">
768 When you reboot you should see a new Gentoo Linux menu option in the EFI Boot
769 Manager which will boot Gentoo.
770 </p>
771
772 <p>
773 Once rebooted in your Gentoo installation, finish up with <uri
774 link="?part=1&amp;chap=11">Finalizing your Gentoo Installation</uri>.
775 </p>
776
777 </body>
778 </subsection>
779 </section>
780 </sections>

  ViewVC Help
Powered by ViewVC 1.1.20