OL9.9 grub2-common-2.06-134.0.1: 20-grub.install ignores DEFAULTKERNEL — installing RHCK steals the default from UEK
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 82/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- bash, linux, shell
- Ambito
- operating-systems
Direzione di ricerca
Inizia confrontando /usr/lib/kernel/install.d/20-grub.install tra le versioni 2.06-127.0.1 e 2.06-134.0.1, concentrandoti su DEFAULTKERNEL e KERNEL_NAME. Segui come tmp_saved_entry viene promosso in 95-set-boot-entry.install, quindi controlla i test pertinenti del pacchetto, se presenti. L’obiettivo è raggiunto quando l’installazione di RHCK con DEFAULTKERNEL=kernel-uek-core lascia la voce di avvio UEK come predefinita.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Environment
- Oracle Linux 9.9, x86_64 (bare metal, BLS, GRUB_ENABLE_BLSCFG=true)
- grub2-common-2.06-134.0.1.el9 (upgraded from 2.06-127.0.1.el9_8)
- /etc/sysconfig/kernel:
UPDATEDEFAULT=yes,DEFAULTKERNEL=kernel-uek-core - Both UEK (kernel-uek-core-5.15.0-326.224.5.1.el9uek) and RHCK (kernel-core) installed
What happened
A routine dnf-automatic update (9.8 → 9.9) installed kernel-core-5.14.0-741.20.1.el9_9 together with
grub2-*-2.06-134.0.1. After the reboot the system came up on RHCK 5.14.0-741.20.1.el9_9 instead of UEK;
grub2-editenv list shows saved_entry=<machine-id>-5.14.0-741.20.1.el9_9.x86_64.
Earlier RHCK updates on the same host (kernel-core-5.14.0-687.60.1/.61.1/.65.1/.66.1, all installed while
grub2 2.06-127.0.1 was present) did NOT change the default — the system stayed on UEK.
Root cause
/usr/lib/kernel/install.d/20-grub.install lost Oracle's DEFAULTKERNEL guard (Orabug 30643497,
"honor /etc/sysconfig/kernel DEFAULTKERNEL setting for BLS") when it was rebased onto Red Hat's 2.06-130 change
"Wait for initramfs and kernel to be installed before set default kernel" (tmp_saved_entry + 95-set-boot-entry.install):
--- 2.06-127.0.1.el9_8 20-grub.install
+++ 2.06-134.0.1.el9 20-grub.install
@@ -159,2 +159,2 @@
- if [ -n "$NEWDEFAULT" ] && [ "$DEFAULTKERNEL" = "$KERNEL_NAME" ]; then
- grub2-editenv - set "saved_entry=${NEWDEFAULT}"
+ if [ -n "$NEWDEFAULT" ]; then
+ grub2-editenv - set "tmp_saved_entry=${NEWDEFAULT}"
KERNEL_NAME is still computed but no longer used. 95-set-boot-entry.install then promotes
tmp_saved_entry to saved_entry unconditionally, so any newly installed kernel (RHCK included) becomes the
default. The 2.06-134.0.1 changelog still lists the Orabug 30643497 patch.
Expected
With DEFAULTKERNEL=kernel-uek-core, installing/updating RHCK must not change the default boot entry
(as with 2.06-127.0.1, and as documented: updates keep the installed kernel type).
Suggested fix
Restore the guard on the new line:
if [ -n "$NEWDEFAULT" ] && [ "$DEFAULTKERNEL" = "$KERNEL_NAME" ]; then
grub2-editenv - set "tmp_saved_entry=${NEWDEFAULT}"
Reproduce
- OL9 with UEK default,
DEFAULTKERNEL=kernel-uek-core, grub2-common-2.06-134.0.1. dnf install kernel-core-<newer RHCK>(ordnf reinstall).grubby --default-kernel→ now the RHCK image.
Workaround
grubby --set-default /boot/vmlinuz-<uek-version> after each RHCK update, or exclude RHCK from updates.
- Lingua principale
- Shell
- Stelle
- 180
- Fork
- 52
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di oracle/oracle-linux
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
oracle/oracle-linux#234 ·
-
Difficoltà 4/5 1-2 giorni Idoneità per principianti 42/100
oracle/oracle-linux#232 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
oracle/oracle-linux#230 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
oracle/oracle-linux#229 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
oracle/oracle-linux#219 ·
Tutte le issue di oracle/oracle-linux
Issue simili
-
milestone-3
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Harsha0912/recall#71 ·
I maintainer di solito rispondono entro 1 giorno
-
Add datatype property 'url'Apertaeffort: low impact: minor type: feature request
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
semanticarts/gist#1560 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Netcracker/qubership-ai-packages#303 ·
I maintainer di solito rispondono entro 1 giorno
-
ready-for-pr
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
kunchenguid/firstmate#8880 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
pantsbuild/pants#23803 ·
I maintainer di solito rispondono entro 1 giorno