/[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.11 - (hide annotations) (download) (as text)
Fri May 2 08:04:23 2008 UTC (6 years, 7 months ago) by nightmorph
Branch: MAIN
Changes since 1.10: +27 -28 lines
File MIME type: application/xml
As announced on the list (http://archives.gentoo.org/gentoo-doc/msg_e721be404c6a5ae8ce5c5bf02f45381c.xml), assume all arches are using the libata framework, so sd* everywhere. includes updating block device and partition descriptions. also added a new included file for boot config (starting sshd, hdparm, etc). synced up several wayward files, including sparc. also changed/dropped usage of some now useless keys, since everyone's using sd*. lots of intensive, invasive changes. and i never even used sed once.

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.11 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-x86+amd64-bootloader.xml,v 1.10 2008/04/01 08:53:46 nightmorph Exp $ -->
8 neysx 1.1
9     <sections>
10    
11 nightmorph 1.11 <version>6.1</version>
12     <date>2008-05-02</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     If your root filesystem is JFS, you <e>must</e> add " ro" to the <c>kernel</c>
271     line since JFS needs to replay its log before it allows read-write mounting.
272     </note>
273    
274     <pre caption="grub.conf for non-genkernel users">
275     <comment># Which listing to boot as default. 0 is the first, 1 the second etc.</comment>
276     default 0
277     <comment># How many seconds to wait before the default listing is booted.</comment>
278     timeout 30
279     <comment># Nice, fat splash-image to spice things up :)
280     # Comment out if you don't have a graphics card installed</comment>
281     splashimage=(hd0,0)/boot/grub/splash.xpm.gz
282    
283 nightmorph 1.10 title Gentoo Linux <keyval id="kernel-version"/>
284 neysx 1.1 <comment># Partition where the kernel image (or operating system) is located</comment>
285     root (hd0,0)
286 nightmorph 1.11 kernel /boot/<keyval id="kernel-name"/> root=/dev/sda3
287 neysx 1.1
288 nightmorph 1.10 title Gentoo Linux <keyval id="kernel-version"/> (rescue)
289 vapier 1.4 <comment># Partition where the kernel image (or operating system) is located</comment>
290     root (hd0,0)
291 nightmorph 1.11 kernel /boot/<keyval id="kernel-name"/> root=/dev/sda3 init=/bin/bb
292 vapier 1.4
293 neysx 1.1 <comment># The next four lines are only if you dualboot with a Windows system.</comment>
294 nightmorph 1.11 <comment># In this case, Windows is hosted on /dev/sda6.</comment>
295 nightmorph 1.10 title Windows XP
296 neysx 1.1 rootnoverify (hd0,5)
297     makeactive
298     chainloader +1
299     </pre>
300    
301     <pre caption="grub.conf for genkernel users">
302     default 0
303     timeout 30
304     splashimage=(hd0,0)/boot/grub/splash.xpm.gz
305    
306 nightmorph 1.10 title Gentoo Linux <keyval id="kernel-version"/>
307 neysx 1.1 root (hd0,0)
308 nightmorph 1.11 kernel /boot/<keyval id="genkernel-name"/> root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/sda3 udev
309 neysx 1.2 initrd /boot/<keyval id="genkernel-initrd"/>
310 neysx 1.1
311     <comment># Only in case you want to dual-boot</comment>
312 nightmorph 1.10 title Windows XP
313 neysx 1.1 rootnoverify (hd0,5)
314     makeactive
315     chainloader +1
316     </pre>
317    
318     <note>
319     The <c>udev</c> mentioned at the end of the kernel line is needed to work around
320     a bug in some genkernel versions <e>if</e> you use udev in the first place
321     (which is the default behaviour).
322     </note>
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.11 append="init=/linuxrc ramdisk=8192 real_root=/dev/sda3 udev"
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     The <c>udev</c> mentioned at the end of the append line is needed to work around
593     a bug in some genkernel versions <e>if</e> you use udev in the first place
594     (which is the default behaviour).
595     </note>
596    
597     <note>
598     If you use a different partitioning scheme and/or kernel image, adjust
599     accordingly.
600     </note>
601    
602     <p>
603     If you need to pass any additional options to the kernel, add an
604     <c>append</c> statement to the section. As an example, we add the
605     <c>video</c> statement to enable framebuffer:
606     </p>
607    
608 neysx 1.2 <pre caption="Using append to add kernel options">
609     image=/boot/<keyval id="kernel-name"/>
610 neysx 1.1 label=gentoo
611     read-only
612 nightmorph 1.11 root=/dev/sda3
613 neysx 1.1 <i>append="video=vesafb:mtrr,ywrap,1024x768-32@85"</i>
614     </pre>
615    
616     <p>
617     If you're using a 2.6.7 or higher kernel and you jumpered your harddrive
618     because the BIOS can't handle large harddrives you'll need to append
619 nightmorph 1.11 <c>sda=stroke</c>. Replace sda with the device that requires this option.
620 neysx 1.1 </p>
621    
622     <p>
623     <c>genkernel</c> users should know that their kernels use the same boot options
624     as is used for the Installation CD. For instance, if you have SCSI devices, you
625     should add <c>doscsi</c> as kernel option.
626     </p>
627    
628     <p>
629     Now save the file and exit. To finish up, you have to run <c>/sbin/lilo</c> so
630     LILO can apply the <path>/etc/lilo.conf</path> to your system (i.e. install
631 neysx 1.2 itself on the disk). Keep in mind that you'll also have to run
632 neysx 1.1 <c>/sbin/lilo</c> every time you install a new kernel or make any changes to
633     the menu.
634     </p>
635    
636 neysx 1.2 <pre caption="Finishing the LILO installation">
637 neysx 1.1 # <i>/sbin/lilo</i>
638     </pre>
639    
640 neysx 1.2 <p>
641     If you have more questions regarding LILO, please consult its <uri
642     link="http://en.wikipedia.org/wiki/LILO_(boot_loader)">wikipedia page</uri>.
643     </p>
644 neysx 1.1
645     <p>
646     You can now continue with <uri link="#reboot">Rebooting the System</uri>.
647     </p>
648    
649     </body>
650     </subsection>
651     </section>
652 nightmorph 1.8 <section id="elilo" test="func:keyval('arch')='IA64'">
653     <title>Default: Installing elilo</title>
654     <body>
655    
656     <p>
657     On the IA64 platform, the boot loader is called elilo. You may need to emerge
658     it on your machine first.
659     </p>
660    
661     <pre caption="Installing elilo">
662     # <i>emerge elilo</i>
663     </pre>
664    
665     <p>
666     You can find the configuration file at <path>/etc/elilo.conf</path> and a
667     sample file in the typical docs dir
668     <path>/usr/share/doc/elilo-&lt;ver&gt;/</path>. Here is another sample
669     configuration:
670     </p>
671    
672     <pre caption="/etc/elilo.conf example">
673     boot=/dev/sda1
674     delay=30
675     timeout=50
676     default=Gentoo
677     append="console=ttyS0,9600"
678     prompt
679    
680     image=/vmlinuz
681     label=Gentoo
682     root=/dev/sda2
683     read-only
684    
685     image=/vmlinuz.old
686     label=Gentoo.old
687     root=/dev/sda2
688     read-only
689     </pre>
690    
691     <p>
692     The <c>boot</c> line tells elilo the location of the boot partition (in this
693     case, <path>/dev/sda1</path>). The <c>delay</c> line sets the number of
694     10<sup>th</sup> of seconds before automatically booting the default when in
695     non-interactive mode. The <c>timeout</c> line is just like the delay line but
696     for interactive mode. The <c>default</c> line sets the default kernel entry
697     (which is defined below). The <c>append</c> line adds extra options to the
698     kernel command line. The <c>prompt</c> sets the default elilo behavior to
699     interactive.
700     </p>
701    
702     <p>
703     The sections that start with <c>image</c> define different bootable images.
704     Each image has a nice <c>label</c>, a <c>root</c> filesystem, and will only
705     mount the root filesystem <c>read-only</c>.
706     </p>
707    
708     <p>
709     When configuration is done, just run <c>elilo --efiboot</c>. The
710     <c>--efiboot</c> option adds a menu entry for Gentoo Linux to the EFI Boot
711     Manager.
712     </p>
713    
714     <pre caption="Applying the elilo configuration">
715     # <i>elilo --efiboot</i>
716     </pre>
717    
718     <p>
719     Now continue with <uri link="#reboot">Rebooting the System</uri>.
720     </p>
721    
722     </body>
723     </section>
724    
725 neysx 1.1 <section id="reboot">
726     <title>Rebooting the System</title>
727     <subsection>
728     <body>
729    
730     <p>
731 neysx 1.2 Exit the chrooted environment and unmount all mounted partitions. Then type in
732 neysx 1.1 that one magical command you have been waiting for: <c>reboot</c>.
733     </p>
734    
735 nightmorph 1.8 <pre caption="Unmounting all partitions and rebooting" test="func:keyval('arch')='IA64'">
736     # <i>exit</i>
737     cdimage ~# <i>cd</i>
738     cdimage ~# <i>umount /mnt/gentoo/boot /mnt/gentoo/sys /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo</i>
739     cdimage ~# <i>reboot</i>
740     </pre>
741    
742     <pre caption="Unmounting all partitions and rebooting" test="not(func:keyval('arch')='IA64')">
743 neysx 1.1 # <i>exit</i>
744     cdimage ~# <i>cd</i>
745     cdimage ~# <i>umount /mnt/gentoo/boot /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo</i>
746     cdimage ~# <i>reboot</i>
747     </pre>
748    
749     <p>
750     Of course, don't forget to remove the bootable CD, otherwise the CD will be
751     booted again instead of your new Gentoo system.
752     </p>
753    
754 nightmorph 1.8 <p test="func:keyval('arch')='IA64'">
755     When you reboot you should see a new Gentoo Linux menu option in the EFI Boot
756     Manager which will boot Gentoo.
757     </p>
758    
759 neysx 1.1 <p>
760     Once rebooted in your Gentoo installation, finish up with <uri
761     link="?part=1&amp;chap=11">Finalizing your Gentoo Installation</uri>.
762     </p>
763    
764     </body>
765     </subsection>
766     </section>
767     </sections>

  ViewVC Help
Powered by ViewVC 1.1.20