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