On 17.06.2022 22:58, ylluminate wrote: > Following an upgrade / cross-grade from CentOS 7 to AlmaLinux 8, I'm having > some trouble with the GRUB not being able to boot properly for lack of > finding / generating entries. I'm hoping to resolve and document this in > order to further help the folks at AlmaLinux and cPanel on their ELevate > upgrade progress and am hoping to ask for some GRUB community eyes on this > issue to nail down what may be going on and how to resolve it: > https://serverfault.com/questions/1103555/how-to-recover-from-the-grub-losing-its-entries-and-faced-with-only-grub-at > > Appreciate any input / help! > > SeaBIOS (version rel-1.12.1-0.ga5ca58e9aef-prebuilt.qemu.org) > > iPXE (http://ipxe.org) 00:04.0 C980 PCI2.10 PnP PMM+7FF90F20+7FEF0F20 C980 > > > Booting from ROM... > Welcome to GRUB! > > error: variable `prefix' isn't set. >
$prefix is location of grub files (effectively /boot/grub). Without $prefix grub does not know where to look for its own modules and configuration files. $prefix (or code to find prifex at boot time) is computed by grub-install and stored in generated core.img (for specific platform). > GNU GRUB version 2.04 ... > Package grub2-pc-1:2.02-123.el8.alma.x86_64 is already installed. So your operating system has grub 2.02 but booted grub is 2.04. This is some different image probably left from previously installed operating system. You need to install grub using grub-install (or corresponding tools of your distribution) into proper location where your firmware looks for it. SeaBIOS implies legacy BIOS boot, but further you describe configuration for UEFI boot which is inconsistent.
