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