-
Notifications
You must be signed in to change notification settings - Fork 268
Expand file tree
/
Copy pathay_grub_bootloader.xml
More file actions
489 lines (481 loc) · 18.3 KB
/
ay_grub_bootloader.xml
File metadata and controls
489 lines (481 loc) · 18.3 KB
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
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sect1
[
<!ENTITY % entities SYSTEM "generic-entities.ent">
%entities;
]>
<sect1 version="5.0"
xml:id="CreateProfile-Bootloader"
xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>The &grub; boot loader</title>
<info>
<dm:docmanager xmlns:dm="urn:x-suse:ns:docmanager">
<dm:bugtracker></dm:bugtracker>
<dm:translation>yes</dm:translation>
</dm:docmanager>
</info>
<para>
This documentation is for <command>yast2-bootloader</command> and applies
to &grub;. For older product versions shipping with legacy GRUB, refer to
the documentation that comes with your distribution in
<filename>/usr/share/doc/packages/autoyast2/</filename>
</para>
<para>
By default, &ay; proposes the same booting mechanism as used by the booting
medium. For example, if you boot using EFI, the GRUB 2 for EFI is
installed. Therefore, you can omit this section unless you have specific
requirements. As the EFI boot requires specific partitioning, we
recommend using the automatic partitioning as described in
<xref linkend="CreateProfile-Automatic-Partitioning"/>, which will create
all needed partitions automatically.
</para>
<para>
If you need to adapt the default, use the
<literal><bootloader></literal> part. Its general structure
looks like the following snippet:
</para>
<screen><bootloader>
<loader_type>
<!-- boot loader type (grub2 or grub2-efi) -->
</loader_type>
<global>
<!--
entries defining the installation settings for &grub; and
the generic boot code
-->
</global>
<device_map config:type="list">
<!-- entries defining the order of devices -->
</device_map>
</bootloader></screen>
<para>
You do not need to fill out all settings. Rather, you only need to define
those that you need to change. &ay; will then merge the default values
with those specified in the profile.
</para>
<sect2 xml:id="CreateProfile-Bootloader-type-Grub">
<title>Loader type</title>
<para>
This defines which boot loader (UEFI or BIOS/legacy) to use. Not all
architectures support both legacy and EFI variants of the boot loader. The
safest (<literal>default</literal>) option is to leave the decision up to
the installer.
</para>
<screen><loader_type><replaceable>LOADER_TYPE</replaceable></loader_type></screen>
<para>
Possible values for <replaceable>LOADER_TYPE</replaceable> are:
</para>
<itemizedlist>
<listitem>
<para>
<literal>default</literal>: The installer chooses the correct boot
loader. This is the default when no option is defined.
</para>
</listitem>
<listitem>
<para>
<literal>grub2</literal>: Use the legacy BIOS boot loader.
</para>
</listitem>
<listitem>
<para>
<literal>grub2-efi</literal>: Use the EFI boot loader.
</para>
</listitem>
<listitem>
<para>
<literal>none</literal>: The boot process is not managed and
configured by the installer.
</para>
</listitem>
</itemizedlist>
</sect2>
<sect2 xml:id="CreateProfile-Bootloader-globals-Grub">
<title>Globals</title>
<para>
This is an important if optional part. Define here where to install &grub;
and how the boot process will work. Again,
<command>yast2-bootloader</command> will propose a configuration if you do not
define one. Usually the &ay; control file includes only this part and all
other parts are added automatically during installation by
<command>yast2-bootloader</command>. Unless you have some special
requirements, do not specify the boot loader configuration in the XML file.
</para>
<tip>
<title>Hibernation</title>
<para>
This is an important if optional part. Define here where to install
&grub; and how the boot process will work. Again,
<command>yast2-bootloader</command> proposes a configuration if you do
not define one. Usually, the &ay; control file includes only this part, and
all other parts are added automatically during installation by
<command>yast2-bootloader</command>. Unless you have some special
requirements, do not specify the boot loader configuration in the XML
file.
</para>
</tip>
<tip>
<title>Hibernation</title>
<para>
If there is a need for specific hibernation settings, then
<literal>resume</literal> or <literal>noresume</literal> in the
<literal>append</literal> configuration can be used.
</para>
<para>
To disable hibernation regardless of what the installer proposes,
specify <literal>noresume</literal> as a kernel parameter in the
<literal>append</literal> section.
</para>
<para>
To specify the hibernation device, use the <literal>resume</literal>
key with the device path. The recommended way to get stable results is
configuring your own partitioning and having a swap device with a
label:
</para>
<screen>
<append>quiet resume=/dev/disk/by-label/my_swap</append>
</screen>
<para>
If you do not use <literal>resume</literal> or
<literal>noresume</literal>, or if <literal>resume</literal> specifies
a device that will not exist on the installed system, then the
installer may propose a correct value for <literal>resume</literal>, or
it may remove the hibernation parameter completely, depending on
installer logic.
</para>
</tip>
<screen><global>
<activate>true</activate>
<timeout config:type="integer">10</timeout>
<terminal>gfxterm</terminal>
<gfxmode>1280x1024x24</gfxmode>
</global></screen>
<variablelist>
<title>Boot loader global options</title>
<varlistentry>
<term>activate</term>
<listitem>
<para>
Set the boot flag on the boot partition. The boot partition can be
<filename>/</filename> if there is no separate
<filename>/boot</filename> partition. If the boot partition is on a
logical partition, the boot flag is set to the extended partition.
</para>
<screen><activate>true</activate></screen>
</listitem>
</varlistentry>
<varlistentry>
<term>append</term>
<listitem>
<para>
Kernel parameters added at the end of boot entries for normal and
recovery mode.
</para>
<screen><append>nomodeset vga=0x317</append></screen>
</listitem>
</varlistentry>
<varlistentry>
<term>boot_boot</term>
<listitem>
<para>
Write &grub; to a separate <filename>/boot</filename> partition. If
no separate <filename>/boot</filename> partition exists, &grub;
will be written to <filename>/</filename>.
</para>
<screen><boot_boot>false</boot_boot></screen>
</listitem>
</varlistentry>
<varlistentry>
<term>boot_custom</term>
<listitem>
<para>
Write &grub; to a custom device.
</para>
<screen><boot_custom>/dev/sda3</boot_custom></screen>
</listitem>
</varlistentry>
<varlistentry>
<term>boot_extended</term>
<listitem>
<para>
Write &grub; to the extended partition (important if you want to
use generic boot code and the <filename>/boot</filename> partition
is logical). Note: if the boot partition is logical, you should use
<literal>boot_mbr</literal> (write &grub; to MBR) rather than
<literal>generic_mbr</literal>.
</para>
<screen><boot_extended>false</boot_extended></screen>
</listitem>
</varlistentry>
<varlistentry>
<term>boot_mbr</term>
<listitem>
<para>
Write &grub; to the MBR of the first disk in the order.
(<filename>device.map</filename> includes the order of the disks.)
</para>
<screen><boot_mbr>false</boot_mbr></screen>
</listitem>
</varlistentry>
<varlistentry>
<term>boot_root</term>
<listitem>
<para>
Write &grub; to <filename>/</filename> partition.
</para>
<screen><boot_root>false</boot_root></screen>
</listitem>
</varlistentry>
<varlistentry>
<term>cpu_mitigations</term>
<listitem>
<para>
Lets you select a default setting of kernel boot command-line
parameters for CPU mitigation (and, at the same time, strike a
balance between security and performance).
</para>
<para>
Possible values are:
</para>
<variablelist>
<varlistentry>
<term>auto</term>
<listitem>
&kernel_cpu_mitigations_auto;
</listitem>
</varlistentry>
<varlistentry>
<term>nosmt</term>
<listitem>
&kernel_cpu_mitigations_nosmt;
</listitem>
</varlistentry>
<varlistentry>
<term>off</term>
<listitem>
&kernel_cpu_mitigations_off;
</listitem>
</varlistentry>
<varlistentry>
<term>manual</term>
<listitem>
&kernel_cpu_mitigations_manual;
</listitem>
</varlistentry>
</variablelist>
<screen><cpu_mitigations>auto</cpu_mitigations></screen>
<para>
If not set in &ay;, the respective settings can be changed via
kernel command line. By default, the (product-specific) settings in
the <filename>/control.xml</filename> file on the installation
medium are used (if nothing else is specified).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>generic_mbr</term>
<listitem>
<para>
Write generic boot code to the MBR (will be ignored if
<literal>boot_mbr</literal> is set to <literal>true</literal>).
</para>
<screen><generic_mbr config:type="boolean">false</generic_mbr></screen>
</listitem>
</varlistentry>
<varlistentry>
<term>gfxmode</term>
<listitem>
<para>
Graphical resolution of the &grub; screen (requires
<terminal> to be set to <literal>gfxterm</literal>).
</para>
<para>
Valid entries are <literal>auto</literal>, <literal><replaceable>
HORIZONTAL</replaceable>x<replaceable>VERTICAL</replaceable></literal>,
or
<literal><replaceable>HORIZONTAL</replaceable>x<replaceable>VERTICAL
</replaceable>x<replaceable>COLOR DEPTH</replaceable></literal>.
You can see the screen resolutions supported by &grub; on a
particular system by using the <command>vbeinfo</command> command
at the &grub; command line in the running system.
</para>
<screen><gfxmode>1280x1024x24</gfxmode></screen>
</listitem>
</varlistentry>
<varlistentry>
<term>os_prober</term>
<listitem>
<para>
If set to <literal>true</literal>, automatically searches for
operating systems already installed and generates boot entries for
them during the installation.
</para>
<screen><os_prober>false</os_prober></screen>
</listitem>
</varlistentry>
<varlistentry>
<term>password</term>
<listitem>
<para>
If this is defined, it protects the boot loader with a password.
The system will not boot until the password is entered.
</para>
<para>
It has three subelements: <literal>value</literal>,
<literal>encrypted</literal>, and <literal>unrestricted</literal>.
</para>
<para>
<literal>value</literal> holds the password. It can be either plain
text, which &yast; will encrypt, or a password already encrypted
with <command>grub-mkpasswd-pbkdf2</command>. Set
<literal>encrypted</literal> to <literal>true</literal> when you
use an already encrypted password.
</para>
<para>
When <literal>unrestricted</literal> is set to
<literal>false</literal>, users need the password defined by the
<literal>value</literal> subelement to boot or edit &grub; menu
entries (by pressing <keycap>E</keycap> on a selected boot menu
item). When it is set to <literal>true</literal>, users can boot
the system without a password, but need a password to edit &grub;
menu entries. If the option is omitted, it defaults to
<literal>true</literal>.
</para>
<para>
<phrase os="sles;sled">For more information on managing boot
passwords, see
<xref linkend="vle-grub2-yast2-boot-password"/>.</phrase>
</para>
<screen><password><value>my_strong_password</value><encrypted>false</encrypted><unrestricted>false</unrestricted></password></screen>
</listitem>
</varlistentry>
<varlistentry>
<term>suse_btrfs</term>
<listitem>
<para>
Obsolete and no longer used. Booting from Btrfs snapshots is
automatically enabled.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>serial</term>
<listitem>
<para>
Command to execute if the &grub; terminal mode is set to
<literal>serial</literal>.
</para>
<screen><serial>serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1</serials></screen>
</listitem>
</varlistentry>
<!-- secure_boot disable added to SLE 15 SP2 oct 1 2019, not in
earlier releases yet, see
https://github.com/SUSE/doc-sle/pull/481 (cjs) -->
<varlistentry>
<term>secure_boot</term>
<listitem>
<para>
If set to <literal>false</literal>, then UEFI secure boot is
disabled. Works only for <literal>grub2-efi</literal> boot loader.
</para>
<screen><secure_boot>false</secure_boot></screen>
</listitem>
</varlistentry>
<varlistentry>
<term>terminal</term>
<listitem>
<para>
Specify the &grub; terminal mode to use. Valid entries are
<literal>console</literal>, <literal>gfxterm</literal>, and
<literal>serial</literal>. If set to <literal>serial</literal>, the
serial command needs to be specified with <serial>, too.
</para>
<screen><terminal>serial</terminal></screen>
</listitem>
</varlistentry>
<varlistentry>
<term>timeout</term>
<listitem>
<para>
The timeout in seconds until the default boot entry is booted
automatically.
</para>
<screen><timeout config:type="integer">10</timeout></screen>
</listitem>
</varlistentry>
<varlistentry>
<term>trusted_grub</term>
<listitem>
<para>
If set to <literal>true</literal>, then Trusted GRUB is used.
Trusted GRUB supports Trusted Platform Module (TPM). Works only for
<literal>grub2</literal> boot loader.
</para>
<screen><trusted_grub">true</trusted_grub></screen>
</listitem>
</varlistentry>
<varlistentry>
<term>update_nvram</term>
<listitem>
<para>
If set to <literal>true</literal>, then &ay; adds an NVRAM entry
for the boot loader in the firmware. This is the desirable behavior
unless you want to preserve a specific setting or you need to work
around firmware issues.
</para>
<screen><update_nvram>true</update_nvram></screen>
</listitem>
</varlistentry>
<varlistentry>
<term>vgamode</term>
<listitem>
<para>
Adds the kernel parameter
<literal>vga=<replaceable>VALUE</replaceable> </literal> to the
boot entries.
</para>
<screen><vgamode>0x317</vgamode></screen>
</listitem>
</varlistentry>
<varlistentry>
<term>xen_append</term>
<listitem>
<para>
Kernel parameters added at the end of boot entries for &xen;
guests.
</para>
<screen><xen_append>nomodeset vga=0x317</xen_append></screen>
</listitem>
</varlistentry>
<varlistentry>
<term>xen_kernel_append</term>
<listitem>
<para>
Kernel parameters added at the end of boot entries for &xen;
kernels on the &vmhost;.
</para>
<screen><xen_kernel_append>dom0_mem=768M</xen_kernel_append></screen>
</listitem>
</varlistentry>
</variablelist>
</sect2>
<sect2 xml:id="CreateProfile-Bootloader-dev-map-Grub">
<title>Device map</title>
<para>
&grub; avoids mapping problems between BIOS drives and Linux devices by
using device ID strings (UUIDs) or file system labels when generating its
configuration files. &grub; utilities create a temporary device map on the
fly, which is usually sufficient, particularly on single-disk systems.
However, if you need to override the automatic device mapping mechanism,
create your custom mapping in this section.
</para>
<screen><device_map config:type="list">
<device_map_entry>
<firmware>hd0</firmware> <!-- order of devices in target map -->
<linux>/dev/disk/by-id/ata-ST3500418AS_6VM23FX0</linux> <!-- name of device (disk) -->
</device_map_entry>
</device_map></screen>
</sect2>
</sect1>