I've been using Gentoo for over 15 years now and decided to replace one of my machines with a brand new AMD Ryzen machine.
But: I can't get it to boot with a custom kernel, whilst the standard genkernel kernel ("genkernel all") boots up just fine.
Here's what I did:
I set up gentoo on a new machine with two NVMe storage devices according to the gentoo handbook.
My / is an ext4 formatted fs on a LV, whose VG/PV is residing on a raid1.
To get things booting up fast, I decided to go with the "allmighty kernel" by doing a genkernel all. I installed grub2 onto an ESP on the first NVMe device (after failing with RAID1 for the ESP).
Reboot, machine comes up. Now I took the kernel config from the genkernel build and menuconfig-ed it.
I unticked a whole lot of device drivers and other options, bearing in mind that (from experience) I'd still have to fine-tune the kernel config later.
However, I ended up with a kernel that does not boot at all.
When I select the custom built kernel via grub, the machine is stuck at the following:
Code: Select all
Booting a command list
Loading Linux 5.4.38-gentoo-x86_64 ...
Loading initial ramdisk ...
As soon as I boot my custom kernel, the machine completely locks up after it says "Loading initial ramdisk ...".
What I tried to fix it:
- I completely wiped the ESP and reinstalled the kernels and GRUB2 onto it
- I ran GRUB2 with "set debug=all", but it essentially only told me about loading stuff from the ESPs FAT filesystem
- I checked against https://wiki.gentoo.org/wiki/Ryzen and corrected some config values, with no success
- I did quite some research on the web and fiddled with stuff like random.trust_cpu=on/off
Here's my hardware specs:
- AMD Ryzen 5 3600
- ASUS B450M-A
- 4x8GB Kingston HyperX DDR4-2666
- Kingston KC2000 256GB NVMe PCIe SSD
- Is my assumption correct that there is an issue with my custom built kernel? Why would the system immediately lock up when I try to boot it and leave everything else untouched?
- Which kernel config could be the culprit here? I already invested quite some hours and can't see menuconfig clearly anymore

UPDATE for additional information:
My custom kernel config: https://pastebin.com/MT4yRyWG
I built the initramfs for my custom kernel through genkernel --domdadm --dolvm initramfs.
Output of lspci -v: https://pastebin.com/vgz5gE5j
The disk setup is as follows:
Code: Select all
* nvme0n1
- nvme0n1p1
- nvme0n1p2
- nvme0n1p3
* nvme1n1
- nvme1n1p1
- nvme1n1p2
- nvme1n1p3nvme0n1p2 (128MiB FAT32) is the ESP
nvme1n1p2 (128MiB) is not in use
nvmeXn1p3 (30GiB) are in RAID 1 (= md127)
/dev/m127 serves as a PV with one VG "sysvg", with one LV "root"
So: RAID1(nvme0n1p3, nvme1n1p3) => PV => VG "sysvg" => LV "root" => ext4 fs

