forked from osbuild/osbuild
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathorg.osbuild.grub2.meta.json
266 lines (266 loc) · 9.19 KB
/
org.osbuild.grub2.meta.json
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
{
"summary": "Configure GRUB2 bootloader and set boot options",
"description": [
"Configure the system to use GRUB2 as the bootloader, and set boot options.",
"Sets the GRUB2 boot/root filesystem to `rootfs`. If a separated boot",
"partition is used it can be specified via `bootfs`. The file-systems",
"can be identified either via uuid (`{\"uuid\": \"<uuid>\"}`) or label",
"(`{\"label\": \"<label>\"}`). The kernel boot argument will be composed",
"of the root file system id and additional options specified in",
"`{kernel_opts}`, if any.",
"Configures GRUB2 to boot via the Boot Loader Specification",
"(https://systemd.io/BOOT_LOADER_SPECIFICATION), which is the default",
"behavior in Fedora 30 and later.",
"This stage will overwrite `/etc/default/grub`, `/boot/grub2/grubenv`, and",
"`/boot/grub2/grub.cfg`. (Leading directories will be created if not present.)",
"If Legacy boot support is requested via `legacy` this stage will also",
"overwrite `/boot/grub2/grub.cfg` and will copy the GRUB2 files from the",
"buildhost into the target tree:",
"* `/usr/share/grub/unicode.pf2` -> `/boot/grub2/fonts/`",
"* `/usr/lib/grub/$platform/*.{mod,lst}` -> `/boot/grub2/$platform/`",
" * NOTE: skips `fdt.lst`, which is an empty file",
"The $platform variable (default: i386-pc) refers to target platform",
"that grub2 is mean to ran on (see grub-install(1)'s `--target`)",
"NB: with legacy support enabled, this stage will fail if the buildhost",
"doesn't have `/usr/lib/grub/$platform/` and `/usr/share/grub/unicode.pf2`.",
"If UEFI support is enabled via `uefi: {\"vendor\": \"<vendor>\"}` this stage will",
"also write the `grub.cfg` to `boot/efi/EFI/<vendor>/grub.cfg`. EFI binaries",
"and accompanying data can be installed from the built root via `uefi.install`.",
"Both UEFI and Legacy can be specified at the same time (hybrid boot).",
"If `uefi.unified` is specified or hybrid boot is enabled, the main grub config",
"will be written to `boot/grub2/grub.cfg` and a redirect config will be placed",
"in the EFI directory.",
"If the `saved_entry` option is present it will result in an entry in the",
"`grubenv` file of the same name. The grub config file contains logic so",
"that this variable will be used to select the next boot entry. This will",
"also make grub2-reboot and grub2-set-default tools work. It will also",
"prevent newly installed non-default kernels (like e.g. the debug kernel)",
"to be selected as default. The contents of variable needs to match the",
"corresponding loader entry, which currently is a combination of the",
"machine id and kernel NVRA, like e.g.:",
" `ffffffffffffffffffffffffffffffff-5.6.6-300.fc32.x86_64`",
"If `saved_entry` is set it is advisable to set `config.default` to",
"`saved` so that any re-creation of the grub configuration by the",
"user will preserve that functionality.",
"Support for \"greenboot\" can be turned on via the `greenboot` option.",
"Greenboot is the idea of automatically rolling back bad updates,",
"i.e. updates that do not boot successfully. The implementation",
"is split between the boot loader and a user space component.",
"The latter sets two variables `boot_counter`, which indicates",
"the maximum number of boot attempts and `boot_success` which",
"tells the boot laoder if a previous boot was successful. The",
"bootloader on the other hand will decrement the counter variable",
"and reset the success indicator one.",
"An implementation of the user space component for rpm-ostree is",
"called `greenboot`.",
"Support for ignition (https://github.com/coreos/ignition) can be turned",
"on via the `ignition` option. If enabled, a 'ignition_firstboot' variable",
"will be created, which is meant to be included in the kernel command line.",
"The grub.cfg will then contain the necessary code to detect and source",
"the '/boot/ignition.firstboot' file and configure said 'ignition_firstboot'",
"variable appropriately. See the 'org.osbuild.ignition' stage for more",
"information on that file."
],
"schema": {
"additionalProperties": false,
"oneOf": [
{
"required": [
"root_fs_uuid"
]
},
{
"required": [
"rootfs"
]
}
],
"definitions": {
"uuid": {
"description": "Identify the file system by UUID",
"type": "string",
"oneOf": [
{
"pattern": "^[0-9A-Za-z]{8}(-[0-9A-Za-z]{4}){3}-[0-9A-Za-z]{12}$",
"examples": [
"9c6ae55b-cf88-45b8-84e8-64990759f39d"
]
},
{
"pattern": "^[0-9A-Za-z]{4}-[0-9A-Za-z]{4}$",
"examples": [
"6699-AFB5"
]
}
]
},
"filesystem": {
"description": "Description of how to locate a file system",
"type": "object",
"oneOf": [
{
"required": [
"uuid"
]
},
{
"required": [
"label"
]
}
],
"properties": {
"label": {
"description": "Identify the file system by label",
"type": "string"
},
"uuid": {
"$ref": "#/definitions/uuid"
}
}
},
"terminal": {
"description": "Terminal device",
"type": "array",
"items": {
"type": "string"
}
}
},
"properties": {
"rootfs": {
"$ref": "#/definitions/filesystem"
},
"bootfs": {
"$ref": "#/definitions/filesystem"
},
"root_fs_uuid": {
"$ref": "#/definitions/uuid"
},
"boot_fs_uuid": {
"$ref": "#/definitions/uuid"
},
"kernel_opts": {
"description": "Additional kernel boot options",
"type": "string",
"default": ""
},
"legacy": {
"description": "Include legacy boot support",
"oneOf": [
{
"type": "boolean",
"default": false
},
{
"type": "string"
}
]
},
"uefi": {
"description": "Include UEFI boot support",
"type": "object",
"required": [
"vendor"
],
"properties": {
"vendor": {
"type": "string",
"description": "The vendor of the UEFI binaries (this is us)",
"examples": [
"fedora"
],
"pattern": "^(.+)$"
},
"efi_src_dir": {
"type": "string",
"description": "The source path to use for the EFI/ binaries when installing is set to True",
"default": "/boot/efi/EFI"
},
"install": {
"description": "Install EFI binaries and data from the build root",
"type": "boolean",
"default": false
},
"unified": {
"description": "Main grub config in 'boot/grub2/grub.cfg'",
"type": "boolean",
"default": false
}
}
},
"saved_entry": {
"description": "Set the variable of the same name in `grubenv`.",
"type": "string"
},
"write_defaults": {
"description": "Whether to write /etc/defaults/grub",
"type": "boolean",
"default": true
},
"write_cmdline": {
"description": "Include the kernel command line in `grubenv`",
"type": "boolean",
"default": true
},
"ignition": {
"description": "Include ignition support in the grub.cfg",
"type": "boolean",
"default": false
},
"greenboot": {
"description": "Include support for fallback counting",
"type": "boolean",
"default": false
},
"config": {
"description": "Configuration options for grub itself",
"type": "object",
"additionalProperties": false,
"properties": {
"default": {
"description": "Default boot entry",
"type": "string"
},
"disable_recovery": {
"type": "boolean"
},
"disable_submenu": {
"type": "boolean"
},
"distributor": {
"description": "Name of the distributor",
"type": "string"
},
"terminal": {
"$ref": "#/definitions/terminal"
},
"terminal_input": {
"$ref": "#/definitions/terminal"
},
"terminal_output": {
"$ref": "#/definitions/terminal"
},
"timeout": {
"description": "Timeout in seconds",
"type": "integer",
"minimum": 0,
"default": 0
},
"timeout_style": {
"type": "string",
"enum": [
"hidden",
"menu",
"countdown"
]
},
"serial": {
"description": "The command to configure the serial console",
"type": "string"
}
}
}
}
}
}