Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Need help configuring gentoo kernel 4.9
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
knob-creek
n00b
n00b


Joined: 28 Jul 2008
Posts: 22
Location: Germany

PostPosted: Wed Feb 15, 2017 5:00 pm    Post subject: [SOLVED] Need help configuring gentoo kernel 4.9 Reply with quote

This is a follow up to this topic. I seem to be unable to configure a booting 4.9 kernel. The kernels i create are unable to mount the root FS and panic.

I realised meanwhile, that the problem is broader than in the topic above. I have exactly the same problem on two completely different machines:

  • SATA SSD, MBR partitioning, ext4 root, legacy BIOS boot
  • NVME SSD, GDT partitioning, btrfs root, UEFI boot

Both 4.9 kernels are configured very close to the respective working 4.8 kernel. The SSD and the partitioning scheme are recognised by the kernel, The root FS is compiled into the kernel, which is largely monolithic. There is an INITRAMFS compiled into the kernel containing the Intel microcode, as the update via microcode_ctl during boot seems to be deprecated. There is no INITRAMFS containing any modules: everything required for booting is compiled into the kernel. Almost everything, as it seems.

AFAICS, the kernel is unable to create a root device in /dev, but in fact, i have no clue, where this /dev tree should come from, as the DEVTMPFS is mounted after the root FS.

Any suggestion is very much appreciated.


Last edited by knob-creek on Thu Feb 16, 2017 12:49 pm; edited 1 time in total
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1696

PostPosted: Wed Feb 15, 2017 5:55 pm    Post subject: Reply with quote

If I recall correctly, when you use btrfs as your root partition, you need to use an initramfs with btrfs tools built in. This is because the kernel it's self is not able to rebuilt the btrfs tree to (due to the kernel devs not wanting the kernel to have that ability) know what to mount. As far as using the NVMe, I have no experience on this, so I don't know if I can help much on that part.

Now this may have changed since I last dealt with this, but from what it looked like from several guides, it hasn't.

As far as your first machine, with the ext4 partition... Is your boot partition finding the hard drive, or unable to identify the fs type? Depending on what the error is, the issue can be several things.

On a side note, due to the common frequency with kernel issues. Double check to see if you are booting with the correct kernel, it is very common for people to forget to mount the boot partition before coping the kernel over to your boot partition (make install also copies the kernel over too). Also to cover the bases, there is a difference on hitting Y or M when configuring the kernel, the later means it is built as a module.
Back to top
View user's profile Send private message
knob-creek
n00b
n00b


Joined: 28 Jul 2008
Posts: 22
Location: Germany

PostPosted: Thu Feb 16, 2017 10:39 am    Post subject: Solved Reply with quote

As it seems, i have found the reason (and a solution) for the problem: it is the microcode cpio image included.
If i leave CONFIG_BLK_DEV_INITRD=n and omit the microcode.cpio, which contains only a kernel directory, the otherwise unchanged kernel boots fine.
I noticed, that i did not follow the Instructions for Intel microcode.
Note: the easiest way to get the microcode update is described in the last paragraph of the page.

ct85711 wrote:
If I recall correctly, when you use btrfs as your root partition, you need to use an initramfs with btrfs tools built in. This is because the kernel it's self is not able to rebuilt the btrfs tree to (due to the kernel devs not wanting the kernel to have that ability) know what to mount.

In fact, kernels since at least 4.4 are able to mount btrfs without external help (if that was ever the case at all).
Back to top
View user's profile Send private message
sphakka
n00b
n00b


Joined: 24 Jun 2003
Posts: 72

PostPosted: Sat Feb 18, 2017 12:24 pm    Post subject: Reply with quote

I'm pulling my hair out trying to boot my new BTRFS-based system. I must be doing something stupid with my initramfs-less kernel-4.9.10 (it's actually a Funtoo system), as, at boot, it's unable to find the root device (whatever I put as "root=" in grub cfg: dev, UUID or LABEL) and panics with

Code:
VFS: Unable to mount root fs on unknown-block(0,0)


Apparently, it doesn't even get to *find* the right device!? Indeed, no available partition is listed.

I double checked: BTRFS support static, early devtmpfs, partition support, ecc. The only macroscopic differences are that the disk is an M2 sata SSD (AFAIK, not an NVMe), the 2nd one in the box (so "hd1" for grub) and it's MSDOS-partitioned. The rootfs is actually a BTRFS subvolume -- the correct "rootflags=subvol=..." options is passed to grub -- but is not the *default* one (that's the BTRFS root volume on top of "/dev/sdb3"). I also tried to add "device=/dev/sdb3" to "rootflags" at no avail.

@knob-creek, could you please post your BTRFS volume structure and the relevant parts in your grub and kernel config?
Back to top
View user's profile Send private message
knob-creek
n00b
n00b


Joined: 28 Jul 2008
Posts: 22
Location: Germany

PostPosted: Sun Feb 19, 2017 12:35 pm    Post subject: Reply with quote

sphakka wrote:
Code:
VFS: Unable to mount root fs on unknown-block(0,0)


Apparently, it doesn't even get to *find* the right device!? Indeed, no available partition is listed.

@knob-creek, could you please post your BTRFS volume structure and the relevant parts in your grub and kernel config?

As NeddySeagoon pointed out in my original thread:

NeddySeagoon wrote:
Code:
unknown block device (259,7)
Is the kernel major,minor device number.
The kernel can see the device, or you get (0,0).

Your kernel does not recognize the hardware. Maybe you should enable NVME?
Back to top
View user's profile Send private message
sphakka
n00b
n00b


Joined: 24 Jun 2003
Posts: 72

PostPosted: Sun Feb 19, 2017 3:48 pm    Post subject: Reply with quote

Yeah, I've seen NeddySeagoon's words... Indeed, I went back to the BIOS configuration to check SATA settings and switched from "AHCI" to "Compatibility" (ATA) just to give it try and... Bingo!

Mmh... whadda... no AHCI?? I went back to my kernel config (v4.9.10) and, darn it... had forgotten that (as it was copied over from an older machine that didn't run at all on AHCI)! Stupid me :oops:

BTW, @knob-creek, since I'm also interested in Intel's microcode updates, did you finally managed to do that without the initramfs ("new method")?
Back to top
View user's profile Send private message
knob-creek
n00b
n00b


Joined: 28 Jul 2008
Posts: 22
Location: Germany

PostPosted: Mon Feb 20, 2017 4:15 pm    Post subject: Reply with quote

sphakka wrote:
BTW, @knob-creek, since I'm also interested in Intel's microcode updates, did you finally managed to do that without the initramfs ("new method")?


Yes, the intel microcode page explains how to do it in the last paragraph: include the right microcode as binary firmware image. You don't need the monolithic image nor the cpio image.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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