Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Grub cant find files on the ESP partition.
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
acerm
n00b
n00b


Joined: 31 Oct 2020
Posts: 7

PostPosted: Tue Sep 03, 2024 11:23 pm    Post subject: Grub cant find files on the ESP partition. Reply with quote

I have been trying to reinstall the Gentoo kernel (because of a separate screw-up) and during boot Grub reports the error below.

Code:
   Booting 'Gentoo GNU/Linux'

Loading Linux 6.6.47-gentoo-dist.efi ...
error: file '/EFI/Linux/gentoo-6.6.47-gentoo-dist.efi' not found.


This error fails to make sense as the grubx64.efi is on the same partition. A tree of the partition is below.

Code:
(chroot) livecd / # tree /efi
/efi
└── EFI
    ├── gentoo
    │   └── grubx64.efi
    └── Linux
        ├── gentoo-6.6.47-gentoo-dist.efi
        └── gentoo-6.6.47-gentoo-dist-old.efi


I am not a stranger to Gentoo, but this has stumped me for a week.
Below I am including details that give a better idea as to the kernel install.

Code:
livecd /home/gentoo # blkid | grep nvme0
/dev/nvme0n1p1: LABEL_FATBOOT="ESP" LABEL="ESP" UUID="BF1B-DD9D" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="UEFIboot" PARTUUID="c12a7328-f81f-11d2-ba4b-00a0c93ec93b"
/dev/nvme0n1p2: UUID="1c43520d-635f-44b1-af1c-40e85a2f6562" BLOCK_SIZE="4096" TYPE="f2fs" PARTLABEL="rootfs" PARTUUID="c5cd933e-3e37-49b7-ad66-57c457397c17"
-------------------------------
make.conf excerpts
ACCEPT_LICENSE="@BINARY-REDISTRIBUTABLE"
GRUB_PLATFORMS="efi-64"
USE="-systemd dist-kernel -bluetooth"
----------------------------------
fstab excerpts
LABEL=ESP               /efi            vfat    umask=0077                              0 2
PARTLABEL=rootfs        /               f2fs    defaults,noatime                        0 1
-------------------------------------------
/etc/portage/package.use/installkernel
sys-kernel/installkernel -generic-uki dracut -systemd -systemd-boot uki -ukify grub -refind -efistub

#Utilities split out from systemd for OpenRC users
sys-apps/systemd-utils boot kernel-install
-------------------------------------------
(chroot) livecd / # grub-install --efi-directory=/efi

Installing for x86_64-efi platform.
Installation finished. No error reported.
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1638
Location: South America

PostPosted: Wed Sep 04, 2024 3:51 pm    Post subject: Reply with quote

Could you post the contents of the grub.cfg file?
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
acerm
n00b
n00b


Joined: 31 Oct 2020
Posts: 7

PostPosted: Wed Sep 04, 2024 4:34 pm    Post subject: Reply with quote

As requested, the contents of /boot/grub/grub.cfg.

