aboutsummaryrefslogtreecommitdiffstats
path: root/docs/installer/en/setupBootloaderExpert.xml
blob: 9ca54642de68cfce6853b82bd34b2465aa23c812 (plain)
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
<?xml version="1.0" encoding="utf-8"?>
<section version="5.0" xml:id="setupBootloaderExpert"
         xmlns="http://docbook.org/ns/docbook"
         xmlns:ns5="http://www.w3.org/1999/xhtml"
         xmlns:ns42="http://www.w3.org/1998/Math/MathML"
         xmlns:ns4="http://www.w3.org/1999/xlink"
         xmlns:ns3="http://www.w3.org/2000/svg"
         xmlns:ns="http://docbook.org/ns/docbook">

  <info>
    <title xml:id="setupBootloaderExpert-ti1">Bootloader expert use</title>
  </info>

  <!-- Made by marja on 2012 04 01 -->

  <!-- NEEDS TO BE REVIEWED! -->

  <!-- SimonNZG 2012-04-03: Needs to return to this one -->

  <!-- 20120421 imported barjac's text (a lot!!, thx barjac) - marja -->

  <!-- 2012-04-22 thanks marja - nice job - I changed the section heading back to 
      'existing bootloader', as this applies to any O.S. not just Linux - maybe the
       xml:ids need changing? -->

  <!-- 2012-04-22 changed xml:id's accordingly, removed a few words I had wrongly 
       added to barjac's text-->

  <!-- 2012-04-22 Exported the complicated part of setupBootloaderBeginner.xml to 
       this new file, the original file should be linked to this one.-->

  <!-- barjac 2012-04-25 removed listitem as it seems that there is *always* a copy
       of core.img in the /boot/... dir - I was not aware that was the case until I
       checked with upstream tonight -->

  <!-- barjac 2012-04-25 Added handling of /boot on a separate partiton and simplified
       checking of / and /boot - I hope no translators are on this section - if so sorry
       - I'm happy with it now!-->

  <!-- barjac 2012-04-25 Corrected case of grub -> GRUB2 and minor punctuation edits. -->
  
  <!-- barjac 2012-04-25 Improved some wording thanks to grenoya -->
  
  <!-- barjac 2012-05-09 Added para pa52 due to new os-prober release with bug fix.
       Removed link in pa50 as in the installer help a link is useless -->
