OL9.9 grub2-common-2.06-134.0.1: 20-grub.install ignores DEFAULTKERNEL — installing RHCK steals the default from UEK
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 82/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- bash, linux, shell
- Lĩnh vực
- operating-systems
Hướng nghiên cứu
Bắt đầu bằng cách so sánh /usr/lib/kernel/install.d/20-grub.install giữa các phiên bản 2.06-127.0.1 và 2.06-134.0.1, tập trung vào DEFAULTKERNEL và KERNEL_NAME. Theo dõi cách tmp_saved_entry được đặt làm mặc định trong 95-set-boot-entry.install, sau đó kiểm tra các bài kiểm thử liên quan của gói nếu có. Công việc được xem là hoàn tất khi cài đặt RHCK với DEFAULTKERNEL=kernel-uek-core vẫn để mục khởi động UEK làm mặc định.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Shell
- Star
- 180
- Fork
- 52
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của oracle/oracle-linux
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
oracle/oracle-linux#234 ·
-
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 42/100
oracle/oracle-linux#232 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
oracle/oracle-linux#230 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
oracle/oracle-linux#229 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
oracle/oracle-linux#219 ·
Tất cả issue của oracle/oracle-linux
Issue tương tự
-
milestone-3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Harsha0912/recall#71 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add datatype property 'url'Đang mởeffort: low impact: minor type: feature request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
semanticarts/gist#1560 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Netcracker/qubership-ai-packages#303 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Let fm-procevent-when.sh arm clear a finished watch itself instead of requiring retire firstĐang mởready-for-pr
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
kunchenguid/firstmate#8880 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
pantsbuild/pants#23803 ·
Maintainer thường phản hồi trong vòng 1 ngày