Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Boot] I can't boot gentoo in new computer with Nvme (Open)
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
ZaPa
l33t
l33t


Joined: 13 Feb 2007
Posts: 826

PostPosted: Mon Feb 24, 2025 6:19 pm    Post subject: [Boot] I can't boot gentoo in new computer with Nvme (Open) Reply with quote

Hello.

Recently I bought a new laptop and I wanted to install gentoo linux inside. This laptop use NVMe for hard disk. I have follow the handbook like other times before. The unique point that i did difererent is with the kernel.I wanted configure the kernel like other times, emerging gentoo-sources and configuring by hand. I don't know if this is possible today or if I have to change the way I install/configure the kernel.

This to autodetect modules that was using for livecd environment:

Code:

# make localmodconfig


and select other devices with
Code:

# make menuconfig,


select, save, whith:

Code:

# make && make modules_install && make install


The problem is after install grub2 and configure him. The computer is not possible to boot, this message error is:

Code:

md: Waiting for all devices to be availbe before autodetect
md: If you don't use raid, use raid=noautodetect
md: Autodetecting RAID arrays
md: ... autorun DONE
/dev/root: Can't open blockdev
VFS: Cannot open root device "PARTUUID=58aaae65d-891d-4adc-9405-903808a10de8" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
List of all bdev filesystems:
ext3
ext4
ext2
msdos
exfat
ntfs
ntfs3
xfs
btrfs

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
CPU: 15 PID: 1 Comm: swapper/0 Not tainted 6.6.74-gentoo  #5
hardware name: HP HP Pavilion Laptop 15-eh3xxx/8BC7, BIOS F.05 04/24/2024
Call Trace:
........



My fstab file:

Code:

PARTUUID=97a575ec-cc65-4d1c-829a-81aff570fb26           /efi         vfat    umask=0077   0 2
PARTUUID=792c5eb0-145a-4865-9b1b-fb7fc59984aa           none         swap    sw           0 0
PARTUUID=58aae65d-891d-4adc-9405-903808a10de8           /            ext4    defaults,noatime 0 1


Blkid:

Code:

/dev/nvme0n1p3: UUID="966607ae-203b-4a53-96f0-b6d7caed2980" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="58aae65d-891d-4adc-9405-903808a10de8"
/dev/nvme0n1p1: UUID="3091-C804" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="97a575ec-cc65-4d1c-829a-81aff570fb26"
/dev/nvme0n1p2: UUID="8e1f8ffe-ebc8-44d2-b6b9-dbbf222107d2" TYPE="swap" PARTUUID="792c5eb0-145a-4865-9b1b-fb7fc59984aa"


fdisk:

Code:

Device            Start        End   Sectors   Size Type
/dev/nvme0n1p1     2048    2099199   2097152     1G EFI System
/dev/nvme0n1p2  2099200   52430847  50331648    24G Linux swap
/dev/nvme0n1p3 52430848 1000214527 947783680 451.9G Linux root (x86-64)

Command (m for help):




lspci:

Code:

pcilib: Cannot open /proc/bus/pci
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne Root Complex
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne IOMMU
00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:02.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne PCIe GPP Bridge
00:02.4 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne PCIe GPP Bridge
00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 51)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 3
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 5
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 6
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 7
01:00.0 Network controller: MEDIATEK Corp. MT7921 802.11ax PCI Express Wireless Network Adapter
02:00.0 Non-Volatile memory controller: SK hynix BC901 NVMe Solid State Drive (DRAM-less) (rev 03)
03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Barcelo (rev c4)
03:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Renoir Radeon High Definition Audio Controller
03:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor
03:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne USB 3.1
03:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne USB 3.1
03:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] ACP/ACP3X/ACP6x Audio Coprocessor (rev 01)
03:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h/19h/1ah HD Audio Controller



grub.cfg:

Code:

