Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Problem loading custom kernel for Dell XPS 13 9370
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
shrooman
n00b
n00b


Joined: 24 Apr 2022
Posts: 32

PostPosted: Fri May 06, 2022 3:00 pm    Post subject: [SOLVED] Problem loading custom kernel for Dell XPS 13 9370 Reply with quote

Hello!

I tried installing Gentoo on my Dell XPS 13 9370 (the USB-C version) last night, got the rEFInd boot manager working but my custom kernel won't load properly.
Code:
VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6

I made sure the NVMe and ext4/vfat drivers are installed into the kernel. Not sure why this is happening. May someone help me with my kernel .config? I always seem to get stuck on this part... Thanks!

/usr/src/linux/.config

/etc/portage/make.conf

# lspci; lsmod;


Last edited by shrooman on Fri May 06, 2022 9:40 pm; edited 1 time in total
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1649

PostPosted: Fri May 06, 2022 3:13 pm    Post subject: Reply with quote

From the photo posted, the NVMe is found. But, the error indicates that no root= is specified on the command line, or some initramfs is required if nvme0n1p2 or nvme0n1p3 needs special attention (LUKS, LVM or using root=UUID= for example)
Back to top
View user's profile Send private message
shrooman
n00b
n00b


Joined: 24 Apr 2022
Posts: 32

PostPosted: Fri May 06, 2022 3:24 pm    Post subject: Reply with quote

grknight,

Thank you for your response!

My refind_linux.conf is:
Code:

"Boot with standard options"  "root=PARTUUID=0fd3f78d-6700-7d44-a015-60cd1a96d1f8 quiet"
"Boot to single-user mode"    "root=PARTUUID=0fd3f78d-6700-7d44-a015-60cd1a96d1f8 quiet single"
"Boot with minimal options"   "ro root=PARTUUID=0fd3f78d-6700-7d44-a015-60cd1a96d1f8"
Im passing PARTUUID and not UUID to the kernel. Do I still need an initramfs? I probably need one if I want microcode loaded, but this is my first time doing microcode loading for intel.
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1649

PostPosted: Fri May 06, 2022 4:27 pm    Post subject: Reply with quote

I would suggest adding "rootdelay=5 loglevel=8" the end of boot parameters to
  1. Ensure the config is being read
  2. Rule out the possibility of async discovery of the nvme

The output should include "Waiting 5 sec before mounting root device..." and actually stop for 5 seconds at that point


Last edited by grknight on Fri May 06, 2022 4:28 pm; edited 1 time in total
Back to top
View user's profile Send private message
shrooman
n00b
n00b


Joined: 24 Apr 2022
Posts: 32

PostPosted: Fri May 06, 2022 4:27 pm    Post subject: Reply with quote

Code:

/boot
├── EFI
│   ├── BOOT
│   │   ├── BOOT.CSV
│   │   ├── bootx64.efi
│   │   ├── icons
│   │   ├── keys
│   │   ├── refind.conf
│   │   └── vars
│   ├── Gentoo
│   │   ├── early_ucode.cpio
│   │   ├── initramfs-5.15.32-gentoo-r1.img
│   │   └── vmlinuz-5.15.32-gentoo-r1
│   ├── refind
│   │   ├── BOOT.CSV
│   │   ├── icons
│   │   ├── keys
│   │   ├── refind.conf
│   │   ├── refind_x64.efi
│   │   └── vars
│   └── tools
└── refind_linux.conf



refind.conf
Code:

menuentry Gentoo {
   icon EFI/refind/icons/os_gentoo.png
   loader boot/EFI/Gentoo/vmlinuz-5.15.32-gentoo-r1
   options "initrd=/boot/EFI/Gentoo/early_ucode.cpio
      initrd=/boot/EFI/Gentoo/initramfs-5.15.32-gentoo-r1.img
      root=PARTUUID=0fd3f78d-6700-7d44-a015-60cd1a96d1f8"
}

refind_linux.conf
Code:

"Boot with standard options"  "root=PARTUUID=0fd3f78d-6700-7d44-a015-60cd1a96d1f8 initrd=/boot/EFI/Gentoo/early_ucode.cpio initrd=boot/EFI/Gentoo/initramfs-%v.img quiet"


For some reason, the os stanza in refind.conf doesnt boot to the kernel at all. Booting using refind_linux.conf options drops me to a dracut debug. I dont know why this wont work now.
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1649

PostPosted: Fri May 06, 2022 4:38 pm    Post subject: Reply with quote

Unfortunately, I cannot help with rEFInd itself. I only have worked with grub and grub-mkconfig.

It would be interesting to capture the rdsosreport.txt from dracut emergency shell however.
Back to top
View user's profile Send private message
shrooman
n00b
n00b


Joined: 24 Apr 2022
Posts: 32

PostPosted: Fri May 06, 2022 5:37 pm    Post subject: Reply with quote

Code:

dracut: fatal: no or empty root= argument

Even though I specified root with a PARTUUID...

My output for dracut generating the initramfs with --early-microcode option. Looks like nothing went wrong. But Im also not 100%.
https://pastebin.com/qE875HTd
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1649

PostPosted: Fri May 06, 2022 7:39 pm    Post subject: Reply with quote

shrooman wrote:
Code:

dracut: fatal: no or empty root= argument

Even though I specified root with a PARTUUID...

My output for dracut generating the initramfs with --early-microcode option. Looks like nothing went wrong. But Im also not 100%.
https://pastebin.com/qE875HTd


Sounds like rEFInd isn't passing it correctly. Alternatively, it can be baked into the kernel's config using CONFIG_CMDLINE for a default and then the loader could override it if needed.
Back to top
View user's profile Send private message
shrooman
n00b
n00b


Joined: 24 Apr 2022
Posts: 32

PostPosted: Fri May 06, 2022 9:26 pm    Post subject: Reply with quote

grknight,

I rebuilt my kernel with my processor's intel-ucode built into CONFIG_EXTRA_FIRMWARE. Updated my refind.conf and the os stanza now works and I launch the kernel but I still get a kernel panic. I traded the PARTUUID for a UUID but I still get an error.
Code:
VFS: unable to mount root fs on unknown-block(0,0)


My refined refind.conf arguments.

My new kernel .config.

Maybe I should try rootdelay=5 again.
Back to top
View user's profile Send private message
shrooman
n00b
n00b


Joined: 24 Apr 2022
Posts: 32

PostPosted: Fri May 06, 2022 9:37 pm    Post subject: Reply with quote

Awesome, rootdelay did it! Thank you grknight.

By the way someone should move the wiki section on baking the microcode into the kernel to the top. I feel like that's much more fail safe atleast for refind. I don't have to even have an initramfs because it does one inside the kernel for the microcode (AFAIK).
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