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

Bad grub configuration for /efi or /boot/efi partitions #2428

Open
HanM23 opened this issue Mar 20, 2024 · 4 comments
Open

Bad grub configuration for /efi or /boot/efi partitions #2428

HanM23 opened this issue Mar 20, 2024 · 4 comments

Comments

@HanM23
Copy link

HanM23 commented Mar 20, 2024

I do not understand the fix #2048
It will put grub.cfg into /boot/efi/grub if we use /boot/efi as esp partition OR into /efi/grub if we use /efi as esp partition

boot_dir = Path('/boot')

boot_dir_arg = []
			if boot_partition.mountpoint and boot_partition.mountpoint != boot_dir:
				boot_dir_arg.append(f'--boot-directory={boot_partition.mountpoint}')
				boot_dir = boot_partition.mountpoint

Indeed, either we use /efi (new style) or /boot/efi (old style) as esp partition, grub.cfg, grubenv, fonts, locales and so on should not be in this partition.

It causes issue with btrfs snapshot for instance if you want to do a restore. All thoses files should be located in the /boot/grub FOLDER inside the root filesystem.

Only bootx64.efi or/and grubx64.efi should be inside the esp partition.

NB: also, permissions of folder (e.g. the mounpoint) in esp partition must be drwx------ and not drwxr-xr-x

@p2world
Copy link

p2world commented Apr 7, 2024

I have meet the same issue, when use /efi as ESP, will exec grub-mkconfig -o /efi/grub/grub.cfg, this will cause 2 issues:

  1. There is no /efi/grub directory in the ESP.
  2. Grub will try to load /boot/grub/grub.cfg so it won't boot archlinux.

@codefiles
Copy link
Contributor

@HanM23

Indeed, either we use /efi (new style) or /boot/efi (old style) as esp partition, grub.cfg, grubenv, fonts, locales and so on should not be in this partition.

It causes issue with btrfs snapshot for instance if you want to do a restore. All thoses files should be located in the /boot/grub FOLDER inside the root filesystem.

What if the user chooses to encrypt the root file system? This would be problematic because archinstall supports encrypting the root file system but not /boot (see #1271).

@p2world, duplicate of #2372

@HanM23
Copy link
Author

HanM23 commented Apr 9, 2024

What if the user chooses to encrypt the root file system? This would be problematic because archinstall supports encrypting the root file system but not /boot (see #1271).

This is the problem indeed if the installer does not support /boot encryption, it should, hopefully soon.

@codefiles
Copy link
Contributor

Right. It can be done, it just is not there yet.

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

No branches or pull requests

3 participants