1
// This Source Code Form is subject to the terms of the Mozilla Public
2
// License, v. 2.0. If a copy of the MPL was not distributed with this
3
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
"github.com/siderolabs/go-pointer"
10
"github.com/siderolabs/talos/pkg/machinery/constants"
16
// MinRAWDiskSize is the minimum size disk we can create. Used for metal images.
17
MinRAWDiskSize = 1246 * mib
19
// DefaultRAWDiskSize is the value we use for any non-metal images by default.
20
DefaultRAWDiskSize = 8192 * mib
23
// Default describes built-in profiles.
24
var Default = map[string]Profile{
27
Platform: constants.PlatformMetal,
28
SecureBoot: pointer.To(false),
31
OutFormat: OutFormatRaw,
35
Platform: constants.PlatformMetal,
36
SecureBoot: pointer.To(true),
39
OutFormat: OutFormatRaw,
40
ISOOptions: &ISOOptions{
41
SDBootEnrollKeys: SDBootEnrollKeysIfSafe,
47
Platform: constants.PlatformMetal,
48
SecureBoot: pointer.To(false),
51
OutFormat: OutFormatZSTD,
52
ImageOptions: &ImageOptions{
53
DiskSize: MinRAWDiskSize,
54
DiskFormat: DiskFormatRaw,
59
Platform: constants.PlatformMetal,
60
SecureBoot: pointer.To(true),
63
OutFormat: OutFormatZSTD,
64
ImageOptions: &ImageOptions{
65
DiskSize: MinRAWDiskSize,
66
DiskFormat: DiskFormatRaw,
72
SecureBoot: pointer.To(false),
74
Kind: OutKindInstaller,
75
OutFormat: OutFormatRaw,
78
"secureboot-installer": {
80
SecureBoot: pointer.To(true),
82
Kind: OutKindInstaller,
83
OutFormat: OutFormatRaw,
89
SecureBoot: pointer.To(false),
92
OutFormat: OutFormatGZ,
93
ImageOptions: &ImageOptions{
94
DiskSize: MinRAWDiskSize,
95
DiskFormat: DiskFormatRaw,
101
SecureBoot: pointer.To(false),
104
OutFormat: OutFormatZSTD,
105
ImageOptions: &ImageOptions{
106
DiskSize: DefaultRAWDiskSize,
107
DiskFormat: DiskFormatRaw,
113
SecureBoot: pointer.To(false),
116
OutFormat: OutFormatZSTD,
117
ImageOptions: &ImageOptions{
118
DiskSize: DefaultRAWDiskSize,
119
DiskFormat: DiskFormatVPC,
120
DiskFormatOptions: "subformat=fixed,force_size",
125
Platform: "digital-ocean",
126
SecureBoot: pointer.To(false),
129
OutFormat: OutFormatGZ,
130
ImageOptions: &ImageOptions{
131
DiskSize: DefaultRAWDiskSize,
132
DiskFormat: DiskFormatRaw,
137
Platform: "exoscale",
138
SecureBoot: pointer.To(false),
141
OutFormat: OutFormatZSTD,
142
ImageOptions: &ImageOptions{
143
DiskSize: 10 * 1024 * mib,
144
DiskFormat: DiskFormatQCOW2,
145
DiskFormatOptions: "cluster_size=8k",
151
SecureBoot: pointer.To(false),
154
OutFormat: OutFormatTar,
155
ImageOptions: &ImageOptions{
156
DiskSize: DefaultRAWDiskSize,
157
DiskFormat: DiskFormatRaw,
163
SecureBoot: pointer.To(false),
166
OutFormat: OutFormatZSTD,
167
ImageOptions: &ImageOptions{
168
DiskSize: MinRAWDiskSize,
169
DiskFormat: DiskFormatRaw,
175
SecureBoot: pointer.To(false),
178
OutFormat: OutFormatZSTD,
179
ImageOptions: &ImageOptions{
180
DiskSize: MinRAWDiskSize,
181
DiskFormat: DiskFormatRaw,
186
Platform: "opennebula",
187
SecureBoot: pointer.To(false),
190
OutFormat: OutFormatZSTD,
191
ImageOptions: &ImageOptions{
192
DiskSize: MinRAWDiskSize,
193
DiskFormat: DiskFormatRaw,
198
Platform: "openstack",
199
SecureBoot: pointer.To(false),
202
OutFormat: OutFormatZSTD,
203
ImageOptions: &ImageOptions{
204
DiskSize: MinRAWDiskSize,
205
DiskFormat: DiskFormatRaw,
211
SecureBoot: pointer.To(false),
214
OutFormat: OutFormatZSTD,
215
ImageOptions: &ImageOptions{
216
DiskSize: DefaultRAWDiskSize,
217
DiskFormat: DiskFormatQCOW2,
218
DiskFormatOptions: "cluster_size=8k",
223
Platform: "scaleway",
224
SecureBoot: pointer.To(false),
227
OutFormat: OutFormatZSTD,
228
ImageOptions: &ImageOptions{
229
DiskSize: MinRAWDiskSize,
230
DiskFormat: DiskFormatRaw,
236
SecureBoot: pointer.To(false),
239
OutFormat: OutFormatZSTD,
240
ImageOptions: &ImageOptions{
241
DiskSize: DefaultRAWDiskSize,
242
DiskFormat: DiskFormatRaw,
248
SecureBoot: pointer.To(false),
251
OutFormat: OutFormatRaw,
252
ImageOptions: &ImageOptions{
253
DiskSize: DefaultRAWDiskSize,
254
DiskFormat: DiskFormatOVA,
260
SecureBoot: pointer.To(false),
263
OutFormat: OutFormatZSTD,
264
ImageOptions: &ImageOptions{
265
DiskSize: DefaultRAWDiskSize,
266
DiskFormat: DiskFormatRaw,
271
constants.BoardRPiGeneric: {
273
Platform: constants.PlatformMetal,
274
Board: constants.BoardRPiGeneric,
275
SecureBoot: pointer.To(false),
278
OutFormat: OutFormatZSTD,
279
ImageOptions: &ImageOptions{
280
DiskSize: MinRAWDiskSize,
281
DiskFormat: DiskFormatRaw,
285
constants.BoardRock64: {
287
Platform: constants.PlatformMetal,
288
Board: constants.BoardRock64,
289
SecureBoot: pointer.To(false),
292
OutFormat: OutFormatZSTD,
293
ImageOptions: &ImageOptions{
294
DiskSize: MinRAWDiskSize,
295
DiskFormat: DiskFormatRaw,
299
constants.BoardBananaPiM64: {
301
Platform: constants.PlatformMetal,
302
Board: constants.BoardBananaPiM64,
303
SecureBoot: pointer.To(false),
306
OutFormat: OutFormatZSTD,
307
ImageOptions: &ImageOptions{
308
DiskSize: MinRAWDiskSize,
309
DiskFormat: DiskFormatRaw,
313
constants.BoardLibretechAllH3CCH5: {
315
Platform: constants.PlatformMetal,
316
Board: constants.BoardLibretechAllH3CCH5,
317
SecureBoot: pointer.To(false),
320
OutFormat: OutFormatZSTD,
321
ImageOptions: &ImageOptions{
322
DiskSize: MinRAWDiskSize,
323
DiskFormat: DiskFormatRaw,
327
constants.BoardRockpi4: {
329
Platform: constants.PlatformMetal,
330
Board: constants.BoardRockpi4,
331
SecureBoot: pointer.To(false),
334
OutFormat: OutFormatZSTD,
335
ImageOptions: &ImageOptions{
336
DiskSize: MinRAWDiskSize,
337
DiskFormat: DiskFormatRaw,
341
constants.BoardRockpi4c: {
343
Platform: constants.PlatformMetal,
344
Board: constants.BoardRockpi4c,
345
SecureBoot: pointer.To(false),
348
OutFormat: OutFormatZSTD,
349
ImageOptions: &ImageOptions{
350
DiskSize: MinRAWDiskSize,
351
DiskFormat: DiskFormatRaw,
355
constants.BoardPine64: {
357
Platform: constants.PlatformMetal,
358
Board: constants.BoardPine64,
359
SecureBoot: pointer.To(false),
362
OutFormat: OutFormatZSTD,
363
ImageOptions: &ImageOptions{
364
DiskSize: MinRAWDiskSize,
365
DiskFormat: DiskFormatRaw,
369
constants.BoardJetsonNano: {
371
Platform: constants.PlatformMetal,
372
Board: constants.BoardJetsonNano,
373
SecureBoot: pointer.To(false),
376
OutFormat: OutFormatZSTD,
377
ImageOptions: &ImageOptions{
378
DiskSize: MinRAWDiskSize,
379
DiskFormat: DiskFormatRaw,
383
constants.BoardNanoPiR4S: {
385
Platform: constants.PlatformMetal,
386
Board: constants.BoardNanoPiR4S,
387
SecureBoot: pointer.To(false),
390
OutFormat: OutFormatZSTD,
391
ImageOptions: &ImageOptions{
392
DiskSize: MinRAWDiskSize,
393
DiskFormat: DiskFormatRaw,