/[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.14 - (hide annotations) (download) (as text)
Thu Sep 24 20:26:50 2009 UTC (5 years, 2 months ago) by nightmorph
Branch: MAIN
Changes since 1.13: +10 -3 lines
File MIME type: application/xml
Added real_rootflags info to the handbook. bug 273803. thanks to mpagano for the patch

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

  ViewVC Help
Powered by ViewVC 1.1.20