View previous topic :: View next topic |
Author |
Message |
nxe9 Tux's lil' helper
Joined: 05 Jun 2021 Posts: 116
|
Posted: Sun Oct 20, 2024 3:55 pm Post subject: grub-install error. efi-directory is ignored |
|
|
Hi, I am trying to finish my new gentoo installation but grub-install fails and I don't quite understand why.
There are two partitions:
/dev/nvm1n1p1 <- mount point /efi, no encryption, vfat
/dev/nvm1n1p2 <- lvm, encrypted, contains root as xfs
/dev/mapper/vg0-root inside lvm with mount point /
/efi contains my vmlinuz files
The problem
Code: | #grub-install --efi-directory=/efi
Installing for x86_64-efi platform.
grub-install: error: attempt to install to encrypted disk without cryptodisk enabled. Set `GRUB_ENABLE_CRYPTODISK=y' in file `/etc/default/grub'. |
What is going on? /efi is not encrypted. I believe grub-install tries to create something inside /boot because after executing
Code: | #grub-install --efi-directory=/efi |
there is a folder grub inside /boot. And /boot is inside /dev/nvm1n1p2 which is encrypted. I assume this is the problem but why isn't the --efi-directory=/efi parameter working or what am I doing wrong? |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5122 Location: Bavaria
|
Posted: Sun Oct 20, 2024 4:02 pm Post subject: |
|
|
You are doing nothing wrong ... except not believing what grub says: Set `GRUB_ENABLE_CRYPTODISK=y' in file `/etc/default/grub'.
grub consists of two parts: The first part will be copied into your ESP (as \efi\gentoo\grubx64.efi), the second part (together with the grub.cfg) is in /boot/grub/...
When you start your machine, then UEFI will start grubx64.efi from your ESP. This part of grub will start its 2nd part and therfore needs access to /boot. If /boot is part of your root partition and encrypted then grubx64.efi must be able to encrypt the root partition. _________________ https://wiki.gentoo.org/wiki/User:Pietinger |
|
Back to top |
|
|
nxe9 Tux's lil' helper
Joined: 05 Jun 2021 Posts: 116
|
Posted: Sun Oct 20, 2024 4:12 pm Post subject: |
|
|
Thank you. Now I understand it better and after activating this option, the grub-install works. |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5122 Location: Bavaria
|
|
Back to top |
|
|
sMueggli Guru
Joined: 03 Sep 2022 Posts: 497
|
Posted: Mon Oct 21, 2024 9:15 am Post subject: Re: grub-install error. efi-directory is ignored |
|
|
nxe9 wrote: | What is going on? /efi is not encrypted. |
But /boot is encrypted. Grub needs to read /boot/grub/grub.cfg and later the kernel and initramfs.
If you are using LUKS2, please make sure that you do not use argon as PBKDF, otherwise Grub cannot unlock the LUKS container. |
|
Back to top |
|
|
|