Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Installing Gentoo
  • Search

Kernel panic upon boot

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
112 posts
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • Next
Author
Message
dmpogo
Advocate
Advocate
Posts: 3714
Joined: Thu Sep 02, 2004 9:21 pm
Location: Canada

  • Quote

Post by dmpogo » Sat Oct 11, 2025 9:44 pm

amosbarsinai wrote:It's not NVMe, I'm not rich :|
But I installed a dist kernel and now it's fine, thanks to you all
Great ! Now you can compare the .config of the dist kernel, and of your attempt for gentoo-sources, and see where the critical difference is.
Top
pietinger
Administrator
Administrator
Posts: 6622
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Sat Oct 11, 2025 10:05 pm

dmpogo wrote:Great ! Now you can compare the .config of the dist kernel, and of your attempt for gentoo-sources, and see where the critical difference is.
Hmm ... this is very difficult for a kernel newbie ... because you have to know which are sensible options. In addition, PO wanted to configure a kernel without initramfs. Here, you need to know which modules need to be statically configured into the kernel and for which modules it doesn't matter whether they are static or <M>odules.

I suggest always a "lsmod" (after booting with our Gento dist-kernel) to get an idea of the parts of a machine (of course together with lspci-k). With this list you can search in "make menuconfig" for the description of this module (after hitting / you get the input mask for a search). Select the number and you will be transferred to the option. There you select <Help>.
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
dmpogo
Advocate
Advocate
Posts: 3714
Joined: Thu Sep 02, 2004 9:21 pm
Location: Canada

  • Quote

Post by dmpogo » Sat Oct 11, 2025 10:41 pm

pietinger wrote:
dmpogo wrote:Great ! Now you can compare the .config of the dist kernel, and of your attempt for gentoo-sources, and see where the critical difference is.
Hmm ... this is very difficult for a kernel newbie ... because you have to know which are sensible options. In addition, PO wanted to configure a kernel without initramfs. Here, you need to know which modules need to be statically configured into the kernel and for which modules it doesn't matter whether they are static or <M>odules.

I suggest always a "lsmod" (after booting with our Gento dist-kernel) to get an idea of the parts of a machine (of course together with lspci-k). With this list you can search in "make menuconfig" for the description of this module (after hitting / you get the input mask for a search). Select the number and you will be transferred to the option. There you select <Help>.
Absolutely !

What I tended to do, is to open menuconfig for both kernels side by side, and just go line by line :) But by now I know the structure of the config, so it is hard to put myself into shoes who does not
Top
amosbarsinai
n00b
n00b
Posts: 72
Joined: Tue Sep 02, 2025 6:17 pm

  • Quote

Post by amosbarsinai » Sun Oct 12, 2025 6:50 am

I think that's what I'm gonna do, thank you. I'm not gonna be online though (I'm going back to school on Wednesday... Break's over...)
Top
Goverp
Advocate
Advocate
User avatar
Posts: 2402
Joined: Wed Mar 07, 2007 6:41 pm

  • Quote

Post by Goverp » Sun Oct 12, 2025 10:47 am

A small plug for my cfcfg config comparator, which may, or may not, be of help.
Greybeard
Top
dmpogo
Advocate
Advocate
Posts: 3714
Joined: Thu Sep 02, 2004 9:21 pm
Location: Canada

  • Quote

Post by dmpogo » Sun Oct 12, 2025 5:28 pm

Goverp wrote:A small plug for my cfcfg config comparator, which may, or may not, be of help.

Downloaded :D
Top
pietinger
Administrator
Administrator
Posts: 6622
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Sun Oct 26, 2025 10:07 am

pietinger wrote:The only thing I have seen in your output for accessing disks is:

Code: Select all

00:12.7 Universal Flash Storage controller [0109]: Intel Corporation Alder Lake-N UFS Controller [8086:54ff]
        DeviceName: Onboard - Other
        Kernel driver in use: ufshcd
amosbarsinai,

even though you have now installed our Gentoo distribution kernel (and it works), I googled your machine again today while reviewing my threads. And yes, you don't have NVMe, but a highly integrated flash controller. So if you want to try a manual kernel configuration again at some point, you need to enable the following (you may not need all three options, but I don't know your hardware in detail):

Code: Select all

Device Drivers  --->
    [*] Universal Flash Storage Controller  --->
        [*]   Universal Flash Storage BSG device node
        [*]   PCI bus based UFS Controller support
        [*]   Platform bus based UFS Controller support
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
amosbarsinai
n00b
n00b
Posts: 72
Joined: Tue Sep 02, 2025 6:17 pm

  • Quote

Post by amosbarsinai » Sun Oct 26, 2025 11:13 am

For some reason I can only set them as modules... Pressing Enter in nconfig just marks an M
Top
pietinger
Administrator
Administrator
Posts: 6622
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Sun Oct 26, 2025 11:32 am

amosbarsinai wrote:For some reason I can only set them as modules... Pressing Enter in nconfig just marks an M
I guess you have enabled SCSI as <M>odule ... and it depends on it:

Code: Select all

