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 <filename>/home</filename> and <filename>/srv</filename>, as well as
47 discovering and enabling swap partitions, based on GPT
48 partition type GUIDs.</refpurpose>
52 <para><filename>/usr/lib/systemd/system-generators/systemd-gpt-auto-generator</filename></para>
56 <title>Description</title>
58 <para><filename>systemd-gpt-auto-generator</filename>
59 is a unit generator that automatically discovers
60 <filename>/home</filename>, <filename>/srv</filename>
61 and swap partitions and creates mount and swap units
62 for them, based on the the partition type GUIDs of
63 GUID partition tables (GPT). Note that this generator
64 has no effect on non-GPT systems, on systems where the
65 units are explicitly configured (for example, listed
67 <citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>),
68 or where the mount points are non-empty.</para>
70 <para>This generator will only look for partitions on
71 the same physical disk the root file system is stored
72 on. This generator has no effect on systems where the
73 root file system is distributed on multiple disks, for
74 example via btrfs RAID.</para>
76 <para><filename>systemd-gpt-auto-generator</filename>
77 is useful for centralizing file system configuration
78 in the partition table and making manual configuration
79 in <filename>/etc/fstab</filename> or suchlike
82 <para>This generator looks for the partitions based on
83 their partition type GUID. The following partition
84 type GUIDs are identified:</para>
87 <title>Partition Type GUIDs</title>
88 <tgroup cols='3' align='left' colsep='1' rowsep='1'>
89 <colspec colname="guid" />
90 <colspec colname="location" />
91 <colspec colname="explanation" />
94 <entry>Partition Type GUID</entry>
95 <entry>Location</entry>
96 <entry>Explanation</entry>
101 <entry>0657fd6d-a4ab-43c4-84e50933c84b4f4f</entry>
103 <entry>All swap partitions are enabled.</entry>
106 <entry>933ac7e1-2eb4-4f13-b8440e14e2aef915</entry>
107 <entry><filename>/home</filename></entry>
108 <entry>The first home partition on the disk is mounted to <filename>/home</filename>.</entry>
111 <entry>3b8f8425-20e0-4f3b-907f1a25a76f98e8</entry>
112 <entry><filename>/srv</filename></entry>
113 <entry>The first server data partition on the disk is mounted to <filename>/srv</filename>.</entry>
119 <para>The <filename>/home</filename> and
120 <filename>/srv</filename> partitions may be encrypted
121 in LUKS format. In this case a device mapper device is
122 set up under the names
123 <filename>/dev/mapper/home</filename> and
124 <filename>/dev/mapper/srv</filename>. Note that this
125 might create conflicts if the same partition is listed
126 in <filename>/etc/crypttab</filename> with a different
127 device mapper device name.</para>
130 <citerefentry><refentrytitle>systemd-efi-boot-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
131 will mount the EFI System Partition to
132 <filename>/boot</filename> is not otherwise mounted.</para>
134 <para><filename>systemd-gpt-auto-generator</filename>
135 implements the <ulink
136 url="http://www.freedesktop.org/wiki/Software/systemd/Generators">generator
137 specification</ulink>.</para>
141 <title>See Also</title>
143 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
144 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
145 <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
146 <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
147 <citerefentry><refentrytitle>systemd-efi-boot-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
148 <citerefentry><refentrytitle>systemd-cryptsetup@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
149 <citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
150 <citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>