livecd /usr/src/linux # cat /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 966607ae-203b-4a53-96f0-b6d7caed2980
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-966607ae-203b-4a53-96f0-b6d7caed2980' {
        load_video
        insmod gzio
        insmod part_gpt
        insmod ext2
        search --no-floppy --fs-uuid --set=root 966607ae-203b-4a53-96f0-b6d7caed2980
        echo    'Loading Linux 6.6.74 ...'
        linux   /boot/kernel-6.6.74 root=PARTUUID=58aae65d-891d-4adc-9405-903808a10de8 ro 
        echo    'Loading initial ramdisk ...'
        initrd  /boot/amd-uc.img
}
submenu 'Advanced options for Gentoo GNU/Linux' $menuentry_id_option 'gnulinux-advanced-966607ae-203b-4a53-96f0-b6d7caed2980' {
        menuentry 'Gentoo GNU/Linux, with Linux 6.6.74' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.6.74-advanced-966607ae-203b-4a53-96f0-b6d7caed2980' {
                load_video
                insmod gzio
                insmod part_gpt
                insmod ext2
                search --no-floppy --fs-uuid --set=root 966607ae-203b-4a53-96f0-b6d7caed2980
                echo    'Loading Linux 6.6.74 ...'
                linux   /boot/kernel-6.6.74 root=PARTUUID=58aae65d-891d-4adc-9405-903808a10de8 ro 
                echo    'Loading initial ramdisk ...'
                initrd  /boot/amd-uc.img
        }
        menuentry 'Gentoo GNU/Linux, with Linux 6.6.74 (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.6.74-recovery-966607ae-203b-4a53-96f0-b6d7caed2980' {
                load_video
                insmod gzio
                insmod part_gpt
                insmod ext2
                search --no-floppy --fs-uuid --set=root 966607ae-203b-4a53-96f0-b6d7caed2980
                echo    'Loading Linux 6.6.74 ...'
                linux   /boot/kernel-6.6.74 root=PARTUUID=58aae65d-891d-4adc-9405-903808a10de8 ro single
                echo    'Loading initial ramdisk ...'
                initrd  /boot/amd-uc.img
        }
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/25_bli ###
if [ "$grub_platform" = "efi" ]; then
  insmod bli
fi
### END /etc/grub.d/25_bli ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
if [ "$grub_platform" = "efi" ]; then
        menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
                fwsetup
        }
fi
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###



My .config kernel file:

Code:

https://pastebin.com/fht3FfAB


Why with this grub configuration appear initrd image option??? In my previous gentoo installation, 4 or 5 years ago, never I have used initrd option to load kernel image in grub configuration...

Can someone help me?


Thanks.
_________________
--
http://www.monovarlinux.org. Información y experiencias con linux, especialmente con Gentoo.
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3953

PostPosted: Mon Feb 24, 2025 7:09 pm    Post subject: Reply with quote

If you insist on not having an initramfs make sure that ext4 and nvme module is in-built in the kernel.
Code:

CONFIG_EXT4_FS=y
CONFIG_BLK_DEV_NVME=y

The output you are getting refers to the amd firmware initramfs, NOT your actual initramfs.
Code:

initrd  /boot/amd-uc.img

If i were you i would strongly use an initramfs.Pick up dracut.Its fabulous.
_________________
:)
Back to top
View user's profile Send private message
ZaPa
l33t
l33t


Joined: 13 Feb 2007
Posts: 826

PostPosted: Mon Feb 24, 2025 7:36 pm    Post subject: Reply with quote

Hello.

Thanks alamhant for your help.

I have checked this, and is correct

Code:

livecd /usr/src/linux # cat .config | grep CONFIG_EXT4_FS
CONFIG_EXT4_FS=y


Code:

livecd /usr/src/linux # cat .config | grep CONFIG_BLK_DEV_NVME
CONFIG_BLK_DEV_NVME=y



I don't understand exactly what initrd is for and I've never needed it to run my various Gentoo machines. Maybe now I do? What exactly does it do?
_________________
--
http://www.monovarlinux.org. Información y experiencias con linux, especialmente con Gentoo.
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 2032

PostPosted: Mon Feb 24, 2025 8:26 pm    Post subject: Reply with quote

Try adding rootwait=5 to the command-line options (near root= or ro) as NVMe devices are added asynchronously and a panic may occur if the kernel is looking for root while it is still being populated.
Back to top
View user's profile Send private message
Ralphred
l33t
l33t


Joined: 31 Dec 2013
Posts: 734

PostPosted: Mon Feb 24, 2025 8:40 pm    Post subject: Reply with quote

alamahant wrote:
Code:
CONFIG_EXT4_FS=y
CONFIG_BLK_DEV_NVME=y
This is done by make localmodconfig, that's it purpose.
ZaPa wrote:
Code:
        search --no-floppy --fs-uuid --set=root 966607ae-203b-4a53-96f0-b6d7caed2980
        echo    'Loading Linux 6.6.74 ...'
        linux   /boot/kernel-6.6.74 root=PARTUUID=58aae65d-891d-4adc-9405-903808a10de8 ro
        echo    'Loading initial ramdisk ...'
        initrd  /boot/amd-uc.img
/boot/kernel-6.6.74 seems odd, what "instalkernel" set-up are you using? When you use
Code:
USE="-*" emerge sys-kernel/installkernel
make install does more* than just copy the bzimage file.

Once you get it booting you are better off losing the ucode images from /boot/ and just including "amd-ucode/microcode_amd_fam17h.bin" in CONFIG_EXTRA_FIRMWARE (the 17h is the hex value of "cpu family" from /proc/cpuinfo, I think you are 17h, well 23). You'll want the amdgpu/<firmware files> in there too, so (assuming I got the right cpu/gpu combo)
Code:
CONFIG_EXTRA_FIRMWARE="amd-ucode/microcode_amd_fam17h.bin amdgpu/green_sardine_asd.bin amdgpu/green_sardine_ce.bin amdgpu/green_sardine_dmcub.bin amdgpu/green_sardine_me.bin amdgpu/green_sardine_mec2.bin amdgpu/green_sardine_mec.bin amdgpu/green_sardine_pfp.bin amdgpu/green_sardine_rlc.bin amdgpu/green_sardine_sdma.bin amdgpu/green_sardine_ta.bin amdgpu/green_sardine_vcn.bin"
TBH, CONFIG_EXTRA_FIRMWARE is such a chore to alter in menuconfig it's the main one I do by hand in an editor.

ZaPa wrote:
What exactly does it do?
It's basically to load modules that you need to boot, and do "other things" that the kernel can't w/o access to things it can't access at that stage in the boot process. As someone who doesn't even have loadable module support in most of my kernels, the only legitimate use case I'd have would be an encrypted root partition.

*Installkernel can try to re-create /boot/{intel,amd}-uc.img every time you run make install, the easiest way I've found to stop this is to just mute the the scripts if it does
Code:
echo '#!/bin/bash
exit' |tee /etc/kernel/preinst.d/35-intel-microcode.install > /etc/kernel/preinst.d/35-amd-microcode.install
I don't know what causes this, mine doesn't do it, I've just been running triage on a bunch of machines I didn't install is all.
Back to top
View user's profile Send private message
ZaPa
l33t
l33t


Joined: 13 Feb 2007
Posts: 826

PostPosted: Mon Feb 24, 2025 9:02 pm    Post subject: Reply with quote

Hello, thanks for your messages.

As I said before, I didn't use installkernel.
I just did emerge gentoo-sources and configured the kernel by hand and then make && make modules_install && make install to copy the kernel image to /boot. (I have follow this way always with all my gentoo installation)

About the name of image of kernel, I changed it myself, since if I left the default name generated by make install 'vmlinuz' when doing a grub-mkconfig it simply didn't detect the image.

