1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Bootloader expert use</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="Installation with DrakX">
<link rel="up" href="index.html" title="Installation with DrakX">
<link rel="prev" href="setupBootloaderBeginner.html" title="Bootloader main options (old page)">
<link rel="next" href="misc-params.html" title="Summary of miscellaneous parameters"><style xmlns="http://www.w3.org/TR/xhtml1/transitional" type="text/css">
<!--
body { font-family: sans-serif; font-size: 13px }
table { font-family: sans-serif; font-size: 13px }
--></style></head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div lang="" class="section" title="Bootloader expert use">
<div class="titlepage">
<div>
<div>
<h2 class="title"><a name="setupBootloaderExpert"></a>Bootloader expert use
</h2>
</div>
</div>
</div>
<p><a name="setupBootloaderExpert-pa1"></a>If you haven't done so
yet, please read <a class="xref" href="setupBootloader.html" title="Bootloader main options">the section called “Bootloader main
options”</a> first.
</p>
<div class="section" title="Adding a GRUB2 based system manually">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="addingGRUB2system"></a>Adding a GRUB2 based system
manually
</h3>
</div>
</div>
</div>
<p><a name="setupBootloaderExpert-pa7"></a>A GRUB2 based system
may be added to the Mageia boot menu as follows:
</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p><a name="setupBootloaderExpert-pa8"></a>Boot into the
system in question. In order to determine the GRUB2 version run the
following command in a terminal:
</p>
<p><a name="setupBootloaderExpert-pa9"></a><code class="literal">sudo
grub-install --version</code></p>
<p><a name="setupBootloaderExpert-pa10"></a>or if that
fails try:
</p>
<p><a name="setupBootloaderExpert-pa11"></a><code class="literal">sudo
grub2-install --version</code></p>
</li>
<li class="listitem">
<p><a name="setupBootloaderExpert-pa12"></a>If this returns
"GNU GRUB version 0.97" (possibly with a custom suffix), then it is
using GRUB (otherwise called GRUB legacy) not GRUB2 and your system
should be correctly identified by Mageia during installation and added
automatically to the menu.
</p>
</li>
<li class="listitem">
<p><a name="setupBootloaderExpert-pa15"></a>If this returns
(GRUB) 1.98 or 1.99 or 2.xx, then you are using GRUB2.
</p>
<p><a name="setupBootloaderExpert-pa16"></a>Make a note of
the version and enter this command to identify the root
partition:
</p>
<p><a name="setupBootloaderExpert-pa17"></a><code class="literal">df -h
/ |(read; awk '{print $1; exit}')</code></p>
<p><a name="setupBootloaderExpert-pa18"></a>This will
output something like :
</p>
<p><a name="setupBootloaderExpert-pa20"></a><code class="literal">/dev/sdb11</code></p>
<p><a name="setupBootloaderExpert-pa21"></a>sdb11 is the
root partition - make a note of it.
</p>
</li>
<li class="listitem">
<p><a name="setupBootloaderExpert-pa22"></a>Now check that
the /boot folder is in the same partition by entering the following
command:
</p>
<p><a name="setupBootloaderExpert-pa23"></a><code class="literal">df -h
/boot |(read; awk '{print $1; exit}')</code></p>
<p><a name="setupBootloaderExpert-pa25"></a>If the /boot
partition is different to the root partition then make a note and use
the /boot partition in the "root" line when editing menu.lst
below.
</p>
</li>
<li class="listitem">
<p><a name="setupBootloaderExpert-pa26"></a>You can now
shut down the system and install Mageia.
</p>
</li>
<li class="listitem">
<p><a name="setupBootloaderExpert-pa27"></a>In your new
running Mageia system, open a terminal and as root edit the file
/boot/grub/menu.lst as follows:
</p>
</li>
<li class="listitem">
<p><a name="setupBootloaderExpert-pa28"></a>To become root
use:
</p>
<p><a name="setupBootloaderExpert-pa29"></a><code class="literal">su
-</code></p>
<p><a name="setupBootloaderExpert-pa30"></a>(enter root
password)
</p>
</li>
<li class="listitem">
<p><a name="setupBootloaderExpert-pa31"></a>To open the
file in an editor use:
</p>
<p><a name="setupBootloaderExpert-pa32"></a><code class="literal">kwrite
/boot/grub/menu.lst</code></p>
<p><a name="setupBootloaderExpert-pa33"></a>(replace
"kwrite" with "gedit" if you are using Gnome)
</p>
</li>
<li class="listitem">
<p><a name="setupBootloaderExpert-pa34"></a>Add the
following entry for your (e.g. Ubuntu) system, possibly as the second
stanza. The position the item appears in the menu will depend on its
position in the file:
</p>
<p><a name="setupBootloaderExpert-pa35"></a><code class="literal">title
Ubuntu</code></p>
<p><a name="setupBootloaderExpert-pa36"></a><code class="literal">root
(hd1,10)</code></p>
<p><a name="setupBootloaderExpert-pa37"></a><code class="literal">kernel
/boot/grub/core.img</code></p>
</li>
<li class="listitem">
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="note.png"></td>
<th align="left"></th>
</tr>
<tr>
<td align="left" valign="top">
<p><a name="setupBootloaderExpert-pa42"></a>In the second
line, "hd1" means the second hard drive, the "10" indicates the 11th
partition. Drives and partitions in Mageia's legacy GRUB count from
zero.
</p>
<p><a name="setupBootloaderExpert-pa43"></a>Therefore:
</p>
<p><a name="setupBootloaderExpert-pa44"></a><code class="literal">sdb11 =
(hd1,10)</code></p>
<p><a name="setupBootloaderExpert-pa45"></a><code class="literal">sda1
= (hd0,0)</code></p>
</td>
</tr>
</table>
</div>
</li>
<li class="listitem">
<p><a name="setupBootloaderExpert-pa38"></a>If the GRUB2
version is 2.xx then change the last line to :
</p>
<p><a name="setupBootloaderExpert-pa39"></a><code class="literal">kernel
/boot/grub/i386-pc/core.img</code></p>
<p><a name="setupBootloaderExpert-pa40"></a>If you needed
to use "grub2-install" earlier then change <code class="literal">"grub"</code>
to <code class="literal">"grub2"</code> in the last line.
</p>
<p><a name="setupBootloaderExpert-pa40a"></a>If /boot was
on a separate partition, then remove <code class="literal">"/boot"</code> from
the last line.
</p>
</li>
<li class="listitem">
<p><a name="setupBootloaderExpert-pa41"></a>Save the file
and re-boot. You should now see your "Ubuntu" entry in the menu and be
able to boot from it.
</p>
</li>
</ul>
</div>
</div>
<div class="section" title="Using an existing GRUB2 bootloader">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="usingExistingBootloaderGRUB2"></a>Using an
existing GRUB2 bootloader
</h3>
</div>
</div>
</div>
<p><a name="setupBootloaderExpert-pa49a"></a>If you didn't read
the general part about using an existing bootloader yet, do so now. See
<a class="xref" href="setupBootloader.html#usingExistingBootloader" title="Using an existing bootloader">the section called “Using an
existing bootloader”</a></p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="note.png"></td>
<th align="left"></th>
</tr>
<tr>
<td align="left" valign="top">
<p><a name="setupBootloaderExpert-pa50"></a>There is a known
bug in OS-prober used during GRUB2 installation in some versions
of Debian/Ubuntu that incorrectly creates grub.cfg when adding Mageia
(or Mandriva) systems. This is simple to work around and details of a
fix can be found in the Mageia forum. Search for "prober", the topic is
"grub problem", post #9 has the information.
</p>
<p><a name="setupBootloaderExpert-pa51"></a>To make the fix
permanent so that it will survive an Ubuntu kernel update, the Mageia
entry should be added to <code class="literal">/etc/grub.d/40_custom</code></p>
<p><a name="setupBootloaderExpert-pa52"></a>Stop Press: The bug
is fixed in os-prober-1.53 released on 8th May 2012. So now, upgrading to
the new version in your GRUB2 installation is the preferred solution.
</p>
</td>
</tr>
</table>
</div>
</div>
</div>
</body>
</html>
|