Code:
#
# 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 f2fs
search --no-floppy --fs-uuid --set=root 1c43520d-635f-44b1-af1c-40e85a2f6562
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=1280x800
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=2
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=2
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-1c43520d-635f-44b1-af1c-40e85a2f6562' {
        load_video
        set gfxpayload=1920x1200
        insmod gzio
        insmod part_gpt
        insmod f2fs
        search --no-floppy --fs-uuid --set=root 1c43520d-635f-44b1-af1c-40e85a2f6562
        echo    'Loading Linux 6.6.47-gentoo-dist.efi ...'
        linux   /EFI/Linux/gentoo-6.6.47-gentoo-dist.efi root=PARTUUID=c5cd933e-3e37-49b7-ad66-57c457397c17 ro
}
submenu 'Advanced options for Gentoo GNU/Linux' $menuentry_id_option 'gnulinux-advanced-1c43520d-635f-44b1-af1c-40e85a2f6562' {
        menuentry 'Gentoo GNU/Linux, with Linux 6.6.47-gentoo-dist.efi' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.6.47-gentoo-dist.efi-advanced-1c43520d-635f-44b1-af1c-40e85a2f6562' {
                load_video
                set gfxpayload=1920x1200
                insmod gzio
                insmod part_gpt
                insmod f2fs
                search --no-floppy --fs-uuid --set=root 1c43520d-635f-44b1-af1c-40e85a2f6562
                echo    'Loading Linux 6.6.47-gentoo-dist.efi ...'
                linux   /EFI/Linux/gentoo-6.6.47-gentoo-dist.efi root=PARTUUID=c5cd933e-3e37-49b7-ad66-57c457397c17 ro
        }
        menuentry 'Gentoo GNU/Linux, with Linux 6.6.47-gentoo-dist.efi (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.6.47-gentoo-dist.efi-recovery-1c43520d-635f-44b1-af1c-40e8>
                load_video
                set gfxpayload=1920x1200
                insmod gzio
                insmod part_gpt
                insmod f2fs
                search --no-floppy --fs-uuid --set=root 1c43520d-635f-44b1-af1c-40e85a2f6562
                echo    'Loading Linux 6.6.47-gentoo-dist.efi ...'
                linux   /EFI/Linux/gentoo-6.6.47-gentoo-dist.efi root=PARTUUID=c5cd933e-3e37-49b7-ad66-57c457397c17 ro single
        }
        menuentry 'Gentoo GNU/Linux, with Linux 6.6.47-gentoo-dist-old.efi' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.6.47-gentoo-dist-old.efi-advanced-1c43520d-635f-44b1-af1c-40e85a2f6562>
                load_video
                set gfxpayload=1920x1200
                insmod gzio
                insmod part_gpt
                insmod f2fs
                search --no-floppy --fs-uuid --set=root 1c43520d-635f-44b1-af1c-40e85a2f6562
                echo    'Loading Linux 6.6.47-gentoo-dist-old.efi ...'
                linux   /EFI/Linux/gentoo-6.6.47-gentoo-dist-old.efi root=PARTUUID=c5cd933e-3e37-49b7-ad66-57c457397c17 ro
        }
        menuentry 'Gentoo GNU/Linux, with Linux 6.6.47-gentoo-dist-old.efi (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.6.47-gentoo-dist-old.efi-recovery-1c43520d-635f-44b1-a>
                load_video
                set gfxpayload=1920x1200
                insmod gzio
                insmod part_gpt
                insmod f2fs
                search --no-floppy --fs-uuid --set=root 1c43520d-635f-44b1-af1c-40e85a2f6562
                echo    'Loading Linux 6.6.47-gentoo-dist-old.efi ...'
                linux   /EFI/Linux/gentoo-6.6.47-gentoo-dist-old.efi root=PARTUUID=c5cd933e-3e37-49b7-ad66-57c457397c17 ro single
        }
        menuentry 'Gentoo GNU/Linux, with Linux 6.6.47-gentoo-dist.efi' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.6.47-gentoo-dist.efi-advanced-1c43520d-635f-44b1-af1c-40e85a2f6562' {
                load_video
                set gfxpayload=1920x1200
                insmod gzio
                insmod part_gpt
                insmod f2fs
                search --no-floppy --fs-uuid --set=root 1c43520d-635f-44b1-af1c-40e85a2f6562
                echo    'Loading Linux 6.6.47-gentoo-dist.efi ...'
                linux   /boot/vmlinuz-6.6.47-gentoo-dist.efi root=PARTUUID=c5cd933e-3e37-49b7-ad66-57c457397c17 ro
        }
        menuentry 'Gentoo GNU/Linux, with Linux 6.6.47-gentoo-dist.efi (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.6.47-gentoo-dist.efi-recovery-1c43520d-635f-44b1-af1c-40e8>
                load_video
                set gfxpayload=1920x1200
                insmod gzio
                insmod part_gpt
                insmod f2fs
                search --no-floppy --fs-uuid --set=root 1c43520d-635f-44b1-af1c-40e85a2f6562
                echo    'Loading Linux 6.6.47-gentoo-dist.efi ...'
                linux   /boot/vmlinuz-6.6.47-gentoo-dist.efi root=PARTUUID=c5cd933e-3e37-49b7-ad66-57c457397c17 ro single
        }
}

### 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 ###
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1638
Location: South America

PostPosted: Wed Sep 04, 2024 4:44 pm    Post subject: Reply with quote

acerm wrote:
Code:
livecd /home/gentoo # blkid | grep nvme0
/dev/nvme0n1p1: LABEL_FATBOOT="ESP" LABEL="ESP" UUID="BF1B-DD9D" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="UEFIboot" PARTUUID="c12a7328-f81f-11d2-ba4b-00a0c93ec93b"
/dev/nvme0n1p2: UUID="1c43520d-635f-44b1-af1c-40e85a2f6562" BLOCK_SIZE="4096" TYPE="f2fs" PARTLABEL="rootfs" PARTUUID="c5cd933e-3e37-49b7-ad66-57c457397c17"
acerm wrote:
As requested, the contents of /boot/grub/grub.cfg.

Code:
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-1c43520d-635f-44b1-af1c-40e85a2f6562' {
        load_video
        set gfxpayload=1920x1200
        insmod gzio
        insmod part_gpt
        insmod f2fs
        search --no-floppy --fs-uuid --set=root 1c43520d-635f-44b1-af1c-40e85a2f6562
        echo    'Loading Linux 6.6.47-gentoo-dist.efi ...'
        linux   /EFI/Linux/gentoo-6.6.47-gentoo-dist.efi root=PARTUUID=c5cd933e-3e37-49b7-ad66-57c457397c17 ro
}
# ...
### END /etc/grub.d/10_linux ###

File /boot/grub/grub.cfg is telling GRUB to look for /EFI/Linux/gentoo-6.6.47-gentoo-dist.efi in partition 2 (filesystem UUID 1c43520d-635f-44b1-af1c-40e85a2f6562) instead of the ESP (partition 1). How did you create this file?
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
acerm
n00b
n00b


Joined: 31 Oct 2020
Posts: 7

PostPosted: Wed Sep 04, 2024 10:47 pm    Post subject: Reply with quote

The file was created when I emerged sys-kernel/gentoo-kernel with the grub USE flag enabled for sys-kernel/installkernel.

