/[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.13 - (hide annotations) (download) (as text)
Wed Apr 15 07:23:57 2009 UTC (5 years, 3 months ago) by nightmorph
Branch: MAIN
Changes since 1.12: +6 -12 lines
File MIME type: application/xml
updated lilo info for the AMD64 handbook, bug 245419

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.13 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-x86+amd64-bootloader.xml,v 1.12 2008/09/10 23:40:52 nightmorph Exp $ -->
8 neysx 1.1
9     <sections>
10    
11 nightmorph 1.13 <version>6.3</version>
12     <date>2009-04-15</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     If you're using a 2.6.7 or higher kernel and you jumpered your harddrive
350     because the BIOS can't handle large harddrives you'll need to append
351 nightmorph 1.11 <c>sda=stroke</c>. Replace sda with the device that requires this option.
352 neysx 1.1 </p>
353    
354     <p>
355     <c>genkernel</c> users should know that their kernels use the same boot options
356     as is used for the Installation CD. For instance, if you have SCSI devices, you
357     should add <c>doscsi</c> as kernel option.
358     </p>
359    
360     <p>
361 neysx 1.2 Now save the <path>grub.conf</path> file and exit. You still need to install
362 neysx 1.1 GRUB in the MBR (Master Boot Record) so that GRUB is automatically executed when
363     you boot your system.
364     </p>
365    
366     <p>
367     The GRUB developers recommend the use of <c>grub-install</c>. However, if for
368     some reason <c>grub-install</c> fails to work correctly you still have the
369     option to manually install GRUB.
370     </p>
371    
372     <p>
373     Continue with <uri link="#grub-install-auto">Default: Setting up GRUB using
374     grub-install</uri> or <uri link="#grub-install-manual">Alternative: Setting up
375     GRUB using manual instructions</uri>.
376     </p>
377    
378     </body>
379     </subsection>
380     <subsection id="grub-install-auto">
381     <title>Default: Setting up GRUB using grub-install</title>
382     <body>
383    
384     <p>
385     To install GRUB you will need to issue the <c>grub-install</c> command.
386     However, <c>grub-install</c> won't work off-the-shelf since we are inside a
387     chrooted environment. We need to create <path>/etc/mtab</path> which lists all
388     mounted filesystems. Fortunately, there is an easy way to accomplish this -
389     just copy over <path>/proc/mounts</path> to <path>/etc/mtab</path>, excluding
390     the <c>rootfs</c> line if you haven't created a separate boot partition. The
391     following command will work in both cases:
392     </p>
393    
394     <pre caption="Creating /etc/mtab">
395     # <i>grep -v rootfs /proc/mounts &gt; /etc/mtab</i>
396     </pre>
397    
398     <p>
399     Now we can install GRUB using <c>grub-install</c>:
400     </p>
401    
402     <pre caption="Running grub-install">
403 nightmorph 1.11 # <i>grub-install --no-floppy /dev/sda</i>
404 neysx 1.1 </pre>
405    
406     <p>
407     If you have more questions regarding GRUB, please consult the <uri
408 neysx 1.2 link="http://www.gnu.org/software/grub/grub-faq.html">GRUB FAQ</uri> or the
409     <uri link="http://www.gnu.org/software/grub/manual/">GRUB Manual</uri>.
410 neysx 1.1 </p>
411    
412     <p>
413     Continue with <uri link="#reboot">Rebooting the System</uri>.
414     </p>
415    
416     </body>
417     </subsection>
418     <subsection id="grub-install-manual">
419     <title>Alternative: Setting up GRUB using manual instructions</title>
420     <body>
421    
422     <p>
423     To start configuring GRUB, you type in <c>grub</c>. You'll be presented
424 neysx 1.2 with the <path>grub&gt;</path> grub command-line prompt. Now, you need to type
425 neysx 1.1 in the right commands to install the GRUB boot record onto your hard drive.
426     </p>
427    
428     <pre caption="Starting the GRUB shell">
429 neysx 1.7 # <i>grub --no-floppy</i>
430 neysx 1.1 </pre>
431    
432     <note>
433     If your system does not have any floppy drives, add the <c>--no-floppy</c>
434 neysx 1.2 option to the above command to prevent grub from probing the (non-existing)
435 neysx 1.1 floppy drives.
436     </note>
437    
438     <p>
439 neysx 1.2 In the example configuration we want to install GRUB so that it reads its
440     information from the boot partition <path><keyval id="/boot"/></path>, and
441     installs the GRUB boot record on the hard drive's MBR (master boot record) so
442     that the first thing we see when we turn on the computer is the GRUB prompt. Of
443     course, if you haven't followed the example configuration during the
444     installation, change the commands accordingly.
445 neysx 1.1 </p>
446    
447     <p>
448     The tab completion mechanism of GRUB can be used from within GRUB.
449     For instance, if you type in "<c>root (</c>" followed by a TAB, you will
450     be presented with a list of devices (such as <path>hd0</path>). If you
451     type in "<c>root (hd0,</c>" followed by a TAB, you will receive a list
452     of available partitions to choose from (such as <path>hd0,0</path>).
453     </p>
454    
455     <p>
456     By using the tab completion, setting up GRUB should be not that hard.
457     Now go on, configure GRUB, shall we? :-)
458     </p>
459    
460     <pre caption="Installing GRUB in the MBR">
461 neysx 1.2 grub&gt; <i>root (hd0,0)</i> <comment>(Specify where your /boot partition resides)</comment>
462     grub&gt; <i>setup (hd0)</i> <comment>(Install GRUB in the MBR)</comment>
463     grub&gt; <i>quit</i> <comment>(Exit the GRUB shell)</comment>
464 neysx 1.1 </pre>
465    
466     <note>
467     If you want to install GRUB in a certain partition instead of the MBR,
468     you have to alter the <c>setup</c> command so it points to the right
469     partition. For instance, if you want GRUB installed in
470 nightmorph 1.11 <path>/dev/sda3</path>, then the command becomes <c>setup (hd0,2)</c>.
471 neysx 1.1 Few users however want to do this.
472     </note>
473    
474     <p>
475     If you have more questions regarding GRUB, please consult the <uri
476     link="http://www.gnu.org/software/grub/grub-faq.html">GRUB FAQ</uri> or the <uri
477     link="http://www.gnu.org/software/grub/manual/">GRUB Manual</uri>.
478     </p>
479    
480     <p>
481     Continue with <uri link="#reboot">Rebooting the System</uri>.
482     </p>
483    
484     </body>
485     </subsection>
486     </section>
487 neysx 1.9 <section id="lilo" test="contains('AMD64 x86', func:keyval('arch'))">
488 neysx 1.1 <title>Alternative: Using LILO</title>
489     <subsection>
490     <title>Installing LILO</title>
491     <body>
492    
493     <p>
494     LILO, the LInuxLOader, is the tried and true workhorse of Linux
495     bootloaders. However, it lacks some features that GRUB has (which is
496     also the reason why GRUB is currently gaining popularity). The reason
497     why LILO is still used is that, on some systems, GRUB doesn't work and
498     LILO does. Of course, it is also used because some people know LILO and
499     want to stick with it. Either way, Gentoo supports both, and apparently
500     you have chosen to use LILO.
501     </p>
502    
503     <p>
504     Installing LILO is a breeze; just use <c>emerge</c>.
505     </p>
506    
507 neysx 1.2 <pre caption="Installing LILO">
508 neysx 1.1 # <i>emerge lilo</i>
509     </pre>
510    
511     </body>
512     </subsection>
513     <subsection>
514     <title>Configuring LILO</title>
515     <body>
516    
517     <p>
518     To configure LILO, you must create <path>/etc/lilo.conf</path>. Fire up
519     your favorite editor (in this handbook we use <c>nano</c> for
520     consistency) and create the file.
521     </p>
522    
523 neysx 1.2 <pre caption="Creating /etc/lilo.conf">
524 neysx 1.1 # <i>nano -w /etc/lilo.conf</i>
525     </pre>
526    
527     <p>
528     Some sections ago we have asked you to remember the kernel-image name
529     you have created. In the next example <path>lilo.conf</path> we use the
530 neysx 1.2 example partitioning scheme. There are two separate parts:
531 neysx 1.1 </p>
532    
533     <ul>
534     <li>
535     One for those who have not used <c>genkernel</c> to build their kernel
536     </li>
537     <li>
538     One for those who have used <c>genkernel</c> to build their kernel
539     </li>
540     </ul>
541    
542     <p>
543     Make sure you use <e>your</e> kernel image filename and, if appropriate,
544     <e>your</e> initrd image filename.
545     </p>
546    
547     <note>
548     If your root filesystem is JFS, you <e>must</e> add a <c>append="ro"</c>
549 neysx 1.2 line after each boot item since JFS needs to replay its log before it allows
550 neysx 1.1 read-write mounting.
551     </note>
552    
553 neysx 1.2 <pre caption="Example /etc/lilo.conf">
554 nightmorph 1.11 boot=/dev/sda <comment># Install LILO in the MBR</comment>
555 neysx 1.1 prompt <comment># Give the user the chance to select another section</comment>
556     timeout=50 <comment># Wait 5 (five) seconds before booting the default section</comment>
557     default=gentoo <comment># When the timeout has passed, boot the "gentoo" section</comment>
558    
559     <comment># For non-genkernel users</comment>
560 neysx 1.2 image=/boot/<keyval id="kernel-name"/>
561 neysx 1.1 label=gentoo <comment># Name we give to this section</comment>
562     read-only <comment># Start with a read-only root. Do not alter!</comment>
563 nightmorph 1.11 root=/dev/sda3 <comment># Location of the root filesystem</comment>
564 neysx 1.1
565 vapier 1.5 image=/boot/<keyval id="kernel-name"/>
566     label=gentoo.rescue <comment># Name we give to this section</comment>
567     read-only <comment># Start with a read-only root. Do not alter!</comment>
568 nightmorph 1.11 root=/dev/sda3 <comment># Location of the root filesystem</comment>
569 vapier 1.5 append="init=/bin/bb" <comment># Launch the Gentoo static rescue shell</comment>
570    
571 neysx 1.1 <comment># For genkernel users</comment>
572 neysx 1.2 image=/boot/<keyval id="genkernel-name"/>
573 neysx 1.1 label=gentoo
574     read-only
575     root=/dev/ram0
576 nightmorph 1.12 append="init=/linuxrc ramdisk=8192 real_root=/dev/sda3"
577 neysx 1.2 initrd=/boot/<keyval id="genkernel-initrd"/>
578 neysx 1.1
579     <comment># The next two lines are only if you dualboot with a Windows system.</comment>
580 nightmorph 1.11 <comment># In this case, Windows is hosted on /dev/sda6.</comment>
581     other=/dev/sda6
582 neysx 1.1 label=windows
583     </pre>
584    
585     <note>
586     If you use a different partitioning scheme and/or kernel image, adjust
587     accordingly.
588     </note>
589    
590     <p>
591     If you need to pass any additional options to the kernel, add an
592     <c>append</c> statement to the section. As an example, we add the
593     <c>video</c> statement to enable framebuffer:
594     </p>
595    
596 neysx 1.2 <pre caption="Using append to add kernel options">
597     image=/boot/<keyval id="kernel-name"/>
598 neysx 1.1 label=gentoo
599     read-only
600 nightmorph 1.11 root=/dev/sda3
601 neysx 1.1 <i>append="video=vesafb:mtrr,ywrap,1024x768-32@85"</i>
602     </pre>
603    
604     <p>
605     If you're using a 2.6.7 or higher kernel and you jumpered your harddrive
606     because the BIOS can't handle large harddrives you'll need to append
607 nightmorph 1.11 <c>sda=stroke</c>. Replace sda with the device that requires this option.
608 neysx 1.1 </p>
609    
610     <p>
611     <c>genkernel</c> users should know that their kernels use the same boot options
612     as is used for the Installation CD. For instance, if you have SCSI devices, you
613     should add <c>doscsi</c> as kernel option.
614     </p>
615    
616     <p>
617     Now save the file and exit. To finish up, you have to run <c>/sbin/lilo</c> so
618     LILO can apply the <path>/etc/lilo.conf</path> to your system (i.e. install
619 neysx 1.2 itself on the disk). Keep in mind that you'll also have to run
620 neysx 1.1 <c>/sbin/lilo</c> every time you install a new kernel or make any changes to
621     the menu.
622     </p>
623    
624 neysx 1.2 <pre caption="Finishing the LILO installation">
625 neysx 1.1 # <i>/sbin/lilo</i>
626     </pre>
627    
628 neysx 1.2 <p>
629     If you have more questions regarding LILO, please consult its <uri
630     link="http://en.wikipedia.org/wiki/LILO_(boot_loader)">wikipedia page</uri>.
631     </p>
632 neysx 1.1
633     <p>
634     You can now continue with <uri link="#reboot">Rebooting the System</uri>.
635     </p>
636    
637     </body>
638     </subsection>
639     </section>
640 nightmorph 1.8 <section id="elilo" test="func:keyval('arch')='IA64'">
641     <title>Default: Installing elilo</title>
642     <body>
643    
644     <p>
645     On the IA64 platform, the boot loader is called elilo. You may need to emerge
646     it on your machine first.
647     </p>
648    
649     <pre caption="Installing elilo">
650     # <i>emerge elilo</i>
651     </pre>
652    
653     <p>
654     You can find the configuration file at <path>/etc/elilo.conf</path> and a
655     sample file in the typical docs dir
656     <path>/usr/share/doc/elilo-&lt;ver&gt;/</path>. Here is another sample
657     configuration:
658     </p>
659    
660     <pre caption="/etc/elilo.conf example">
661     boot=/dev/sda1
662     delay=30
663     timeout=50
664     default=Gentoo
665     append="console=ttyS0,9600"
666     prompt
667    
668     image=/vmlinuz
669     label=Gentoo
670     root=/dev/sda2
671     read-only
672    
673     image=/vmlinuz.old
674     label=Gentoo.old
675     root=/dev/sda2
676     read-only
677     </pre>
678    
679     <p>
680     The <c>boot</c> line tells elilo the location of the boot partition (in this
681     case, <path>/dev/sda1</path>). The <c>delay</c> line sets the number of
682     10<sup>th</sup> of seconds before automatically booting the default when in
683     non-interactive mode. The <c>timeout</c> line is just like the delay line but
684     for interactive mode. The <c>default</c> line sets the default kernel entry
685     (which is defined below). The <c>append</c> line adds extra options to the
686     kernel command line. The <c>prompt</c> sets the default elilo behavior to
687     interactive.
688     </p>
689    
690     <p>
691     The sections that start with <c>image</c> define different bootable images.
692     Each image has a nice <c>label</c>, a <c>root</c> filesystem, and will only
693     mount the root filesystem <c>read-only</c>.
694     </p>
695    
696     <p>
697     When configuration is done, just run <c>elilo --efiboot</c>. The
698     <c>--efiboot</c> option adds a menu entry for Gentoo Linux to the EFI Boot
699     Manager.
700     </p>
701    
702     <pre caption="Applying the elilo configuration">
703     # <i>elilo --efiboot</i>
704     </pre>
705    
706     <p>
707     Now continue with <uri link="#reboot">Rebooting the System</uri>.
708     </p>
709    
710     </body>
711     </section>
712    
713 neysx 1.1 <section id="reboot">
714     <title>Rebooting the System</title>
715     <subsection>
716     <body>
717    
718     <p>
719 neysx 1.2 Exit the chrooted environment and unmount all mounted partitions. Then type in
720 neysx 1.1 that one magical command you have been waiting for: <c>reboot</c>.
721     </p>
722    
723 nightmorph 1.8 <pre caption="Unmounting all partitions and rebooting" test="func:keyval('arch')='IA64'">
724     # <i>exit</i>
725     cdimage ~# <i>cd</i>
726     cdimage ~# <i>umount /mnt/gentoo/boot /mnt/gentoo/sys /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo</i>
727     cdimage ~# <i>reboot</i>
728     </pre>
729    
730     <pre caption="Unmounting all partitions and rebooting" test="not(func:keyval('arch')='IA64')">
731 neysx 1.1 # <i>exit</i>
732     cdimage ~# <i>cd</i>
733     cdimage ~# <i>umount /mnt/gentoo/boot /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo</i>
734     cdimage ~# <i>reboot</i>
735     </pre>
736    
737     <p>
738     Of course, don't forget to remove the bootable CD, otherwise the CD will be
739     booted again instead of your new Gentoo system.
740     </p>
741    
742 nightmorph 1.8 <p test="func:keyval('arch')='IA64'">
743     When you reboot you should see a new Gentoo Linux menu option in the EFI Boot
744     Manager which will boot Gentoo.
745     </p>
746    
747 neysx 1.1 <p>
748     Once rebooted in your Gentoo installation, finish up with <uri
749     link="?part=1&amp;chap=11">Finalizing your Gentoo Installation</uri>.
750     </p>
751    
752     </body>
753     </subsection>
754     </section>
755     </sections>

  ViewVC Help
Powered by ViewVC 1.1.20