GRUB2 save entry : Différence entre versions
m (→/etc/default/grub) |
m (→/etc/default/grub) |
||
| Ligne 18 : | Ligne 18 : | ||
On RHEL 8, if GRUB_ENABLE_BLSCFG is removed or set to "false", grub.cfg generated by grub2-mkconfig will define the menu entries just as RHEL 7.<br> | On RHEL 8, if GRUB_ENABLE_BLSCFG is removed or set to "false", grub.cfg generated by grub2-mkconfig will define the menu entries just as RHEL 7.<br> | ||
The default value of GRUB_ENABLE_BLSCFG is "true" on RHEL 9. Deleting GRUB_ENABLE_BLSCFG=true from /etc/default/grub won't disable BLS. User has to set GRUB_ENABLE_BLSCFG=false to disable BLS.<br> | The default value of GRUB_ENABLE_BLSCFG is "true" on RHEL 9. Deleting GRUB_ENABLE_BLSCFG=true from /etc/default/grub won't disable BLS. User has to set GRUB_ENABLE_BLSCFG=false to disable BLS.<br> | ||
| − | '''Note On RHEL 8, grub2-mkconfig is never run on kernel upgrade''' even if GRUB_ENABLE_BLSCFG=false, user has to run grub2-mkconfig after upgrading kernel. The issue is fixed in RHSA-2022:2110<br> | + | '''Note On RHEL 8, grub2-mkconfig is never run on kernel upgrade''' even if GRUB_ENABLE_BLSCFG=false, user has to run grub2-mkconfig after upgrading kernel. The issue is fixed in RHSA-2022:2110"<br> |
[[Category:Linux]] | [[Category:Linux]] | ||
[[Category:GRUB]] | [[Category:GRUB]] | ||
Version actuelle datée du 27 août 2023 à 14:26
/etc/default/grub
doit contenir:
GRUB_DEFAULT=saved GRUB_SAVEDEFAULT=true GRUB_ENABLE_BLSCFG=false
Pris en compte par un commande telle que
# grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg # grub2-mkconfig -o /etc/grub2-efi.cfg
NB: ceci fait apparaître des lignes "savedefault" dans les entrées générées. Si certaines entrées sont récupérées en dur par un fichier /etc/grub.d/xx_custom_yy, penser à y ajouter manuellement le 'savedefault' avant de faire le grub2-mkconfig.
NB: si GRUB_ENABLE_BLSCFG=true, grub.cfg n'est pas utilisé et SAVEDEFAUKT pas pris en compte Commentaires de redhat sur le sujet:
"With GRUB_ENABLE_BLSCFG=true in /etc/default/grub, GRUB2 uses blscfg files and entries in /boot/loader instead of menuentry entries in grub.cfg. It's the standard configuration since RHEL 8.
On RHEL 8, if GRUB_ENABLE_BLSCFG is removed or set to "false", grub.cfg generated by grub2-mkconfig will define the menu entries just as RHEL 7.
The default value of GRUB_ENABLE_BLSCFG is "true" on RHEL 9. Deleting GRUB_ENABLE_BLSCFG=true from /etc/default/grub won't disable BLS. User has to set GRUB_ENABLE_BLSCFG=false to disable BLS.
Note On RHEL 8, grub2-mkconfig is never run on kernel upgrade even if GRUB_ENABLE_BLSCFG=false, user has to run grub2-mkconfig after upgrading kernel. The issue is fixed in RHSA-2022:2110"