If I understood the handbook, then the installkernel scripts would install the kernel, initramfs and the bootloader configuration. But after what you spotted, it now seems to be screwing up the GRUB configuration.
Back to top
View user's profile Send private message
AndrewAmmerlaan
Developer
Developer


Joined: 25 Jun 2014
Posts: 373
Location: Nijmegen

PostPosted: Thu Sep 05, 2024 10:02 am    Post subject: Reply with quote

The kernel should not be on the ESP to begin with when using GRUB.

Could you please share the output of:
emerge -pv sys-kernel/installkernel
and
emerge --config sys-kernel/gentoo-kernel

[EDIT]Do I see correctly that you are building Unified Kernel Images? Those should indeed be on the ESP, but the support for Unified Kernel Images in GRUB is a bit experimental and flaky. One problem is that you can run into this situation where grub-mkconfig incorrectly identifies the partition the UKI is on (it thinks it is in /boot). A work-around is to mount the ESP at /boot, another solution is to set GRUB_DEVICE_BOOT or GRUB_DEVICE_BOOT_UUID to your ESP in /etc/default/grub (untested).
_________________
OS: Gentoo 6.8.10-gentoo-dist, ~amd64, 23.0/desktop/plasma/systemd
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Back to top
View user's profile Send private message
acerm
n00b
n00b


Joined: 31 Oct 2020
Posts: 7

PostPosted: Fri Sep 06, 2024 12:15 am    Post subject: Reply with quote

As requested, the output of the two commands is pasted below.
Code:
emerge -pv sys-kernel/installkernel
These are the packages that would be merged, in order:

Calculating dependencies  ... done!
Dependency resolution took 1.00 s (backtrack: 0/30).

[ebuild   R    ] sys-kernel/installkernel-39-r2::gentoo  USE="dracut grub uki (-efistub) -refind -systemd -systemd-boot (-ugrd) -ukify" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB


Code:
emerge --config sys-kernel/gentoo-kernel
Configuring pkg...

 * Assuming you do not have a separate /boot partition.
 * Your /efi partition was detected as being mounted.
 * Files will be installed there for gentoo-kernel to function correctly.
 * Assuming you do not have a separate /boot/efi partition.
 * Assuming you do not have a separate /boot/EFI partition.
 * Installing the kernel via installkernel ...
Reading /usr/lib/kernel/install.conf...
/usr/lib/kernel/install.conf configures layout=uki
/usr/lib/kernel/install.conf configures initrd_generator=dracut
/usr/lib/kernel/install.conf configures uki_generator=dracut

Running /usr/lib/kernel/preinst.d/35-amd-microcode.install 6.6.47-gentoo-dist /usr/src/linux-6.6.47-gentoo-dist/arch/x86/boot/bzImage...

initrd_generator=dracut bundles CPU microcode, nothing to do here.

Hook /usr/lib/kernel/preinst.d/35-amd-microcode.install finished successfully


Running /usr/lib/kernel/preinst.d/50-dracut.install 6.6.47-gentoo-dist /usr/src/linux-6.6.47-gentoo-dist/arch/x86/boot/bzImage...

 * Using dracut as the initramfs and UKI generator...
