You are not logged in.
I followed this and set flag 63 to my /dev/sda1 yet systemd continues to both create /efi and mount /dev/sda1 to /efi. What am I missing?
# gdisk /dev/sda
Command (? for help): p
Command (? for help): x
Expert command (? for help): a
Partition number (1-4): 1
Known attributes are:
0: system partition
1: hide from EFI
2: legacy BIOS bootable
60: read-only
62: hidden
63: do not automount
Attribute value is 8000000000000000. Set fields are:
63 (do not automount)
Toggle which attribute field (0-63, 64 or <Enter> to exit): Last edited by graysky (2023-09-17 12:34:47)
Offline
Perhaps it is due to https://github.com/systemd/systemd/issues/5218
Offline
The ESP is not among the partitions that this flag may be applied to (I have no idea why, though): https://uapi-group.org/specifications/s … bute-flags
Also https://uapi-group.org/specifications/s … -operation
If the EFI partition shall not be mounted to /efi/ or /boot/, it must create /etc/fstab entries for them.
where "it" refers to "an installer" (so an Arch user). The "them" is weird: you need entries for both /efi/ and /boot/ rather than an entry for the EFI partition?
Last edited by Raynman (2023-09-12 18:28:38)
Offline
I added the entry to /etc/fstab and systemd is honoring it. Ideally, I do not want that partition mounted at all. I did not see an option for this in the systemd-gpt-auto-generator man page.
Offline
Allegedly it should not automount if you create a non-empty /efi file / directory on the root partition. But I'd not put much stock in that.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Option 1 : use a MBR drive instead of a GPT-formatted drive
(works fine if your drives are below 2 TiB )
Note that this generator has no effect on non-GPT systems
edit :
yes, contrary to popular belief EFI can boot from MBR drives.
(it does require setting a special partition ID on the ESP)
end of edit
Option 2
For a GPT drive you can disable the generator .
systemd.gpt_auto, rd.systemd.gpt_auto
Those options take an optional boolean argument, and default to yes. The generator is enabled by default, and a false value may be used to disable it (e.g. "systemd.gpt_auto=0").
EFI systems can boot from MBR drives
Last edited by Lone_Wolf (2023-09-12 19:38:19)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Ideally, I do not want that partition mounted at all.
A noauto fstab entry doesn't fit your situation?
Offline
A noauto fstab entry doesn't fit your situation?
Or a ro,noauto fstab entry even?
Offline
What if you mask the .mount units created by the generator?
Offline
The ESP is not among the partitions that this flag may be applied to (I have no idea why, though): https://uapi-group.org/specifications/s … bute-flags
Systemd follows the UEFI spec quite strictly here, and takes the stance that it's not allowed to interpret flag 63 on an ESP.
The UEFI spec reserves flags 48 to 63 for partition-type specific interpretation, meaning whoever defines the partition type gets to say what those flags mean. For its own partition types (i.e. those in the UAPI DPS) it has decreed that 63 means "don't automount", but it can't do that for the ESP which is defined by the UEFI spec and not under systemd's control. And the UEFI specification doesn't actually specify any additional flags for the ESP.
As such, in a strict understanding of the UEFI spec, flags 48 to 63 are not defined for the ESP. While it probably wouldn't do any harm to interpret 63 on the ESP, later versions of the UEFI spec could technically assign an entirely different meaning to 63. So I guess systemd wants to be on the safe side here.
See https://github.com/systemd/systemd/pull/5224 for the corresponding change in systemd.
Offline
Allegedly it should not automount if you create a non-empty /efi file / directory on the root partition. But I'd not put much stock in that.
That solved it, thank you as usual, Trilby!
Offline