forked from osbuild/osbuild
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathorg.osbuild.grub2.legacy.meta.json
261 lines (261 loc) · 7.5 KB
/
org.osbuild.grub2.legacy.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
{
"summary": "Configure GRUB2 bootloader and set boot options (legacy, i.e. non-BLS)",
"description": [
"This stage creates traditional menu entries for systems that are not",
"capable of using the Booloader Specific (BLS).",
"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>\"}`)",
" - label (`{\"label\": \"<label>\"}`)",
" - device (`{\"device\": \"<device>\"}`, only for the root file system)",
"The kernel boot argument will be composed of the root file system id",
"and additional options specified in `config.cmdline`, if any.",
"This stage will overwrite `/etc/default/grub`, `/boot/grub2/grubenv`;",
"leading directories will be created if not present.",
"The stage supports configuring grub for BIOS boot and UEFI systems:",
"If BIOS boot support is requested via `bios` 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",
"NB: with bios 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)."
],
"schema": {
"definitions": {
"filesystem": {
"description": "Description of how to locate a file system",
"type": "object",
"oneOf": [
{
"required": [
"uuid"
]
},
{
"required": [
"label"
]
},
{
"required": [
"device"
]
}
],
"properties": {
"device": {
"description": "Identify the file system by device node",
"type": "string"
},
"label": {
"description": "Identify the file system by label",
"type": "string"
},
"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"
]
}
]
}
}
},
"terminal": {
"description": "Terminal device",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"rootfs",
"entries"
],
"anyOf": [
{
"required": [
"bios"
]
},
{
"required": [
"uefi"
]
}
],
"properties": {
"rootfs": {
"$ref": "#/definitions/filesystem"
},
"bootfs": {
"$ref": "#/definitions/filesystem"
},
"bios": {
"description": "Include bios boot support",
"type": "object",
"required": [
"platform"
],
"properties": {
"platform": {
"type": "string",
"enum": [
"i386-pc",
"powerpc-ieee1275"
]
}
}
},
"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": "^(.+)$"
},
"install": {
"description": "Install EFI binaries and data from the build root",
"type": "boolean",
"default": false
}
}
},
"write_defaults": {
"description": "Whether to write /etc/defaults/grub",
"type": "boolean",
"default": true
},
"entries": {
"description": "List of entries to add to the boot menu",
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"product",
"kernel"
],
"properties": {
"default": {
"type": "boolean",
"description": "Make this entry the default entry"
},
"id": {
"description": "UUID for the entry (grub uses the root fs uuid)",
"type": "string"
},
"product": {
"type": "object",
"additionalProperties": false,
"required": [
"name",
"version"
],
"properties": {
"name": {
"type": "string"
},
"nick": {
"type": "string"
},
"version": {
"type": "string"
}
}
},
"kernel": {
"description": "The kernel (EVRA)",
"type": "string"
}
}
}
},
"config": {
"description": "Configuration options for grub itself",
"type": "object",
"additionalProperties": false,
"properties": {
"cmdline": {
"description": "Additional kernel command line options",
"type": "string"
},
"default": {
"description": "Default boot entry",
"type": "string",
"default": "saved"
},
"disable_recovery": {
"type": "boolean",
"default": true
},
"disable_submenu": {
"type": "boolean",
"default": true
},
"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"
],
"default": "countdown"
},
"serial": {
"description": "The command to configure the serial console",
"type": "string"
}
}
}
}
}
}