dracut[I]: Executing: /usr/bin/dracut --force --verbose --kernel-image /usr/src/linux-6.6.47-gentoo-dist/arch/x86/boot/bzImage --uefi /usr/src/linux-6.6.47-gentoo-dist/arch/x86/boot/uki.efi 6.6.47-gentoo-dist
dracut[D]: Module 'dash' will not be installed, because command 'dash' could not be found!
dracut[D]: Module 'mksh' will not be installed, because command 'mksh' could not be found!
dracut[D]: Module 'systemd' will not be installed, because command '/usr/lib/systemd/systemd' could not be found!
dracut[D]: Module 'systemd-ask-password' will not be installed, because command 'systemd-ask-password' could not be found!
dracut[D]: Module 'systemd-ask-password' will not be installed, because command 'systemd-tty-ask-password-agent' could not be found!
dracut[D]: Module 'systemd-bsod' will not be installed, because command '/usr/lib/systemd/systemd-bsod' could not be found!
dracut[D]: Module 'systemd-coredump' will not be installed, because command 'coredumpctl' could not be found!
dracut[D]: Module 'systemd-coredump' will not be installed, because command '/usr/lib/systemd/systemd-coredump' could not be found!
dracut[D]: Module 'systemd-creds' will not be installed, because command 'systemd-creds' could not be found!
dracut[D]: Module 'systemd-hostnamed' will not be installed, because command 'hostnamectl' could not be found!
dracut[D]: Module 'systemd-hostnamed' will not be installed, because command '/usr/lib/systemd/systemd-hostnamed' could not be found!
dracut[D]: Module 'systemd-integritysetup' will not be installed, because command '/usr/lib/systemd/systemd-integritysetup' could not be found!
dracut[D]: Module 'systemd-integritysetup' will not be installed, because command '/usr/lib/systemd/system-generators/systemd-integritysetup-generator' could not be found!
dracut[D]: Module 'systemd-journald' will not be installed, because command 'journalctl' could not be found!
dracut[D]: Module 'systemd-journald' will not be installed, because command '/usr/lib/systemd/systemd-journald' could not be found!
dracut[D]: Module 'systemd-modules-load' will not be installed, because command '/usr/lib/systemd/systemd-modules-load' could not be found!
dracut[D]: Module 'systemd-networkd' will not be installed, because command '/usr/lib/systemd/systemd-networkd' could not be found!
dracut[D]: Module 'systemd-networkd' will not be installed, because command '/usr/lib/systemd/systemd-network-generator' could not be found!
dracut[D]: Module 'systemd-networkd' will not be installed, because command '/usr/lib/systemd/systemd-networkd-wait-online' could not be found!
dracut[D]: Module 'systemd-pcrphase' will not be installed, because command '/usr/lib/systemd/systemd-pcrphase' could not be found!
dracut[D]: Module 'systemd-pcrphase' will not be installed, because command '/usr/lib/systemd/systemd-pcrextend' could not be found!
dracut[D]: Module 'systemd-portabled' will not be installed, because command 'portablectl' could not be found!
dracut[D]: Module 'systemd-portabled' will not be installed, because command '/usr/lib/systemd/systemd-portabled' could not be found!
dracut[D]: Module 'systemd-pstore' will not be installed, because command '/usr/lib/systemd/systemd-pstore' could not be found!
dracut[D]: Module 'systemd-repart' will not be installed, because command 'systemd-repart' could not be found!
dracut[D]: Module 'systemd-resolved' will not be installed, because command 'resolvectl' could not be found!
dracut[D]: Module 'systemd-resolved' will not be installed, because command '/usr/lib/systemd/systemd-resolved' could not be found!
dracut[D]: Module 'systemd-sysctl' will not be installed, because command '/usr/lib/systemd/systemd-sysctl' could not be found!
dracut[D]: Module 'systemd-sysext' will not be installed, because command 'systemd-sysext' could not be found!
dracut[D]: Module 'systemd-sysusers' will not be installed, because command 'systemd-sysusers' could not be found!
dracut[D]: Module 'systemd-timedated' will not be installed, because command 'timedatectl' could not be found!
dracut[D]: Module 'systemd-timedated' will not be installed, because command '/usr/lib/systemd/systemd-timedated' could not be found!
dracut[D]: Module 'systemd-timesyncd' will not be installed, because command '/usr/lib/systemd/systemd-timesyncd' could not be found!
dracut[D]: Module 'systemd-timesyncd' will not be installed, because command '/usr/lib/systemd/systemd-time-wait-sync' could not be found!
dracut[D]: Module 'systemd-veritysetup' will not be installed, because command '/usr/lib/systemd/systemd-veritysetup' could not be found!
dracut[D]: Module 'systemd-veritysetup' will not be installed, because command '/usr/lib/systemd/system-generators/systemd-veritysetup-generator' could not be found!
dracut[D]: Module 'modsign' will not be installed, because command 'keyctl' could not be found!
dracut[D]: Module 'busybox' will not be installed, because command 'busybox' could not be found!
dracut[D]: Module 'dbus-broker' will not be installed, because command 'dbus-broker' could not be found!
dracut[D]: Module 'rngd' will not be installed, because command 'rngd' could not be found!
dracut[D]: Module 'connman' will not be installed, because command 'connmand' could not be found!
dracut[D]: Module 'connman' will not be installed, because command 'connmanctl' could not be found!
dracut[D]: Module 'connman' will not be installed, because command 'connmand-wait-online' could not be found!
dracut[D]: Module 'network-legacy' will not be installed, because command 'dhclient' could not be found!
dracut[D]: Module 'network-manager' will not be installed, because command 'NetworkManager' could not be found!
dracut[I]: 62bluetooth: Could not find any command of '/usr/lib/bluetooth/bluetoothd /usr/libexec/bluetooth/bluetoothd'!
dracut[D]: Module 'lvmmerge' will not be installed, because command 'lvm' could not be found!
dracut[D]: Module 'lvmthinpool-monitor' will not be installed, because command 'lvm' could not be found!
dracut[D]: Module 'btrfs' will not be installed, because command 'btrfs' could not be found!
dracut[I]: 90crypt: Could not find any command of '/usr/lib/systemd/systemd-cryptsetup cryptsetup'!
dracut[D]: Module 'dm' will not be installed, because command 'dmsetup' could not be found!
dracut[D]: Module 'dmraid' will not be installed, because command 'dmraid' could not be found!
dracut[D]: Module 'dmsquash-live-ntfs' will not be installed, because command 'ntfs-3g' could not be found!
dracut[D]: Module 'lvm' will not be installed, because command 'lvm' could not be found!
dracut[D]: Module 'mdraid' will not be installed, because command 'mdadm' could not be found!
dracut[D]: Module 'multipath' will not be installed, because command 'multipath' could not be found!
dracut[I]: 90systemd-cryptsetup: Could not find any command of '/usr/lib/systemd/systemd-cryptsetup'!
dracut[D]: Module 'pcsc' will not be installed, because command 'pcscd' could not be found!
dracut[D]: Module 'tpm2-tss' will not be installed, because command 'tpm2' could not be found!
dracut[D]: Module 'cifs' will not be installed, because command 'mount.cifs' could not be found!
dracut[D]: Module 'fcoe' will not be installed, because command 'dcbtool' could not be found!
dracut[D]: Module 'fcoe' will not be installed, because command 'fipvlan' could not be found!
dracut[D]: Module 'fcoe' will not be installed, because command 'lldpad' could not be found!
dracut[D]: Module 'fcoe' will not be installed, because command 'fcoemon' could not be found!
dracut[D]: Module 'fcoe' will not be installed, because command 'fcoeadm' could not be found!
dracut[D]: Module 'fcoe-uefi' will not be installed, because command 'dcbtool' could not be found!
dracut[D]: Module 'fcoe-uefi' will not be installed, because command 'fipvlan' could not be found!
dracut[D]: Module 'fcoe-uefi' will not be installed, because command 'lldpad' could not be found!
dracut[D]: Module 'iscsi' will not be installed, because command 'iscsi-iname' could not be found!
dracut[D]: Module 'iscsi' will not be installed, because command 'iscsiadm' could not be found!
dracut[D]: Module 'iscsi' will not be installed, because command 'iscsid' could not be found!
dracut[D]: Module 'nbd' will not be installed, because command 'nbd-client' could not be found!
dracut[I]: 95nfs: Could not find any command of 'rpcbind portmap'!
dracut[D]: Module 'nvmf' will not be installed, because command 'nvme' could not be found!
dracut[D]: Module 'nvmf' will not be installed, because command 'jq' could not be found!
dracut[D]: Module 'biosdevname' will not be installed, because command 'biosdevname' could not be found!
dracut[D]: Module 'dracut-systemd' will not be installed, because command '/usr/lib/systemd/systemd' could not be found!
dracut[D]: Module 'memstrack' will not be installed, because command 'memstrack' could not be found!
dracut[D]: Module 'squash' will not be installed, because command 'mksquashfs' could not be found!
dracut[D]: Module 'squash' will not be installed, because command 'unsquashfs' could not be found!
dracut[I]: *** Including module: i18n ***
dracut[I]: *** Including module: kernel-modules ***
dracut-install: Failed to find module 'simplefb' /lib/modules/6.6.47-gentoo-dist//kernel/drivers/video/fbdev/simplefb.ko
dracut-install: Failed to find module 'x86_pkg_temp_thermal' /lib/modules/6.6.47-gentoo-dist//kernel/drivers/thermal/intel/x86_pkg_temp_thermal.ko
dracut-install: Failed to find module 'intel_powerclamp' /lib/modules/6.6.47-gentoo-dist//kernel/drivers/thermal/intel/intel_powerclamp.ko
dracut-install: Failed to find module 'intel_ifs' /lib/modules/6.6.47-gentoo-dist//kernel/drivers/platform/x86/intel/ifs/intel_ifs.ko
dracut-install: Failed to find module 'nvme_fcloop' /lib/modules/6.6.47-gentoo-dist//kernel/drivers/nvme/target/nvme-fcloop.ko
dracut-install: Failed to find module 'simpledrm' /lib/modules/6.6.47-gentoo-dist//kernel/drivers/gpu/drm/tiny/simpledrm.ko
dracut-install: Failed to find module 'i10nm_edac' /lib/modules/6.6.47-gentoo-dist//kernel/drivers/edac/i10nm_edac.ko
dracut-install: Failed to find module 'skx_edac_common' /lib/modules/6.6.47-gentoo-dist//kernel/drivers/edac/skx_edac_common.ko
dracut-install: Failed to find module 'skx_edac' /lib/modules/6.6.47-gentoo-dist//kernel/drivers/edac/skx_edac.ko
dracut-install: Failed to find module 'igen6_edac' /lib/modules/6.6.47-gentoo-dist//kernel/drivers/edac/igen6_edac.ko
dracut-install: Failed to find module 'pnd2_edac' /lib/modules/6.6.47-gentoo-dist//kernel/drivers/edac/pnd2_edac.ko
dracut-install: Failed to find module 'sb_edac' /lib/modules/6.6.47-gentoo-dist//kernel/drivers/edac/sb_edac.ko
dracut-install: Failed to find module 'i7core_edac' /lib/modules/6.6.47-gentoo-dist//kernel/drivers/edac/i7core_edac.ko
dracut[I]: *** Including module: kernel-modules-extra ***
dracut[D]:   kernel-modules-extra: configuration source "/run/depmod.d" does not exist
dracut[D]:   kernel-modules-extra: configuration source "/etc/depmod.d" does not exist
dracut[D]:   kernel-modules-extra: configuration source "/lib/depmod.d" does not exist
dracut[I]: *** Including module: nvdimm ***
dracut[I]: *** Including module: pcmcia ***
dracut[D]: Skipping udev rule: 60-pcmcia.rules
dracut[I]: *** Including module: qemu ***
dracut[I]: *** Including module: qemu-net ***
dracut[I]: *** Including module: hwdb ***
dracut[I]: *** Including module: lunmask ***
dracut[I]: *** Including module: resume ***
dracut[I]: *** Including module: rootfs-block ***
dracut[I]: *** Including module: terminfo ***
dracut[I]: *** Including module: udev-rules ***
dracut[I]: Skipping program dmi_memory_id using in udev rule 70-memory.rules as it cannot be found
dracut[I]: *** Including module: virtiofs ***
dracut[I]: *** Including module: usrmount ***
dracut[I]: *** Including module: base ***
dracut[I]: *** Including module: fs-lib ***
dracut[I]: *** Including module: shutdown ***
dracut[I]: *** Including modules done ***
dracut[I]: *** Installing kernel module dependencies ***
dracut[I]: *** Installing kernel module dependencies done ***
dracut[I]: *** Resolving executable dependencies ***
dracut[I]: *** Resolving executable dependencies done ***
dracut[I]: *** Hardlinking files ***
dracut[D]: Mode:                     real
dracut[D]: Method:                   sha256
dracut[D]: Files:                    1564
dracut[D]: Linked:                   3 files
dracut[D]: Compared:                 0 xattrs
dracut[D]: Compared:                 505 files
dracut[D]: Saved:                    6.22 KiB
dracut[D]: Duration:                 0.007719 seconds
dracut[I]: *** Hardlinking files done ***
dracut[I]: *** Generating early-microcode cpio image ***
dracut[I]: *** Constructing AuthenticAMD.bin ***
dracut[I]: *** Store current command line parameters ***
dracut[I]: *** Stripping files ***
dracut[I]: *** Stripping files done ***
dracut[I]: *** Creating image file '/usr/src/linux-6.6.47-gentoo-dist/arch/x86/boot/uki.efi' ***
dracut[I]: Using auto-determined compression method 'zstd'
dracut[D]: Image: /var/tmp/portage/sys-kernel/gentoo-kernel-6.6.47/temp/dracut.mQB49J/initramfs.img: 23M
dracut[D]: ========================================================================
dracut[D]: Early CPIO image
dracut[D]: ========================================================================
dracut[D]: drwxr-xr-x   3 root     root            0 Sep  5 07:37 .
dracut[D]: -rw-r--r--   1 root     root            2 Sep  5 07:37 early_cpio
dracut[D]: drwxr-xr-x   3 root     root            0 Sep  5 07:37 kernel
Warning : decompression does not support multi-threading
dracut[D]: drwxr-xr-x   3 root     root            0 Sep  5 07:37 kernel/x86
dracut[D]: drwxr-xr-x   2 root     root            0 Sep  5 07:37 kernel/x86/microcode
dracut[D]: -rw-r--r--   1 root     root        76166 Sep  5 07:37 kernel/x86/microcode/AuthenticAMD.bin
dracut[D]: ========================================================================
dracut[D]: Version: dracut-103
Warning : decompression does not support multi-threading
dracut[D]:
dracut[D]: Arguments:  --force --verbose --kernel-image '/usr/src/linux-6.6.47-gentoo-dist/arch/x86/boot/bzImage' --uefi
dracut[D]:
Warning : decompression does not support multi-threading
dracut[D]: dracut modules:
dracut[D]: i18n
dracut[D]: kernel-modules
dracut[D]: kernel-modules-extra
dracut[D]: nvdimm
dracut[D]: pcmcia
dracut[D]: qemu
dracut[D]: qemu-net
dracut[D]: hwdb
dracut[D]: lunmask
dracut[D]: resume
dracut[D]: rootfs-block
dracut[D]: terminfo
dracut[D]: udev-rules
dracut[D]: virtiofs
dracut[D]: usrmount
dracut[D]: base
dracut[D]: fs-lib
dracut[D]: shutdown
dracut[D]: ========================================================================
dracut[D]: drwxr-xr-x  12 root     root            0 Sep  5 07:37 .
dracut[D]: crw-r--r--   1 root     root       5,   1 Sep  5 07:37 dev/console
dracut[D]: crw-r--r--   1 root     root       1,  11 Sep  5 07:37 dev/kmsg
dracut[D]: crw-r--r--   1 root     root       1,   3 Sep  5 07:37 dev/null
dracut[D]: crw-r--r--   1 root     root       1,   8 Sep  5 07:37 dev/random
dracut[D]: crw-r--r--   1 root     root       1,   9 Sep  5 07:37 dev/urandom
dracut[D]: lrwxrwxrwx   1 root     root            7 Sep  5 07:37 bin -> usr/bin
dracut[D]: drwxr-xr-x   2 root     root            0 Sep  5 07:37 dev
dracut[D]: drwxr-xr-x   6 root     root            0 Sep  5 07:37 etc
dracut[D]: drwxr-xr-x   2 root     root            0 Sep  5 07:37 etc/cmdline.d
dracut[D]: drwxr-xr-x   2 root     root            0 Sep  5 07:37 etc/conf.d
dracut[D]: -rw-r--r--   1 root     root          169 Sep  5 07:37 etc/conf.d/systemd.conf
dracut[D]: -rw-r--r--   1 root     root          138 Aug 30 16:41 etc/e2fsck.conf
dracut[D]: -rw-r--r--   1 root     root            0 Sep  5 07:37 etc/fstab.empty
dracut[D]: -rw-r--r--   1 root     root          184 Sep  5 07:37 etc/group
dracut[D]: lrwxrwxrwx   1 root     root           25 Sep  5 07:37 etc/initrd-release -> ../usr/lib/initrd-release
dracut[D]: -rw-r--r--   1 root     root         2418 Sep  5 07:37 etc/ld.so.cache
dracut[D]: -rw-r--r--   1 root     root          196 Aug 31 10:18 etc/ld.so.conf
dracut[D]: drwxr-xr-x   2 root     root            0 Sep  5 07:37 etc/ld.so.conf.d
dracut[D]: -rw-r--r--   1 root     root           75 Aug 30 16:48 etc/ld.so.conf.d/05gcc-x86_64-pc-linux-gnu.conf
dracut[D]: lrwxrwxrwx   1 root     root           17 Sep  5 07:37 etc/mtab -> /proc/self/mounts
dracut[D]: lrwxrwxrwx   1 root     root           14 Sep  5 07:37 etc/os-release -> initrd-release
dracut[D]: -rw-r--r--   1 root     root           75 Sep  5 07:37 etc/passwd
dracut[D]: drwxr-xr-x   3 root     root            0 Sep  5 07:37 etc/udev
dracut[D]: drwxr-xr-x   2 root     root            0 Sep  5 07:37 etc/udev/rules.d

