Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel Panic upon boot
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
HimTortons
n00b
n00b


Joined: 13 Sep 2015
Posts: 32

PostPosted: Tue Feb 23, 2016 3:19 pm    Post subject: Kernel Panic upon boot Reply with quote

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 with
Code:
Kernel panic- not synching: VFS: Unable to mount root fs on unknown-block(0,0)
(I'll post a link to the picture)
I know from other threads that this is related to the Kernel not recognizing my HDD controller. I haven't been able to figure out why. I checked for a driver using the web tool provided by debian and it actually recognized my controller (It's just the standard Intel Z97 controller) but it doesn't actually tell me any driver. Can anyone help me with my issue? https://drive.google.com/file/d/0B6__L3tBBvz7ZjJ0a1lBVmszMWs/view?usp=sharing
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Feb 23, 2016 5:56 pm    Post subject: Reply with quote

HimTortons,

Right at the top of your image is a list of the block devices the kernel can see. Some of it has scrolled off.
The remains go
Code:
  sdc1
sdb
  sdb1
  sdb2
  sdb3

So we can tell you have at least three HDD.

Its possible that you have several HDD controllers and the one you need for root is missing from the kernel.
Post your lspci output.

Its also possible the the drive detection order is not what you expect, so grub is trying to mount root from the wrong drive.

There is no message about Tried <list of filesystems> to mount root. Its possible that the kernel is missing the driver for your root filesystem.
_________________
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
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Tue Feb 23, 2016 6:33 pm    Post subject: Reply with quote

Generally most of controllers work with AHCI driver ... if they are not put in IDE mode - which is a Bad Thing®.
Back to top
View user's profile Send private message
HimTortons
n00b
n00b


Joined: 13 Sep 2015
Posts: 32

PostPosted: Tue Feb 23, 2016 7:29 pm    Post subject: Reply with quote

1.) Yes I've got 3 Hard Drives. 1 SSD with Windows (/dev/sdc), 1 2TB HDD with my Windows games (/dev/sdb), and 1 1TB HDD for Gentoo (/dev/sda)

2.)
Code:
00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
00:14.0 USB controller: Intel Corporation 9 Series Chipset Family USB xHCI Controller
00:16.0 Communication controller: Intel Corporation 9 Series Chipset Family ME Interface #1
00:1a.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #2
00:1b.0 Audio device: Intel Corporation 9 Series Chipset Family HD Audio Controller
00:1c.0 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 1 (rev d0)
00:1c.2 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 3 (rev d0)
00:1c.3 PCI bridge: Intel Corporation 82801 PCI Bridge (rev d0)
00:1d.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #1
00:1f.0 ISA bridge: Intel Corporation 9 Series Chipset Family Z97 LPC Controller
00:1f.2 SATA controller: Intel Corporation 9 Series Chipset Family SATA Controller [AHCI Mode]
00:1f.3 SMBus: Intel Corporation 9 Series Chipset Family SMBus Controller
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Fiji XT [Radeon R9 FURY X] (rev c8)
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Device aae8
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 11)
04:00.0 PCI bridge: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge (rev 04)


I posted all of it and not just "IDE/SATA" because I don't know if I missed anything or not

3.) What could I do about Grub trying to mount root from the wrong drive?

4.) My root filesystem is ext4 and I've got that compiled right into the Kernel (not as a module)
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Tue Feb 23, 2016 7:36 pm    Post subject: Reply with quote

I'd disconnect all drives but sda and see if it can boot, if not it may give you the clue you need to fix it.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Feb 23, 2016 8:18 pm    Post subject: Reply with quote

HimTortons,

You have exactly one HDD controller and its working.

Post - pastebin your grub.cfg and your kernel .config file.
Also post the output of
Code:
df -T
just before you chroot.
_________________
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
HimTortons
n00b
n00b


Joined: 13 Sep 2015
Posts: 32

PostPosted: Tue Feb 23, 2016 8:54 pm    Post subject: Reply with quote

.config:
http://pastebin.com/d93nd8WX
df -T output:
http://pastebin.com/nw4H6bnH
grub.cfg:
http://pastebin.com/jyGLHGNs
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Feb 23, 2016 9:42 pm    Post subject: Reply with quote

HimTortons,

You didn't get that .config from genkernel. How did you build your kernel and initrd?

root=UUID= only works if the userspace mount is provided in the intitrd.
However, the kernel can manage root=PARTUUID= all on its own.

Try switching to root=PARTUUID= - get your PARTUUID from blkid or use plan old root=/dev/sda3
_________________
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
HimTortons
n00b
n00b


Joined: 13 Sep 2015
Posts: 32

