Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] gentoo-kernel 4.9.6-r1 does not find root on nvme
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: Sat Feb 11, 2017 9:43 pm    Post subject: [SOLVED] gentoo-kernel 4.9.6-r1 does not find root on nvme Reply with quote

I just tried to update the kernel from 4.8.17 to 4.9.6-r1.
The new kernel does not boot from a NVMe SSD, although all relevant kernel configuration is unchanged since 4.8.17. The root fs is btrfs.
Neither root=/dev/nvme0n1p7 nor root=UUID=12345678-... works, the kernel panics because it did not find the root filesystem. It then prints a list of found partitions, one of which is nvme0n1p7.
With 4.8.17, i boot with the root=/dev/nvme0n1p7 parameter.
The boot manager is grub 2.

# grep NVME .config
CONFIG_NVME_CORE=y
CONFIG_BLK_DEV_NVME=y
# CONFIG_BLK_DEV_NVME_SCSI is not set
# CONFIG_NVME_TARGET is not set

# grep BTRFS .config
CONFIG_BTRFS_FS=y
# CONFIG_BTRFS_FS_POSIX_ACL is not set
# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set
# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set
# CONFIG_BTRFS_DEBUG is not set
# CONFIG_BTRFS_ASSERT is not set


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


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

PostPosted: Sat Feb 11, 2017 9:47 pm    Post subject: Reply with quote

knob-creek,

Try adding rootwait to the kernel command line.

It looks like the kernel tries to mount root before the device is ready.
_________________
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
knob-creek
n00b
n00b


Joined: 28 Jul 2008
Posts: 22
Location: Germany

PostPosted: Sat Feb 11, 2017 9:56 pm    Post subject: Reply with quote

Thank you for your quick response.
However, i doubt that this is the problem. There is lots of other HW initialized (USB etc.) until the kernel reaches the point where root should be mounted. (The kernel is rather monolithic and i don't have an initrd). With 4.8.17, the time was roughly the same and it was sufficient.
I will try it anyway.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Feb 11, 2017 10:11 pm    Post subject: Reply with quote

knob-creek,

root=UUID=12345678... requires an initrd. The kernel does not understand UUID.

PARTUID, which is a different string altogether wirr be understood by the kernel.
If the block device isn't ready, it won't help.
_________________
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
knob-creek
n00b
n00b


Joined: 28 Jul 2008
Posts: 22
Location: Germany

PostPosted: Sat Feb 11, 2017 10:44 pm    Post subject: Reply with quote

Thank you. I usually don't use the UUID syntax, ubuntu uses it and i wanted to give it a try, in case device names have changed.
With rootwait there is no change. The kernel does not seem to know which driver to use for the nvme drive (it seem to recognize it somehow but it writes (driver?) to the console).
The next message is "could not create /dev/nvme0n1p7".
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Feb 11, 2017 10:56 pm    Post subject: Reply with quote

knob-creek,

With rootwait, the boot process should hang forever if the root device never becomes available.
It will not panic.

If you prefer a pause before the panic, use rootdelay=30 in place of rootwait.
Thats a 30 second wait for the root device, then carry on and panic if its not there.

Its odd that the kernel lists /dev/nvme0n1p7 in available devices.

What is the text of the panic message ... unknown-block(x,y)
What are x and y?
_________________
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
knob-creek
n00b
n00b


Joined: 28 Jul 2008
Posts: 22
Location: Germany

PostPosted: Sat Feb 11, 2017 11:06 pm    Post subject: Reply with quote

Well, "wait forever" was my expectation, too.

It sais "cannot create /dev/nvme0n1p7 error -2"
And "unable to ... root ... on nvme0n1p7 or unknown block device (259,7)

(I should start using a different machine for posting my problem description here... ;-)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Feb 11, 2017 11:19 pm    Post subject: Reply with quote

knob-creek,

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

It means that it can't read the information on the device.

There are two popular reasons:-
The partition table code is missing from the kernel.
The filesystem code is missing from 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
knob-creek
n00b
n00b


Joined: 28 Jul 2008
Posts: 22
Location: Germany

PostPosted: Sat Feb 11, 2017 11:35 pm    Post subject: Reply with quote

This machine has a GPT partitioned SSD and is booted via UEFI.
CONFIG_EFI_PARTITION=y
(and the kernel shows a correct list of partitions just as it panics and (259, 7) seems to indicate that it knows where to look at.)

As i wrote in the beginning, the root fs is btrfs and
CONFIG_BTRFS_FS=y
These settings have not changed since 4.8.17.

I suspect, my kernel refuses to read the root fs for a not so popular reason. Is there anything special since 4.9 regarding booting from btrfs?
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 1:32 pm    Post subject: Reply with quote

The problem was unrelated to NVME or BTRFS, cf. this follow up.
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