trimmed to reduce post size------------------------------------------------

dracut[D]: drwxr-xr-x   2 root     root            0 Sep  5 07:37 var/lib/dracut/hooks/mount
dracut[D]: -rwxr-xr-x   1 root     root         4265 Jul 13 21:26 var/lib/dracut/hooks/mount/99-mount-root.sh
dracut[D]: drwxr-xr-x   2 root     root            0 Sep  5 07:37 var/lib/dracut/hooks/netroot
dracut[D]: drwxr-xr-x   2 root     root            0 Sep  5 07:37 var/lib/dracut/hooks/pre-mount
dracut[D]: -rwxr-xr-x   1 root     root          631 Jul 13 21:26 var/lib/dracut/hooks/pre-mount/99-mount-virtiofs.sh
dracut[D]: drwxr-xr-x   2 root     root            0 Sep  5 07:37 var/lib/dracut/hooks/pre-pivot
dracut[D]: -rwxr-xr-x   1 root     root         3539 Jul 13 21:26 var/lib/dracut/hooks/pre-pivot/50-mount-usr.sh
dracut[D]: drwxr-xr-x   2 root     root            0 Sep  5 07:37 var/lib/dracut/hooks/pre-shutdown
dracut[D]: drwxr-xr-x   2 root     root            0 Sep  5 07:37 var/lib/dracut/hooks/pre-trigger
dracut[D]: drwxr-xr-x   2 root     root            0 Sep  5 07:37 var/lib/dracut/hooks/pre-udev
dracut[D]: -rwxr-xr-x   1 root     root          507 Jul 13 21:26 var/lib/dracut/hooks/pre-udev/30-block-genrules.sh
dracut[D]: drwxr-xr-x   2 root     root            0 Sep  5 07:37 var/lib/dracut/hooks/shutdown
dracut[D]: drwxr-xr-x   2 root     root            0 Sep  5 07:37 var/lib/dracut/hooks/shutdown-emergency
dracut[D]: lrwxrwxrwx   1 root     root           11 Sep  5 07:37 var/lock -> ../run/lock
dracut[D]: lrwxrwxrwx   1 root     root            6 Sep  5 07:37 var/run -> ../run
dracut[D]: drwxr-xr-x   2 root     root            0 Sep  5 07:37 var/tmp
dracut[D]: ========================================================================
dracut[D]:
dracut[D]: dracut cmdline:
dracut[I]: *** Creating UEFI image file '/usr/src/linux-6.6.47-gentoo-dist/arch/x86/boot/uki.efi' done ***