Depends on: SCSI [=y] && SCSI_DMA [=y]
Set this as built-in ->

Code: Select all

Device Drivers  --->
    SCSI device support  --->
        {*} SCSI device support
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
amosbarsinai
n00b
n00b
Posts: 72
Joined: Tue Sep 02, 2025 6:17 pm

  • Quote

Post by amosbarsinai » Sun Oct 26, 2025 1:15 pm

That didn't solve the problem. What you mentioned was already enabled, and I checked again - it isn't able to be *.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56088
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Oct 26, 2025 2:21 pm

amosbarsinai,

Something that it depends on will be set as <m>.
Go into the help and read the Depends On:
Everything there must be <*> before you can set <*>

You may need to apply that recursively.

It cannot work as <m>
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
amosbarsinai
n00b
n00b
Posts: 72
Joined: Tue Sep 02, 2025 6:17 pm

  • Quote

Post by amosbarsinai » Sun Oct 26, 2025 2:44 pm

Works. Thanks!
Now, should I just run

Code: Select all

make
make modules_install
make install
?
How do I have both the dist-kernel and the manually configured/compiled kernel in GRUB available?
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56088
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Oct 26, 2025 3:44 pm

amosbarsinai,

Regenerating grub.cfg will do that for you.
You should get both kernels in the menu.
You may need to go into the Advanced menu at the grub menu screen as the kernel you want to boot may not be the default kernel.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
pietinger
Administrator
Administrator
Posts: 6622
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Sun Oct 26, 2025 3:45 pm

amosbarsinai wrote:How do I have both the dist-kernel and the manually configured/compiled kernel in GRUB available?
You need your kernel in /boot (either "make install" OR you copy it yourself) and then a grubmkconfig =>
https://wiki.gentoo.org/wiki/User:Pieti ... eat_Sheets
->
Changing the configuration of your used kernel:
->
start after "make menuconfig"
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
amosbarsinai
n00b
n00b
Posts: 72
Joined: Tue Sep 02, 2025 6:17 pm

  • Quote

Post by amosbarsinai » Sun Oct 26, 2025 6:29 pm

I entered my linux source directory, ran

Code: Select all

make modules_install
make install
grub-mkconfig -o /boot/grub/grub.cfg
(as root of course)
And for some reason, it installed a new entry called linux-gentoo-gentoo-dist (yeah... it's not a distkernel and there's no reason for the double "gentoo").
So I removed my /boot directory, but then I forgot to rerun grub-install and got a kernel panic...
Long story short, my system is fine now, but I still can't manage to install the manually compiled kernel.

How do I wipe my whole /boot and /efi directories and just install both kernels cleanly?
Top
pietinger
Administrator
Administrator
Posts: 6622
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Sun Oct 26, 2025 7:16 pm

amosbarsinai wrote:[...] How do I wipe my whole /boot and /efi directories and just install both kernels cleanly?
Please dont do this ... remember you have a bootable dist-kernel you can choose in grub ... ;-)
(So, you dont need to boot with a bootCD)
amosbarsinai wrote:[...] but then I forgot to rerun grub-install and got a kernel panic...
1. Dont do a grub install again ... it is not necessary
2. If you have now a kernel panic this means: You have booted your new kernel ... and there is a problem (again) ...

... time to give us your kernel .config to inspect it 8)

... and a "ls -al /boot" ... and to be on a safe side the 10-section of your /boot/grub/grub.cfg (for the moment we dont need more)
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56088
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Oct 26, 2025 7:27 pm

amosbarsinai,

Your lspci -nnk output would be good too.
If it's further up the topic, that's fine. I didn't look as I'm on my phone just now.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
amosbarsinai
n00b
n00b
Posts: 72
Joined: Tue Sep 02, 2025 6:17 pm

  • Quote

Post by amosbarsinai » Sun Oct 26, 2025 7:36 pm

Uh, sorry, my mistake
Not a kernel panic
A GRUB panic...
The rescue thing?
Something about normal.mod not existing
Anyway I resolved that by booting into the LiveCD, re-emerging the gentoo-kernel-bin, and reinstalling GRUB.
I just want both the distkernel and my own kernel as options...
And what happened up there with the linux-gentoo-gentoo-dist?
Top
pietinger
Administrator
Administrator
Posts: 6622
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Sun Oct 26, 2025 8:06 pm

amosbarsinai wrote:And what happened up there with the linux-gentoo-gentoo-dist?
I dont know ... what do you have on your /boot? (ls -al /boot) ... and the grub.cfg (only 10-section).

Maybe check also these two lines in your .config ->

Code: Select all

#
# General setup
#
[...]
CONFIG_LOCALVERSION=""
# CONFIG_LOCALVERSION_AUTO is not set
What do you have here?
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
amosbarsinai
n00b
n00b
Posts: 72
Joined: Tue Sep 02, 2025 6:17 pm

  • Quote

Post by amosbarsinai » Sun Oct 26, 2025 8:45 pm

Code: Select all

╰─>$ grep -i "CONFIG_LOCALVERSION" .config
CONFIG_LOCALVERSION="-gentoo-dist"
# CONFIG_LOCALVERSION_AUTO is not set
Yup, explains that...
But why is CONFIG_LOCALVERSION "-gentoo-dist"?

