archinstall icon indicating copy to clipboard operation
archinstall copied to clipboard

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

Open HanM23 opened this issue 1 year ago • 4 comments

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

HanM23 avatar Mar 20 '24 21:03 HanM23

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.

p2world avatar Apr 07 '24 20:04 p2world

@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

codefiles avatar Apr 09 '24 02:04 codefiles

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.

HanM23 avatar Apr 09 '24 02:04 HanM23

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

codefiles avatar Apr 09 '24 02:04 codefiles