Hook /usr/lib/kernel/preinst.d/50-dracut.install finished successfully

Found UKI directory on ESP
Installing Unified Kernel Image for 6.6.47-gentoo-dist...

Running /usr/lib/kernel/postinst.d/91-grub-mkconfig.install 6.6.47-gentoo-dist /efi/EFI/Linux/gentoo-6.6.47-gentoo-dist.efi...

 * Backing up existing grub config as /boot/grub/grub.cfg~...
'/boot/grub/grub.cfg' -> '/boot/grub/grub.cfg~'
 * Generating new GRUB config as /boot/grub/grub.cfg...
Generating grub configuration file ...
Found linux image: /efi/EFI/Linux/gentoo-6.6.47-gentoo-dist.efi
Found linux image: /efi/EFI/Linux/gentoo-6.6.47-gentoo-dist-old.efi
Found linux image: /boot/vmlinuz-6.6.47-gentoo-dist.efi
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done

Hook /usr/lib/kernel/postinst.d/91-grub-mkconfig.install finished successfully

 [ ok ]


I have laso attempted both of the suggested workarounds (ESP mounted to /boot or GRUB_DEVICE_BOOT_UUID) and found that the grub.cfg file continued to reference partition 2. It feels like I am cursed.
Back to top
View user's profile Send private message
AndrewAmmerlaan
Developer
Developer


