Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Custom kernel not booting w/ nVidia GT710
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
TheButcher
n00b
n00b


Joined: 22 Nov 2003
Posts: 63
Location: Vienna / Austria / Europe

PostPosted: Sun Jun 14, 2020 3:32 pm    Post subject: [SOLVED] Custom kernel not booting w/ nVidia GT710 Reply with quote

Hello there,

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:
  Booting a command list

Loading Linux 5.4.38-gentoo-x86_64 ...
Loading initial ramdisk ...

It doesn't matter whether i choose the initramfs from the initial "almighty-genkernel-build" or the initramfs built from my custom kernel.
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


For me it drills down to these questions:
  • 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 :wink:


Thanks for any advice!

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:
* nvme0n1
- nvme0n1p1
- nvme0n1p2
- nvme0n1p3
* nvme1n1
- nvme1n1p1
- nvme1n1p2
- nvme1n1p3


nvmeXn1p1 (2MiB each) are not in use
nvme0n1p2 (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


Last edited by TheButcher on Sun Jun 14, 2020 9:23 pm; edited 2 times in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 45794
Location: 56N 3W

PostPosted: Sun Jun 14, 2020 6:35 pm    Post subject: Reply with quote

TheButcher,

Code:
  Booting a command list

Loading Linux 5.4.38-gentoo-x86_64 ...
Loading initial ramdisk ...
comes from grub, just before it jumps to the kernel.

That says that the kernel is not initialising the console. That's not an error condition to the kernel.
The system may boot normally, you just can't see it.

ssh may work, you may be able to log in blind and your GUI may work, if you have it installed.

Please put your kernel .config onto a pastebin site.
Post the output of lspci, so we can see your hardware.

Explain your partitioning scheme, including the use of LVM.

Explain how you made your initrd. Root on raid requires an initrd to assemble the raid set, as that's normally performed by user space tools.
If you are trying to use the kernels Raid Auto Assembly that only works with raid superblock version 0.90. Version 1.2 has been the default for many years.

Starting LVM usually uses an initrd too.

The first step is to get some diagnostics on the console.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
TheButcher
n00b
n00b


Joined: 22 Nov 2003
Posts: 63
Location: Vienna / Austria / Europe

PostPosted: Sun Jun 14, 2020 7:32 pm    Post subject: Reply with quote

Hey NeddySeagoon,

Thanks for the heads-up and sorry for not giving all the information when opening the question.
I updated my initial post with the requested info.

During my research I also stumbled upon the possibility that the kernel is just not initializing/using the console.
I'm pretty certain however that this is not the case, because the machine is completely locked up.
No disk activity (through the LED on the machine), the keyboard is unresponsive in a sense that the caps lock LED is not lighting up when you press the caps lock key and the machine also is not accessible over the network even after a few minutes. :?


In the meanwhile I kind of restarted from a full genkernel config, only deselected a few device drivers and it boots just fine.
I can't stop of thinking that I messed up somewhere in the config, but maybe I'm also wrong.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 45794
Location: 56N 3W

PostPosted: Sun Jun 14, 2020 8:20 pm    Post subject: Reply with quote

TheButcher,

Lets just try for some diagnostics.
Code:
CONFIG_FB_NVIDIA=y
CONFIG_FB_NVIDIA_I2C=y
mush be off. Those options are for last century graphics cards.

Code:
CONFIG_FB_VESA=y
is probably hamless.

Code:
# CONFIG_FB_SIMPLE is not set
turn that on.

As you have
Code:
# CONFIG_DRM is not set
you won't be trying to use the nouveau Graphics driver.
I'm not sure if the nvidia-drivers needs kernel drm support or not. Its very picky about frame buffer consoles though.

Code:
# CONFIG_BLK_DEV_SR is not set
# CONFIG_CHR_DEV_SG is not set

_SR is for Optical drives. Off is OK if you don't have one.
_SG is for raw control of Optical drives and other character devices that use the SCSI protocol.

Code:
CONFIG_MD_AUTODETECT=y
It still works but your initrd should take care of it.
What does
Code:
mdadm -E /dev/nvmeXn1p3
say about the version.

Code:
$ sudo mdadm -E /dev/sda1
Password:
/dev/sda1:
          Magic : a92b4efc
        Version : 0.90.00
...
If you don't get Version : 0.90.00, turn it off as its no use to you.

Lets see if that gets some diagnostics.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
TheButcher
n00b
n00b


Joined: 22 Nov 2003
Posts: 63
Location: Vienna / Austria / Europe

PostPosted: Sun Jun 14, 2020 9:22 pm    Post subject: Reply with quote

Hey,

wooooow...

Only turning this off did the trick:
Code:
CONFIG_FB_NVIDIA=y

Looks like enabling this, together with my GT710 totally locked up the system.
Now that I got that disabled, the system boots like a charm.

Thanks for your help!
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