You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make udev create /dev/disk/by-purpose symlinks to partitions using the existing GPT partition discovery logic. For example, the EFI System Partition would be /dev/disk/by-purpose/efi-system and it could be used in a fstab entry like this:
This would allow the sysadmin to use the regular /etc/fstab (or .mount units) to configure mount options for auto-detected partitions, without having to add a separate config file specifically for gpt-generator, and without having to hardcode the specific "by-uuid" name.
(I don't think it would be useful to have generic "by-parttypeuuid" symlinks, as there could be e.g. multiple EFI System Partitions on a machine and there would be no way to mount the "current" one, whereas I imagine that "by-purpose/efi-system" should always point to the one that was currently used for booting.)
Describe alternatives you've considered
There were suggestions to add a kernel parameter or a dedicated config file for systemd-gpt-generator, but I don't like bloating the kernel command-line with things that would be easier to manage in /etc. And when it comes to mount options, we already suggest using /etc/fstab for things like /proc and even the rootfs (via systemd-remount-fs).
Reacted by Riccardo Paolo Bestetti, Adrian Vovk and Youfu Zhang
Whether this belongs in systemd proper, or just for deconfliction with coreos/bootupd project...
What about the multiple EFI System partition case? Both ESP's have the same "by-purpose" so how would or should that be handled? The bootupd preliminary idea is to just stop doing mdraid, and firmware raid, and have a server sync all instances of the ESP with a canonical source. And it's also responsible for setting NVRAM boot entries and order, so that the firmware can do the proper fall back.
What about the multiple EFI System partition case? Both ESP's have the same "by-purpose" so how would or should that be handled?
I don't think it should be handled in any special way.
The idea of this RFE is that they would be handled exactly the same as they're currently handled by the already existing code in systemd-gpt-auto-generator. Currently it has to choose one ESP to auto-mount at /efi or /boot; this would follow the same logic. (Even if you have multiple clones of the ESP, the firmware still picks a specific one to boot from.)
Systems which use bootupd to manage multiple ESPs would simply ignore this new symlink like they currently ignore the gpt-generator; I assume they would want to mount the canonical partition by its UUID anyway.
What about the multiple EFI System partition case?
We only automount the ESP if the boot loader told us which one was used to boot, and ignore all others.
Both ESP's have the same "by-purpose" so how would or should that be handled? The bootupd preliminary idea is to just stop doing mdraid, and firmware raid, and have a server sync all instances of the ESP with a canonical source. And it's also responsible for setting NVRAM boot entries and order, so that the firmware can do the proper fall back.
I am sorry, but you want ESP on RAID? That's a broken setup. People should get out of their head that that could ever work. Firmware fs drivers support writing and do not support raid, hence any write access will fuck up the raid. (And boot loaders write to it, for automatic boot counting/assessment)
The UEFI people have not defined RAID-backed ESP as something that is part of the spec, and hence it just doesn't work in the general case. If you put RAID into something it's supposed to improve reliability, but if the layer that is the primary user of the RAID storae doesn't actually care about RAID then it will improve fragility, nothing else.
Really, forget about having RAID-backed ESP. it's nonsense.
We only automount the ESP if the boot loader told us which one was used to boot, and ignore all others.
Is the proper way to inhibit automount to create an fstab entry with noauto? Is there a non-fstab way to inhibit the automounting of the ESP? What if the bootloader doesn't tell you whicih one was used to boot? (I don't know if GRUB does that.)
I am sorry, but you want ESP on RAID?
I don't, but it already exists. Sysadmins do it, distros do it, the idea keeps coming up. I want bootupd to manage syncing multiple ESP, instead of using mdraid - for exaclty the reasons you mention.
Activity
cmurf commentedon Dec 24, 2020
Whether this belongs in systemd proper, or just for deconfliction with coreos/bootupd project...
What about the multiple EFI System partition case? Both ESP's have the same "by-purpose" so how would or should that be handled? The bootupd preliminary idea is to just stop doing mdraid, and firmware raid, and have a server sync all instances of the ESP with a canonical source. And it's also responsible for setting NVRAM boot entries and order, so that the firmware can do the proper fall back.
grawity commentedon Dec 24, 2020
I don't think it should be handled in any special way.
The idea of this RFE is that they would be handled exactly the same as they're currently handled by the already existing code in systemd-gpt-auto-generator. Currently it has to choose one ESP to auto-mount at /efi or /boot; this would follow the same logic. (Even if you have multiple clones of the ESP, the firmware still picks a specific one to boot from.)
Systems which use bootupd to manage multiple ESPs would simply ignore this new symlink like they currently ignore the gpt-generator; I assume they would want to mount the canonical partition by its UUID anyway.
poettering commentedon Dec 25, 2020
We only automount the ESP if the boot loader told us which one was used to boot, and ignore all others.
I am sorry, but you want ESP on RAID? That's a broken setup. People should get out of their head that that could ever work. Firmware fs drivers support writing and do not support raid, hence any write access will fuck up the raid. (And boot loaders write to it, for automatic boot counting/assessment)
The UEFI people have not defined RAID-backed ESP as something that is part of the spec, and hence it just doesn't work in the general case. If you put RAID into something it's supposed to improve reliability, but if the layer that is the primary user of the RAID storae doesn't actually care about RAID then it will improve fragility, nothing else.
Really, forget about having RAID-backed ESP. it's nonsense.
cmurf commentedon Dec 25, 2020
Is the proper way to inhibit automount to create an fstab entry with
noauto? Is there a non-fstab way to inhibit the automounting of the ESP? What if the bootloader doesn't tell you whicih one was used to boot? (I don't know if GRUB does that.)I don't, but it already exists. Sysadmins do it, distros do it, the idea keeps coming up. I want bootupd to manage syncing multiple ESP, instead of using mdraid - for exaclty the reasons you mention.
udev: add dissect_image builtin
udev: add dissect_image builtin
udev: add dissect_image builtin
udev: add dissect_image builtin
udev: add dissect_image builtin
udev: add dissect_image builtin
udev: add dissect_image builtin
udev: add dissect_image builtin
udev: add dissect_image builtin
udev: new "image_dissect" builtin that can be used to generate symlin…