Joined: 25 Jun 2014
Posts: 373
Location: Nijmegen

PostPosted: Fri Sep 06, 2024 8:33 am    Post subject: Reply with quote

Quote:
It feels like I am cursed.


Don't worry, it's not a curse, GRUB simply is not properly compatible with UKIs (yet). If you take a look at /usr/lib/kernel/postinst.d/91-grub-mkconfig.install you can see how I sort off tried to make it work with GRUB_LINUX_KERNEL_GLOBS. When I tested this on my system grub-mkconfig created a proper grub.cfg for me, but what this really needs is a proper fix upstream instead of a hack in a postinstall script.

I'd recommend either systemd-boot or refind for UKIs. Note that building an UKI requires systemd-stub which, for build system reasons, is toggled by the same flag as systemd-boot (USE=boot), so you already have all the tools present to boot with systemd-boot (simply 'bootctl install' and you should be good to go).
_________________
OS: Gentoo 6.8.10-gentoo-dist, ~amd64, 23.0/desktop/plasma/systemd
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Back to top
View user's profile Send private message
acerm
n00b
n00b


Joined: 31 Oct 2020
Posts: 7

PostPosted: Sat Sep 07, 2024 1:11 pm    Post subject: Reply with quote

Well... I attempted everything over again, this time using rEFInd.
When booting after the gui for rEFInd, everything stops and the following is near the top of the terminal.
Code:
dracut: FATAL: no or empty root= argument

