Gentoo Archives: gentoo-doc-cvs

From: "Sven Vermeulen (swift)" <swift@g.o>
To: gentoo-doc-cvs@l.g.o
Subject: [gentoo-doc-cvs] gentoo commit in xml/htdocs/doc/en/handbook: hb-install-x86+amd64-bootloader.xml
Date: Thu, 15 Aug 2013 17:05:48
Message-Id: 20130815170538.65B582171C@flycatcher.gentoo.org
1 swift 13/08/15 17:05:38
2
3 Modified: hb-install-x86+amd64-bootloader.xml
4 Log:
5 Fix bug #316603 - Add GRUB2 instructions to handbook
6
7 Revision Changes Path
8 1.30 xml/htdocs/doc/en/handbook/hb-install-x86+amd64-bootloader.xml
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/doc/en/handbook/hb-install-x86+amd64-bootloader.xml?rev=1.30&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/doc/en/handbook/hb-install-x86+amd64-bootloader.xml?rev=1.30&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/doc/en/handbook/hb-install-x86+amd64-bootloader.xml?r1=1.29&r2=1.30
13
14 Index: hb-install-x86+amd64-bootloader.xml
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-x86+amd64-bootloader.xml,v
17 retrieving revision 1.29
18 retrieving revision 1.30
19 diff -u -r1.29 -r1.30
20 --- hb-install-x86+amd64-bootloader.xml 15 Aug 2013 08:14:10 -0000 1.29
21 +++ hb-install-x86+amd64-bootloader.xml 15 Aug 2013 17:05:38 -0000 1.30
22 @@ -4,11 +4,11 @@
23 <!-- The content of this document is licensed under the CC-BY-SA license -->
24 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
25
26 -<!-- $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 $ -->
27 +<!-- $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 $ -->
28
29 <sections>
30
31 -<version>13</version>
32 +<version>14</version>
33 <date>2013-08-15</date>
34
35 <section>
36 @@ -28,9 +28,16 @@
37 <body test="contains('AMD64 x86', func:keyval('arch'))">
38 <p>
39 For <keyval id="arch"/>, Gentoo Linux provides <uri
40 -link="#grub">GRUB</uri> and <uri link="#lilo">LILO</uri>.
41 +link="#grub">GRUB</uri>, <uri link="#grub2">GRUB2</uri> and
42 +<uri link="#lilo">LILO</uri>.
43 </p>
44
45 +<note>
46 +GRUB2 might not be stabilized at the moment of reading this. However,
47 +stabilization is due very soon so we temporarily document both GRUB and GRUB2
48 +and will remove the GRUB instructions after stabilization of GRUB2.
49 +</note>
50 +
51 </body>
52 <body>
53 <p>
54 @@ -109,7 +116,8 @@
55 </p>
56
57 <p test="not(func:keyval('arch')='IA64')">
58 -Now continue by installing <uri link="#grub">GRUB</uri> <e>or</e> <uri
59 +Now continue by installing <uri link="#grub">GRUB</uri>, <uri
60 +link="#grub2">GRUB2</uri> <e>or</e> <uri
61 link="#lilo">LILO</uri>.
62 </p>
63
64 @@ -117,7 +125,27 @@
65 </subsection>
66 </section>
67 <section id="grub" test="contains('AMD64 x86',func:keyval('arch'))">
68 -<title>Default: Using GRUB</title>
69 +<title>Default: Using GRUB Legacy</title>
70 +<subsection>
71 +<title>What is Legacy?</title>
72 +<body>
73 +
74 +<p>
75 +GRUB has been reworked and a new release dubbed GRUB2 is made available. The new
76 +GRUB2 codebase is quite different from the current GRUB, which is why this GRUB
77 +version is now dubbed as "GRUB Legacy".
78 +</p>
79 +
80 +<p>
81 +We recommend to start with GRUB2 as soon as it is available. The migration of
82 +GRUB to GRUB2 is <uri link="/doc/en/grub2-migration.xml">documented
83 +online</uri>. The instructions in this section relate to "GRUB Legacy" and will
84 +disappear from the book soon after the stabilization of <uri
85 +link="#grub2">GRUB2</uri>.
86 +</p>
87 +
88 +</body>
89 +</subsection>
90 <subsection>
91 <title>Understanding GRUB's terminology</title>
92 <body>
93 @@ -574,6 +602,86 @@
94 </body>
95 </subsection>
96 </section>
97 +<section id="grub2" test="contains('AMD64 x86', func:keyval('arch'))">
98 +<title>Alternative: Using GRUB2</title>
99 +<subsection>
100 +<title>Installing GRUB2</title>
101 +<body>
102 +
103 +<p>
104 +GRUB2 is provided through the <c>sys-boot/grub</c> package. To deploy GRUB2, use
105 +the <e>SLOT</e> notation to tell Portage to install GRUB2. SLOTs are a feature
106 +of Gentoo Linux where multiple versions of the same package can be deployed
107 +simultaneously on a system. In our case, this means that GRUB Legacy and GRUB2
108 +can be installed on a system (software-wise) at the same time.
109 +</p>
110 +
111 +<note>
112 +GRUB2 might still be marked as ~<keyval id="arch" />. If that is the case, you
113 +can either wait and use <uri link="#grub">GRUB Legacy</uri> or unmask the
114 +package. This is explained in <uri
115 +link="handbook-amd64.xml?part=3&amp;chap=3#doc_chap2">Mixing Stable with
116 +Testing</uri>. Once GRUB2 is stabilized, the SLOT operator also is no longer
117 +mandatory.
118 +</note>
119 +
120 +<pre caption="Installing GRUB2">
121 +# <i>emerge grub:2</i>
122 +</pre>
123 +
124 +<p>
125 +The GRUB2 software is now installed on the system, but not activated yet.
126 +</p>
127 +
128 +</body>
129 +</subsection>
130 +<subsection>
131 +<title>Configuring GRUB2</title>
132 +<body>
133 +
134 +<p>
135 +First, let us install the necessary GRUB2 files in <path>/boot/grub2</path>.
136 +Assuming the first disk (the one where the system boots from) is
137 +<path>/dev/sda</path>, the following command will do this for us:
138 +</p>
139 +
140 +<pre caption="Installing the GRUB2 files in /boot/grub2">
141 +# <i>grub2-install /dev/sda</i>
142 +</pre>
143 +
144 +<p>
145 +Next, we can generate the GRUB2 configuration based on the user configuration
146 +specified in the <path>/etc/default/grub</path> file and
147 +<path>/etc/grub.d</path> scripts. In most cases, no configuration is needed
148 +by users as GRUB2 will automatically detect which kernel to boot (the highest
149 +one available in <path>/boot</path>) and what the root file system is.
150 +</p>
151 +
152 +<p>
153 +To generate the final GRUB2 configuration, run the <c>grub2-mkconfig</c>
154 +command:
155 +</p>
156 +
157 +<pre caption="Generating GRUB2 configuration">
158 +# <i>grub2-mkconfig -o /boot/grub2/grub.cfg</i>
159 +Generating grub.cfg ...
160 +Found linux image: /boot/<keyval id="kernel-name" />
161 +Found initrd image: /boot/<keyval id="genkernel-initrd" />
162 +done
163 +</pre>
164 +
165 +<p>
166 +The output of the command <e>must</e> mention that at least one Linux image is
167 +found, as those are needed to boot the system. If you use initramfs or used
168 +<c>genkernel</c> to build the kernel, the correct initrd image should be
169 +detected as well. If this is not the case, go to <path>/boot</path> and check
170 +the contents using the <c>ls</c> command. If the files are indeed missing, go
171 +back to the kernel configuration and installation instructions.
172 +</p>
173 +
174 +</body>
175 +</subsection>
176 +</section>
177 <section id="elilo" test="func:keyval('arch')='IA64'">
178 <title>Default: Installing elilo</title>
179 <body>
180 @@ -660,7 +768,6 @@
181
182 </body>
183 </section>
184 -
185 <section id="reboot">
186 <title>Rebooting the System</title>
187 <subsection>