Debian Codegraph @

upstream/debian-trixie/man8/systemd-gpt-auto-generator.8

raw
1 '\" t
2 .TH "SYSTEMD\-GPT\-AUTO\-GENERATOR" "8" "" "systemd 257.13" "systemd-gpt-auto-generator"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 systemd-gpt-auto-generator \- Generator for automatically discovering and mounting root, /home/, /srv/, /var/ and /var/tmp/ partitions, as well as discovering and enabling swap partitions, based on GPT partition type GUIDs
24 .SH "SYNOPSIS"
25 .PP
26 /usr/lib/systemd/system\-generators/systemd\-gpt\-auto\-generator
27 .SH "DESCRIPTION"
28 .PP
29 systemd\-gpt\-auto\-generator
30 is a unit generator that automatically discovers the root partition,
31 /home/,
32 /srv/,
33 /var/,
34 /var/tmp/, the EFI System Partition (ESP), the Extended Boot Loader Partition (XBOOTLDR), and swap partitions and creates mount and swap units for them, based on the partition type GUIDs of GUID partition tables (GPT)\&. See
35 \m[blue]\fBUEFI Specification\fR\m[]\&\s-2\u[1]\d\s+2, chapter 5 for more details\&. It implements the
36 \m[blue]\fBDiscoverable Partitions Specification\fR\m[]\&\s-2\u[2]\d\s+2\&.
37 .PP
38 Note that this generator has no effect on non\-GPT systems\&. It will also not create mount point configuration for directories which already contain files or if the mount point is explicitly configured in
39 \fBfstab\fR(5)\&. Additionally no unit will be created for the ESP or the XBOOTLDR partition if mount entries are found in the
40 /boot/
41 or
42 /efi/
43 hierarchies in
44 \fBfstab\fR(5)\&.
45 .PP
46 If the units this generator creates are overridden, for example by units in directories with higher precedence, drop\-ins and additional dependencies created by this generator might still be used\&.
47 .PP
48 This generator will only look for the root partition on the same physical disk where the EFI System Partition (ESP) is located\&. Note that support from the boot loader is required: the EFI variable
49 \fILoaderDevicePartUUID\fR
50 of the
51 \fB4a67b082\-0a4c\-41cf\-b6c7\-440b29bb8c4f\fR
52 vendor UUID is used to determine from which partition, and hence the disk, from which the system was booted\&. If the boot loader does not set this variable, this generator will not be able to detect the root partition\&. See the
53 \m[blue]\fBBoot Loader Interface\fR\m[]\&\s-2\u[3]\d\s+2
54 for details\&.
55 .PP
56 Similarly, this generator will only look for the other partitions on the same physical disk as the root partition\&. In this case, boot loader support is not required\&. These partitions will not be searched for on systems where the root file system is distributed on multiple disks, for example via btrfs RAID\&.
57 .PP
58 systemd\-gpt\-auto\-generator
59 is useful for centralizing file system configuration in the partition table and making configuration in
60 /etc/fstab
61 or on the kernel command line unnecessary\&.
62 .PP
63 This generator looks for the partitions based on their partition type GUID\&. The following partition type GUIDs are identified:
64 .sp
65 .it 1 an-trap
66 .nr an-no-space-flag 1
67 .nr an-break-flag 1
68 .br
69 .B Table\ \&1.\ \&Partition Type GUIDs
70 .TS
71 allbox tab(:);
72 lB lB lB lB lB.
73 T{
74 Partition Type
75 T}:T{
76 GUID
77 T}:T{
78 Name
79 T}:T{
80 Mount Point
81 T}:T{
82 Explanation
83 T}
84 .T&
85 l l l l l
86 l l l l l
87 l l l l l
88 l l l l l
89 l l l l l
90 l l l l l
91 l l l l l
92 l l l l l
93 l l l l l
94 l l l l l.
95 T{
96 \fBSD_GPT_ROOT_X86_64\fR
97 T}:T{
98 \fB4f68bce3\-e8cd\-4db1\-96e7\-fbcaf984b709\fR
99 T}:T{
100 Root Partition (x86\-64)
101 T}:T{
102 /
103 T}:T{
104 The first partition with this type UUID, located on the same disk as the ESP used for booting, is used as the root file system / on AMD64 / 64\-bit x86 systems\&.
105 T}
106 T{
107 \fBSD_GPT_ROOT_ARM64\fR
108 T}:T{
109 \fBb921b045\-1df0\-41c3\-af44\-4c6f280d3fae\fR
110 T}:T{
111 Root Partition (64\-bit ARM)
112 T}:T{
113 /
114 T}:T{
115 The first partition with this type UUID, located on the same disk as the ESP used for booting, is used as the root file system / on AArch64 / 64\-bit ARM systems\&.
116 T}
117 T{
118 \fBSD_GPT_ROOT_ALPHA\fR \fBSD_GPT_ROOT_ARC\fR \fBSD_GPT_ROOT_ARM\fR \fBSD_GPT_ROOT_ARM64\fR \fBSD_GPT_ROOT_IA64\fR \fBSD_GPT_ROOT_LOONGARCH64\fR \fBSD_GPT_ROOT_MIPS\fR \fBSD_GPT_ROOT_MIPS64\fR \fBSD_GPT_ROOT_MIPS_LE\fR \fBSD_GPT_ROOT_MIPS64_LE\fR \fBSD_GPT_ROOT_PARISC\fR \fBSD_GPT_ROOT_PPC\fR \fBSD_GPT_ROOT_PPC64\fR \fBSD_GPT_ROOT_PPC64_LE\fR \fBSD_GPT_ROOT_RISCV32\fR \fBSD_GPT_ROOT_RISCV64\fR \fBSD_GPT_ROOT_S390\fR \fBSD_GPT_ROOT_S390X\fR \fBSD_GPT_ROOT_TILEGX\fR \fBSD_GPT_ROOT_X86\fR \fBSD_GPT_ROOT_X86_64\fR \fBSD_GPT_USR_ALPHA\fR \fBSD_GPT_USR_ARC\fR \fBSD_GPT_USR_ARM\fR \fBSD_GPT_USR_IA64\fR \fBSD_GPT_USR_LOONGARCH64\fR \fBSD_GPT_USR_MIPS_LE\fR \fBSD_GPT_USR_MIPS64_LE\fR \fBSD_GPT_USR_PARISC\fR \fBSD_GPT_USR_PPC\fR \fBSD_GPT_USR_PPC64\fR \fBSD_GPT_USR_PPC64_LE\fR \fBSD_GPT_USR_RISCV32\fR \fBSD_GPT_USR_RISCV64\fR \fBSD_GPT_USR_S390\fR \fBSD_GPT_USR_S390X\fR \fBSD_GPT_USR_TILEGX\fR \fBSD_GPT_USR_X86\fR
119 T}:T{
120 \&...
121 T}:T{
122 Root partitions for other architectures
123 T}:T{
124 /
125 T}:T{
126 The first partition with the type UUID matching the architecture, located on the same disk as the ESP used for booting, is used as the root file system /\&. For the full list and constant values, see \m[blue]\fBDiscoverable Partitions Specification\fR\m[]\&\s-2\u[2]\d\s+2\&.
127 T}
128 T{
129 \fBSD_GPT_HOME\fR
130 T}:T{
131 \fB933ac7e1\-2eb4\-4f13\-b844\-0e14e2aef915\fR
132 T}:T{
133 Home Partition
134 T}:T{
135 /home/
136 T}:T{
137 The first partition with this type UUID on the same disk as the root partition is mounted to /home/\&.
138 T}
139 T{
140 \fBSD_GPT_SRV\fR
141 T}:T{
142 \fB3b8f8425\-20e0\-4f3b\-907f\-1a25a76f98e8\fR
143 T}:T{
144 Server Data Partition
145 T}:T{
146 /srv/
147 T}:T{
148 The first partition with this type UUID on the same disk as the root partition is mounted to /srv/\&.
149 T}
150 T{
151 \fBSD_GPT_VAR\fR
152 T}:T{
153 \fB4d21b016\-b534\-45c2\-a9fb\-5c16e091fd2d\fR
154 T}:T{
155 Variable Data Partition
156 T}:T{
157 /var/
158 T}:T{
159 The first partition with this type UUID on the same disk as the root partition is mounted to /var/ \(em under the condition its partition UUID matches the first 128 bit of the HMAC\-SHA256 of the GPT type uuid of this partition keyed by the machine ID of the installation stored in \fBmachine-id\fR(5)\&. This can be generated using \fBsystemd-id128\fR(1)\&.
160 T}
161 T{
162 \fBSD_GPT_TMP\fR
163 T}:T{
164 \fB7ec6f557\-3bc5\-4aca\-b293\-16ef5df639d1\fR
165 T}:T{
166 Temporary Data Partition
167 T}:T{
168 /var/tmp/
169 T}:T{
170 The first partition with this type UUID on the same disk as the root partition is mounted to /var/tmp/\&.
171 T}
172 T{
173 \fBSD_GPT_SWAP\fR
174 T}:T{
175 \fB0657fd6d\-a4ab\-43c4\-84e5\-0933c84b4f4f\fR
176 T}:T{
177 Swap
178 T}:T{
179 n/a
180 T}:T{
181 All partitions with this type UUID on the same disk as the root partition are used as swap\&.
182 T}
183 T{
184 \fBSD_GPT_ESP\fR
185 T}:T{
186 \fBc12a7328\-f81f\-11d2\-ba4b\-00a0c93ec93b\fR
187 T}:T{
188 EFI System Partition (ESP)
189 T}:T{
190 /efi/ or /boot/
191 T}:T{
192 The first partition with this type UUID located on the same disk as the root partition is mounted to /boot/ or /efi/, see below\&.
193 T}
194 T{
195 \fBSD_GPT_XBOOTLDR\fR
196 T}:T{
197 \fBbc13c2ff\-59e6\-4262\-a352\-b275fd6f7172\fR
198 T}:T{
199 Extended Boot Loader Partition
200 T}:T{
201 /boot/
202 T}:T{
203 The first partition with this type UUID located on the same disk as the root partition is mounted to /boot/, see below\&.
204 T}
205 .TE
206 .sp 1
207 .PP
208 This generator understands the following attribute flags for partitions:
209 .sp
210 .it 1 an-trap
211 .nr an-no-space-flag 1
212 .nr an-break-flag 1
213 .br
214 .B Table\ \&2.\ \&Partition Attribute Flags
215 .TS
216 allbox tab(:);
217 lB lB lB lB.
218 T{
219 Flag
220 T}:T{
221 Value
222 T}:T{
223 Applicable to
224 T}:T{
225 Explanation
226 T}
227 .T&
228 l l l l
229 l l l l
230 l l l l.
231 T{
232 \fBSD_GPT_FLAG_READ_ONLY\fR
233 T}:T{
234 \fB0x1000000000000000\fR
235 T}:T{
236 /, /home/, /srv/, /var/, /var/tmp/, Extended Boot Loader Partition
237 T}:T{
238 Partition is mounted read\-only
239 T}
240 T{
241 \fBSD_GPT_FLAG_NO_AUTO\fR
242 T}:T{
243 \fB0x8000000000000000\fR
244 T}:T{
245 /, /home/, /srv/, /var/, /var/tmp/, Extended Boot Loader Partition
246 T}:T{
247 Partition is not mounted automatically
248 T}
249 T{
250 \fBSD_GPT_FLAG_NO_BLOCK_IO_PROTOCOL\fR
251 T}:T{
252 \fB0x0000000000000002\fR
253 T}:T{
254 EFI System Partition (ESP)
255 T}:T{
256 Partition is not mounted automatically
257 T}
258 .TE
259 .sp 1
260 .PP
261 The
262 /home/,
263 /srv/,
264 /var/,
265 /var/tmp/
266 and swap partitions may be encrypted in LUKS format\&. In this case, a device mapper device is set up under the names
267 /dev/mapper/home,
268 /dev/mapper/srv,
269 /dev/mapper/var,
270 /dev/mapper/tmp
271 or
272 /dev/mapper/swap\&. Note that this might create conflicts if the same partition is listed in
273 /etc/crypttab
274 with a different device mapper device name\&.
275 .PP
276 When systemd is running in the initrd the
277 /
278 partition may be encrypted with LUKS as well\&. In this case, a device mapper device is set up under the name
279 /dev/mapper/root, and a
280 sysroot\&.mount
281 is set up that mounts the device under
282 /sysroot\&. For more information, see
283 \fBbootup\fR(7)\&.
284 .PP
285 The root partition can be specified by symlinking
286 /run/systemd/volatile\-root
287 to
288 /dev/block/$major:$minor\&. This is especially useful if the root mount has been replaced by some form of volatile file system (overlayfs)\&.
289 .PP
290 Mount and automount units for the EFI System Partition (ESP) and Extended Boot Loader Partition (XBOOTLDR) are generated on EFI systems\&. If the disk contains an XBOOTLDR partition, as defined in the
291 \m[blue]\fBBoot Loader Specification\fR\m[]\&\s-2\u[4]\d\s+2, it is made available at
292 /boot/\&. This generator creates an automount unit; the mount will only be activated on\-demand when accessed\&. The mount point will be created if necessary\&.
293 .PP
294 The ESP is mounted to
295 /boot/
296 if that directory exists and is not used for XBOOTLDR, and otherwise to
297 /efi/\&. Same as for
298 /boot/, an automount unit is used\&. The mount point will be created if necessary\&.
299 .PP
300 No configuration is created for mount points that are configured in
301 \fBfstab\fR(5)
302 or when the target directory contains files\&.
303 .PP
304 When using this generator in conjunction with btrfs file systems, make sure to set the correct default subvolumes on them, using
305 \fBbtrfs subvolume set\-default\fR\&.
306 .PP
307 If the system was booted via
308 \fBsystemd-stub\fR(7)
309 and the stub reported to userspace that the kernel image was measured to a TPM2 PCR, then any discovered root and
310 /var/
311 volume identifiers (and volume encryption key in case it is encrypted) will be automatically measured into PCR 15 on activation, via
312 \[email protected]\fR(8)\&.
313 .PP
314 systemd\-gpt\-auto\-generator
315 implements
316 \fBsystemd.generator\fR(7)\&.
317 .SH "KERNEL COMMAND LINE"
318 .PP
319 systemd\-gpt\-auto\-generator
320 understands the following kernel command line parameters:
321 .PP
322 \fIsystemd\&.gpt_auto\fR, \fIrd\&.systemd\&.gpt_auto\fR
323 .RS 4
324 Those options take an optional boolean argument, and default to yes\&. The generator is enabled by default, and a false value may be used to disable it (e\&.g\&.
325 "systemd\&.gpt_auto=0")\&.
326 .sp
327 Added in version 242\&.
328 .RE
329 .PP
330 \fIsystemd\&.image_policy=\fR
331 .RS 4
332 Takes an image dissection policy string as argument (as per
333 \fBsystemd.image-policy\fR(7)), and allows enforcing a policy on dissection and use of the automatically discovered GPT partition table entries\&.
334 .sp
335 Added in version 254\&.
336 .RE
337 .PP
338 \fIroot=\fR, \fIrootfstype=\fR, \fIrootflags=\fR
339 .RS 4
340 When
341 \fIroot=\fR
342 is used with the special value
343 "gpt\-auto"
344 (or if the parameter is not used at all), automatic discovery of the root partition based on the GPT partition type is enabled\&. Any other value disables this logic\&.
345 .sp
346 The
347 \fIrootfstype=\fR
348 and
349 \fIrootflags=\fR
350 are used to select the file system type and options when the root file system is automatically discovered\&.
351 .sp
352 Added in version 242\&.
353 .RE
354 .PP
355 \fIrw\fR, \fIro\fR
356 .RS 4
357 Mount the root partition read\-write or read\-only
358 \fIinitially\fR\&.
359 .sp
360 Note that unlike most kernel command line options these settings do not override configuration in the file system, and the file system may be remounted later\&. See
361 \fBsystemd-remount-fs.service\fR(8)\&.
362 .sp
363 Added in version 242\&.
364 .RE
365 .PP
366 \fIsystemd\&.swap=\fR
367 .RS 4
368 Takes a boolean argument or enables the option if specified without an argument\&. If disabled, automatic discovery of swap partition(s) based on GPT partition type is disabled\&. Defaults to enabled\&.
369 .sp
370 Added in version 254\&.
371 .RE
372 .SH "SEE ALSO"
373 .PP
374 \fBsystemd\fR(1), \fBsystemd.mount\fR(5), \fBsystemd.swap\fR(5), \fBsystemd-fstab-generator\fR(8), \[email protected]\fR(8), \[email protected]\fR(8), \fBmachine-id\fR(5), \fBcryptsetup\fR(8), \fBfstab\fR(5), \fBbtrfs\fR(8)
375 .SH "NOTES"
376 .IP " 1." 4
377 UEFI Specification
378 .RS 4
379 \%https://uefi.org/specifications
380 .RE
381 .IP " 2." 4
382 Discoverable Partitions Specification
383 .RS 4
384 \%https://uapi-group.org/specifications/specs/discoverable_partitions_specification
385 .RE
386 .IP " 3." 4
387 Boot Loader Interface
388 .RS 4
389 \%https://systemd.io/BOOT_LOADER_INTERFACE
390 .RE
391 .IP " 4." 4
392 Boot Loader Specification
393 .RS 4
394 \%https://uapi-group.org/specifications/specs/boot_loader_specification
395 .RE