Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

nvme, distribution kernel

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
rzdndr
Tux's lil' helper
Tux's lil' helper
Posts: 118
Joined: Fri Jul 26, 2024 9:34 am

nvme, distribution kernel

  • Quote

Post by rzdndr » Sun Oct 27, 2024 9:20 am

Hello

I am trying to install gentoo on new hardware (AMD based) that has an nvme drive. I am using elilo, and would like to use that because of its simplicity.

I have insalled gentoo-kernel-bin and copied the vmlinuz kernel and initramfs file to my efi partition.

When I try to boot, the system reboots itself, after loading the vmlinuz and initramfs files.

How could I determine the cause of this?

I am suspecting that this has to do with nvme drives, and how they are not recognized by the initramfs. I found a thread in the forum that might be related to this. viewtopic-p-8835320.html. There it says
Without CONFIG_VMD=y kernel cannot access its NVME devices.
In the distribution kernel I have these settings

Code: Select all

...
CONFIG_VMD=m
...
CONFIG_NVME_COMMON=m
CONFIG_NVME_CORE=m
CONFIG_BLK_DEV_NAME=m
CONFIG_NVME_MULTIPATH=y
I also wanted to ask if I could use distribution kernel, but use the gentoo-kernel and instead of gentoo-kernel-bin, and modify the configuration using (https://wiki.gentoo.org/wiki/Project:Di ... figuration) using config snippets?

Regards
Top
pietinger
Administrator
Administrator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Sun Oct 27, 2024 11:26 am

rzdndr,

before I answer I want to give you some infos:

1. You can have/use a kernel with an corresponding initramfs OR a kernel that does not have initramfs. What is the difference?

Any kernel that is NOT manually configured does not know which modules it needs to access the root partition, but still needs to run on every machine. Therefore, it passes control to an inítramfs that loads the appropriate modules. If you want to have a kernel without initramfs, you have to configure it manually and ALL the modules the kernel needs to access the root partition must be statically built INTO the kernel. Every Gentoo distribution kernel has an associated initramfs (because it is not manually configured) because the kernel requires it.

2. If you want your machine to boot a kernel WITH initramfs, then UEFI or the bootmanager/bootloader must load BOTH (this is done via the parameter initrd=...).

3. If a kernel reboots on its own, this is almost always due to a kernel panic. The most common reason for a kernel panic at system startup is that the kernel cannot access the root partition.

I suspect that your “elilo” is only trying to start the kernel, but not telling it the initramfs. Please read this paragraph:
https://wiki.gentoo.org/wiki/User:Pieti ... _initrd.3D
Another possible mistake could be that elilo gives the kernel the wrong information about its root partitiion (root=...).

(Please don't ask me HOW to configure the “elilo” - I don't use it)

(I don't think it has anything to do with VMD because you have an AMD machine and vmd is the Intel Volume Management Device Driver.)
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
rzdndr
Tux's lil' helper
Tux's lil' helper
Posts: 118
Joined: Fri Jul 26, 2024 9:34 am

  • Quote

Post by rzdndr » Sun Oct 27, 2024 12:19 pm

pietinger wrote:rzdndr,

before I answer I want to give you some infos:

1. You can have/use a kernel with an corresponding initramfs OR a kernel that does not have initramfs. What is the difference?

Any kernel that is NOT manually configured does not know which modules it needs to access the root partition, but still needs to run on every machine. Therefore, it passes control to an inítramfs that loads the appropriate modules. If you want to have a kernel without initramfs, you have to configure it manually and ALL the modules the kernel needs to access the root partition must be statically built INTO the kernel. Every Gentoo distribution kernel has an associated initramfs (because it is not manually configured) because the kernel requires it.

2. If you want your machine to boot a kernel WITH initramfs, then UEFI or the bootmanager/bootloader must load BOTH (this is done via the parameter initrd=...).

3. If a kernel reboots on its own, this is almost always due to a kernel panic. The most common reason for a kernel panic at system startup is that the kernel cannot access the root partition.

I suspect that your “elilo” is only trying to start the kernel, but not telling it the initramfs. Please read this paragraph:
https://wiki.gentoo.org/wiki/User:Pieti ... _initrd.3D
Another possible mistake could be that elilo gives the kernel the wrong information about its root partitiion (root=...).

(Please don't ask me HOW to configure the “elilo” - I don't use it)

(I don't think it has anything to do with VMD because you have an AMD machine and vmd is the Intel Volume Management Device Driver.)
Yes, I have an AMD machine, and do not have to enable VMD.

In my kernel config I have CONFIG_BLK_DEV_NVME=m, which I changed to y (using config snippets) and recompiled the kernel. I get the same "reboot loop" behavior. If this was left at "m" then I think the nvme devices would not be available when initramfs is loaded, would that be correct?
Top
pietinger
Administrator
Administrator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Sun Oct 27, 2024 1:00 pm

rzdndr wrote:In my kernel config I have CONFIG_BLK_DEV_NVME=m, which I changed to y (using config snippets) and recompiled the kernel. I get the same "reboot loop" behavior. If this was left at "m" then I think the nvme devices would not be available when initramfs is loaded, would that be correct?
No.

IF you use our distribution kernel THEN everything can be a <M>odule .. because the initramfs OF our dist kernel loads every necessary module. (It is only important that the initramfs gets load also :lol: )
IF you configure your kernel manually THEN start here: https://wiki.gentoo.org/wiki/User:Pieti ... figuration
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
rzdndr
Tux's lil' helper
Tux's lil' helper
Posts: 118
Joined: Fri Jul 26, 2024 9:34 am

  • Quote

Post by rzdndr » Sun Oct 27, 2024 1:18 pm

pietinger wrote:
rzdndr wrote:In my kernel config I have CONFIG_BLK_DEV_NVME=m, which I changed to y (using config snippets) and recompiled the kernel. I get the same "reboot loop" behavior. If this was left at "m" then I think the nvme devices would not be available when initramfs is loaded, would that be correct?
No.

IF you use our distribution kernel THEN everything can be a <M>odule .. because the initramfs OF our dist kernel loads every necessary module. (It is only important that the initramfs gets load also :lol: )
IF you configure your kernel manually THEN start here: https://wiki.gentoo.org/wiki/User:Pieti ... figuration
Thanks for the link, will read that.

My vmlinuz and initramfs files are loaded (I can see them loaded, with the spinning pipe, forwardslash, and backslash characters). That would mean that my elilo configuration can find the vmlinuz and initramfs files correctly. After that the screen goes blank and reboots. That is a kernel panic I would assume. At this stage there are no logs created, from what I can tell. I think the nvme devices are not present in the devices folder (in my elilo configuration I refer to the root partition as /dev/nvme0n1p3).

I also made sure that the modules are loaded, checking the modules.buildin file with

Code: Select all

cat /lib/modules/6.6.57-gentoo-dist/modules.builtin | grep -i nvme
There are nvme modules in that file listed. Those I do not have on my original PC, which does not have nvme, and nvme is a module (set to =m).

I also checked the config file generated into the /boot folder. This also has CONFIG_BLK_DEV_NVME=y, CONFIG_NVME_COMMON=y and CONFIG_NVME_CORE=y. Those were set to =m before I compiled the kernel. So these configuration settings are in effect in the current kernel and initramfs files I would believe.
Top
Nowa
Developer
Developer
User avatar
Posts: 522
Joined: Wed Jun 25, 2014 7:07 am
Location: Hilversum

  • Quote

Post by Nowa » Sun Oct 27, 2024 2:35 pm

How are you building the initramfs?

Please share the output of "emerge --config gentoo-kernel-bin"
OS: Gentoo 6.19.3-gentoo-dist, ~amd64, 23.0/desktop/plasma/systemd
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Top
rzdndr
Tux's lil' helper
Tux's lil' helper
Posts: 118
Joined: Fri Jul 26, 2024 9:34 am

  • Quote

Post by rzdndr » Tue Oct 29, 2024 3:18 am

Nowa wrote:How are you building the initramfs?

Please share the output of "emerge --config gentoo-kernel-bin"
Sorry for the late reply. I have been able to boot my new laptop with gentoo.

I am not using gentoo-kernel-bin anymore, instead am using gentoo-kernel. And to enable nvme drives (to make these build-in not modules) I have used config snippets.

The output you requested is at https://pastebin.com/NHtBXtjM
Top
Post Reply

7 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic