Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mdev udev at boot
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
rictjo
n00b
n00b


Joined: 22 Sep 2020
Posts: 11
Location: Sweden

PostPosted: Tue Sep 22, 2020 6:46 am    Post subject: mdev udev at boot Reply with quote

Hi

Desktop x86 user here.

So I built a kernel 5.4.48 using genkernel and setup a gentoo box running from a LVM cryptroot. It boots fine. When booting the working kernel mdev is activated prior to mounting of crypt disks.

I decided to upgrade the kernel to version 5.4.60 from the old config in order to build away a configuration quirk in the old system.

I now built the kernel, installed modules, generated a new intiramfs using genkernel and created a new grub.cfg

When I try to boot into the new kernel udev is activated and promptly fails at finding the CRYPT_ROOT

My /boot/grub/grub.cfg has the pertinent information

Quote:
linux /vmlinuz-5.4.60-gentoo-x86_64 root=/dev/mapper/vg0-root ro dolvm crypt_root=UUID=b0c654a8-b43e-4e3c-ba14-bdf343b4aa7f root=/dev/mapper/vg0-root rdblacklist=nouveau


as well as /etc/default/grub:
Quote:
GRUB_ENABLE_CRYPTODISK=y
GRUB_CMDLINE_LINUX="dolvm crypt_root=UUID=b0c654a8-b43e-4e3c-ba14-bdf343b4aa7f root=/dev/mapper/vg0-root"
GRUB_CMDLINE_LINUX_DEFAULT="rdblacklist=nouveau"


Now that was all working before which leads me to believe that an udev/mdev configuration mashup might be hiding somewhere but I don't know how to make the initramfs to activate mdev... or is that the kernel now...?

Anywho... help would be appreaciated.

Thanks in advance
_________________
Absurditate rerum cognitionem illuminatae
Back to top
View user's profile Send private message
Whissi
Developer
Developer


Joined: 12 Jan 2011
Posts: 167

PostPosted: Tue Sep 22, 2020 12:29 pm    Post subject: Reply with quote

mdev/udev has nothing to do with kernel.

Looks like you updated genkernel in the meanwhile: Until <genkernel-4.1 used mdev. Since >=genkernel-4.1 we are using udev.

Are you using genkernel to create both, kernel image and initramfs or just initramfs?

When genkernel starts and is unable to to find your root/crypt_root, you should get a shell. Please create gksosreport and attach this to this bug.
_________________
Regards,
Whissi
Back to top
View user's profile Send private message
rictjo
n00b
n00b


Joined: 22 Sep 2020
Posts: 11
Location: Sweden

PostPosted: Tue Sep 22, 2020 1:04 pm    Post subject: Reply with quote

Yes I can see that there are different genkernel versions when I boot into the older working config.

Old working config:
both kernel and initramfs were genkernel generated

New broken config:
kernel is updated from the previous one using (as root):
Code:

var=$(uname -r)
cp /usr/src/linux/.config /root/kernel-config-$var
eselect kernel list
eselect kernel set 2
nvar=$(eselect kernel list | awk '{print $2}' | tail -n 1)
ln -sf /usr/src/$nvar /usr/src/linux
zcat /proc/config.gz > /usr/src/linux/.config
cd /usr/src/linux
make oldconfig
nano -w .config
make && make modules_install
mount /boot
make install
genkernel --luks --lvm --busybox initramfs
grub-mkconfig -o /boot/grub/grub.cfg
reboot



I will append a gksosreport shortly
_________________
Absurditate rerum cognitionem illuminatae
Back to top
View user's profile Send private message
Whissi
Developer
Developer


Joined: 12 Jan 2011
Posts: 167

PostPosted: Tue Sep 22, 2020 1:07 pm    Post subject: Reply with quote

This is wrong. When you only generate initramfs, always pass
Code:
--kernel-config=/path/to/kernel.config
. Otherwise (watch genkernel output), genkernel will fallback to generic config at worst which won't match your actually kernel causing an unbootable system.
_________________
Regards,
Whissi
Back to top
View user's profile Send private message
rictjo
n00b
n00b


Joined: 22 Sep 2020
Posts: 11
Location: Sweden

PostPosted: Wed Sep 23, 2020 5:33 am    Post subject: Reply with quote

I updated gentoo-sources and compiled a new kernel 5.4.66 using genkernel. The generated initramfs was used and all the files were found to have been moved to /boot. I then updated the grub conf and rebooted. There are two problems arising

1) the issue. The kernel seems to fire up. Activate udev and then looks for lvms and promptly gives up and tells me that CRYPT_ROOT is not set for the kernel cmdline

2)` I enter the shell and gets a generated gksosreport.txt in my run. Great. But I cannot mount /boot or an USB. The USB is detected as a dev device but when I try to mount it on mnt on a dummy it just tells me the file doesn't exist. It's the same when I try to mount the boot. I find this strange since it had to mount boot in order to boot. I manually ran
Code:

mkdir /boot
mount /dev/sda2 /boot

In the shell
_________________
Absurditate rerum cognitionem illuminatae
Back to top
View user's profile Send private message
rictjo
n00b
n00b


Joined: 22 Sep 2020
Posts: 11
Location: Sweden

PostPosted: Wed Sep 23, 2020 11:32 am    Post subject: Reply with quote

Genkernel was creating a kernel with missing nodules. I manually edited a configuration and can now boot properly.
_________________
Absurditate rerum cognitionem illuminatae
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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