/[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.9 - (hide annotations) (download) (as text)
Tue Nov 27 19:23:06 2007 UTC (6 years, 7 months ago) by neysx
Branch: MAIN
Changes since 1.8: +25 -24 lines
File MIME type: application/xml
#119883 Bring lilo back in amd64 bootloader install

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

  ViewVC Help
Powered by ViewVC 1.1.20