Code: Select all

╰─>$ ls -al /boot
total 43308
drwxr-xr-x 1 root root      126 Oct 26 20:24 ./
drwxr-xr-x 1 root root      138 Oct 26 20:24 ../
drwxr-xr-x 1 root root       84 Oct 26 20:24 grub/
-rw-r--r-- 1 root root 23808336 Oct 26 20:24 initramfs-6.12.47-gentoo-dist.img
-rw-r--r-- 1 root root 20519920 Oct 26 20:24 kernel-6.12.47-gentoo-dist
I haven't installed my own kernel since I wiped my boot directory...

Code: Select all

╰─>$ sudo head -n 20 /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi
Top
amosbarsinai
n00b
n00b
Posts: 72
Joined: Tue Sep 02, 2025 6:17 pm

  • Quote

Post by amosbarsinai » Sun Oct 26, 2025 9:14 pm

Never mind, I fixed the problem.
Just needed to NOT wipe my /boot after I saw the weird ending...
Thanks so much to you two, you're always ridiculously helpful!
Top
pietinger
Administrator
Administrator
Posts: 6622
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Sun Oct 26, 2025 10:13 pm

amosbarsinai wrote:Thanks so much to you two, you're always ridiculously helpful!
You are very Welcome! :D

If I may give you another piece of advice: Install 6.17 right away (it's rock solid now). Then you won't get confused with the versions.

Feel free to write here when your first manually configured kernel boots ... I can still remember how good I felt back then.

I don't know where the “-gentoo-dist” comes from... maybe it's a new default... anyway, get rid of it. (Oh yes, your sound might be difficult ... always these new SoC System-on-a-Chip...) Don't be frustrated and be patient ... yes, you learn that with Gentoo Linux too :lol:

If you want to know when I last had a kernel panic ... I'm now on 6.17.5 and my machine has the Intel Volume Management Device [*] ... just take a look here:
https://forums.gentoo.org/viewtopic-t-1 ... ight-.html
:evil:

But I can reassure you: it happens extremely rarely. 8)

*)

Code: Select all

# lspci -nnk
[...]
0000:00:0e.0 RAID bus controller [0104]: Intel Corporation Volume Management Device NVMe RAID Controller Intel Corporation [8086:a77f]
        DeviceName: Onboard - Other
        Subsystem: Intel Corporation Device [8086:0000]
        Kernel driver in use: vmd
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
amosbarsinai
n00b
n00b
Posts: 72
Joined: Tue Sep 02, 2025 6:17 pm

  • Quote

Post by amosbarsinai » Mon Nov 03, 2025 3:40 pm

So...
I emerged sys-kernel/vanilla-sources, enabled everything I was told to in this post, compiled it and installed it, and when I boot it...
Guess what?...
Kernel panic!
Also, I'm not sure if it's a panic... it might just be hanging.
There's no kernel panic message. This happened before (I posted about it here), but even then, the CapsLock button started blinking. Here it all just seems eerily quiet, and stuck on the two first lines.
(The dist and gentoo-sources work fine though, so it's nothing urgent 8) )
Top
pietinger
Administrator
Administrator
Posts: 6622
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Mon Nov 03, 2025 3:53 pm

amosbarsinai wrote:[...]
Kernel panic!
[...]
There's no kernel panic message. [...]
Then it is no kernel panic. :lol:

Make sure you have this (statically) enabled to get an output on screen:
https://wiki.gentoo.org/wiki/User:Pieti ... nd_Console
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
pietinger
Administrator
Administrator
Posts: 6622
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Mon Nov 03, 2025 4:02 pm

amosbarsinai wrote:So...
I emerged sys-kernel/vanilla-sources [...]
So ...
you want to take the hard way. :lol:

With gentoo-sources we have enabled some important options automatically with the Kconfig in /usr/src/linux/distro ... I give you an excerpt of this file:

Code: Select all

config GENTOO_LINUX_UDEV
        bool "Linux dynamic and persistent device naming (userspace devfs) support"

        depends on GENTOO_LINUX
        default y if GENTOO_LINUX

        select DEVTMPFS
        select TMPFS
        select UNIX

        select MMU
        select SHMEM

        help
                [...]

config GENTOO_LINUX_PORTAGE
        bool "Select options required by Portage features"

        depends on GENTOO_LINUX
        default y if GENTOO_LINUX

        select CGROUPS
        select NAMESPACES
        select IPC_NS
        select NET_NS
        select PID_NS
        select SYSVIPC
        select USER_NS
        select UTS_NS

config GENTOO_LINUX_INIT_SCRIPT
        bool "OpenRC, runit and other script based systems and managers"

        default y if GENTOO_LINUX

        depends on GENTOO_LINUX

        select BINFMT_SCRIPT
        select CGROUPS
        select EPOLL
        select FILE_LOCKING
        select INOTIFY_USER
        select SIGNALFD
        select TIMERFD
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
Post Reply

112 posts
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • Next

Return to “Installing Gentoo”

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