{"id":2805,"date":"2022-12-20T15:17:21","date_gmt":"2022-12-20T18:17:21","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/systemdgptautogenerator-man8\/"},"modified":"2022-12-20T15:17:21","modified_gmt":"2022-12-20T18:17:21","slug":"systemdgptautogenerator-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/systemdgptautogenerator-man8\/","title":{"rendered":"SYSTEMD&minus;GPT&minus;AUTO&minus;GENERATOR (man8)"},"content":{"rendered":"<h1 align=\"center\">SYSTEMD\u2212GPT\u2212AUTO\u2212GENERATOR<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#KERNEL COMMAND LINE\">KERNEL COMMAND LINE<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#NOTES\">NOTES<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">systemd-gpt-auto-generator \u2212 Generator for automatically discovering and mounting root, \/home\/, \/srv\/, \/var\/ and \/var\/tmp\/ partitions, as well as discovering and enabling swap partitions, based on GPT partition type GUIDs<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">\/usr\/lib\/systemd\/system\u2212generators\/systemd\u2212gpt\u2212auto\u2212generator<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">systemd\u2212gpt\u2212auto\u2212generator is a unit generator that automatically discovers root, \/home\/, \/srv\/, \/var\/, \/var\/tmp\/, the EFI System Partition, the Extended Boot Loader Partition and swap partitions and creates mount and swap units for them, based on the partition type GUIDs of GUID partition tables (GPT), see <b><font color=\"#0000FF\">UEFI Specification<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">, chapter 5. It implements the<\/font> <b><font color=\"#0000FF\">Discoverable Partitions Specification<\/font><\/b> <small><font color=\"#000000\">[2]<\/font><\/small> <font color=\"#000000\">. Note that this generator has no effect on non\u2212GPT systems, and on specific mount points that are directories already containing files. Also, on systems where the units are explicitly configured (for example, listed in <b>fstab<\/b>(5)), the units this generator creates are overridden, but additional implicit dependencies might be created.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">This generator will only look for the root partition on the same physical disk the EFI System Partition (ESP) is located on. Note that support from the boot loader is required: the EFI variable <i>LoaderDevicePartUUID<\/i> of the <b>4a67b082\u22120a4c\u221241cf\u2212b6c7\u2212440b29bb8c4f<\/b> vendor UUID is used to determine from which partition, and hence the disk from which the system was booted. If the boot loader does not set this variable, this generator will not be able to autodetect the root partition. See the<\/font> <b><font color=\"#0000FF\">Boot Loader Interface<\/font><\/b> <small><font color=\"#000000\">[3]<\/font><\/small> <font color=\"#000000\">for details.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Similarly, this generator will only look for the other partitions on the same physical disk as the root partition. In this case, boot loader support is not required. These partitions will not be searched for on systems where the root file system is distributed on multiple disks, for example via btrfs RAID.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">systemd\u2212gpt\u2212auto\u2212generator is useful for centralizing file system configuration in the partition table and making configuration in \/etc\/fstab or on the kernel command line unnecessary.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">This generator looks for the partitions based on their partition type GUID. The following partition type GUIDs are identified:<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Table\u00a01.\u00a0Partition Type GUIDs<\/b><\/font><\/p>\n<p align=\"center\"><font color=\"#000000\"><b><img decoding=\"async\" src=\"grohtml-1023471.png\" alt=\"Image grohtml-1023471.png\"><\/b><\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">This generator understands the following attribute flags for partitions:<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Table\u00a02.\u00a0Partition Attributes<\/b><\/font><\/p>\n<p align=\"center\"><font color=\"#000000\"><b><img decoding=\"async\" src=\"grohtml-1023472.png\" alt=\"Image grohtml-1023472.png\"><\/b><\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The \/home\/, \/srv\/, \/var\/ and \/var\/tmp\/ partitions may be encrypted in LUKS format. In this case, a device mapper device is set up under the names \/dev\/mapper\/home, \/dev\/mapper\/srv, \/dev\/mapper\/var and \/dev\/mapper\/tmp. Note that this might create conflicts if the same partition is listed in \/etc\/crypttab with a different device mapper device name.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">When systemd is running in the initrd the \/ partition may be encrypted in LUKS format as well. In this case, a device mapper device is set up under the name \/dev\/mapper\/root, and a sysroot.mount is set up that mounts the device under \/sysroot. For more information, see <b>bootup<\/b>(7).<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Mount and automount units for the EFI System Partition (ESP) are generated on EFI systems. The ESP is mounted to \/boot\/ (except if an Extended Boot Loader partition exists, see below), unless a mount point directory \/efi\/ exists, in which case it is mounted there. Since this generator creates an automount unit, the mount will only be activated on\u2212demand, when accessed. On systems where \/boot\/ (or \/efi\/ if it exists) is an explicitly configured mount (for example, listed in <b>fstab<\/b>(5)) or where the \/boot\/ (or \/efi\/) mount point is non\u2212empty, no mount units are generated.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">If the disk contains an Extended Boot Loader partition, as defined in the<\/font> <b><font color=\"#0000FF\">Boot Loader Specification<\/font><\/b> <small><font color=\"#000000\">[4]<\/font><\/small> <font color=\"#000000\">, it is made available at \/boot\/ (by means of an automount point, similar to the ESP, see above). If both an EFI System Partition and an Extended Boot Loader partition exist the latter is preferably mounted to \/boot\/. Make sure to create both \/efi\/ and \/boot\/ to ensure both partitions are mounted.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">When using this generator in conjunction with btrfs file systems, make sure to set the correct default subvolumes on them, using <b>btrfs subvolume set\u2212default<\/b>.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">systemd\u2212gpt\u2212auto\u2212generator implements <b>systemd.generator<\/b>(7).<\/font><\/p>\n<h2>KERNEL COMMAND LINE <a name=\"KERNEL COMMAND LINE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">systemd\u2212gpt\u2212auto\u2212generator understands the following kernel command line parameters:<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>systemd.gpt_auto<\/i>, <i>rd.systemd.gpt_auto<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Those options take an optional boolean argument, and default to yes. The generator is enabled by default, and a negative value may be used to disable it.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>root=<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">When used with the special value &#8220;gpt\u2212auto&#8221;, automatic discovery of the root partition based on the GPT partition type is enabled. Any other value disables this generator.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>rw<\/i>, <i>ro<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Mount the root partition read\u2212write or read\u2212only <i>initially<\/i>.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">Note that unlike most kernel command line options these settings do not override configuration in the file system, and the file system may be remounted later. See <b>systemd-remount-fs.service<\/b>(8).<\/font><\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>systemd<\/b>(1), <b>systemd.mount<\/b>(5), <b>systemd.swap<\/b>(5), <b>systemd-fstab-generator<\/b>(8), <b>systemd-cryptsetup@.service<\/b>(8), <b>machine-id<\/b>(5), <b>cryptsetup<\/b>(8), <b>fstab<\/b>(5), <b>btrfs<\/b>(8)<\/font><\/p>\n<h2>NOTES <a name=\"NOTES\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">1.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"28%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">UEFI Specification<\/font><\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/uefi.org\/specifications<\/font><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">2.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"57%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">Discoverable Partitions Specification<\/font><\/p>\n<\/td>\n<td width=\"26%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/systemd.io\/DISCOVERABLE_PARTITIONS<\/font><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">3.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">Boot Loader Interface<\/font><\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/systemd.io\/BOOT_LOADER_INTERFACE<\/font><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">4.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"38%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">Boot Loader Specification<\/font><\/p>\n<\/td>\n<td width=\"45%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/systemd.io\/BOOT_LOADER_SPECIFICATION<\/font><\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  systemd-gpt-auto-generator \u2212 Generator for automatically discovering and mounting root, \/home\/, \/srv\/, \/var\/ and \/var\/tmp\/ partitions, as well as discovering and enabling swap partitions, based on GPT partition type GUIDs <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,52,4,158],"class_list":["post-2805","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-man8","tag-systemd-gpt-auto-generator"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/2805","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=2805"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/2805\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=2805"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=2805"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=2805"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}