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