]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/systemd-gpt-auto-generator.xml
tree-wide: remove Lennart's copyright lines
[thirdparty/systemd.git] / man / systemd-gpt-auto-generator.xml
CommitLineData
d67ca9ab
LP
1<?xml version="1.0"?>
2<!--*-nxml-*-->
12b42c76 3<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
d67ca9ab 4<!--
572eb058 5 SPDX-License-Identifier: LGPL-2.1+
d67ca9ab
LP
6-->
7<refentry id="systemd-gpt-auto-generator">
8
798d3a52
ZJS
9 <refentryinfo>
10 <title>systemd-gpt-auto-generator</title>
11 <productname>systemd</productname>
12
13 <authorgroup>
14 <author>
15 <contrib>Developer</contrib>
16 <firstname>Lennart</firstname>
17 <surname>Poettering</surname>
18 <email>lennart@poettering.net</email>
19 </author>
20 </authorgroup>
21 </refentryinfo>
22
23 <refmeta>
24 <refentrytitle>systemd-gpt-auto-generator</refentrytitle>
25 <manvolnum>8</manvolnum>
26 </refmeta>
27
28 <refnamediv>
29 <refname>systemd-gpt-auto-generator</refname>
30 <refpurpose>Generator for automatically discovering
31 and mounting root, <filename>/home</filename> and
32 <filename>/srv</filename> partitions, as well as
33 discovering and enabling swap partitions, based on GPT
34 partition type GUIDs.</refpurpose>
35 </refnamediv>
36
37 <refsynopsisdiv>
12b42c76 38 <para><filename>/usr/lib/systemd/system-generators/systemd-gpt-auto-generator</filename></para>
798d3a52
ZJS
39 </refsynopsisdiv>
40
41 <refsect1>
42 <title>Description</title>
43
44 <para><filename>systemd-gpt-auto-generator</filename> is a unit
45 generator that automatically discovers root,
46 <filename>/home</filename>, <filename>/srv</filename> and swap
47 partitions and creates mount and swap units for them, based on the
8d5a4f27
ZJS
48 partition type GUIDs of GUID partition tables (GPT),
49 see <ulink url="http://www.uefi.org/specifications">UEFI Specification</ulink>, chapter 5.
50 It implements the <ulink
28a0ad81 51 url="https://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec/">Discoverable
798d3a52 52 Partitions Specification</ulink>. Note that this generator has no
c6355b31
LP
53 effect on non-GPT systems, or where the directories under the
54 mount points are already non-empty. Also, on systems where the
55 units are explicitly configured (for example, listed in
56 <citerefentry
57 project='man-pages'><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>),
dc61b7e4 58 the units this generator creates are overridden, but additional
45f09f93 59 implicit dependencies might be created.</para>
798d3a52
ZJS
60
61 <para>This generator will only look for root partitions on the
62 same physical disk the EFI System Partition (ESP) is located on.
63 It will only look for the other partitions on the same physical
64 disk the root file system is located on. These partitions will not
8d5a4f27 65 be searched for on systems where the root file system is distributed
798d3a52
ZJS
66 on multiple disks, for example via btrfs RAID.</para>
67
68 <para><filename>systemd-gpt-auto-generator</filename> is useful
69 for centralizing file system configuration in the partition table
8d5a4f27
ZJS
70 and making configuration in <filename>/etc/fstab</filename> unnecessary.
71 </para>
798d3a52
ZJS
72
73 <para>This generator looks for the partitions based on their
74 partition type GUID. The following partition type GUIDs are
75 identified:</para>
76
77 <table>
78 <title>Partition Type GUIDs</title>
79 <tgroup cols='3' align='left' colsep='1' rowsep='1'>
80 <colspec colname="guid" />
81 <colspec colname="name" />
82 <colspec colname="explanation" />
83 <thead>
84 <row>
85 <entry>Partition Type GUID</entry>
86 <entry>Name</entry>
87 <entry>Explanation</entry>
88 </row>
89 </thead>
90 <tbody>
91 <row>
92 <entry>44479540-f297-41b2-9af7-d131d5f0458a</entry>
93 <entry><filename>Root Partition (x86)</filename></entry>
94 <entry>On 32-bit x86 systems, the first x86 root partition on the disk the EFI ESP is located on is mounted to the root directory <filename>/</filename>.</entry>
95 </row>
96 <row>
97 <entry>4f68bce3-e8cd-4db1-96e7-fbcaf984b709</entry>
98 <entry><filename>Root Partition (x86-64)</filename></entry>
99 <entry>On 64-bit x86 systems, the first x86-64 root partition on the disk the EFI ESP is located on is mounted to the root directory <filename>/</filename>.</entry>
100 </row>
101 <row>
102 <entry>69dad710-2ce4-4e3c-b16c-21a1d49abed3</entry>
103 <entry><filename>Root Partition (32-bit ARM)</filename></entry>
104 <entry>On 32-bit ARM systems, the first ARM root partition on the disk the EFI ESP is located on is mounted to the root directory <filename>/</filename>.</entry>
105 </row>
106 <row>
107 <entry>b921b045-1df0-41c3-af44-4c6f280d3fae</entry>
108 <entry><filename>Root Partition (64-bit ARM)</filename></entry>
109 <entry>On 64-bit ARM systems, the first ARM root partition on the disk the EFI ESP is located on is mounted to the root directory <filename>/</filename>.</entry>
110 </row>
b793ddfa
LW
111 <row>
112 <entry>993d8d3d-f80e-4225-855a-9daf8ed7ea97</entry>
113 <entry><filename>Root Partition (Itanium/IA-64)</filename></entry>
114 <entry>On Itanium systems, the first Itanium root partition on the disk the EFI ESP is located on is mounted to the root directory <filename>/</filename>.</entry>
115 </row>
798d3a52
ZJS
116 <row>
117 <entry>933ac7e1-2eb4-4f13-b844-0e14e2aef915</entry>
118 <entry>Home Partition</entry>
119 <entry>The first home partition on the disk the root partition is located on is mounted to <filename>/home</filename>.</entry>
120 </row>
121 <row>
122 <entry>3b8f8425-20e0-4f3b-907f-1a25a76f98e8</entry>
123 <entry>Server Data Partition</entry>
124 <entry>The first server data partition on the disk the root partition is located on is mounted to <filename>/srv</filename>.</entry>
125 </row>
126 <row>
127 <entry>0657fd6d-a4ab-43c4-84e5-0933c84b4f4f</entry>
128 <entry>Swap</entry>
129 <entry>All swap partitions located on the disk the root partition is located on are enabled.</entry>
130 </row>
b52a109a
LP
131 <row>
132 <entry>c12a7328-f81f-11d2-ba4b-00a0c93ec93b</entry>
133 <entry>EFI System Partition (ESP)</entry>
134 <entry>The first ESP located on the disk the root partition is located on is mounted to <filename>/boot</filename> or <filename>/efi</filename>, see below.</entry>
135 </row>
798d3a52
ZJS
136 </tbody>
137 </tgroup>
138 </table>
139
8d5a4f27
ZJS
140 <para>This generator understands the following attribute flags for partitions:</para>
141
142 <table>
143 <title>Partition Attributes</title>
144 <tgroup cols='4' align='left' colsep='1' rowsep='1'>
145 <colspec colname="attribute" />
146 <colspec colname="value" />
147 <colspec colname="where" />
148 <colspec colname="explanation" />
149 <thead>
150 <row>
151 <entry>Name</entry>
152 <entry>Value</entry>
153 <entry>Applicable to</entry>
154 <entry>Explanation</entry>
155 </row>
156 </thead>
157 <tbody>
158 <row>
159 <entry><constant>GPT_FLAG_READ_ONLY</constant></entry>
160 <entry>0x1000000000000000</entry>
161 <entry><filename>/</filename>, <filename>/srv</filename>, <filename>/home</filename></entry>
162 <entry>Partition is mounted read-only</entry>
163 </row>
164
165 <row>
166 <entry><constant>GPT_FLAG_NO_AUTO</constant></entry>
167 <entry>0x8000000000000000</entry>
168 <entry><filename>/</filename>, <filename>/srv</filename>, <filename>/home</filename></entry>
169 <entry>Partition is not mounted automatically</entry>
170 </row>
171
172 <row>
173 <entry><constant>GPT_FLAG_NO_BLOCK_IO_PROTOCOL</constant></entry>
174 <entry>0x0000000000000002</entry>
175 <entry>ESP</entry>
176 <entry>Partition is not mounted automatically</entry>
177 </row>
178 </tbody>
179 </tgroup>
180 </table>
181
798d3a52 182 <para>The <filename>/home</filename> and <filename>/srv</filename>
b938cb90 183 partitions may be encrypted in LUKS format. In this case, a device
798d3a52
ZJS
184 mapper device is set up under the names
185 <filename>/dev/mapper/home</filename> and
186 <filename>/dev/mapper/srv</filename>. Note that this might create
187 conflicts if the same partition is listed in
188 <filename>/etc/crypttab</filename> with a different device mapper
189 device name.</para>
190
b52a109a
LP
191 <para>Mount and automount units for the EFI System Partition (ESP) are generated on EFI systems. The ESP is mounted
192 to <filename>/boot</filename>, unless a mount point directory <filename>/efi</filename> exists, in which case it is
193 mounted there. Since this generator creates an automount unit, the mount will only be activated on-demand, when
194 accessed. On systems where <filename>/boot</filename> (or <filename>/efi</filename> if it exists) is an explicitly
195 configured mount (for example, listed in <citerefentry
196 project='man-pages'><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>) or where the
197 <filename>/boot</filename> (or <filename>/efi</filename>) mount point is non-empty, no mount units are
198 generated.</para>
798d3a52
ZJS
199
200 <para>When using this generator in conjunction with btrfs file
201 systems, make sure to set the correct default subvolumes on them,
202 using <command>btrfs subvolume set-default</command>.</para>
203
204 <para><filename>systemd-gpt-auto-generator</filename> implements
b1c1a519 205 <citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
798d3a52
ZJS
206 </refsect1>
207
208 <refsect1>
209 <title>See Also</title>
210 <para>
211 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
212 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
213 <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
214 <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
798d3a52 215 <citerefentry><refentrytitle>systemd-cryptsetup@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
3ba3a79d
ZJS
216 <citerefentry project='die-net'><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
217 <citerefentry project='man-pages'><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
218 <citerefentry project='man-pages'><refentrytitle>btrfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>
798d3a52
ZJS
219 </para>
220 </refsect1>
d67ca9ab
LP
221
222</refentry>