View previous topic :: View next topic |
Author |
Message |
rzdndr Tux's lil' helper
Joined: 26 Jul 2024 Posts: 112
|
Posted: Sun Oct 27, 2024 9:20 am Post subject: nvme, distribution kernel |
|
|
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. https://forums.gentoo.org/viewtopic-p-8835320.html. There it says
Quote: | Without CONFIG_VMD=y kernel cannot access its NVME devices. |
In the distribution kernel I have these settings
Code: |
...
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:Distribution_Kernel#Modifying_kernel_configuration) using config snippets?
Regards |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5219 Location: Bavaria
|
Posted: Sun Oct 27, 2024 11:26 am Post subject: |
|
|
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:Pietinger/Tutorials/Kernel_Commandline_Parameter#Parameter:_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 |
|
Back to top |
|
|
rzdndr Tux's lil' helper
Joined: 26 Jul 2024 Posts: 112
|
Posted: Sun Oct 27, 2024 12:19 pm Post subject: |
|
|
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:Pietinger/Tutorials/Kernel_Commandline_Parameter#Parameter:_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? |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5219 Location: Bavaria
|
Posted: Sun Oct 27, 2024 1:00 pm Post subject: |
|
|
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 )
IF you configure your kernel manually THEN start here: https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_kernel_configuration _________________ https://wiki.gentoo.org/wiki/User:Pietinger |
|
Back to top |
|
|
rzdndr Tux's lil' helper
Joined: 26 Jul 2024 Posts: 112
|
Posted: Sun Oct 27, 2024 1:18 pm Post subject: |
|
|
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 )
IF you configure your kernel manually THEN start here: https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_kernel_configuration |
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: | 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. |
|
Back to top |
|
|
Nowa Developer
Joined: 25 Jun 2014 Posts: 445 Location: Nijmegen
|
Posted: Sun Oct 27, 2024 2:35 pm Post subject: |
|
|
How are you building the initramfs?
Please share the output of "emerge --config gentoo-kernel-bin" _________________ OS: Gentoo 6.10.12-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 |
|
Back to top |
|
|
rzdndr Tux's lil' helper
Joined: 26 Jul 2024 Posts: 112
|
Posted: Tue Oct 29, 2024 3:18 am Post subject: |
|
|
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 |
|
Back to top |
|
|
|
|
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
|
|