Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installing GRUB2 > existing EFI stub kernel to LVM/LUKS
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
kdcadet
n00b
n00b


Joined: 19 Jan 2020
Posts: 8
Location: USA

PostPosted: Mon Feb 10, 2020 12:47 pm    Post subject: Installing GRUB2 > existing EFI stub kernel to LVM/LUKS Reply with quote

Sakaki,

First of all, I'd like to thank you for your amazing EFI install guide. I have used it on two machines thus far and am very please with the results. Thank you for the work you put into helping all of us trying to get into the Gentoo world!

When I installed on my laptop things went perfectly (well apart from some naturally occurring hick-ups). When booting with the USB key inserted, Gentoo starts and prompts for the passphrase. When booting with the USB key missing Windows starts. This is ideal dual boot functionality.

However, my desktop is being a bit more difficult. It does not remember the USB key being at the top of the boot order so I have to change the settings each time I want to switch OS. I have since reinistalled and chosen to install the ESP on the internal drive. I would like to install GRUB2 to provide a boot menu on startup. When I installed GRUB2 it did not install without adding the GRUB_ENABLE_CRYPTODISK variable set to YES. I then rebooted, it prompted me for passphrase, and failed to open LUKS.

I was hoping GRUB2 could simply point to the Linux stub kernel I created using your buildkernel script. That way GRUB2 would not need to know that LUKS is even in place. Does GRUB need more than just what is contained in the .efi file to startup? If so, is there a way to put all those resources in the unencrypted ESP so that GRUB can startup without needing to access the LUKS/LVM file system?

Thank you in advance for any assistance or suggestions!
Back to top
View user's profile Send private message
rufnut
Apprentice
Apprentice


Joined: 16 May 2005
Posts: 252

PostPosted: Mon Feb 10, 2020 1:51 pm    Post subject: Reply with quote

Hi,

First part sounds like it could be fixed with a BIOS order setting.

You can also adjust the order as in this article.:
https://wiki.gentoo.org/wiki/Efibootmgr

kdcadet wrote:
Sakaki,
it prompted me for passphrase, and failed to open LUKS.


sounds like that is a LUKS issue but from memory certain modules are used by grub as well e.g.:
Code:
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha1
insmod lvm
insmod ext2

hope this helps.

:)
Back to top
View user's profile Send private message
kdcadet
n00b
n00b


Joined: 19 Jan 2020
Posts: 8
Location: USA

PostPosted: Mon Feb 10, 2020 3:01 pm    Post subject: Reply with quote

Simply editing the boot order does not fix my issue. Or rather, I can edit the boot order each time I want to switch from one OS to the other, but that is not my first choice of how to go about things. I would like to set things up so that I can choose on startup which OS to start.


Is it possible to load grub, and thereby the boot menu, without unlocking the drive?
Back to top
View user's profile Send private message
rufnut
Apprentice
Apprentice


Joined: 16 May 2005
Posts: 252

PostPosted: Mon Feb 10, 2020 3:42 pm    Post subject: Reply with quote

my install is old so I have the menu from ages back.

perhaps you could try this as it scans for kernels and creates menu entries.

https://wiki.gentoo.org/wiki/GRUB2#Installing_a_new_kernel

https://wiki.gentoo.org/wiki/GRUB2/Chainloading

I have a few machines and each is different 1 is full uefi and another pseudo uefi so a bit of experimentation might be needed.

good luck
Back to top
View user's profile Send private message
rufnut
Apprentice
Apprentice


Joined: 16 May 2005
Posts: 252

PostPosted: Mon Feb 10, 2020 3:48 pm    Post subject: Reply with quote

kdcadet wrote:
Is it possible to load grub, and thereby the boot menu, without unlocking the drive?


Sure is that is what confused me on your setup.

The only direct boot setup I had like your was with gummiboot now called:

https://wiki.gentoo.org/wiki/Systemd-boot << I don't use systemd though
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum