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