I recently did a profile upgrade ( from 17.1 to 23.0) in Gentoo,
after that I built a new kernel 6.15.3
nevj@mary /usr/src $ eselect kernel list
Available kernel symlink targets:
[1] linux-5.15.88-gentoo
[2] linux-6.6.0-gentoo
[3] linux-6.15.3-gentoo *
genkernel all
emerge --ask --noreplace sys-kernel/gentoo-sources:6.15.3
All seemed to go well
Then I attempted to setup grub. My machine has grub controlled by Debian and has Gentoo as a dual boot option.
In Gentoo
grub-mkconfig -o /boot/grub/grub.cfg
Reboot into Debian
update-grub
Reboot and
Gentoo fails to boot.... none of my 3 kernels will boot.... not 6.15.3 ( the new one) nor 6.6.0 nor 5.18.88
The message is 'unable to mount root fs'
So I mount the gentoo filesystem and check /etc/fstab⦠it is OK⦠it uses a UUID for /
So I go to the grub menu, select gentoo6.15.3, press āeā and I see the last line
initrd /boot/amd-uc.img
What is that???
I mount the gentoo filesystem again and look at /boot
nevj@mary ~ $ ls -l /boot
total 102960
-rw-r--r-- 1 root root 148480 Jun 27 20:42 amd-uc.img
drwxr-xr-x 2 root root 4096 Jun 29 10:46 grub
-rw-r--r-- 1 root root 10909928 Jan 29 2023 initramfs-5.15.88-gentoo-x86_64.img
-rw-r--r-- 1 root root 12663652 Jun 28 22:50 initramfs-6.15.3-gentoo-x86_64.img
-rw-r--r-- 1 root root 12237272 Nov 10 2023 initramfs-6.6.0-gentoo-x86_64.img
-rw-r--r-- 1 root root 4954398 Jan 29 2023 System.map-5.15.88-gentoo-x86_64
-rw-r--r-- 1 root root 4042263 Feb 17 2023 System.map-6.1.12-gentoo-x86_64
-rw-r--r-- 1 root root 7350978 Jun 28 21:55 System.map-6.15.3-gentoo-x86_64
-rw-r--r-- 1 root root 6094604 Apr 8 2023 System.map-6.2.10-gentoo-x86_64
-rw-r--r-- 1 root root 6094595 Mar 20 2023 System.map-6.2.7-gentoo-x86_64
-rw-r--r-- 1 root root 6345540 Nov 10 2023 System.map-6.6.0-gentoo-x86_64
-rw-r--r-- 1 root root 9865664 Jan 29 2023 vmlinuz-5.15.88-gentoo-x86_64
-rw-r--r-- 1 root root 12947968 Jun 28 21:56 vmlinuz-6.15.3-gentoo-x86_64
-rw-r--r-- 1 root root 11742752 Nov 10 2023 vmlinuz-6.6.0-gentoo-x86_64
Yes, it is there
Then I look at /boot/grub/grub.cfg
linux /boot/vmlinuz-6.15.3-gentoo-x86_64 root=UUID=5fa0230a-6757-4281-a209-9f116869d70c ro
echo 'Loading initial ramdisk ...'
initrd /boot/amd-uc.img /boot/initramfs-6.15.3-gentoo-x86_64.img
That initrd line is different to what shows with āeā in the grub menu⦠it only has initrd /boot/amd-uc.img
So I go back to the grub menu , select the Gentoo 6.15.3 line , do āeā, and edit it to
initrd /boot/initramfs-6.6.0-gentoo-x86_64.img
Then it boots⦠SUCCESS
but two questions
- How is it that both initrd files are in the grub.cfg file in Gentoo, but they do not make it to the commands that show with āeā in the grub menu? ⦠that has to be a grub error?
- What is this /boot/amd-uc.img file that makes the boot fail?
mary /boot # ls -l
total 102960
-rw-r--r-- 1 root root 148480 Jun 27 20:42 amd-uc.img
drwxr-xr-x 2 root root 4096 Jun 29 10:46 grub
-rw-r--r-- 1 root root 10909928 Jan 29 2023 initramfs-5.15.88-gentoo-x86_64.img
-rw-r--r-- 1 root root 12663652 Jun 28 22:50 initramfs-6.15.3-gentoo-x86_64.img
-rw-r--r-- 1 root root 12237272 Nov 10 2023 initramfs-6.6.0-gentoo-x86_64.img
It was made on Jun27 , the day before vmlinuz and initramfs were made for 6.15.3
Well the only things I did in Gentoo before genkernel were
The profile upgrade
followed by
config file updating
Therefore the profile update must have made that
amd-uc.img
file?
I dont understand?
Is there a grub expert who can help me understand this?