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/, /srv/, /var/ and /var/tmp/ partitions, as
8       well as discovering and enabling swap partitions, based on GPT
9       partition type GUIDs
10

SYNOPSIS

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

DESCRIPTION

15       systemd-gpt-auto-generator is a unit generator that automatically
16       discovers root, /home/, /srv/, /var/, /var/tmp/, the EFI System
17       Partition, the Extended Boot Loader Partition and swap partitions and
18       creates mount and swap units for them, based on the partition type
19       GUIDs of GUID partition tables (GPT), see UEFI Specification[1],
20       chapter 5. It implements the Discoverable Partitions Specification[2].
21       Note that this generator has no effect on non-GPT systems, and on
22       specific mount points that are directories already containing files.
23       Also, on systems where the units are explicitly configured (for
24       example, listed in fstab(5)), the units this generator creates are
25       overridden, but additional implicit dependencies might be created.
26
27       This generator will only look for the root partition on the same
28       physical disk the EFI System Partition (ESP) is located on. Note that
29       support from the boot loader is required: the EFI variable
30       LoaderDevicePartUUID of the 4a67b082-0a4c-41cf-b6c7-440b29bb8c4f vendor
31       UUID is used to determine from which partition, and hence the disk from
32       which the system was booted. If the boot loader does not set this
33       variable, this generator will not be able to autodetect the root
34       partition. See the Boot Loader Interface[3] for details.
35
36       Similarly, this generator will only look for the other partitions on
37       the same physical disk as the root partition. In this case, boot loader
38       support is not required. These partitions will not be searched for on
39       systems where the root file system is distributed on multiple disks,
40       for example via btrfs RAID.
41
42       systemd-gpt-auto-generator is useful for centralizing file system
43       configuration in the partition table and making configuration in
44       /etc/fstab or on the kernel command line unnecessary.
45
46       This generator looks for the partitions based on their partition type
47       GUID. The following partition type GUIDs are identified:
48
49       Table 1. Partition Type GUIDs
50       ┌─────────────────────────────────────┬──────────────────┬─────────────────┬──────────────────┐
51Partition Type                       Name             Mount Point     Explanation      
52GUID                                 │                  │                 │                  │
53       ├─────────────────────────────────────┼──────────────────┼─────────────────┼──────────────────┤
54       │44479540-f297-41b2-9af7-d131d5f0458a │ Root Partition   │ /               │ On 32-bit x86    │
55       │                                     │ (x86)            │                 │ systems, the     │
56       │                                     │                  │                 │ first x86 root   │
57       │                                     │                  │                 │ partition on the │
58       │                                     │                  │                 │ disk the EFI ESP │
59       │                                     │                  │                 │ is located on is │
60       │                                     │                  │                 │ mounted to the   │
61       │                                     │                  │                 │ root directory   │
62       │                                     │                  │                 │ /.               │
63       ├─────────────────────────────────────┼──────────────────┼─────────────────┼──────────────────┤
64       │4f68bce3-e8cd-4db1-96e7-fbcaf984b709 │ Root Partition   │ /               │ On 64-bit x86    │
65       │                                     │ (x86-64)         │                 │ systems, the     │
66       │                                     │                  │                 │ first x86-64     │
67       │                                     │                  │                 │ root partition   │
68       │                                     │                  │                 │ on the disk the  │
69       │                                     │                  │                 │ EFI ESP is       │
70       │                                     │                  │                 │ located on is    │
71       │                                     │                  │                 │ mounted to the   │
72       │                                     │                  │                 │ root directory   │
73       │                                     │                  │                 │ /.               │
74       ├─────────────────────────────────────┼──────────────────┼─────────────────┼──────────────────┤
75       │69dad710-2ce4-4e3c-b16c-21a1d49abed3 │ Root Partition   │ /               │ On 32-bit ARM    │
76       │                                     │ (32-bit ARM)     │                 │ systems, the     │
77       │                                     │                  │                 │ first ARM root   │
78       │                                     │                  │                 │ partition on the │
79       │                                     │                  │                 │ disk the EFI ESP │
80       │                                     │                  │                 │ is located on is │
81       │                                     │                  │                 │ mounted to the   │
82       │                                     │                  │                 │ root directory   │
83       │                                     │                  │                 │ /.               │
84       ├─────────────────────────────────────┼──────────────────┼─────────────────┼──────────────────┤
85       │b921b045-1df0-41c3-af44-4c6f280d3fae │ Root Partition   │ /               │ On 64-bit ARM    │
86       │                                     │ (64-bit ARM)     │                 │ systems, the     │
87       │                                     │                  │                 │ first ARM root   │
88       │                                     │                  │                 │ partition on the │
89       │                                     │                  │                 │ disk the EFI ESP │
90       │                                     │                  │                 │ is located on is │
91       │                                     │                  │                 │ mounted to the   │
92       │                                     │                  │                 │ root directory   │
93       │                                     │                  │                 │ /.               │
94       ├─────────────────────────────────────┼──────────────────┼─────────────────┼──────────────────┤
95       │993d8d3d-f80e-4225-855a-9daf8ed7ea97 │ Root Partition   │ /               │ On Itanium       │
96       │                                     │ (Itanium/IA-64)  │                 │ systems, the     │
97       │                                     │                  │                 │ first Itanium    │
98       │                                     │                  │                 │ root partition   │
99       │                                     │                  │                 │ on the disk the  │
100       │                                     │                  │                 │ EFI ESP is       │
101       │                                     │                  │                 │ located on is    │
102       │                                     │                  │                 │ mounted to the   │
103       │                                     │                  │                 │ root directory   │
104       │                                     │                  │                 │ /.               │
105       ├─────────────────────────────────────┼──────────────────┼─────────────────┼──────────────────┤
106       │77055800-792c-4f94-b39a-98c91b762bb6 │ Root Partition   │ /               │ On LoongArch     │
107       │                                     │ (LoongArch 64)   │                 │ 64-bit systems,  │
108       │                                     │                  │                 │ the first        │
109       │                                     │                  │                 │ LoongArch 64-bit │
110       │                                     │                  │                 │ root partition   │
111       │                                     │                  │                 │ on the disk the  │
112       │                                     │                  │                 │ EFI ESP is       │
113       │                                     │                  │                 │ located on is    │
114       │                                     │                  │                 │ mounted to the   │
115       │                                     │                  │                 │ root directory   │
116       │                                     │                  │                 │ /.               │
117       ├─────────────────────────────────────┼──────────────────┼─────────────────┼──────────────────┤
118       │60d5a7fe-8e7d-435c-b714-3dd8162144e1 │ Root Partition   │ /               │ On RISC-V 32-bit │
119       │                                     │ (RISCV-V 32)     │                 │ systems, the     │
120       │                                     │                  │                 │ first RISCV-V    │
121       │                                     │                  │                 │ 32-bit root      │
122       │                                     │                  │                 │ partition on the │
123       │                                     │                  │                 │ disk the EFI ESP │
124       │                                     │                  │                 │ is located on is │
125       │                                     │                  │                 │ mounted to the   │
126       │                                     │                  │                 │ root directory   │
127       │                                     │                  │                 │ /.               │
128       ├─────────────────────────────────────┼──────────────────┼─────────────────┼──────────────────┤
129       │72ec70a6-cf74-40e6-bd49-4bda08e8f224 │ Root Partition   │ /               │ On RISC-V 64-bit │
130       │                                     │ (RISCV-V 64)     │                 │ systems, the     │
131       │                                     │                  │                 │ first RISCV-V    │
132       │                                     │                  │                 │ 64-bit root      │
133       │                                     │                  │                 │ partition on the │
134       │                                     │                  │                 │ disk the EFI ESP │
135       │                                     │                  │                 │ is located on is │
136       │                                     │                  │                 │ mounted to the   │
137       │                                     │                  │                 │ root directory   │
138       │                                     │                  │                 │ /.               │
139       ├─────────────────────────────────────┼──────────────────┼─────────────────┼──────────────────┤
140       │933ac7e1-2eb4-4f13-b844-0e14e2aef915 │ Home Partition   │ /home/          │ The first home   │
141       │                                     │                  │                 │ partition on the │
142       │                                     │                  │                 │ disk the root    │
143       │                                     │                  │                 │ partition is     │
144       │                                     │                  │                 │ located on is    │
145       │                                     │                  │                 │ mounted to       │
146       │                                     │                  │                 │ /home/.          │
147       ├─────────────────────────────────────┼──────────────────┼─────────────────┼──────────────────┤
148       │3b8f8425-20e0-4f3b-907f-1a25a76f98e8 │ Server Data      │ /srv/           │ The first server │
149       │                                     │ Partition        │                 │ data partition   │
150       │                                     │                  │                 │ on the disk the  │
151       │                                     │                  │                 │ root partition   │
152       │                                     │                  │                 │ is located on is │
153       │                                     │                  │                 │ mounted to       │
154       │                                     │                  │                 │ /srv/.           │
155       ├─────────────────────────────────────┼──────────────────┼─────────────────┼──────────────────┤
156       │4d21b016-b534-45c2-a9fb-5c16e091fd2d │ Variable Data    │ /var/           │ The first        │
157       │                                     │ Partition        │                 │ variable data    │
158       │                                     │                  │                 │ partition on the │
159       │                                     │                  │                 │ disk the root    │
160       │                                     │                  │                 │ partition is     │
161       │                                     │                  │                 │ located on is    │
162       │                                     │                  │                 │ mounted to /var/ │
163       │                                     │                  │                 │ — under the      │
164       │                                     │                  │                 │ condition its    │
165       │                                     │                  │                 │ partition UUID   │
166       │                                     │                  │                 │ matches the      │
167       │                                     │                  │                 │ first 128 bit of │
168       │                                     │                  │                 │ the HMAC-SHA256  │
169       │                                     │                  │                 │ of the GPT type  │
170       │                                     │                  │                 │ uuid of this     │
171       │                                     │                  │                 │ partition keyed  │
172       │                                     │                  │                 │ by the machine   │
173       │                                     │                  │                 │ ID of the        │
174       │                                     │                  │                 │ installation     │
175       │                                     │                  │                 │ stored in        │
176       │                                     │                  │                 │ machine-id(5).   │
177       ├─────────────────────────────────────┼──────────────────┼─────────────────┼──────────────────┤
178       │7ec6f557-3bc5-4aca-b293-16ef5df639d1 │ Temporary Data   │ /var/tmp/       │ The first        │
179       │                                     │ Partition        │                 │ temporary data   │
180       │                                     │                  │                 │ partition on the │
181       │                                     │                  │                 │ disk the root    │
182       │                                     │                  │                 │ partition is     │
183       │                                     │                  │                 │ located on is    │
184       │                                     │                  │                 │ mounted to       │
185       │                                     │                  │                 │ /var/tmp/.       │
186       ├─────────────────────────────────────┼──────────────────┼─────────────────┼──────────────────┤
187       │0657fd6d-a4ab-43c4-84e5-0933c84b4f4f │ Swap             │ n/a             │ All swap         │
188       │                                     │                  │                 │ partitions       │
189       │                                     │                  │                 │ located on the   │
190       │                                     │                  │                 │ disk the root    │
191       │                                     │                  │                 │ partition is     │
192       │                                     │                  │                 │ located on are   │
193       │                                     │                  │                 │ enabled.         │
194       ├─────────────────────────────────────┼──────────────────┼─────────────────┼──────────────────┤
195       │c12a7328-f81f-11d2-ba4b-00a0c93ec93b │ EFI System       │ /efi/ or /boot/ │ The first ESP    │
196       │                                     │ Partition (ESP)  │                 │ located on the   │
197       │                                     │                  │                 │ disk the root    │
198       │                                     │                  │                 │ partition is     │
199       │                                     │                  │                 │ located on is    │
200       │                                     │                  │                 │ mounted to       │
201       │                                     │                  │                 │ /boot/ or /efi/, │
202       │                                     │                  │                 │ see below.       │
203       ├─────────────────────────────────────┼──────────────────┼─────────────────┼──────────────────┤
204       │bc13c2ff-59e6-4262-a352-b275fd6f7172 │ Extended Boot    │ /boot/          │ The first        │
205       │                                     │ Loader Partition │                 │ Extended Boot    │
206       │                                     │                  │                 │ Loader Partition │
207       │                                     │                  │                 │ is mounted to    │
208       │                                     │                  │                 │ /boot/, see      │
209       │                                     │                  │                 │ below.           │
210       └─────────────────────────────────────┴──────────────────┴─────────────────┴──────────────────┘
211
212       This generator understands the following attribute flags for
213       partitions:
214
215       Table 2. Partition Attributes
216       ┌──────────────────────────────┬────────────────────┬──────────────────┬──────────────────┐
217Name                          Value              Applicable to    Explanation      
218       ├──────────────────────────────┼────────────────────┼──────────────────┼──────────────────┤
219GPT_FLAG_READ_ONLY            │ 0x1000000000000000 │ /, /home/,       │ Partition is     │
220       │                              │                    │ /srv/, /var/,    │ mounted          │
221       │                              │                    │ /var/tmp/,       │ read-only        │
222       │                              │                    │ Extended Boot    │                  │
223       │                              │                    │ Loader Partition │                  │
224       ├──────────────────────────────┼────────────────────┼──────────────────┼──────────────────┤
225GPT_FLAG_NO_AUTO              │ 0x8000000000000000 │ /, /home/,       │ Partition is not │
226       │                              │                    │ /srv/, /var/,    │ mounted          │
227       │                              │                    │ /var/tmp/,       │ automatically    │
228       │                              │                    │ Extended Boot    │                  │
229       │                              │                    │ Loader Partition │                  │
230       ├──────────────────────────────┼────────────────────┼──────────────────┼──────────────────┤
231GPT_FLAG_NO_BLOCK_IO_PROTOCOL │ 0x0000000000000002 │ EFI System       │ Partition is not │
232       │                              │                    │ Partition (ESP)  │ mounted          │
233       │                              │                    │                  │ automatically    │
234       └──────────────────────────────┴────────────────────┴──────────────────┴──────────────────┘
235
236       The /home/, /srv/, /var/ and /var/tmp/ partitions may be encrypted in
237       LUKS format. In this case, a device mapper device is set up under the
238       names /dev/mapper/home, /dev/mapper/srv, /dev/mapper/var and
239       /dev/mapper/tmp. Note that this might create conflicts if the same
240       partition is listed in /etc/crypttab with a different device mapper
241       device name.
242
243       When systemd is running in the initrd the / partition may be encrypted
244       in LUKS format as well. In this case, a device mapper device is set up
245       under the name /dev/mapper/root, and a sysroot.mount is set up that
246       mounts the device under /sysroot. For more information, see bootup(7).
247
248       The root partition can be specified by symlinking
249       /run/systemd/volatile-root to /dev/block/$major:$minor. This is
250       especially useful if the root mount has been replaced by some form of
251       volatile file system (overlayfs).
252
253       Mount and automount units for the EFI System Partition (ESP) are
254       generated on EFI systems. The ESP is mounted to /boot/ (except if an
255       Extended Boot Loader partition exists, see below), unless a mount point
256       directory /efi/ exists, in which case it is mounted there. Since this
257       generator creates an automount unit, the mount will only be activated
258       on-demand, when accessed. On systems where /boot/ (or /efi/ if it
259       exists) is an explicitly configured mount (for example, listed in
260       fstab(5)) or where the /boot/ (or /efi/) mount point is non-empty, no
261       mount units are generated.
262
263       If the disk contains an Extended Boot Loader partition, as defined in
264       the Boot Loader Specification[4], it is made available at /boot/ (by
265       means of an automount point, similar to the ESP, see above). If both an
266       EFI System Partition and an Extended Boot Loader partition exist the
267       latter is preferably mounted to /boot/. Make sure to create both /efi/
268       and /boot/ to ensure both partitions are mounted.
269
270       When using this generator in conjunction with btrfs file systems, make
271       sure to set the correct default subvolumes on them, using btrfs
272       subvolume set-default.
273
274       systemd-gpt-auto-generator implements systemd.generator(7).
275

