/[gentoo]/xml/htdocs/doc/en/handbook/hb-install-x86+amd64-bootloader.xml
Gentoo

Diff of /xml/htdocs/doc/en/handbook/hb-install-x86+amd64-bootloader.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.29 Revision 1.30
2<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> 2<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3 3
4<!-- The content of this document is licensed under the CC-BY-SA license --> 4<!-- The content of this document is licensed under the CC-BY-SA license -->
5<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 5<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
6 6
7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-x86+amd64-bootloader.xml,v 1.29 2013/08/15 08:14:10 swift Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-x86+amd64-bootloader.xml,v 1.30 2013/08/15 17:05:38 swift Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<version>13</version> 11<version>14</version>
12<date>2013-08-15</date> 12<date>2013-08-15</date>
13 13
14<section> 14<section>
15<title>Making your Choice</title> 15<title>Making your Choice</title>
16<subsection> 16<subsection>
26 26
27</body> 27</body>
28<body test="contains('AMD64 x86', func:keyval('arch'))"> 28<body test="contains('AMD64 x86', func:keyval('arch'))">
29<p> 29<p>
30For <keyval id="arch"/>, Gentoo Linux provides <uri 30For <keyval id="arch"/>, Gentoo Linux provides <uri
31link="#grub">GRUB</uri> and <uri link="#lilo">LILO</uri>. 31link="#grub">GRUB</uri>, <uri link="#grub2">GRUB2</uri> and
32<uri link="#lilo">LILO</uri>.
32</p> 33</p>
34
35<note>
36GRUB2 might not be stabilized at the moment of reading this. However,
37stabilization is due very soon so we temporarily document both GRUB and GRUB2
38and will remove the GRUB instructions after stabilization of GRUB2.
39</note>
33 40
34</body> 41</body>
35<body> 42<body>
36<p> 43<p>
37But before we install the bootloader, we inform you how to configure 44But before we install the bootloader, we inform you how to configure
107<p test="func:keyval('arch')='IA64'"> 114<p test="func:keyval('arch')='IA64'">
108Now, you should install the <uri link="#elilo">elilo bootloader</uri>. 115Now, you should install the <uri link="#elilo">elilo bootloader</uri>.
109</p> 116</p>
110 117
111<p test="not(func:keyval('arch')='IA64')"> 118<p test="not(func:keyval('arch')='IA64')">
112Now continue by installing <uri link="#grub">GRUB</uri> <e>or</e> <uri 119Now continue by installing <uri link="#grub">GRUB</uri>, <uri
120link="#grub2">GRUB2</uri> <e>or</e> <uri
113link="#lilo">LILO</uri>. 121link="#lilo">LILO</uri>.
114</p> 122</p>
115 123
116</body> 124</body>
117</subsection> 125</subsection>
118</section> 126</section>
119<section id="grub" test="contains('AMD64 x86',func:keyval('arch'))"> 127<section id="grub" test="contains('AMD64 x86',func:keyval('arch'))">
120<title>Default: Using GRUB</title> 128<title>Default: Using GRUB Legacy</title>
129<subsection>
130<title>What is Legacy?</title>
131<body>
132
133<p>
134GRUB has been reworked and a new release dubbed GRUB2 is made available. The new
135GRUB2 codebase is quite different from the current GRUB, which is why this GRUB
136version is now dubbed as "GRUB Legacy".
137</p>
138
139<p>
140We recommend to start with GRUB2 as soon as it is available. The migration of
141GRUB to GRUB2 is <uri link="/doc/en/grub2-migration.xml">documented
142online</uri>. The instructions in this section relate to "GRUB Legacy" and will
143disappear from the book soon after the stabilization of <uri
144link="#grub2">GRUB2</uri>.
145</p>
146
147</body>
148</subsection>
121<subsection> 149<subsection>
122<title>Understanding GRUB's terminology</title> 150<title>Understanding GRUB's terminology</title>
123<body> 151<body>
124 152
125<p> 153<p>
572</p> 600</p>
573 601
574</body> 602</body>
575</subsection> 603</subsection>
576</section> 604</section>
605<section id="grub2" test="contains('AMD64 x86', func:keyval('arch'))">
606<title>Alternative: Using GRUB2</title>
607<subsection>
608<title>Installing GRUB2</title>
609<body>
610
611<p>
612GRUB2 is provided through the <c>sys-boot/grub</c> package. To deploy GRUB2, use
613the <e>SLOT</e> notation to tell Portage to install GRUB2. SLOTs are a feature
614of Gentoo Linux where multiple versions of the same package can be deployed
615simultaneously on a system. In our case, this means that GRUB Legacy and GRUB2
616can be installed on a system (software-wise) at the same time.
617</p>
618
619<note>
620GRUB2 might still be marked as ~<keyval id="arch" />. If that is the case, you
621can either wait and use <uri link="#grub">GRUB Legacy</uri> or unmask the
622package. This is explained in <uri
623link="handbook-amd64.xml?part=3&amp;chap=3#doc_chap2">Mixing Stable with
624Testing</uri>. Once GRUB2 is stabilized, the SLOT operator also is no longer
625mandatory.
626</note>
627
628<pre caption="Installing GRUB2">
629# <i>emerge grub:2</i>
630</pre>
631
632<p>
633The GRUB2 software is now installed on the system, but not activated yet.
634</p>
635
636</body>
637</subsection>
638<subsection>
639<title>Configuring GRUB2</title>
640<body>
641
642<p>
643First, let us install the necessary GRUB2 files in <path>/boot/grub2</path>.
644Assuming the first disk (the one where the system boots from) is
645<path>/dev/sda</path>, the following command will do this for us:
646</p>
647
648<pre caption="Installing the GRUB2 files in /boot/grub2">
649# <i>grub2-install /dev/sda</i>
650</pre>
651
652<p>
653Next, we can generate the GRUB2 configuration based on the user configuration
654specified in the <path>/etc/default/grub</path> file and
655<path>/etc/grub.d</path> scripts. In most cases, no configuration is needed
656by users as GRUB2 will automatically detect which kernel to boot (the highest
657one available in <path>/boot</path>) and what the root file system is.
658</p>
659
660<p>
661To generate the final GRUB2 configuration, run the <c>grub2-mkconfig</c>
662command:
663</p>
664
665<pre caption="Generating GRUB2 configuration">
666# <i>grub2-mkconfig -o /boot/grub2/grub.cfg</i>
667Generating grub.cfg ...
668Found linux image: /boot/<keyval id="kernel-name" />
669Found initrd image: /boot/<keyval id="genkernel-initrd" />
670done
671</pre>
672
673<p>
674The output of the command <e>must</e> mention that at least one Linux image is
675found, as those are needed to boot the system. If you use initramfs or used
676<c>genkernel</c> to build the kernel, the correct initrd image should be
677detected as well. If this is not the case, go to <path>/boot</path> and check
678the contents using the <c>ls</c> command. If the files are indeed missing, go
679back to the kernel configuration and installation instructions.
680</p>
681
682</body>
683</subsection>
684</section>
577<section id="elilo" test="func:keyval('arch')='IA64'"> 685<section id="elilo" test="func:keyval('arch')='IA64'">
578<title>Default: Installing elilo</title> 686<title>Default: Installing elilo</title>
579<body> 687<body>
580 688
581<p> 689<p>
658Now continue with <uri link="#reboot">Rebooting the System</uri>. 766Now continue with <uri link="#reboot">Rebooting the System</uri>.
659</p> 767</p>
660 768
661</body> 769</body>
662</section> 770</section>
663
664<section id="reboot"> 771<section id="reboot">
665<title>Rebooting the System</title> 772<title>Rebooting the System</title>
666<subsection> 773<subsection>
667<body> 774<body>
668 775

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

  ViewVC Help
Powered by ViewVC 1.1.20