Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boot.loader.efi.efiSysMountPoint doesn't work as expected #127727

Open
Atemu opened this issue Jun 21, 2021 · 5 comments
Open

boot.loader.efi.efiSysMountPoint doesn't work as expected #127727

Atemu opened this issue Jun 21, 2021 · 5 comments

Comments

@Atemu
Copy link
Member

Atemu commented Jun 21, 2021

Describe the bug
A clear and concise description of what the bug is.

GRUB says it installs into boot.loader.efi.efiSysMountPoint when the install script is run but actually installs itself into /boot which is no bueno because that's not my ESP.

systemd-boot installs itself into efiSysMountPoint as expected but also puts the kernels and initrds on it which is bad again because my ESP is only 100M (thanks M$).

This leaves no way to have a separate ESP and boot partition which is essential for dual boot with Windows.

Expected behavior
A clear and concise description of what you expected to happen.

Boot loaders should go into boot.loader.efi.efiSysMountPoint and the kernels etc. should go into /boot/ (or, even better, a user-specified location)

Additional context
Add any other context about the problem here.

While we're at it we might want to look into making systemd-boot and GRUB share the same initrds and kernels because activating both duplicates them currently.

Notify maintainers

@nh2 @samueldr

Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
@samueldr
Copy link
Member

GRUB should be installing to the EFI mountpoint:

Maybe we should have a UEFI test that uses the efi system mount point feature to validate this. I have not verified whether it works or not.

I'm interested in hearing more details about your setup and what you are observing.


I thought systemd-boot required boot entries to live on the ESP.

systemd-boot loads boot entry information from the EFI system partition (ESP), [...], as well as from the Extended Boot Loader partition if it exists (usually mounted to /boot/).

Looks like it can do something else too.


Boot loaders should go into boot.loader.efi.efiSysMountPoint and the kernels etc. should go into /boot/ (or, even better, a user-specified location)

User-specified would be helpful. Defaulting to /boot would probably keep the current behaviour, but such a change would need to be studied carefully, considering each bootloader config handles installing boot files independently.

@stale
Copy link

stale bot commented Jan 9, 2022

I marked this as stale due to inactivity. → More info

@Atemu
Copy link
Member Author

Atemu commented Jan 10, 2022

Still important to me.

@colemickens
Copy link
Member

Just hit this myself. I'd like to see this fixed too, though I might be more inclined to spend my effort on a different approach to generation/bootloader handling by adding grub2 support to 'bootspec' but that's just a dream right now.

I sort of have a little bit of a loose undefined list in my head -- We are also inconsistent about how grub is installed into a subdirectory when bootloaderId is set or unset. This stuff was noticed when I wrote a module to enable secure boot by using Fedora's shim and then using mokutil to disable secondary verification.

@colemickens
Copy link
Member

colemickens commented Mar 20, 2022

BTW, it seems like the Arch wiki is based on a 2016 comment on systemd that hints that the path forward is "/efi" and xbootloader on "/boot". systemd/systemd#3757 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants