]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd-gpt-auto-generator.xml
Merge pull request #7379 from yuwata/follow-up-7309
[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 This file is part of systemd.
8
9 Copyright 2013 Lennart Poettering
10
11 systemd is free software; you can redistribute it and/or modify it
12 under the terms of the GNU Lesser General Public License as published by
13 the Free Software Foundation; either version 2.1 of the License, or
14 (at your option) any later version.
15
16 systemd is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 Lesser General Public License for more details.
20
21 You should have received a copy of the GNU Lesser General Public License
22 along with systemd; If not, see <http://www.gnu.org/licenses/>.
23 -->
24 <refentry id="systemd-gpt-auto-generator">
25
26 <refentryinfo>
27 <title>systemd-gpt-auto-generator</title>
28 <productname>systemd</productname>
29
30 <authorgroup>
31 <author>
32 <contrib>Developer</contrib>
33 <firstname>Lennart</firstname>
34 <surname>Poettering</surname>
35 <email>lennart@poettering.net</email>
36 </author>
37 </authorgroup>
38 </refentryinfo>
39
40 <refmeta>
41 <refentrytitle>systemd-gpt-auto-generator</refentrytitle>
42 <manvolnum>8</manvolnum>
43 </refmeta>
44
45 <refnamediv>
46 <refname>systemd-gpt-auto-generator</refname>
47 <refpurpose>Generator for automatically discovering
48 and mounting root, <filename>/home</filename> and
49 <filename>/srv</filename> partitions, as well as
50 discovering and enabling swap partitions, based on GPT
51 partition type GUIDs.</refpurpose>
52 </refnamediv>
53
54 <refsynopsisdiv>
55 <para><filename>/usr/lib/systemd/system-generators/systemd-gpt-auto-generator</filename></para>
56 </refsynopsisdiv>
57
58 <refsect1>
59 <title>Description</title>
60
61 <para><filename>systemd-gpt-auto-generator</filename> is a unit
62 generator that automatically discovers root,
63 <filename>/home</filename>, <filename>/srv</filename> and swap
64 partitions and creates mount and swap units for them, based on the
65 partition type GUIDs of GUID partition tables (GPT). It implements
66 the <ulink
67 url="https://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec/">Discoverable
68 Partitions Specification</ulink>. Note that this generator has no
69 effect on non-GPT systems, or where the directories under the
70 mount points are already non-empty. Also, on systems where the
71 units are explicitly configured (for example, listed in
72 <citerefentry
73 project='man-pages'><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>),
74 the units this generator creates are overridden, but additional
75 implicit dependencies might be created.</para>
76
77 <para>This generator will only look for root partitions on the
78 same physical disk the EFI System Partition (ESP) is located on.
79 It will only look for the other partitions on the same physical
80 disk the root file system is located on. These partitions will not
81 be searched on systems where the root file system is distributed
82 on multiple disks, for example via btrfs RAID.</para>
83
84 <para><filename>systemd-gpt-auto-generator</filename> is useful
85 for centralizing file system configuration in the partition table
86 and making manual configuration in <filename>/etc/fstab</filename>
87 or suchlike unnecessary.</para>
88
89 <para>This generator looks for the partitions based on their
90 partition type GUID. The following partition type GUIDs are
91 identified:</para>
92
93 <table>
94 <title>Partition Type GUIDs</title>
95 <tgroup cols='3' align='left' colsep='1' rowsep='1'>
96 <colspec colname="guid" />
97 <colspec colname="name" />
98 <colspec colname="explanation" />
99 <thead>
100 <row>
101 <entry>Partition Type GUID</entry>
102 <entry>Name</entry>
103 <entry>Explanation</entry>
104 </row>
105 </thead>
106 <tbody>
107 <row>
108 <entry>44479540-f297-41b2-9af7-d131d5f0458a</entry>
109 <entry><filename>Root Partition (x86)</filename></entry>
110 <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>
111 </row>
112 <row>
113 <entry>4f68bce3-e8cd-4db1-96e7-fbcaf984b709</entry>
114 <entry><filename>Root Partition (x86-64)</filename></entry>
115 <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>
116 </row>
117 <row>
118 <entry>69dad710-2ce4-4e3c-b16c-21a1d49abed3</entry>
119 <entry><filename>Root Partition (32-bit ARM)</filename></entry>
120 <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>
121 </row>
122 <row>
123 <entry>b921b045-1df0-41c3-af44-4c6f280d3fae</entry>
124 <entry><filename>Root Partition (64-bit ARM)</filename></entry>
125 <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>
126 </row>
127 <row>
128 <entry>993d8d3d-f80e-4225-855a-9daf8ed7ea97</entry>
129 <entry><filename>Root Partition (Itanium/IA-64)</filename></entry>
130 <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>
131 </row>
132 <row>
133 <entry>933ac7e1-2eb4-4f13-b844-0e14e2aef915</entry>
134 <entry>Home Partition</entry>
135 <entry>The first home partition on the disk the root partition is located on is mounted to <filename>/home</filename>.</entry>
136 </row>
137 <row>
138 <entry>3b8f8425-20e0-4f3b-907f-1a25a76f98e8</entry>
139 <entry>Server Data Partition</entry>
140 <entry>The first server data partition on the disk the root partition is located on is mounted to <filename>/srv</filename>.</entry>
141 </row>
142 <row>
143 <entry>0657fd6d-a4ab-43c4-84e5-0933c84b4f4f</entry>
144 <entry>Swap</entry>
145 <entry>All swap partitions located on the disk the root partition is located on are enabled.</entry>
146 </row>
147 <row>
148 <entry>c12a7328-f81f-11d2-ba4b-00a0c93ec93b</entry>
149 <entry>EFI System Partition (ESP)</entry>
150 <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>
151 </row>
152 </tbody>
153 </tgroup>
154 </table>
155
156 <para>The <filename>/home</filename> and <filename>/srv</filename>
157 partitions may be encrypted in LUKS format. In this case, a device
158 mapper device is set up under the names
159 <filename>/dev/mapper/home</filename> and
160 <filename>/dev/mapper/srv</filename>. Note that this might create
161 conflicts if the same partition is listed in
162 <filename>/etc/crypttab</filename> with a different device mapper
163 device name.</para>
164
165 <para>Mount and automount units for the EFI System Partition (ESP) are generated on EFI systems. The ESP is mounted
166 to <filename>/boot</filename>, unless a mount point directory <filename>/efi</filename> exists, in which case it is
167 mounted there. Since this generator creates an automount unit, the mount will only be activated on-demand, when
168 accessed. On systems where <filename>/boot</filename> (or <filename>/efi</filename> if it exists) is an explicitly
169 configured mount (for example, listed in <citerefentry
170 project='man-pages'><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>) or where the
171 <filename>/boot</filename> (or <filename>/efi</filename>) mount point is non-empty, no mount units are
172 generated.</para>
173
174 <para>When using this generator in conjunction with btrfs file
175 systems, make sure to set the correct default subvolumes on them,
176 using <command>btrfs subvolume set-default</command>.</para>
177
178 <para><filename>systemd-gpt-auto-generator</filename> implements
179 <citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
180 </refsect1>
181
182 <refsect1>
183 <title>See Also</title>
184 <para>
185 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
186 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
187 <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
188 <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
189 <citerefentry><refentrytitle>systemd-cryptsetup@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
190 <citerefentry project='die-net'><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
191 <citerefentry project='man-pages'><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
192 <citerefentry project='man-pages'><refentrytitle>btrfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>
193 </para>
194 </refsect1>
195
196 </refentry>