This seems important. So I dived into /boot/refind_linux.conf and found this.
Code:
"Boot with standard options"  "BOOT_IMAGE=/boot/gentoo nodhcp secureconsole root=live:CDLABEL=gentoo-amd64-livegui rd.live.dir=/ rd.live.squashimg=image.squashfs cdroot"
"Boot to single-user mode"    "BOOT_IMAGE=/boot/gentoo nodhcp secureconsole root=live:CDLABEL=gentoo-amd64-livegui rd.live.dir=/ rd.live.squashimg=image.squashfs cdroot single"
"Boot with minimal options"   "ro root=/dev/nvme0n1p2"

The root entries of the first two lines looks wrong.
And the root entry of "minimal options" seems reliant on the /dev entry of the NVME, which I have seen change in between boots. Probably due to multiple NVME drives. For example, right now the /dev entry is /dev/nvme1n1p2.
Back to top
View user's profile Send private message
AndrewAmmerlaan
Developer
Developer


Joined: 25 Jun 2014
Posts: 373
Location: Nijmegen

PostPosted: Sat Sep 07, 2024 1:25 pm    Post subject: Reply with quote

What has probably happened here is that the cmdline section of your UKI is either empty or contains the cmdline extracted from /proc/cmdline (i.e. the cmdline of the currently running kernel, i.e. the cmdline of the livecd).

The cmdline you do want to use should be specified in /etc/kernel/cmdline. Only GRUB has automated determination of the root= parameter for the cmdline, other bootloaders, UKI generators, etc take the cmdline from config file or from /proc/cmdline (and you should therefore set an appropriate root= manually). Note that the cmdline embedded into the UKI can be overridden by the bootloader (if secureboot is not enabled) so you might want to change /boot/refind_linux.conf as well (not sure as I do not use refind myself). I recommend choosing one place to set it so it is not confusing later, so either set /etc/kernel/cmdline and ensure refind does not override this, or create an empty /etc/kernel/cmdline and ensure refind passes on a correct cmdline.
_________________
OS: Gentoo 6.8.10-gentoo-dist, ~amd64, 23.0/desktop/plasma/systemd
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Back to top
View user's profile Send private message
acerm
n00b
n00b


Joined: 31 Oct 2020
Posts: 7

PostPosted: Sat Sep 07, 2024 8:45 pm    Post subject: Reply with quote

Oh thank Zeus..
Andrew thank you so much. I now have the kernel loading and a functioning terminal.

For those of you curious what I did, I updated two files to cover my bases.
It was true that the /etc/dracut.conf.d/uki.conf file did not have an entry for kernel_cmdline. In the Handbook I didn't spot any suggestions or requirement that it be used and thus left it blank. But now it has the line below.
Code:
kernel_cmdline="root=PARTLABEL=rootfs"

The other file, /boot/refind_linux.conf, was manually edited to replace the 'root=' entries.

Hopefully that covers my needs for the future.
Once again, thank you for your patience and expertise.
Back to top
View user's profile Send private message
AndrewAmmerlaan
Developer
Developer


Joined: 25 Jun 2014
Posts: 373
Location: Nijmegen

PostPosted: Sun Sep 08, 2024 7:37 am    Post subject: Reply with quote

Great to hear that it is working now!

I added a little note to the handbook explaining that we usually need at least a root= in the UKI command line: https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Kernel#Optional:_Unified_Kernel_Image
_________________
OS: Gentoo 6.8.10-gentoo-dist, ~amd64, 23.0/desktop/plasma/systemd
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
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