Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel newer then 5.13.not starting
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
nirse
n00b
n00b


Joined: 23 Feb 2017
Posts: 4

PostPosted: Fri Dec 17, 2021 9:39 am    Post subject: Kernel newer then 5.13.not starting Reply with quote

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
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3948

PostPosted: Fri Dec 17, 2021 3:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5352
Location: Bavaria

PostPosted: Fri Dec 17, 2021 9:08 pm    Post subject: Reply with quote

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
View user's profile Send private message
nirse
n00b
n00b


Joined: 23 Feb 2017
Posts: 4

PostPosted: Mon Dec 20, 2021 9:35 am    Post subject: Reply with quote

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
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