pingtoo wrote:could you review and may be help to clarify context?
your post
efibootmgr -u
Code: Select all
BootCurrent: 01FE
Timeout: 0 seconds
BootOrder: 01FF,01FE,0000,0200
Boot0000* Bootx64 (Gentoo) HD(1,GPT,d5d977e1-f515-574f-8949-caf8f2c41559,0x800,0x80000)/\EFI\boot\bootx64.efi root=UUID=963bf518-69b3-41af-8366-617ba5aa3ef5 ro quiet init_on_alloc=1 init_on_free=1 spectre_v2=on spec_store_bypass_disable=seccomp randomize_kstack_offset=on random.trust_cpu=off pti=on page_poison=1 page_alloc.shuffle=1 hardened_usercopy=1 mce=0 vsyscall=none rng_core.default_quality=512 apparmor=1 security=apparmor lsm=landlock,lockdown,yama,loadpin,safesetid,selinux,smack,tomoyo,apparmor,ipe,bpf driver=free amdgpu.modeset=1 video=DP-1:2560x1440@165 zswap.enabled=1 zswap.compressor=zstd zswap.zpool=zsmalloc zswap.max_pool_percent=15 initrd=\EFI\boot\initramfs.cpio initrd=\EFI\boot\amd-uc.img initrd=\EFI\boot\intel-uc.img
Boot01FE* UMC 1 Gentoo Linux 6.14.2 HD(1,GPT,d5d977e1-f515-574f-8949-caf8f2c41559,0x800,0x80000)/\EFI\Gentoo\vmlinuz-6.14.2-gentoo-dist.efi ro quiet init_on_alloc=1 init_on_free=1 spectre_v2=on spec_store_bypass_disable=seccomp randomize_kstack_offset=on random.trust_cpu=off pti=on page_poison=1 page_alloc.shuffle=1 hardened_usercopy=1 mce=0 vsyscall=none rng_core.default_quality=512 apparmor=1 security=apparmor lsm=landlock,lockdown,yama,loadpin,safesetid,selinux,smack,tomoyo,apparmor,ipe,bpf driver=free amdgpu.modeset=1 video=DP-1:2560x1440@165 zswap.enabled=1 zswap.compressor=zstd zswap.zpool=zsmalloc zswap.max_pool_percent=15 initrd=\EFI\Gentoo\amd-uc.img initrd=\EFI\Gentoo\intel-uc.img initrd=\EFI\Gentoo\initramfs-6.14.2-gentoo-dist.img
Boot01FF* UMC 2 Gentoo Linux 6.14.2 HD(1,GPT,d5d977e1-f515-574f-8949-caf8f2c41559,0x800,0x80000)/\EFI\Gentoo\vmlinuz-6.14.2-gentoo.efi ro quiet init_on_alloc=1 init_on_free=1 spectre_v2=on spec_store_bypass_disable=seccomp randomize_kstack_offset=on random.trust_cpu=off pti=on page_poison=1 page_alloc.shuffle=1 hardened_usercopy=1 mce=0 vsyscall=none rng_core.default_quality=512 apparmor=1 security=apparmor lsm=landlock,lockdown,yama,loadpin,safesetid,selinux,smack,tomoyo,apparmor,ipe,bpf driver=free amdgpu.modeset=1 video=DP-1:2560x1440@165 zswap.enabled=1 zswap.compressor=zstd zswap.zpool=zsmalloc zswap.max_pool_percent=15 initrd=\EFI\Gentoo\amd-uc.img initrd=\EFI\Gentoo\intel-uc.img initrd=\EFI\Gentoo\initramfs-6.14.2-gentoo.img
Boot0200* UEFI: Patriot Memory PMAP, Partition 2 PciRoot(0x0)/Pci(0x14,0x0)/USB(10,0)/HD(2,GPT,3c14bf9d-d220-4e30-9902-40b3f5d1d6eb,0x23c,0x1680)
Those two entries with "Gentoo Linux 6.14.2" have no reference to root=963bf518-69b3-41af-8366-617ba5aa3ef5 reference. whereas the entry "Bootx64 (Gentoo)" do have root=963bf518-69b3-41af-8366-617ba5aa3ef5, And you said
Code: Select all
failed to find/mount device root=UUID=963bf518-69b3-41af-8366-617ba5aa3ef5 with /proc/cmdline -t auto -o default,ro
So which entry you tried and got that error?
And what exactly
Same error refer to?
Sometimes when trying too hard will put yourself in to a corner and hard to find way out. May be a review and share some context will help to see where is problem. A context I mean for example content of ESP, commands used and more detail of errors will help paint a better picture.
In that output of
efibootmgr -u, the first entry (Bootx64) is the manually created EFI entry using:
Code: Select all
efibootmgr -c -d /dev/nvme0n1 -p 1 -L "Bootx64 (Gentoo)" -l "\EFI\boot\bootx64.efi" -u " root=UUID=963bf518-69b3-41af-8366-617ba5aa3ef5 ro quiet init_on_alloc=1 init_on_free=1 spectre_v2=on spec_store_bypass_disable=seccomp randomize_kstack_offset=on random.trust_cpu=off pti=on page_poison=1 page_alloc.shuffle=1 hardened_usercopy=1 mce=0 vsyscall=none rng_core.default_quality=512 apparmor=1 security=apparmor lsm=landlock,lockdown,yama,loadpin,safesetid,selinux,smack,tomoyo,apparmor,ipe,bpf driver=free amdgpu.modeset=1 video=DP-1:2560x1440@165 zswap.enabled=1 zswap.compressor=zstd zswap.zpool=zsmalloc zswap.max_pool_percent=15 initrd=\EFI\boot\initramfs.cpio initrd=\EFI\boot\amd-uc.img initrd=\EFI\boot\intel-uc.img"
The other two were created by
installkernel. That refers to the vmlinuz and initramfs that was created when I was manually configuring the kernel, which I explain more below.
The first (
Boot01FE* UMC 1 Gentoo Linux 6.14.2, vmlinuz-6.14.2-gentoo-dist.efi) was created by the normal dist-kernel process, which eventually uses
ugrd to create the initramfs, and
uefi-mkconfig to create the EFI entry.
I am currently on this boot entry, and as you can see it does not have root= in it.
The second (
Boot01FF* UMC 2 Gentoo Linux 6.14.2,vmlinuz-6.14.2-gentoo.efi) was created from
installkernel (which still uses
ugrd and
uefi-mkconfig whenever I ran
make install after building the kernel 6.14.2 from
gentoo-sources with the config I've provided earlier, installing the built modules, and then the
make install.
I used the following for building the kernel:
Code: Select all
make LLVM=1 LLVM_IAS=1 LTO_CLANG_THIN=1 LD="ld.lld" AR="llvm-ar" NM="llvm-nm" RANLIB="llvm-ranlib" STRIP="llvm-strip" OBJCOPY="llvm-objcopy" OBJDUMP="llvm-objdump" LDFLAGS="-fuse-ld=mold -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,--strip-debug -Wl,--icf=safe -Wl,-z,rewrite-endbr -flto=thin" KLDFLAGS="-fuse-ld=mold -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,--strip-debug -Wl,--icf=safe -Wl,-z,rewrite-endbr -flto=thin" KCFLAGS="-O2 -march=alderlake -pipe -mno-cldemote -mno-kl -mno-sgx -mno-widekl -mshstk -fstack-protector-strong -fomit-frame-pointer -flto=thin -mllvm=-polly -mllvm=-polly-vectorizer=stripmine -mllvm=-polly-omp-backend=LLVM -mllvm=-polly-parallel -mllvm=-polly-num-threads=9 -mllvm=-polly-scheduling=dynamic -fzero-call-used-regs=used" -j12
I ran what I
assume is standard for manually building and installing the kernel:
Code: Select all
make LLVM=1 LLVM_IAS=1 LTO_CLANG_THIN=1 LD="ld.lld" AR="llvm-ar" NM="llvm-nm" RANLIB="llvm-ranlib" STRIP="llvm-strip" OBJCOPY="llvm-objcopy" OBJDUMP="llvm-objdump" LDFLAGS="-fuse-ld=mold -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,--strip-debug -Wl,--icf=safe -Wl,-z,rewrite-endbr -flto=thin" KLDFLAGS="-fuse-ld=mold -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,--strip-debug -Wl,--icf=safe -Wl,-z,rewrite-endbr -flto=thin" KCFLAGS="-O2 -march=alderlake -pipe -mno-cldemote -mno-kl -mno-sgx -mno-widekl -mshstk -fstack-protector-strong -fomit-frame-pointer -flto=thin -mllvm=-polly -mllvm=-polly-vectorizer=stripmine -mllvm=-polly-omp-backend=LLVM -mllvm=-polly-parallel -mllvm=-polly-num-threads=9 -mllvm=-polly-scheduling=dynamic -fzero-call-used-regs=used" -j12
make -j12 modules_install
make -j12 install
Here is the custom config I used:
http://dpaste.com/3R4H59MEA
The error I get when trying to boot into this customized kernel (
not what was created from gentoo-kernel-bin) is what I mentioned earlier:
Code: Select all
* Failed to find/mount device root=UUID=963bf518-69b3-41af-8366-617ba5aa3ef5 using /proc/cmdline -t auto -o default,ro
mount: /target_rootfs: can't find UUID=UUID=963bf518-69b3-41af-8366-617ba5aa3ef5
* Failed to mount root partition
* Press enter to break, waiting: 1.0
There's also an error alongside that, but I think it related to this one. I couldn't snap a picture in time, but it's something like:
Code: Select all
deferred probe pending: snd_hda_intel: couldn't bind with audio component
The following is what's in
/etc/default/uefi-mkconfig which is what
uefi-mkconfig uses when it is called by
installkernel to create an EFI entry.
This works with gentoo-kernel-bin, but not when I manually customize and build the kernel myself.
Code: Select all
ENTRY_LABEL_LIMIT=false
KERNEL_CONFIG="%entry_id %linux_name Linux %kernel_version ; rootdelay=10 ro quiet init_on_alloc=1 init_on_free=1 spectre_v2=on spec_store_bypass_disable=seccomp randomize_kstack_offset=on random.trust_cpu=off pti=on page_poison=1 page_alloc.shuffle=1 hardened_usercopy=1 mce=0 vsyscall=none rng_core.default_quality=512 apparmor=1 security=apparmor lsm=landlock,lockdown,yama,loadpin,safesetid,selinux,smack,tomoyo,apparmor,ipe,bpf driver=free amdgpu.modeset=1 video=DP-1:2560x1440@165 zswap.enabled=1 zswap.compressor=zstd zswap.zpool=zsmalloc zswap.max_pool_percent=15"