From: Zbigniew Jędrzejewski-Szmek Date: Thu, 28 Nov 2019 17:21:22 +0000 (+0100) Subject: gpt-auto-generator: make it easier to notice if boot loader support is missing X-Git-Tag: v245-rc1~262^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b50a3a1565028cda00e1ade264bb209c97dac3cc;p=thirdparty%2Fsystemd.git gpt-auto-generator: make it easier to notice if boot loader support is missing The docs didn't talk about this, so let's add an explicit mention that the boot loader must cooperate. And also make the message from the generator notice level. This should help people who are trying to mix grub and the gpt auto logic. --- diff --git a/man/systemd-gpt-auto-generator.xml b/man/systemd-gpt-auto-generator.xml index 22cd638f1f8..8d208f4cb96 100644 --- a/man/systemd-gpt-auto-generator.xml +++ b/man/systemd-gpt-auto-generator.xml @@ -35,7 +35,7 @@ root, /home/, /srv/, 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 UEFI Specification, chapter 5. It implements the UEFI Specification, chapter 5. It implements the Discoverable Partitions Specification. Note that this generator has no effect on non-GPT systems, and on specific mount points that are directories already containing files. Also, on systems where the units are explicitly @@ -44,18 +44,21 @@ units this generator creates are overridden, but additional implicit dependencies might be created. - 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 searched for on systems where the root file system is distributed - on multiple disks, for example via btrfs RAID. + 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: EFI variable + LoaderDevicePartUUID-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f 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. - systemd-gpt-auto-generator is useful - for centralizing file system configuration in the partition table - and making configuration in /etc/fstab unnecessary. + 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. + systemd-gpt-auto-generator is useful for centralizing file system + configuration in the partition table and making configuration in /etc/fstab or on + the kernel command line unnecessary. + This generator looks for the partitions based on their partition type GUID. The following partition type GUIDs are identified: diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c index 99b5da17f5a..bbfebbbe957 100644 --- a/src/gpt-auto-generator/gpt-auto-generator.c +++ b/src/gpt-auto-generator/gpt-auto-generator.c @@ -612,7 +612,8 @@ static int add_root_mount(void) { r = efi_loader_get_device_part_uuid(NULL); if (r == -ENOENT) { - log_debug("EFI loader partition unknown, exiting."); + log_notice("EFI loader partition unknown, exiting.\n" + "(The boot loader did not set EFI variable LoaderDevicePartUUID.)"); return 0; } else if (r < 0) return log_error_errno(r, "Failed to read ESP partition UUID: %m");