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