<!-- marja replaced link to setupBootloaderBeginner by link to setupBootloader -->

  <para revision="1" xml:id="setupBootloaderExpert-pa1">If you haven't done so
  yet, please read <xref linkend="setupBootloader"/> first.</para>

  <section xml:id="addingGRUB2system">

    <info>
      <title xml:id="addingGRUB2system-ti3">Adding a GRUB2 based system
      manually</title>
    </info>

    <para revision="2" xml:id="setupBootloaderExpert-pa7">A GRUB2 based system
    may be added to the Mageia boot menu as follows:</para>

    <itemizedlist>
      <listitem>
        <para revision="4" xml:id="setupBootloaderExpert-pa8">Boot into the
        system in question. In order to determine the GRUB2 version run the
        following command in a terminal:</para>

        <para revision="1" xml:id="setupBootloaderExpert-pa9"><literal>sudo
        grub-install --version</literal></para>

        <para revision="1" xml:id="setupBootloaderExpert-pa10">or if that
        fails try:</para>

        <para revision="1" xml:id="setupBootloaderExpert-pa11"><literal>sudo
        grub2-install --version</literal></para>
      </listitem>

      <listitem>
        <para revision="2" xml:id="setupBootloaderExpert-pa12">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.</para>
      </listitem>

      <listitem>
        <para revision="1" xml:id="setupBootloaderExpert-pa15">If this returns
        (GRUB) 1.98 or 1.99 or 2.xx, then you are using GRUB2.</para>

        <para revision="1" xml:id="setupBootloaderExpert-pa16">Make a note of
        the version and enter this command to identify the root
        partition:</para>

        <para revision="2" xml:id="setupBootloaderExpert-pa17"><literal>df -h
        / |(read; awk '{print $1; exit}')</literal></para>

        <para revision="1" xml:id="setupBootloaderExpert-pa18">This will
        output something like :</para>

        <!--        <para revision="1"
        xml:id="setupBootloaderExpert-pa19"><literal>Filesystem Size Used
	  Avail Use% Mounted on</literal></para> -->

        <para revision="2"
        xml:id="setupBootloaderExpert-pa20"><literal>/dev/sdb11</literal></para>

        <para revision="2" xml:id="setupBootloaderExpert-pa21">sdb11 is the
        root partition - make a note of it.</para>
      </listitem>

      <listitem>
        <para revision="2" xml:id="setupBootloaderExpert-pa22">Now check that
        the /boot folder is in the same partition by entering the following
        command:</para>

        <para revision="2" xml:id="setupBootloaderExpert-pa23"><literal>df -h
        /boot |(read; awk '{print $1; exit}')</literal></para>

        <!--        <para revision="1" xml:id="setupBootloaderExpert-pa24">or:</para> -->

        <para revision="2" xml:id="setupBootloaderExpert-pa25">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.</para>
      </listitem>

      <listitem>
        <para revision="2" xml:id="setupBootloaderExpert-pa26">You can now
        shut down the system and install Mageia.</para>
      </listitem>

      <listitem>
        <para revision="1" xml:id="setupBootloaderExpert-pa27">In your new
        running Mageia system, open a terminal and as root edit the file
        /boot/grub/menu.lst as follows:</para>
      </listitem>

      <listitem>
        <para revision="1" xml:id="setupBootloaderExpert-pa28">To become root
        use:</para>

        <para revision="1" xml:id="setupBootloaderExpert-pa29"><literal>su
        -</literal></para>

        <para revision="1" xml:id="setupBootloaderExpert-pa30">(enter root
        password)</para>
      </listitem>

      <listitem>
        <para revision="1" xml:id="setupBootloaderExpert-pa31">To open the
        file in an editor use:</para>

        <para revision="1" xml:id="setupBootloaderExpert-pa32"><literal>kwrite
        /boot/grub/menu.lst</literal></para>

        <para revision="1" xml:id="setupBootloaderExpert-pa33">(replace
        "kwrite" with "gedit" if you are using Gnome)</para>
      </listitem>

      <listitem>
        <para revision="1" xml:id="setupBootloaderExpert-pa34">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:</para>

        <para revision="1" xml:id="setupBootloaderExpert-pa35"><literal>title
        Ubuntu</literal></para>

        <para revision="1" xml:id="setupBootloaderExpert-pa36"><literal>root
        (hd1,10)</literal></para>

        <para revision="1" xml:id="setupBootloaderExpert-pa37"><literal>kernel
        /boot/grub/core.img</literal></para>
      </listitem>

      <listitem>
        <note>
          <para revision="3" xml:id="setupBootloaderExpert-pa42">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.</para>

          <para revision="2"
          xml:id="setupBootloaderExpert-pa43">Therefore:</para>

          <para revision="1"
          xml:id="setupBootloaderExpert-pa44"><literal>sdb11 =
          (hd1,10)</literal></para>

          <para revision="1" xml:id="setupBootloaderExpert-pa45"><literal>sda1
          = (hd0,0)</literal></para>
        </note>
      </listitem>

      <listitem>
        <para revision="1" xml:id="setupBootloaderExpert-pa38">If the GRUB2
        version is 2.xx then change the last line to :</para>

        <para revision="1" xml:id="setupBootloaderExpert-pa39"><literal>kernel
        /boot/grub/i386-pc/core.img</literal></para>

        <para revision="2" xml:id="setupBootloaderExpert-pa40">If you needed
        to use "grub2-install" earlier then change <literal>"grub"</literal>
        to <literal>"grub2"</literal> in the last line.</para>

        <para revision="1" xml:id="setupBootloaderExpert-pa40a">If /boot was
        on a separate partition, then remove <literal>"/boot"</literal> from
        the last line.</para>
      </listitem>

      <listitem>
        <para revision="1" xml:id="setupBootloaderExpert-pa41">Save the file
        and re-boot. You should now see your "Ubuntu" entry in the menu and be
        able to boot from it.</para>
      </listitem>
    </itemizedlist>
  </section>

  <section xml:id="usingExistingBootloaderGRUB2">
    <info>
      <title revision="1" xml:id="usingExistingBootloaderGRUB2-ti4">Using an
      existing GRUB2 bootloader</title>
    </info>

    <para revision="1" xml:id="setupBootloaderExpert-pa49a">If you didn't read
    the general part about using an existing bootloader yet, do so now. See
    <xref linkend="usingExistingBootloader"/></para>

    <note>
      <para revision="5" xml:id="setupBootloaderExpert-pa50">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.</para>

      <para revision="1" xml:id="setupBootloaderExpert-pa51">To make the fix
      permanent so that it will survive an Ubuntu kernel update, the Mageia
      entry should be added to <literal>/etc/grub.d/40_custom</literal></para>
      
      <para revision="1" xml:id="setupBootloaderExpert-pa52">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.</para>
    </note>
  </section>
</section>