3 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5 This file is part of systemd.
7 Copyright 2013 Lennart Poettering
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.
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.
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/>.
22 <refentry id="systemd-gpt-auto-generator">
25 <title>systemd-gpt-auto-generator</title>
26 <productname>systemd</productname>
30 <contrib>Developer</contrib>
31 <firstname>Lennart</firstname>
32 <surname>Poettering</surname>
33 <email>lennart@poettering.net</email>
39 <refentrytitle>systemd-gpt-auto-generator</refentrytitle>
40 <manvolnum>8</manvolnum>
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>
53 <para><filename>/usr/lib/systemd/system-generators/systemd-gpt-auto-generator</filename></para>
57 <title>Description</title>
59 <para><filename>systemd-gpt-auto-generator</filename>
60 is a unit generator that automatically discovers root,
61 <filename>/home</filename>, <filename>/srv</filename>
62 and swap partitions and creates mount and swap units
63 for them, based on the the partition type GUIDs of
64 GUID partition tables (GPT). It implements the <ulink
65 url="http://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec/">Discoverable
66 Partitions Specification</ulink>. Note that this
67 generator has no effect on non-GPT systems, on systems
68 where the units are explicitly configured (for
70 <citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>),
71 or where the mount points are non-empty.</para>
73 <para>This generator will only look for root
74 partitions on the same physical disk the EFI System
75 Partition (ESP) is located on. It will only look for
76 the other partitions on the same physical disk the
77 root file system is located on. These partitions will
78 not be search on systems where the root file system is
79 distributed on multiple disks, for example via btrfs
82 <para><filename>systemd-gpt-auto-generator</filename>
83 is useful for centralizing file system configuration
84 in the partition table and making manual configuration
85 in <filename>/etc/fstab</filename> or suchlike
88 <para>This generator looks for the partitions based on
89 their partition type GUID. The following partition
90 type GUIDs are identified:</para>
93 <title>Partition Type GUIDs</title>
94 <tgroup cols='3' align='left' colsep='1' rowsep='1'>
95 <colspec colname="guid" />
96 <colspec colname="name" />
97 <colspec colname="explanation" />
100 <entry>Partition Type GUID</entry>
102 <entry>Explanation</entry>
107 <entry>44479540-f297-41b2-9af7-d131d5f0458a</entry>
108 <entry><filename>Root Partition (x86)</filename></entry>
109 <entry>On 32bit 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 <entry>4f68bce3-e8cd-4db1-96e7-fbcaf984b709</entry>
113 <entry><filename>Root Partition (x86-64)</filename></entry>
114 <entry>On 64bit 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 <entry>933ac7e1-2eb4-4f13-b844-0e14e2aef915</entry>
118 <entry>Home Partition</entry>
119 <entry>The first home partition on the disk the root partition is located on is mounted to <filename>/home</filename>.</entry>
122 <entry>3b8f8425-20e0-4f3b-907f-1a25a76f98e8</entry>
123 <entry>Server Data Partition</entry>
124 <entry>The first server data partition on the disk the root partition is located on is mounted to <filename>/srv</filename>.</entry>
127 <entry>0657fd6d-a4ab-43c4-84e5-0933c84b4f4f</entry>
129 <entry>All swap partitions located on the disk the root partition is located on are enabled.</entry>
135 <para>The <filename>/home</filename> and
136 <filename>/srv</filename> partitions may be encrypted
137 in LUKS format. In this case a device mapper device is
138 set up under the names
139 <filename>/dev/mapper/home</filename> and
140 <filename>/dev/mapper/srv</filename>. Note that this
141 might create conflicts if the same partition is listed
142 in <filename>/etc/crypttab</filename> with a different
143 device mapper device name.</para>
146 <citerefentry><refentrytitle>systemd-efi-boot-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
147 will mount the EFI System Partition (ESP) to
148 <filename>/boot</filename> if not otherwise mounted.</para>
150 <para>When using this generator in conjunction with
151 btrfs file systems make sure to set the correct
152 default subvolumes on them, using <command>btrfs
153 subvolume set-default</command>.</para>
155 <para><filename>systemd-gpt-auto-generator</filename>
156 implements the <ulink
157 url="http://www.freedesktop.org/wiki/Software/systemd/Generators">Generator
158 Specification</ulink>.</para>
162 <title>See Also</title>
164 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
165 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
166 <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
167 <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
168 <citerefentry><refentrytitle>systemd-efi-boot-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
169 <citerefentry><refentrytitle>systemd-cryptsetup@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
170 <citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
171 <citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
172 <citerefentry><refentrytitle>btrfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>