Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
kernel panic on uefi + nvme + gpt
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
SilverSurfer972
n00b
n00b


Joined: 10 Jun 2016
Posts: 7

PostPosted: Sat Jun 11, 2016 8:34 pm    Post subject: kernel panic on uefi + nvme + gpt Reply with quote

Hello,

I am a systemd refugee coming back to gentoo after many years and I feel rusty after 2 days of struggle.
I am trying to boot gentoo after on uefi mode on a m.2 drive with GPT partitions on a asus SABERTOOTH x99 motherboard.
After the installation I kept fighting a kernel panic and I can't figure our the source of the problem:

The kernel panic at boot:
http://imgur.com/IGTAUPa

My disk partition:
Code:

Number  Start   End    Size   File system  Name    Flags
 1      1049kB  538MB  537MB  fat16        boot    boot, esp
 2      538MB   128GB  127GB  btrfs        rootfs


I have btrfs compiled in the kernel with NVM

lspci -k
http://pastebin.com/mJDjyuzi

kernel .config
http://pastebin.com/hvTFMvpt

My efiboormgr command:
Code:
efibootmgr --create --disk /dev/nvme0n1 --part 1 --label "Gentoo" --loader "\efi\boot\bootx64.efi"

Which gives me:
Code:
(chroot) livecd linux # efibootmgr  -v
BootCurrent: 0008
Timeout: 1 seconds
BootOrder: 0000,0002,0007,0008
Boot0000* Gentoo        HD(1,0,00000000000000000000000000000000,0x0,0x0)/File(\efi\boot\bootx64.efi)
Boot0002* Hard Drive    BBS(HD,,0x0)..GO..NO..........S.A.M.S.U.N.G. .M.Z.V.P.V.1.2.8.H.D.G.M.-.0.0.0.0.0....................A.......................................J..Gd-.;.A..MQ..L.S.A.M.S.U.N.G. .M.Z.V.P.V.1.2.8.H.D.G.M.-.0.0.0.0.0........BO..NO........o.S.a.m.s.u.n.g. .S.S.D. .8.5.0. .E.V.O. .2.5.0.G.B....................A...........................>..Gd-.;.A..MQ..L.2.S.M.1.X.N.G.A.1.8.6.5.4.2. .K. . . . ........BO..NO........o.W.D.C. .W.D.3.0.E.Z.R.X.-.0.0.D.8.P.B.0....................A...........................>..Gd-.;.A..MQ..L. . . . .W. .-.D.M.W.4.C.0.N.6.K.7.0.K.X........BO..NO........W.J.e.t.F.l.a.s.h.T.r.a.n.s.c.e.n.d. .3.2.G.B. .1...0.0....................A.......................*..Gd-.;.A..MQ..L.3.9.9.6.7.1.1.5.7.7........BO
Boot0007* UEFI OS       HD(1,GPT,2d5fb046-986e-47bc-b631-323eedeb20bd,0x800,0x100000)/File(\EFI\BOOT\BOOTX64.EFI)..BO
Boot0008* UEFI: JetFlashTranscend 32GB 1.00     PciRoot(0x0)/Pci(0x14,0x0)/USB(17,0)/HD(1,MBR,0x25,0x158,0x8800)..BO


Thanks in advance for helping
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7552
Location: Goose Creek SC

PostPosted: Sat Jun 11, 2016 11:00 pm    Post subject: Reply with quote

What bootloader/bootmanager(s) are involved?
I guess that the bootloader cannot read btrfs.
Suggest use efi_stub as bootloader with a builtin cmdline using root=PARTUUID=<partuuid of / partition as found by running blkid less the quotes>
Also suggest builtiin cmdline override external be selected https://wiki.gentoo.org/wiki/EFI_stub_kernel
rEFInd would be most convenient boot manager
_________________
Defund the FCC.
Back to top
View user's profile Send private message
SilverSurfer972
n00b
n00b


Joined: 10 Jun 2016
Posts: 7

PostPosted: Sun Jun 12, 2016 2:37 am    Post subject: Reply with quote

I am not using any bootloader. I try to have the minimum system as possible an I hope it's possible to achieve this without grub.
Yes, that's what I tried to achieve :)

Following your instructions I did the following:
Double checked that efi_stub is enabled:
Quote:
CONFIG_EFI=y
CONFIG_EFI_STUB=y
CONFIG_EFI_MIXED=y


Quote:
(chroot) livecd linux # blkid
/dev/loop0: TYPE="squashfs"
/dev/sda1: UUID="9214-5364" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="203e6814-2a9e-4622-899c-79d40b42af3c"
/dev/sda2: UUID="7783e3cf-b907-4bd2-bc4f-48e90cd801f9" TYPE="ext4" PARTUUID="9b627295-3abb-41ba-8523-c2a3f2e0f3c7"
/dev/sda3: UUID="722b69ab-3946-47e5-9e53-2f62d56494cd" TYPE="swap" PARTUUID="0b168a05-4bc4-441c-a745-576573dab98a"
/dev/sdb1: UUID="4149a46a-cd5b-47bb-80c5-a89df33d70a1" TYPE="ext4" PARTUUID="350f1505-e2db-4c55-b065-5323dbd76e8e"
/dev/sdc1: UUID="2016-05-06-23-06-38-00" LABEL="Gentoo-amd64" TYPE="iso9660" PTUUID="026c9619" PTTYPE="dos" PARTUUID="026c9619-01"
/dev/sdc2: SEC_TYPE="msdos" UUID="953E-6C16" TYPE="vfat" PARTUUID="026c9619-02"
/dev/sdc3: LABEL="Gentoo Linux" TYPE="hfsplus" PARTUUID="026c9619-03"
/dev/nvme0n1p1: SEC_TYPE="msdos" UUID="25B4-FC55" TYPE="vfat" PARTLABEL="boot" PARTUUID="2d5fb046-986e-47bc-b631-323eedeb20bd"
/dev/nvme0n1p2: UUID="02681d58-ed55-4772-b7b0-b6c4a60e9aed" UUID_SUB="185f9cf5-9075-4f25-b1ba-7e80e6e1259f" TYPE="btrfs" PARTLABEL="rootfs" PARTUUID="1a6ccdfe-c686-45fa-8e9a-6f0fb9fcc440"
/dev/nvme0n1: PTUUID="d099739b-62f1-4434-aef0-c80bb2c4ae49" PTTYPE="gpt"


