From 73b80ec2d999c45ce13f3e034704249d80829f7e Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 7 Mar 2014 04:31:26 +0100 Subject: gpt-auto-generator: automatically find the root disk of the system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When run in an initrd and no root= argument is set (or is set to root=gpt-auto) we will automatically look for the root partition on the same disk the EFI ESP is located on. Since we look for swap, /home and /srv on the disk the root partition is located on, we hence have a fully discoverable chain: Firmware discovers the EFI ESP partition → the initrd discovers the root partition → the host OS discovers swap, /home, and /srv. Note that this requires an EFI boot loader that sets the LoaderDevicePartUUID EFI variable, such as Gummiboot. --- man/systemd-gpt-auto-generator.xml | 58 +++++++++++++++++++++++++------------- 1 file changed, 39 insertions(+), 19 deletions(-) (limited to 'man') diff --git a/man/systemd-gpt-auto-generator.xml b/man/systemd-gpt-auto-generator.xml index 75313994d7..a753fb0bef 100644 --- a/man/systemd-gpt-auto-generator.xml +++ b/man/systemd-gpt-auto-generator.xml @@ -43,7 +43,8 @@ systemd-gpt-auto-generator Generator for automatically discovering - and mounting /home and /srv, as well as + and mounting root, /home and + /srv partitions, as well as discovering and enabling swap partitions, based on GPT partition type GUIDs. @@ -56,7 +57,7 @@ Description systemd-gpt-auto-generator - is a unit generator that automatically discovers + is a unit generator that automatically discovers root, /home, /srv and swap partitions and creates mount and swap units for them, based on the the partition type GUIDs of @@ -67,11 +68,14 @@ fstab5), or where the mount points are non-empty. - This generator will only look for partitions on - the same physical disk the root file system is stored - on. This generator has no effect on systems where the - root file system is distributed on multiple disks, for - example via btrfs RAID. + This generator will only look for root + partitions on the same physical disk the EFI System + Partition (ESP) is located on. It will only look for + the other partitions on the same physical disk the + root file system is located on. These partitions will + not be search on systems where the root file system is + distributed on multiple disks, for example via btrfs + RAID. systemd-gpt-auto-generator is useful for centralizing file system configuration @@ -87,30 +91,40 @@ Partition Type GUIDs - + Partition Type GUID - Location + Name Explanation - 0657fd6d-a4ab-43c4-84e50933c84b4f4f - Swap - All swap partitions are enabled. + 44479540-f297-41b2-9af7d131d5f0458a + Root Partition (x86) + On 32bit x86 systems the first x86 root partition on the disk the EFI ESP is located on is mounted to the root directory /. + + + 4f68bce3-e8cd-4db1-96e7fbcaf984b709 + Root Partition (x86-64) + 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 /. 933ac7e1-2eb4-4f13-b8440e14e2aef915 - /home - The first home partition on the disk is mounted to /home. + Home Partition + The first home partition on the disk the root partition is located on is mounted to /home. 3b8f8425-20e0-4f3b-907f1a25a76f98e8 - /srv - The first server data partition on the disk is mounted to /srv. + Server Data Partition + The first server data partition on the disk the root partition is located on is mounted to /srv. + + + 0657fd6d-a4ab-43c4-84e50933c84b4f4f + Swap + All swap partitions located on the disk the root partition is located on are enabled. @@ -128,8 +142,13 @@ Also note that systemd-efi-boot-generator8 - will mount the EFI System Partition to - /boot is not otherwise mounted. + will mount the EFI System Partition (ESP) to + /boot if not otherwise mounted. + + When using this generator in conjunction with + btrfs file systems make sure to set the correct + default subvolumes on them, using btrfs + subvolume set-default. systemd-gpt-auto-generator implements the systemd-efi-boot-generator8, systemd-cryptsetup@.service8, cryptsetup8, - fstab5 + fstab5, + btrfs8 -- cgit v1.2.3-54-g00ecf