Comment 8 for bug 1970257

Revision history for this message
Ioanna Alifieraki (joalif) wrote :

Most likely this bug is because of Centos/RHEL 8 uses blscfg module to read
the entries for each installed kernel from /boot/loader/entries
(more info https://fedoraproject.org/wiki/Changes/BootLoaderSpecByDefault).

On a Centos8 vm deployed by maas , after applying the workaround and booting
the machine :

# ls /boot/loader/entries/
994a7dc087ef40f9bd1f4c6e228f294f-0-rescue.conf 994a7dc087ef40f9bd1f4c6e228f294f-4.18.0-305.25.1.el8_4.x86_64.conf
# ls /boot/loader/entries/
994a7dc087ef40f9bd1f4c6e228f294f-0-rescue.conf 994a7dc087ef40f9bd1f4c6e228f294f-4.18.0-305.25.1.el8_4.x86_64.conf
[root@maas-test-2 entries]# cat /boot/loader/entries/994a7dc087ef40f9bd1f4c6e228f294f-4.18.0-305.25.1.el8_4.x86_64.conf
title CentOS Linux (4.18.0-305.25.1.el8_4.x86_64) 8
version 4.18.0-305.25.1.el8_4.x86_64
linux /boot/vmlinuz-4.18.0-305.25.1.el8_4.x86_64
initrd /boot/initramfs-4.18.0-305.25.1.el8_4.x86_64.img $tuned_initrd
options $kernelopts $tuned_params
id centos-20211103103800-4.18.0-305.25.1.el8_4.x86_64
grub_users $grub_users
grub_arg --unrestricted
grub_class kernel

So the problem is that in this file, linux and initrd paths are prefixed with '/boot'.
Now the question is where this file comes from?
These files are either copied from /lib/modules/$kernelver/bls.conf or generated
if this file doesn't exist. (this information comes from commit e96a64edb5320
"grub-switch-to-blscfg: Only fix boot prefix for non-generated BLS files" in
grub2-2.02-99.el8_4.1 source package).

I'm not sure yet, how this file is created, if curtin is aware of blscfg and if
not if it should be made aware of, but I think we should look into this direction.