talm
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/.
4
5package partition
6
7// Type in partition table.
8type Type = string
9
10// GPT partition types.
11//
12// TODO: should be moved into the blockdevice library.
13const (
14EFISystemPartition Type = "C12A7328-F81F-11D2-BA4B-00A0C93EC93B"
15BIOSBootPartition Type = "21686148-6449-6E6F-744E-656564454649"
16LinuxFilesystemData Type = "0FC63DAF-8483-4772-8E79-3D69D8477DE4"
17)
18
19// FileSystemType is used to format partitions.
20type FileSystemType = string
21
22// Filesystem types.
23const (
24FilesystemTypeNone FileSystemType = "none"
25FilesystemTypeXFS FileSystemType = "xfs"
26FilesystemTypeVFAT FileSystemType = "vfat"
27)
28
29// Partition default sizes.
30const (
31MiB = 1024 * 1024
32
33EFISize = 100 * MiB
34BIOSGrubSize = 1 * MiB
35BootSize = 1000 * MiB
36// EFIUKISize is the size of the EFI partition when UKI is enabled.
37// With UKI all assets are stored in the EFI partition.
38// This is the size of the old EFISize + BIOSGrubSize + BootSize.
39EFIUKISize = EFISize + BIOSGrubSize + BootSize
40MetaSize = 1 * MiB
41StateSize = 100 * MiB
42)
43