Menu

Feature Request: rEFInd should set EFI variable LoaderDevicePartUUID to partition UUID of ESP

2024-05-07
2024-05-09
  • Matthias Nagel

    Matthias Nagel - 2024-05-07

    SystemD is probably the de facto default init system for the majority of Linux distribution. For GPT-based disks, SystemD supports auto-discovery of partitions based on the type UUID of the partition. See https://uapi-group.org/specifications/specs/discoverable_partitions_specification/ and https://www.freedesktop.org/software/systemd/man/latest/systemd-gpt-auto-generator.html.

    However, in order to do so, SystemD needs support from the boot loader/manager. SystemD expects the boot loader to set the EFI variable LoaderDevicePartUUID (4a67b082-0a4c-41cf-b6c7-440b29bb8c4f) to the uique partition UUID of the ESP. SystemD uses this information to select the disk from which the system has been started and to go from there to discover the remaining partitions.

    I would like to see rEFInd to set that variable.

    Note, https://systemd.io/BOOT_LOADER_INTERFACE/ defines some more EFI variables in order to pass information from the boot loader to the init sysem, but LoaderDevicePartUUID is by far the most useful one.

     
  • Roderick W. Smith

    This feature already exists in rEFInd, but is disabled by default so as to minimize wear on the NVRAM. (I've seen systems fail with worn-out NVRAM in the past, so I prefer to minimize NVRAM writes, when possible.) To enable it, uncomment the write_systemd_vars token in refind.conf and set the value to true.

     
  • joevt

    joevt - 2024-05-09

    Couldn't the LoaderDevicePartUUID variable be marked as volatile instead of non-volatile so it isn't written to NVRAM?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.