KERNEL COMMAND LINE

277       systemd-gpt-auto-generator understands the following kernel command
278       line parameters:
279
280       systemd.gpt_auto, rd.systemd.gpt_auto
281           Those options take an optional boolean argument, and default to
282           yes. The generator is enabled by default, and a negative value may
283           be used to disable it.
284
285       root=
286           When used with the special value "gpt-auto", automatic discovery of
287           the root partition based on the GPT partition type is enabled. Any
288           other value disables this generator.
289
290       rw, ro
291           Mount the root partition read-write or read-only initially.
292
293           Note that unlike most kernel command line options these settings do
294           not override configuration in the file system, and the file system
295           may be remounted later. See systemd-remount-fs.service(8).
296

SEE ALSO

298       systemd(1), systemd.mount(5), systemd.swap(5), systemd-fstab-
299       generator(8), systemd-cryptsetup@.service(8), machine-id(5),
300       cryptsetup(8), fstab(5), btrfs(8)
301

NOTES

303        1. UEFI Specification
304           https://uefi.org/specifications
305
306        2. Discoverable Partitions Specification
307           https://systemd.io/DISCOVERABLE_PARTITIONS
308
309        3. Boot Loader Interface
310           https://systemd.io/BOOT_LOADER_INTERFACE
311
312        4. Boot Loader Specification
313           https://systemd.io/BOOT_LOADER_SPECIFICATION
314
315
316
317systemd 250                                      SYSTEMD-GPT-AUTO-GENERATOR(8)
Impressum