/[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.12 - (hide annotations) (download) (as text)
Wed Sep 10 23:40:52 2008 UTC (5 years, 10 months ago) by nightmorph
Branch: MAIN
Changes since 1.11: +11 -17 lines
File MIME type: application/xml
added note on BIOS reordering (bug 234590), and removed some obsolete stuff on udev

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

  ViewVC Help
Powered by ViewVC 1.1.20