Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Issue migrating from genkernel-next to genkernel
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
cmrd
n00b
n00b


Joined: 13 Jul 2014
Posts: 18

PostPosted: Sun Aug 30, 2020 5:22 pm    Post subject: [SOLVED] Issue migrating from genkernel-next to genkernel Reply with quote

Hi,

genkernel-next was resently removed from the official repos.

I am trying to migrate to genkernel, and boot my kernel from an LVM volume (/dev/mapper/vg_root-lv_boot + /dev/mapper/vg_root-lv_root) inside a LUKS volume (/dev/nvme0n1p2).

I built and install my kernel with a script, so prior to running genkernel, it is already installed. Also, I don't build loadable modules.

Previously, I used
Code:
genkernel-next --install --lvm --luks initramfs
.

With genkernel, I am running
Code:
genkernel --install --luks --lvm --initramfs-overlay=/boot/overlay --no-ramdisk-modules initramfs
.

I then run
Code:
grub-mkconfig -o /boot/grub/grub.cfg


This generates a grub.cfg with a kernel command line:
Code:
linux /vmlinuz-5.4.60-gentoo root=/dev/mapper/vg_root-lv_root ro dolvm crypt_root=/dev/nvme0n1p2 real_root=/dev/mapper/vg_root-lv_root root_key=nvme0.key root_keydev=key root_trim=yes ...

In /etc/default/grub:
Code:
GRUB_CMDLINE_LINUX="dolvm crypt_root=/dev/nvme0n1p2 real_root=/dev/mapper/vg_root-lv_root root_key=nvme0.key root_keydev=key root_trim=yes ...
GRUB_ENABLE_CRYPTODISK=y


However when booting, after grub-unlock, after selecting the new kernel+initramfs in grub, after some boot output, I get an error 'can't mount device "mapper/vg_root-lv_root" ' followed by a list of partitions. At this point I would have expected an unlock prompt.

I reviewed man genkernel and the kernel commandline flags seemed the same.

The old (from genkernel-next) initramfs boots both the old (5.4.48 ) and the new (5.4.60 ) kernel, so I believe the point of failure is the new initramfs and not the new kernel. I think I'm using genkernel wrong but I can't see how.

I will try removing the overlay and the root_key stuff to verify that's not the root cause, but I doubt it.

Any idea what I'm doing wrong?


Last edited by cmrd on Mon Aug 31, 2020 5:42 pm; edited 1 time in total
Back to top
View user's profile Send private message
Whissi
Developer
Developer


Joined: 12 Jan 2011
Posts: 166

PostPosted: Sun Aug 30, 2020 7:23 pm    Post subject: Reply with quote

This sounds like a straightforward setup which should work. I cannot spot anything wrong (you don't need real_root= but...).

Of course, not knowing what you are appending via overlay... :)

Also: Please make sure you build both, kernel and initramfs with genkernel. If you only use genkernel to create initramfs you have to pay attention that you pass correct --kernel-config to genkernel or chances are high that you end up with an initramfs not working with your kernel.
_________________
Regards,
Whissi
Back to top
View user's profile Send private message
cmrd
n00b
n00b


Joined: 13 Jul 2014
Posts: 18

PostPosted: Mon Aug 31, 2020 5:41 pm    Post subject: Reply with quote

Whissi wrote:
... pay attention that you pass correct --kernel-config to genkernel or chances are high that you end up with an initramfs not working with your kernel.

This was my issue. Adding --kernel-config produced an initramfs that fully worked with my former genkernel-next overlay:
Code:
genkernel --install --luks --lvm --initramfs-overlay=/boot/overlay --kernel-config=/usr/src/linux/.config --no-ramdisk-modules initramfs

Thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing 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