1SYSTEMD-GPT-AUTO-GENERATOR(s8y)stemd-gpt-auto-generatSoYrSTEMD-GPT-AUTO-GENERATOR(8)
2
3
4

NAME

6       systemd-gpt-auto-generator - Generator for automatically discovering
7       and mounting root, /home and /srv partitions, as well as discovering
8       and enabling swap partitions, based on GPT partition type GUIDs.
9

SYNOPSIS

11       /usr/lib/systemd/system-generators/systemd-gpt-auto-generator
12

DESCRIPTION

14       systemd-gpt-auto-generator is a unit generator that automatically
15       discovers root, /home/, /srv/, the EFI System Partition, the Extended
16       Boot Loader Partition and swap partitions and creates mount and swap
17       units for them, based on the partition type GUIDs of GUID partition
18       tables (GPT), see UEFI Specification[1], chapter 5. It implements the
19       Discoverable Partitions Specification[2]. Note that this generator has
20       no effect on non-GPT systems, and on specific mount points that are
21       directories already containing files. Also, on systems where the units
22       are explicitly configured (for example, listed in fstab(5)), the units
23       this generator creates are overridden, but additional implicit
24       dependencies might be created.
25
26       This generator will only look for root partitions on the same physical
27       disk the EFI System Partition (ESP) is located on. It will only look
28       for the other partitions on the same physical disk the root file system
29       is located on. These partitions will not be searched for on systems
30       where the root file system is distributed on multiple disks, for
31       example via btrfs RAID.
32
33       systemd-gpt-auto-generator is useful for centralizing file system
34       configuration in the partition table and making configuration in
35       /etc/fstab unnecessary.
36
37       This generator looks for the partitions based on their partition type
38       GUID. The following partition type GUIDs are identified:
39
40       Table 1. Partition Type GUIDs
41       ┌─────────────────────────────────────┬──────────────────┬─────────────────┬──────────────────┐
42Partition Type                       Name             Mount Point     Explanation      
43GUID                                 │                  │                 │                  │
44       ├─────────────────────────────────────┼──────────────────┼─────────────────┼──────────────────┤
45       │44479540-f297-41b2-9af7-d131d5f0458a │ Root Partition   │ /               │ On 32-bit x86    │
46       │                                     │ (x86)            │                 │ systems, the     │
47       │                                     │                  │                 │ first x86 root   │
48       │                                     │                  │                 │ partition on the │
49       │                                     │                  │                 │ disk the EFI ESP │
50       │                                     │                  │                 │ is located on is │
51       │                                     │                  │                 │ mounted to the   │
52       │                                     │                  │                 │ root directory   │
53       │                                     │                  │                 │ /.               │
54       ├─────────────────────────────────────┼──────────────────┼─────────────────┼──────────────────┤
55       │4f68bce3-e8cd-4db1-96e7-fbcaf984b709 │ Root Partition   │ /               │ On 64-bit x86    │
56       │                                     │ (x86-64)         │                 │ systems, the     │
57       │                                     │                  │                 │ first x86-64     │
58       │                                     │                  │                 │ root partition   │
59       │                                     │                  │                 │ on the disk the  │
60       │                                     │                  │                 │ EFI ESP is       │
61       │                                     │                  │                 │ located on is    │
62       │                                     │                  │                 │ mounted to the   │
63       │                                     │                  │                 │ root directory   │
64       │                                     │                  │                 │ /.               │
65       ├─────────────────────────────────────┼──────────────────┼─────────────────┼──────────────────┤
66       │69dad710-2ce4-4e3c-b16c-21a1d49abed3 │ Root Partition   │ /               │ On 32-bit ARM    │
67       │                                     │ (32-bit ARM)     │                 │ systems, the     │
68       │                                     │                  │                 │ first ARM root   │
69       │                                     │                  │                 │ partition on the │
70       │                                     │                  │                 │ disk the EFI ESP │
71       │                                     │                  │                 │ is located on is │
72       │                                     │                  │                 │ mounted to the   │
73       │                                     │                  │                 │ root directory   │
74       │                                     │                  │                 │ /.               │
75       ├─────────────────────────────────────┼──────────────────┼─────────────────┼──────────────────┤
76       │b921b045-1df0-41c3-af44-4c6f280d3fae │ Root Partition   │ /               │ On 64-bit ARM    │
77       │                                     │ (64-bit ARM)     │                 │ systems, the     │
78       │                                     │                  │                 │ first ARM root   │
79       │                                     │                  │                 │ partition on the │
80       │                                     │                  │                 │ disk the EFI ESP │
81       │                                     │                  │                 │ is located on is │
82       │                                     │                  │                 │ mounted to the   │
83       │                                     │                  │                 │ root directory   │
84       │                                     │                  │                 │ /.               │
85       ├─────────────────────────────────────┼──────────────────┼─────────────────┼──────────────────┤
86       │993d8d3d-f80e-4225-855a-9daf8ed7ea97 │ Root Partition   │ /               │ On Itanium       │
87       │                                     │ (Itanium/IA-64)  │                 │ systems, the     │
88       │                                     │                  │                 │ first Itanium    │
89       │                                     │                  │                 │ root partition   │
90       │                                     │                  │                 │ on the disk the  │
91       │                                     │                  │                 │ EFI ESP is       │
92       │                                     │                  │                 │ located on is    │
93       │                                     │                  │                 │ mounted to the   │
94       │                                     │                  │                 │ root directory   │
95       │                                     │                  │                 │ /.               │
96       ├─────────────────────────────────────┼──────────────────┼─────────────────┼──────────────────┤
97       │933ac7e1-2eb4-4f13-b844-0e14e2aef915 │ Home Partition   │ /home/          │ The first home   │
98       │                                     │                  │                 │ partition on the │
99       │                                     │                  │                 │ disk the root    │
100       │                                     │                  │                 │ partition is     │
101       │                                     │                  │                 │ located on is    │
102       │                                     │                  │                 │ mounted to       │
103       │                                     │                  │                 │ /home.           │
104       ├─────────────────────────────────────┼──────────────────┼─────────────────┼──────────────────┤
105       │3b8f8425-20e0-4f3b-907f-1a25a76f98e8 │ Server Data      │ /srv/           │ The first server │
106       │                                     │ Partition        │                 │ data partition   │
107       │                                     │                  │                 │ on the disk the  │
108       │                                     │                  │                 │ root partition   │
109       │                                     │                  │                 │ is located on is │
110       │                                     │                  │                 │ mounted to /srv. │
111       ├─────────────────────────────────────┼──────────────────┼─────────────────┼──────────────────┤
112       │0657fd6d-a4ab-43c4-84e5-0933c84b4f4f │ Swap             │ n/a             │ All swap         │
113       │                                     │                  │                 │ partitions       │
114       │                                     │                  │                 │ located on the   │
115       │                                     │                  │                 │ disk the root    │
116       │                                     │                  │                 │ partition is     │
117       │                                     │                  │                 │ located on are   │
118       │                                     │                  │                 │ enabled.         │
119       ├─────────────────────────────────────┼──────────────────┼─────────────────┼──────────────────┤
120       │c12a7328-f81f-11d2-ba4b-00a0c93ec93b │ EFI System       │ /efi/ or /boot/ │ The first ESP    │
121       │                                     │ Partition (ESP)  │                 │ located on the   │
122       │                                     │                  │                 │ disk the root    │
123       │                                     │                  │                 │ partition is     │
124       │                                     │                  │                 │ located on is    │
125       │                                     │                  │                 │ mounted to /boot │
126       │                                     │                  │                 │ or /efi, see     │
127       │                                     │                  │                 │ below.           │
128       ├─────────────────────────────────────┼──────────────────┼─────────────────┼──────────────────┤
129       │bc13c2ff-59e6-4262-a352-b275fd6f7172 │ Extended Boot    │ /boot/          │ The first        │
130       │                                     │ Loader Partition │                 │ Extended Boot    │
131       │                                     │                  │                 │ Loader Partition │
132       │                                     │                  │                 │ is mounted to    │
133       │                                     │                  │                 │ /boot, see       │
134       │                                     │                  │                 │ below.           │
135       └─────────────────────────────────────┴──────────────────┴─────────────────┴──────────────────┘
136
137       This generator understands the following attribute flags for
138       partitions:
139
140       Table 2. Partition Attributes
141       ┌──────────────────────────────┬────────────────────┬─────────────────┬──────────────────┐
142Name                          Value              Applicable to   Explanation      
143       ├──────────────────────────────┼────────────────────┼─────────────────┼──────────────────┤
144GPT_FLAG_READ_ONLY            │ 0x1000000000000000 │ /, /home/,      │ Partition is     │
145       │                              │                    │ /srv/, Extended │ mounted          │
146       │                              │                    │ Boot Loader     │ read-only        │
147       │                              │                    │ Partition       │                  │
148       ├──────────────────────────────┼────────────────────┼─────────────────┼──────────────────┤
149GPT_FLAG_NO_AUTO              │ 0x8000000000000000 │ /, /home/,      │ Partition is not │
150       │                              │                    │ /srv/, Extended │ mounted          │
151       │                              │                    │ Boot Loader     │ automatically    │
152       │                              │                    │ Partition       │                  │
153       ├──────────────────────────────┼────────────────────┼─────────────────┼──────────────────┤
154GPT_FLAG_NO_BLOCK_IO_PROTOCOL │ 0x0000000000000002 │ EFI System      │ Partition is not │
155       │                              │                    │ Partition (ESP) │ mounted          │
156       │                              │                    │                 │ automatically    │
157       └──────────────────────────────┴────────────────────┴─────────────────┴──────────────────┘
158
159       The /home/ and /srv/ partitions may be encrypted in LUKS format. In
160       this case, a device mapper device is set up under the names
161       /dev/mapper/home and /dev/mapper/srv. Note that this might create
162       conflicts if the same partition is listed in /etc/crypttab with a
163       different device mapper device name.
164
165       When systemd is running in the initrd the / partition may be encrypted
166       in LUKS format as well. In this case, a device mapper device is set up
167       under the name /dev/mapper/root, and a sysroot.mount is set up that
168       mounts the device under /sysroot. For more information, see bootup(7).
169
170       Mount and automount units for the EFI System Partition (ESP) are
171       generated on EFI systems. The ESP is mounted to /boot/ (except if an
172       Extended Boot Loader partition exists, see below), unless a mount point
173       directory /efi/ exists, in which case it is mounted there. Since this
174       generator creates an automount unit, the mount will only be activated
175       on-demand, when accessed. On systems where /boot/ (or /efi/ if it
176       exists) is an explicitly configured mount (for example, listed in
177       fstab(5)) or where the /boot/ (or /efi/) mount point is non-empty, no
178       mount units are generated.
179
180       If the disk contains an Extended Boot Loader partition, as defined in
181       the Boot Loader Specification[3], it is made available at /boot (by
182       means of an automount point, similar to the ESP, see above). If both an
183       EFI System Partition and an Extended Boot Loader partition exist the
184       latter is preferably mounted to /boot/. Make sure to create both /efi/
185       and /boot/ to ensure both partitions are mounted.
186
187       When using this generator in conjunction with btrfs file systems, make
188       sure to set the correct default subvolumes on them, using btrfs
189       subvolume set-default.
190
191       systemd-gpt-auto-generator implements systemd.generator(7).
192

KERNEL COMMAND LINE

194       systemd-gpt-auto-generator understands the following kernel command
195       line parameters:
196
197       systemd.gpt_auto, rd.systemd.gpt_auto
198           Those options take an optional boolean argument, and default to
199           yes. The generator is enabled by default, and a negative value may
200           be used to disable it.
201
202       root=
203           When used with the special value "gpt-auto", automatic discovery of
204           the root partition based on the GPT partition type is enabled. Any
205           other value disables this generator.
206
207       rw, ro
208           Mount the root partition read-write or read-only initially.
209
210           Note that unlike most kernel command line options these settings do
211           not override configuration in the file system, and the file system
212           may be remounted later. See systemd-remount-fs.service(8).
213

SEE ALSO

215       systemd(1), systemd.mount(5), systemd.swap(5), systemd-fstab-
216       generator(8), systemd-cryptsetup@.service(8), cryptsetup(8), fstab(5),
217       btrfs(8)
218

NOTES

220        1. UEFI Specification
221           https://uefi.org/specifications
222
223        2. Discoverable Partitions Specification
224           https://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec/
225
226        3. Boot Loader Specification
227           https://systemd.io/BOOT_LOADER_SPECIFICATION
228
229
230
231systemd 243                                      SYSTEMD-GPT-AUTO-GENERATOR(8)
Impressum