Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to get past a kernel panic?
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
tuclogicguy
n00b
n00b


Joined: 17 Dec 2013
Posts: 24

PostPosted: Mon May 23, 2022 4:05 pm    Post subject: How to get past a kernel panic? Reply with quote

I have an Intel DH77KC motherboard with an i5-3450 CPU and 12GB of memory. The board has UEFI.
I have two SATA drives configured as RAID0 in the BIOS (using the Intel Rapid Storage Technology feature, sometimes referred to as "fake raid" in these fora.)
I have Windows, Artix Linux and Rocky Linux installed in separate partitions. I'm not using a boot loader; I just use the UEFI boot loader selection screen to select which OS I want to boot.

I am trying to install Gentoo and have been going through the installation instructions carefully step-by-step. For configuring the kernel I only did the following:
Checked jfs file system, because that is how the root partition is formatted.
Unchecked [ ] EFI mixed-mode support
Checked [*] Built-in kernel command line
Added (root=/dev/md126p8) to the command line
I left all other kernel options at their default setting.

I created a new gentoo subdirectory on the EFI partition and followed the instructions at https://wiki.gentoo.org/wiki/EFI_stub
I copied arch/x86/boot/bzImage to /boot/EFI/gentoo/bzImage-5.15.32-gentoo-r1.efi
I used the efibootmgr command to create a new UEFI boot selection pointing to the Gentoo kernel.

When I try to boot Gentoo I get an immediate kernel panic. The screen goes blank and the keyboard Caps Lock and Scroll Lock lights start flashing. No messages are written to the screen.

How do I go about debugging this? What are the typical causes of an immediate kernel panic like this?

Thanks,
Charles Bailey
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon May 23, 2022 4:34 pm    Post subject: Reply with quote

tuclogicguy,

Intel Rapid Storage Technology 'fake raid' requires an initrd to assemble the raid set before the kernel can see the root filesystem to mount it.

The initrd is a small temporary root filesystem used to do the things required to make the root filesystem visible to the kernel.

Some EFI firmware supports loading the initrd as a separate file, some does not, in which case the initrd needs to be built into the kernel.
_________________
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
tuclogicguy
n00b
n00b


Joined: 17 Dec 2013
Posts: 24

PostPosted: Mon May 23, 2022 6:48 pm    Post subject: Reply with quote

I would think that I would at least get some messages about "unable to mount root file system" or some such. But, I'm not getting any messages at all from the kernel. Is there a "quiet vs verbose" option somewhere?

Charles Bailey
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon May 23, 2022 7:01 pm    Post subject: Reply with quote

tuclogicguy,

You probably have your console support incorrectly configured.
See Framebuffer.
Check the section on Early framebuffer drivers
_________________
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
tuclogicguy
n00b
n00b


Joined: 17 Dec 2013
Posts: 24

PostPosted: Mon May 23, 2022 11:49 pm    Post subject: Reply with quote

Thanks, Neddy, for the advice about Early framebuffer drivers. I didn't have any framebuffer driver enabled. I checked:
[*] EFI-based Framebuffer Support
and now I'm getting lots of messages from the kernel! It says that the cause of the kernel panic is
"VFS: Unable to mount root fs on unknown-block (0,0)"

Obviously, simply checking multi-disk RAID support in the kernel config was not sufficient.

Artix and Rocky Linux both use mdadm to access the RAID0 array. Now, I need to figure out how to get similar support into Gentoo.

Charles Bailey
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue May 24, 2022 11:15 am    Post subject: Reply with quote

tuclogicguy,

You need an initrd.
Kernel raid auto assembly is for mdadm version 0.90 raid sets only.

Code:
unknown-block (0,0)
means that the kernel cannot communicate with the device holding the root filesystem.
If everything else was well, the kernel will have listed all the block devices it can see.
The empty list is difficult to spot. It says
Code:
Unable to find root device in .
where there should be a list in front of the period.
If the list is empty, your block device drivers are configured as modules.

You have two choices here. Add the modules to an initrd or make them built into the kernel binary.
_________________
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
tuclogicguy
n00b
n00b


Joined: 17 Dec 2013
Posts: 24

PostPosted: Thu May 26, 2022 11:34 pm    Post subject: Reply with quote

Well, after gleaning some useful information from here https://wiki.gentoo.org/wiki/User:SwifT/Complete_Handbook/Software_RAID and various places, I finally got Gentoo to boot from the root fs on a RAID partition.

Thank you for your help.

Charles Bailey
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21635

PostPosted: Fri May 27, 2022 3:31 pm    Post subject: Reply with quote

What had you done wrong, and what did you need to do to make it work properly? Would you consider this thread solved?
Back to top
View user's profile Send private message
tuclogicguy
n00b
n00b


Joined: 17 Dec 2013
Posts: 24

PostPosted: Sun May 29, 2022 9:19 pm    Post subject: Reply with quote

I installed mdadm
Code:
root # emerge mdadm


Made sure RAID gets started on boot:
Code:
root # rc-update add mdraid boot


Added "domdadm" to kernel command line.

Rebuilt kernel
Generated initramfs using dracut.

Copied new kernel and initramfs to EFI partition.

Added "initrd=location of initramfs on EFI partition"
On reboot the RAID0 was recognized the Gentoo booted to a command prompt as expected.

Charles Bailey
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