[Solved] Gentoo - Kernel Panic upon boot

I just tried installing Gentoo outside a VM for the first time. However now if I try to boot my new installation it gives me a Kernel Panic. I'm going to try generating a Kernel with genkernel to whether it is because of the kernel configuration or not but I'm going to post a picture of the kernel panic report. What could be causing this Kernel panic?

it looks like it cant mount the root fs. how to fix? idk

Most likely it's a grub issue not pointing to the correct partition.


I thought it was a grub issue as well which is why I tried lilo. It gave me the same issue. In the wiki article you linked, it said that it could be because it doesn't find the controller. Could it be the case that I need some other kernel driver my sata controls? I mean I'm npt using anything unconventional, just an Asus z97-k

Make sure the bootloader is pointing to the right disk or partition.

You can use # lspci | grep --color -E "IDE|SATA" to detect what controller you're using. If you have an AHCI SATA controller, check your BIOS, if AHCI is activated.

It could be that you are missing the initramfs for that kernel. (speculation)

The block device number (0,0) means that the device specified is completely unknown to the kernel. If the first number is 0 the kernel didn't find any suitable device. If the second number is 0 the kernel found a suitable device but it didn't manage to mount the filesystem.

More info about the issue here: http://swift.siphos.be/linux_sea/kernelbuilding.html#idm2877662600400 Search for "Unable to mount root-fs".

I made sure that the bootloader is pointing to the right partition (it came pre-configured to the proper UUID of my root partition). I also checked to make sure the initramfs that I created using genkernel (like the guide told me) was still there. And about the sata controller: I made sure that ahci was on and I checked for a driver using that web tool provided by debian and it recognises the id but it doesnt actually tell me what driver use. Though I did find a driver enabling platform ahci sata. I don't know if this is relevant or not but I thought I'd let you know

Mmh in the webpage I linked there was a link to this discussion in the gentoo forums: https://forums.gentoo.org/viewtopic-t-810063.html maybe it could help.

Sorry that I can't be of much help, but I've never used Gentoo, so maybe some gentoo user here can troubleshoot further or your best bet is to ask on the gentoo forums.

That gentoo forum thread may just be the answer. I'll be able to try it out tomorrow as it's getting kind of late where I live and I want to do this when I've time. Also another question that you may be able answer because it's grub related and not gentoo related: I don't seem to have a grub.conf, only a grub.cfg. Do you know the reason for this?

grub.conf is the config file for legacy grub, grub.cfg is the config file for grub 2.

Grub legacy example:

timeout 5
title Gentoo Linux 3.2.12
root (hd0,0)
kernel /boot/kernel-3.2.12-gentoo root=/dev/sda3

grub 2 example file

menuentry 'Gentoo Linux 3.2.12' {
linux /boot/kernel-3.2.12-gentoo root=/dev/sda3

So the syntax is different, don't mix up the two :)

Ok thanks. That makes sense

Good news everyone! Some people on the gentoo forum helped me fix my problem. Since it's complicated I'm not going to explain it but link the forum post.