View previous topic :: View next topic |
Author |
Message |
nirse n00b
Joined: 23 Feb 2017 Posts: 4
|
Posted: Fri Dec 17, 2021 9:39 am Post subject: Kernel newer then 5.13.not starting |
|
|
Hi there,
since a while I've been seeing that kernels that I compile don't boot. All are from gentoo-sources. I'm not sure what the problem is, the only message I see is
Quote: | "EFI Stub loaded initrd from command line option" |
and then nothing happens. Since I started seeing this on newer kernels, I have managed to build several 5.10 kernels and boot into them fine, but anything after 5.13.11 I've tried fails to boot. I'm using efibootmgr and EFI Stub to start the kernel and that was working fine for me. I started using this system about 8 months ago and never had trouble like this before, was installing new kernels roughly every month.
I've scripted the build and install, so it shouldn't be a case of mistakes in the build or install procedure. Here's the script as I've used it for building the 5.10.85 kernel I'm running just now:
Code: |
VERSION=5.10.85
RELEASE=gentoo
ARCH=x86_64
mount /boot/efi
cd /usr/src/linux-${VERSION}-${RELEASE}
export MAKEFLAGS='-j16'
make oldconfig
make all
make install
make modules_install
genkernel --lvm --luks --btrfs --kernel-config=/boot/config-${VERSION}-${RELEASE}-${ARCH} initramfs
cp /boot/vmlinuz-${VERSION}-${RELEASE}-${ARCH} /boot/efi/EFI/boot/
cp /boot/initramfs-${VERSION}-${RELEASE}-${ARCH}.img /boot/efi/EFI/boot/
# efibootmgr -c -d /dev/nvme0n1 -L "${RELEASE} ${VERSION} $(date -I'minute')" -l "\EFI\boot\vmlinuz-${VERSION}-${RELEASE}-${ARCH}" -u "initrd=\EFI\boot\initramfs-${VERSION}-${RELEASE}-${ARCH}.img root=/dev/mapper/vg0-root ro dolvm dobtrfs crypt_root=UUID=33f9a9be-88b1-49da-8e69-6e6dbe0888b9 init=/lib/systemd/systemd resume=/dev/nvme0n1p2 nvidia-drm.modeset=1"
efibootmgr -c -d /dev/nvme0n1 -L "${RELEASE} ${VERSION} $(date -I'minute')" -l "\EFI\boot\vmlinuz-${VERSION}-${RELEASE}-${ARCH}" -u "initrd=\EFI\boot\initramfs-${VERSION}-${RELEASE}-${ARCH}.img root=/dev/mapper/vg0-root ro dolvm dobtrfs crypt_root=UUID=33f9a9be-88b1-49da-8e69-6e6dbe0888b9 init=/lib/systemd/systemd nvidia-drm.modeset=1"
# cd -
|
Kernels that I tried to build that failed were:
- linux-5.14.3-gentoo
- linux-5.15.5-gentoo
- linux-5.15.8-gentoo
Working kernels:
- linux-5.13.11-gentoo
- linux-5.10.59-gentoo
- linux-5.10.78-gentoo
- linux-5.10-85-gentoo
Any help would be much appreciated.
n.
Last edited by nirse on Thu Dec 23, 2021 8:29 am; edited 1 time in total |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3948
|
Posted: Fri Dec 17, 2021 3:33 pm Post subject: |
|
|
Quote: |
efibootmgr -c -d /dev/nvme0n1 -L "${RELEASE} ${VERSION} $(date -I'minute')" -l "\EFI\boot\vmlinuz-${VERSION}-${RELEASE}-${ARCH}" -u "initrd=\EFI\boot\initramfs-${VERSION}-${RELEASE}-${ARCH}.img root=/dev/mapper/vg0-root ro dolvm dobtrfs crypt_root=UUID=33f9a9be-88b1-49da-8e69-6e6dbe0888b9 init=/lib/systemd/systemd resume=/dev/nvme0n1p2 nvidia-drm.modeset=1"
|
The "dolvm" "dobtrfs" and "crypt_root" clauses are to be understood by genkernel.NOT efibootmgr.
I see you are using systemd.
Systemd reads the /etc/crypttab to generate luks mounts.
Is your /etc/crypttab ok?
TRY this for the shake of testing.
Just once use the binary kernel with your existing setup and if it boot then you will know it the kernel that gives you trouble otherwise you should look at the luks setup
IMPORTANT:
your invocation of efibootmgr is wrong
It should include
Code: |
-d <ESP-disk> -p <ESP-partition-number>
|
You are lacking the partition number. _________________
|
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5352 Location: Bavaria
|
Posted: Fri Dec 17, 2021 9:08 pm Post subject: |
|
|
alamahant wrote: | your invocation of efibootmgr is wrong
It should include
Code: |
-d <ESP-disk> -p <ESP-partition-number>
|
You are lacking the partition number. |
If no parameter "p" is set, efibootmgr sets it to 1 (so, if his ESP is partition nr. 1 there is no problem) |
|
Back to top |
|
|
nirse n00b
Joined: 23 Feb 2017 Posts: 4
|
Posted: Mon Dec 20, 2021 9:35 am Post subject: |
|
|
thanks for your replies: indeed my ESP is on the first partition, so no flag needed.
Part of the mystery is that I'm using basically the same command for building and installing various kernels, but some start and some don't, so that kind of rules out basic misconfiguration. But clearly something isn't quite right, or I wouldn't have this issue. Also, that I can still boot using a 5.10 kernel implies that there's nothing wrong with my luks setup in itself.
Perhaps noteworthy to add, but not sure if it is relevant, was that this problem started appearing after I first tried out installing sys-kernel/gentoo-kernel-bin. |
|
Back to top |
|
|
|