PostPosted: Wed Feb 24, 2016 3:51 pm    Post subject: Reply with quote

I built the kernel myself and generated the initrd using genkernel (because the handbook told me so. Is that something I shouldn't have done? Anyway I'm going to see if I can boot if I set
Code:
root=/dev/sda4
. Lets hope this works
Back to top
View user's profile Send private message
saellaven
Guru
Guru


Joined: 23 Jul 2006
Posts: 505

PostPosted: Wed Feb 24, 2016 4:07 pm    Post subject: Reply with quote

HimTortons wrote:
I built the kernel myself and generated the initrd using genkernel (because the handbook told me so. Is that something I shouldn't have done? Anyway I'm going to see if I can boot if I set
Code:
root=/dev/sda4
. Lets hope this works


it's perfectly fine to build the kernel yourself and then build an initrd/initramdisk separately (keep in mind that most people probably don't even need one, particularly if you're customizing your kernel and building everything in, unless you're doing something exotic, like using root on a LVM or encrypted disk).

and I agree with Neddy - if you're using GPT, use PARTUUID to point to your root rather than UUID (filesystem UUID isn't supported natively in the kernel) for reliability (should your devices change order, it'll still automatically detect the proper root).
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Feb 24, 2016 6:44 pm    Post subject: Reply with quote

HimTortons,

You only need an initrd if your kernel cannont mount root without loading some kernel modules or using some userspace tools.

Typical kernel examples would be the AHCI HDD driver if you set it to <M>
The ext4 filesystem driver if it was set to <M>

User space examples would be mount, because you used root=UUID= and the kernel cannot deal with filesystem UUIDs.
or mdadm because you have root on raid.

I only checked a few items in your .config, so if you get rid of root=UUID, you may not need an initrd at all.
_________________
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
HimTortons
n00b
n00b


Joined: 13 Sep 2015
Posts: 32

PostPosted: Wed Feb 24, 2016 6:58 pm    Post subject: Reply with quote

So I tried setting root to
Code:
root=/dev/sda4
first and then to
Code:
root=PARTUUID=(I don't have the ID on my)
. Neither of the two worked. Do I need to change another setting perhaps?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Feb 24, 2016 7:13 pm    Post subject: Reply with quote

HimTortons,

Maybe ... your image in your original post shows you have a mix of MSDOS and GPT formatted drives.
The partition UUIDs are shown there too.

From that image, sdc has a single partition. sdb has three partitions, so its unlikely that sda is the wrong drive.Its not shown in your image but there is no sdd, so sda is the only one we don't know about.

Quote:
Neither of the two worked.
is not a useful diagnostic message. Did the panic change at a result of switching the root= statement?
If so, please provide a new image.
_________________
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
saellaven
Guru
Guru


Joined: 23 Jul 2006
Posts: 505

PostPosted: Wed Feb 24, 2016 7:14 pm    Post subject: Reply with quote

Are you sure you're using the PARTUUID instead of the UUID?

Code:

# blkid
/dev/sdb1: PARTUUID="f68cd6c1-01"
/dev/sdb5: UUID="3aHOcF-oXL8-ib2P-7jil-nyUL-vTzj-ZuKuPv" TYPE="LVM2_member" PARTUUID="f68cd6c1-05"
/dev/sdc1: UUID="60FD-CDE3" TYPE="vfat" PARTLABEL="EFI System" PARTUUID="fadbf57a-0f43-4762-acef-d669667a0063"
/dev/sdc2: UUID="4e2ceae6-f8dc-4ee4-a685-fd4c2dbe28aa" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="a5a2375c-266f-4b92-8e15-2bc37808f8c1"
/dev/sdc3: UUID="6ab06941-20dc-49f5-9a15-4dddb651e05f" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="a9cb9a9f-cfc6-410e-946b-1ec9e468452a"
/dev/sdd1: LABEL="oldboot" UUID="3984057a-4894-414e-935c-2b8f8d4b893a" TYPE="ext4" PARTUUID="d83466fc-01"
/dev/sdd2: LABEL="oldroot" UUID="80fc4da4-89fa-419d-9d6b-e06480124145" TYPE="ext4" PARTUUID="d83466fc-02"
/dev/sdd5: UUID="XtYTKZ-lf0K-3aAe-L4O5-AOAc-el5B-Pyn1YQ" TYPE="LVM2_member" PARTUUID="d83466fc-05"
/dev/sdd6: UUID="9hK7Iw-OzZF-fOO3-QXPp-FwB6-wARs-zRaI9p" TYPE="LVM2_member" PARTUUID="d83466fc-06"


A snippet of my own system, sdc3 is my current root partition and my kernel line is "root=PARTUUID=a9cb9a9f-cfc6-410e-946b-1ec9e468452a dolvm rootfstype=ext4"
Back to top
View user's profile Send private message
HimTortons
n00b
n00b


Joined: 13 Sep 2015
Posts: 32

PostPosted: Thu Feb 25, 2016 12:49 pm    Post subject: Reply with quote

I don't think the Panic messages changed at all but in case I missed something I'm going to post them anyway:
https://drive.google.com/file/d/0B6__L3tBBvz7YmlKbnFWZVZiV2M/view?usp=sharing (the one with PARTUUID)
https://drive.google.com/file/d/0B6__L3tBBvz7MTQwaG5SbFozY2c/view?usp=sharing (the one with root=/dev/sda4)

Quote:
Are you sure you're using the PARTUUID instead of the UUID?

Yes, saellaven I'm sure. Unless changing it in grub.cfg is not enough.
Also this is just a guess but could it be that I need to specify the rootfs type like you did?
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1369
Location: Montréal

PostPosted: Thu Feb 25, 2016 2:23 pm    Post subject: Reply with quote

When you select in the Grub menu for example Gentoo GNU/Linux, is there a message Loading initial ramdisk ... . If your initramfs /initramfs-genkernel-x86_64-4.1.15-gentoo-r1 who is on /dev/sda2 with the kernel image is not loaded the kernel may panic.

From your chroot you can create a personnalised entry in /etc/grub.d/40_custom to make a test:

Code:
menuentry "Test" {
linux (hd0,2)/vmlinuz-4.1.15-gentoo-r1 root=/dev/sda4 ro
initrd (hd0,2)/initramfs-genkernel-x86_64-4.1.15-gentoo-r1
}


Save and do from chroot again

Code:
grub2-mkconfig -o /boot/grub/crub.cfg


Reboot and select the Test entry.

With a simple entry like this Gentoo should boot unless the path and names of the kernel and/or the initramfs are wrong on /dev/sda2. If it do not boot with the good paths and names, you may have miss something in your kernel configuration and/or the initramfs and/or in /etc/fstab. Your ext4 and Vfat support are in hard in the kernel image. I never need to use the rootfs parameter.

Did you make the kernel and the initramfs with Genkernel or only the initramfs? You can use Dracut to create an initramfs in case the one from Genkernel miss something.

Note that, after mounting /mnt/gentoo and /mnt/gentoo/boot with the host, you need to bind first the /dev, /proc and /sys directories of the host to /mnt/gentoo/dev , /mnt/gentoo/proc and /mnt/gentoo/sys before enter in the chroot for the Grub command and the chroot work well.

Note again that connected Usb keys and Sds card may modify the detection order of the drives by the Bios/Efi and make sda where is Gentoo normally become sdb with the result of a kernel panic.

So, a lot of possibilities of the kernel panic are not yet eliminated.
_________________
Paul
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Feb 25, 2016 6:52 pm    Post subject: Reply with quote

HimTortons,

Your images are different but the panic message is the same. They still provide useful information.
This image lists all the partitions on sda along with their PARTUUIDs.
The first line even says that the [kernel] driver is sd, which is correct. From the PARTUUIDs we can tell that you are using a GPT partition table on sda.

Both images say that you are using 4.1.15-gentoo-r1 #1. The #1 means its your first build of this kernel version. That will be important later.

Lets look at your kernel setup in some detail.

Partition settings:
CONFIG_MSDOS_PARTITION=y
CONFIG_EFI_PARTITION=y
That covers everything a PC is likely to need.

Code:
# CONFIG_SYSFS_DEPRECATED is not set
Good.

IDE Support:
# CONFIG_IDE is not set
is off. That avoids having two drivers for the same hardware. Good .

SCSI device support:
CONFIG_SCSI=y
CONFIG_BLK_DEV_SD=y
CONFIG_ATA=y
CONFIG_SATA_AHCI=y
That the bare minimum HDD stuff to boot and be know from the images the kernel can see the HDD and read the partition table, so we were fairly confident that this was all good.

File systems:

CONFIG_EXT4_FS=y
CONFIG_EXT4_USE_FOR_EXT23=y
CONFIG_EXT4_FS_POSIX_ACL=y
OK.

Code:
CONFIG_EXT4_ENCRYPTION=y
CONFIG_EXT4_FS_ENCRYPTION=y
CONFIG_EXT4_DEBUG=y

You probably don't want the encryption options.
You certainly don't want the debug option unless you are doing ext4 development in the kernel.
It will increase your logspam and may interfere with proper operation. Turn off CONFIG_EXT4_DEBUG and rebuild your kernel.
Unless you know you need encryption turn those options off too.

DOS/FAT/NT Filesystems:

CONFIG_NTFS_FS=y
CONFIG_NTFS_DEBUG=y
CONFIG_NTFS_RW=y
Kernel NTFS support does'n't do whay you think it does.
Turn these options off. This is not related to your boot issue now but it will save you a kernel rebuild later.
In place of the above, turn on
Code:
# CONFIG_FUSE_FS is not set
and
Code:
emerge sys-fs/ntfs3g

This is only needed to have read write access to Windows drives.

Under
Code:
# Kernel hacking
you have a lot of debug options on. Very few are actually useful to users.

Code:
CONFIG_PRINTK_TIME=y
CONFIG_FRAME_WARN=2048
CONFIG_DEBUG_FS=y
are all "mostly harmless".
Read the help on the others and decide if you really need the or not.

When you are done, rebuild and reinstall your kernel. Don't forget to tell grub about it.
Reboot to test.
_________________
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
HimTortons
n00b
n00b


Joined: 13 Sep 2015
Posts: 32

PostPosted: Fri Feb 26, 2016 3:29 pm    Post subject: Reply with quote

I modified, recompiled the Kernel, and reinstalled it but I still get a kernel panic while trying. Though it does try to boot the new Kernel. I don't see it trying to mount sda though and I'm not sure if it's just cut off or not.
I'm just going to post the panic message:
https://drive.google.com/file/d/0B6__L3tBBvz7UnQxc3FYeldQN2M/view?usp=sharing
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Fri Feb 26, 2016 4:43 pm    Post subject: Reply with quote

Buffoon wrote:
I'd disconnect all drives but sda and see if it can boot, if not it may give you the clue you need to fix it.

I recommended this because this is a good way to make sure your Grub is installed where you think it is and your sda really is sda. You chose to ignore my advice. Your kernel shows #2 this time, is this correct?
Back to top
View user's profile Send private message
HimTortons
n00b
n00b


Joined: 13 Sep 2015
Posts: 32

PostPosted: Fri Feb 26, 2016 4:59 pm    Post subject: Reply with quote

Yes I'll try this disconnecting all drives again.
Quote:
You chose to ignore my advice.

Actually I didn't ignore it I was just in the middle of typing an answer telling you that I tried this already but then my phone started screwing around and forced a reboot and then I forgot to reply to your comment
Back to top
View user's profile Send private message
saellaven
Guru
Guru


Joined: 23 Jul 2006
Posts: 505

PostPosted: Fri Feb 26, 2016 5:15 pm    Post subject: Reply with quote

Do you have a second box that you could use for a netconsole, so you can see the entire boot log?
Back to top
View user's profile Send private message
HimTortons
n00b
n00b


Joined: 13 Sep 2015
Posts: 32

PostPosted: Fri Feb 26, 2016 6:32 pm    Post subject: Reply with quote

Quote:
Do you have a second box that you could use for a netconsole, so you can see the entire boot log?

Yes, I've got some laptops lying around. How would I go about setting up a netconsole?

And I tried disconnecting all drives except for sda though it still didn't boot and I got the same panic message as before
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Fri Feb 26, 2016 6:42 pm    Post subject: Reply with quote

I do not think netconsole is going to help, we know the error, it is 'unable to mount root fs on unknown-block(0,0)'. I'm starting to think AHCI driver in your kernel is too old. What is the PCI-ID of your SATA controller? (Output of lspci -nnk.)
Back to top
View user's profile Send private message
HimTortons
n00b
n00b


Joined: 13 Sep 2015
Posts: 32

PostPosted: Fri Feb 26, 2016 8:28 pm    Post subject: Reply with quote

I just put the output of ls -nnk into a pastebin because you never know, maybe someone here finds something interesting. You can find the pastebin here: http://pastebin.com/c9cTnYx7
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Feb 26, 2016 9:13 pm    Post subject: Reply with quote

Buffoon,

The kernel can clearly access the drive. It reads the partition table for all three drives and reports the PARTUUID.
That means that the AHCI driver and the sd driver extract data from the drive.
There is evidence of both MSDOS and GPT partition table being read.

That much works. I think the unknown-block(0,0) error message is misleading ... that normally means that the kernel cannot communicate with the HDD at all.
That is clearly not the case here.

Its all working at the low level. The kernel can see the partition but not mount it.

So ...
the file system is damaged
the file system is not a type that is built into the kernel.
there is a mismatch between the filesystem attributes in the kernel(s) and those used to create the filesystem.

HimTortons

Get ready to chroot but don't actually do it.
Post the output of
Code:
df -T


Make friends with wgetpaste and put the output of
Code:
dumpe2fs /dev/sda4
onto a pastebin pleas.
_________________
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
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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