I'm running CentOS 7.9 fully updated in a dual-boot setup with Win10 on separate SSDs.
The Win disk was detected by grub2 and added to the menu a long time ago, and selecting either OS works fine.
Now I disconnected both SSDs, installed RHEL 8.4 on a new SSD and reconnected the original drives.
Through the BIOS boot disk selector, I can select and boot each OS without issues, and the functionality through grub also still works.
Obviously, RHEL 8 was not on the Centos 7 grub menu, so I ran grub2-mkconfig to update the menu, and it added two entries for RHEL 8.
However, I can not boot from either of those entries as they give me an error that the uuid cannot be found:
Code: Select all
Error: no such device: 7f30c7cf-3878-43c6-a754-9220538f63bc.
Error: file '/vmlinuz-0-rescue-57c550b7375c47f2a7abffba259636d2 not found.
Error: you need to load the kernel first.
Press any key to continue...
I then booted RHEL 8 and ran grub2-mkconfig there too. That one does not find the Win disk, but it does add two CentOS 7 entries to the grub menu which behave exactly like the entries in the CentOS 7 grub menu.
As I currently have CentOS 7 as my main OS with all the tweaks and multimedia stuff, I want to keep that my bootdisk and be able to boot RHEL 8 through the grub menu.
A working CentOS 7 entry looks like this:
Code: Select all
menuentry 'CentOS Linux (3.10.0-1160.25.1.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-1160.25.1.el7.x86_64-advanced-e03783d5-d456-48c2-b8e0-b2a518349d3b' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod xfs
set root='hd2,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos1 --hint-efi=hd2,msdos1 --hint-baremetal=ahci2,msdos1 aca29b0b-a258-4196-b501-6af141b06444
else
search --no-floppy --fs-uuid --set=root aca29b0b-a258-4196-b501-6af141b06444
fi
linux16 /vmlinuz-3.10.0-1160.25.1.el7.x86_64 root=/dev/mapper/cl_hacvmh01-root ro cl_hacvmh01/root rd.lvm.lv=cl_hacvmh01/swap nouveau.modeset=0 rd.driver.blacklist=nouveau vga=0x34A
initrd16 /initramfs-3.10.0-1160.25.1.el7.x86_64.img
Code: Select all
menuentry 'Red Hat Enterprise Linux release 8.4 (Ootpa) (on /dev/mapper/rhel_hacvmh02-root)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-c8dec39a-c017-426c-9b3c-d10b0b160f89' {
insmod part_msdos
insmod xfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' 7f30c7cf-3878-43c6-a754-9220538f63bc
else
search --no-floppy --fs-uuid --set=root 7f30c7cf-3878-43c6-a754-9220538f63bc
fi
linux /vmlinuz-0-rescue-57c550b7375c47f2a7abffba259636d2 root=/dev/mapper/rhel_hacvmh02-root
initrd /initramfs-0-rescue-57c550b7375c47f2a7abffba259636d2.img
Code: Select all
$ lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 xfs 7f30c7cf-3878-43c6-a754-9220538f63bc
└─sda2 LVM2_member go4PFa-HYUM-tpgB-aUwL-LPTm-iNEG-yLeXCx
├─rhel_hacvmh02-swap
swap 5c220e82-7b37-4838-b279-efbd948e7afd
├─rhel_hacvmh02-home
xfs c5ddcd97-8f8b-4246-9580-b73a633d0baf
└─rhel_hacvmh02-root
xfs c8dec39a-c017-426c-9b3c-d10b0b160f89
sdb
├─sdb1 ntfs System Reserved EEDA8311DA82D56D
├─sdb2 ntfs D25084135083FD0B
└─sdb3 ntfs 5698765898763719
sdc
├─sdc1 xfs aca29b0b-a258-4196-b501-6af141b06444 /boot
└─sdc2 LVM2_member Qt7djZ-m1f6-raKU-Wp4P-tGiP-xHTH-FVSnPC
├─cl_hacvmh01-root
xfs e03783d5-d456-48c2-b8e0-b2a518349d3b /
├─cl_hacvmh01-swap
swap 57b00ddc-e96b-4982-8a7d-93a8971fb1a4 [SWAP]
└─cl_hacvmh01-home
xfs e4b26537-7eca-4271-a530-3a9a6701ad50 /home
All the filenames mentioned in the RHEL8 entries do exist in /boot on the RHEL 8 disk.
my /etc/default/grub looks like:
Code: Select all
$ sudo cat /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rd.lvm.lv=cl_hacvmh01/root rd.lvm.lv=cl_hacvmh01/swap nouveau.modeset=0 rd.driver.blacklist=nouveau vga=0x34A"
GRUB_DISABLE_RECOVERY="true"
I think I provided all the relevant information. I did do a lot of investigation prior, but everything I found had to do with booting Windows (chainloading) and/or mismatching uuids, which is clearly not the case here. I guess I could add a chainloader entry for hd0 in /etc/grub.d/40_custom, but I'd still end up with the invalid auto-generated entries in my menu, so I don't consider that a proper solution.
I now have no ideas where to look further, so I came here.
Any ideas? Thanks.