Through this link: https://forums.gentoo.org/viewtopic-p-8765343.html?sid=20a0503872cf5d61732216ef3e8575b5 I found that changing the name and putting kernel-x-x grub detected the image. And so it did.


@grknight I have tried adding rootwait=5 in the grub config file and it didn't work.
_________________
--
http://www.monovarlinux.org. Información y experiencias con linux, especialmente con Gentoo.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6234
Location: Dallas area

PostPosted: Mon Feb 24, 2025 9:19 pm    Post subject: Reply with quote

Is nvme turned on in the kernel config and is it built in?

Code:
# NVME Support
#
CONFIG_NVME_CORE=y
CONFIG_BLK_DEV_NVME=y
CONFIG_NVME_MULTIPATH=y
# CONFIG_NVME_VERBOSE_ERRORS is not set
CONFIG_NVME_HWMON=y
# CONFIG_NVME_FC is not set
# CONFIG_NVME_TCP is not set
# CONFIG_NVME_HOST_AUTH is not set
# CONFIG_NVME_TARGET is not set
# end of NVME Support

_________________
UM780, 6.12 zen kernel, gcc 13, openrc, wayland
Back to top
View user's profile Send private message
ZaPa
l33t
l33t


Joined: 13 Feb 2007
Posts: 826

PostPosted: Mon Feb 24, 2025 9:24 pm    Post subject: Reply with quote

Anon-E-moose wrote:
Is nvme turned on in the kernel config and is it built in?

Code:
# NVME Support
#
CONFIG_NVME_CORE=y
CONFIG_BLK_DEV_NVME=y
CONFIG_NVME_MULTIPATH=y
# CONFIG_NVME_VERBOSE_ERRORS is not set
CONFIG_NVME_HWMON=y
# CONFIG_NVME_FC is not set
# CONFIG_NVME_TCP is not set
# CONFIG_NVME_HOST_AUTH is not set
# CONFIG_NVME_TARGET is not set
# end of NVME Support



Code:

livecd /usr/src/linux # cat .config | grep NVME
# NVME Support
CONFIG_NVME_COMMON=y
CONFIG_NVME_CORE=y
CONFIG_BLK_DEV_NVME=y
CONFIG_NVME_MULTIPATH=y
# CONFIG_NVME_VERBOSE_ERRORS is not set
CONFIG_NVME_HWMON=y
CONFIG_NVME_FABRICS=m
# CONFIG_NVME_FC is not set
# CONFIG_NVME_TCP is not set
CONFIG_NVME_AUTH=y
CONFIG_NVME_TARGET=m
CONFIG_NVME_TARGET_PASSTHRU=y
CONFIG_NVME_TARGET_LOOP=m
CONFIG_NVME_TARGET_FC=m
CONFIG_NVME_TARGET_TCP=m
# CONFIG_NVME_TARGET_AUTH is not set
# end of NVME Support
CONFIG_RTC_NVMEM=y
CONFIG_NVMEM=y
CONFIG_NVMEM_SYSFS=y
# CONFIG_NVMEM_LAYOUT_SL28_VPD is not set
# CONFIG_NVMEM_LAYOUT_ONIE_TLV is not set
# CONFIG_NVMEM_RMEM is not set


My .config file: https://pastebin.com/fht3FfAB


With another installations of gentoo (some years ago), my partitiion schema was different. /boot was in a partition and other partition for operative system..
In this schema, /boot/ y / are in the same partition.... ¿could be here the problem?
_________________
--
http://www.monovarlinux.org. Información y experiencias con linux, especialmente con Gentoo.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6234
Location: Dallas area

PostPosted: Mon Feb 24, 2025 9:56 pm    Post subject: Reply with quote

I wouldn't think you need more selected than the few that I have.
I would turn off the AUTH, and TARGET* stuff to start with, you should not need them.
_________________
UM780, 6.12 zen kernel, gcc 13, openrc, wayland
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