added the CMDLINE in the kernel
Quote:
CONFIG_CMDLINE_BOOL=y
CONFIG_CMDLINE="root=1a6ccdfe-c686-45fa-8e9a-6f0fb9fcc440"


And, now I got :
Quote:
VFS: Cannot open root device "1a6ccdfe-c686-45fa-8e9a-6f0fb9fcc440" or unknown0block(0,0): error -6


Something came up to my attention, in the available partitions there is "(driver?)" next to nvme0n1. Does that mean the kernel is not able to read the nvme device?
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7552
Location: Goose Creek SC

PostPosted: Sun Jun 12, 2016 2:50 am    Post subject: Reply with quote

grep -i cmdline /usr/src/linux/.config from inside the chroot should yield
CONFIG_CMDLINE="root=PARTUUID=1a6ccdfe-c686-45fa-8e9a-6f0fb9fcc440"
you should set this in menuconfig or the like:

[*] Built-in kernel command line
(root=PARTUUID=1a6ccdfe-c686-45fa-8e9a-6f0fb9fcc440) Built-in kernel command string
[*] Built-in command line overrides boot loader arguments

EFI stub kernel is an example of a bootloader; GRUB an example of a bootmanager. a bootmanager selects among bootloaders. Grub actually then becomes a hybrid providing both loader and manager
_________________
Defund the FCC.
Back to top
View user's profile Send private message
SilverSurfer972
n00b
n00b


Joined: 10 Jun 2016
Posts: 7

PostPosted: Sun Jun 12, 2016 12:01 pm    Post subject: Reply with quote

It worked!
Thank you so much!

After booting I got stuck with udev waiting for uevents to be processed...

I disabled all the nvidia stuff in the kernel, enabled
CONFIG_PROC_CHILDREN=y

added radeon build-in
and installed linux-firmware

Now I finally got my prompt!
Thank you do much for taking the time to help!

Great to be back in Gentoo
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7552
Location: Goose Creek SC

PostPosted: Sun Jun 12, 2016 12:05 pm    Post subject: Reply with quote

Favorite computer game is helping in solving a real problem. Glad to help.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Rossy65
n00b
n00b


Joined: 14 Sep 2016
Posts: 27

PostPosted: Wed Sep 14, 2016 3:15 pm    Post subject: EFI Kernel panic post helped! THANKS Reply with quote

I have a ASROCK pro4 h170M motherboard and an Intel .m2 128Gb drive.
DONAHUE's post SAVED ME!!

I was struggling getting Gentoo to boot with grub on the 4.4.6 kernel. One post indicated the current version of grub has PCIe/nvme issues but earlier grub versions worked. I decided to make the change to UEFI booting, and had a big learning curve.
Finally I got the boot manager to boot my kernel stub, but it would panic.

/sbin/blkid - lists uuid of disks and partitions (new to an ancient Sunos/Solaris user like myself)

I tried
CONFIG_COMANDLINE=root=/dev/nvme0n1p3 -- did not work
And
CONFIG_COMANDLINE=root=cb30...(UUID for /dev/nvme0n1p3) -- did not work
BUT adding PARTUUID *and* using the PARTUUID returned from /sbin/blkid worked!!
I also selected "Built in command line overrides boot loader arguments"

I need to research why the kernel can't find the partition without PARTUUID, it should boot with /dev/nvme0n1p3 or the disk uuid...but it didn't for me.
:D
If I cared, I'd see if the command override is absolutely required, but FINALLY this worked for me.

I already had EFI stub support. The handbook is VERY sparse in this area.

We need some examples with /dev/nvme* instead of /dev/sda for stab and in the general handbook.
/dev/sda is Sooo last century :)

Anyway I want to thank DONAHUE and SilverSurfer972 for posting this.
The early EFI firmware and handbook are just not quite enough breadcrumbs for getting this working quickly.
I started my Gentoo install Thursday/Friday last week, and it's taken about a WEEK to boot my new system to the root prompt.
_________________
Remember, Wherever you go, there you are. --Buckaroo Banzai
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7552
Location: Goose Creek SC

PostPosted: Thu Sep 15, 2016 5:38 pm    Post subject: Reply with quote

Quote:
If I cared, I'd see if the command override is absolutely required, but FINALLY this worked for me.
It is not absolutely required, I use it as a security blanket against random boot manager/boot loader entries sending the particular kernel to an unintended place looking for an init. Even rEFInd has that ability.
Using PARTUUID or PARTLABEL instead of /dev/"some kernel name" has so far avoided random name changes induced by introducing usb, memory card, nvm, pcie, etc drives or udev predictable names.
_________________
Defund the FCC.
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