RHEL 7 upgraded minor release but boot menu does not show newly installed kernel
0
votes
0
answers
72
views
I'm administering a Red Hat Enterprise Linux version 7.8 server host and just did an upgrade of minor release to version 7.9 using RHEL official ISO installation media 7.9, and rebooted after the upgrade.
(Please note that is server is running on a VMware vSphere 7 virtual machine.)
Now, here's the problem.
The output of
cat /etc/os-release
showed:
NAME="Red Hat Enterprise Linux Server"
VERSION="7.9 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.9"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.9 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.9:GA:server"
HOME_URL="https://www.redhat.com/ "
BUG_REPORT_URL="https://bugzilla.redhat.com/ "
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.9
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.9"
But meanwhile the output of uname -srm
showed:
Linux 3.10.0-1127.el7.x86_64 x86_64
And the yum list installed kernel
said there are two installed kernels, as shown below:
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
: manager
Installed Packages
kernel.x86_64 3.10.0-1127.el7 @anaconda/7.8
kernel.x86_64 3.10.0-1160.el7 @local-iso
I don't get it. Why after an upgrade and reboot, the OS still boots into version 7.8 and the version 7.9 couldn't event showed on boot menu?
So, in order to troubleshoot faster, I collected some information from the OS, as listed below, which would be helpful:
Output of awk -F\' '==menuentry {print i++ : }' /boot/grub2/grub.cfg
:
0 : Red Hat Enterprise Linux Server (3.10.0-1127.el7.x86_64) 7.8 (Maipo)
1 : Red Hat Enterprise Linux Server (0-rescue-71be072259f245f5b1a7cc30b3746e8f) 7.8 (Maipo)
Output of grub2-editenv list
:
saved_entry=Red Hat Enterprise Linux Server (3.10.0-1127.el7.x86_64) 7.8 (Maipo)
Output of grubby --info ALL
:
index=0
kernel=/boot/vmlinuz-3.10.0-1127.el7.x86_64
args="ro crashkernel=auto rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet LANG=en_US.UTF-8"
root=/dev/mapper/rhel-root
initrd=/boot/initramfs-3.10.0-1127.el7.x86_64.img
title=Red Hat Enterprise Linux Server (3.10.0-1127.el7.x86_64) 7.8 (Maipo)
index=1
kernel=/boot/vmlinuz-0-rescue-71be072259f245f5b1a7cc30b3746e8f
args="ro crashkernel=auto rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet"
root=/dev/mapper/rhel-root
initrd=/boot/initramfs-0-rescue-71be072259f245f5b1a7cc30b3746e8f.img
title=Red Hat Enterprise Linux Server (0-rescue-71be072259f245f5b1a7cc30b3746e8f) 7.8 (Maipo)
index=2
non linux entry
Output of grubby --info DEFAULT
:
index=0
kernel=/boot/vmlinuz-3.10.0-1127.el7.x86_64
args="ro crashkernel=auto rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet LANG=en_US.UTF-8"
root=/dev/mapper/rhel-root
initrd=/boot/initramfs-3.10.0-1127.el7.x86_64.img
title=Red Hat Enterprise Linux Server (3.10.0-1127.el7.x86_64) 7.8 (Maipo)
Output of lsblk
:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 150G 0 disk
├─sda1 8:1 0 2M 0 part
├─sda2 8:2 0 200M 0 part /boot
└─sda3 8:3 0 149.8G 0 part
├─rhel-root 253:0 0 117.8G 0 lvm /
└─rhel-swap 253:1 0 32G 0 lvm [SWAP]
sdb 8:16 0 300G 0 disk
└─dataVG-dataLV 253:3 0 300G 0 lvm /Data
sdc 8:32 0 300G 0 disk
└─bkpVG-bkpLV 253:2 0 300G 0 lvm /Backup
sr0 11:0 1 1024M 0 rom
Output of df -Th
:
Filesystem Type Size Used Avail Use% Mounted on
devtmpfs devtmpfs 7.8G 0 7.8G 0% /dev
tmpfs tmpfs 7.8G 8.0K 7.8G 1% /dev/shm
tmpfs tmpfs 7.8G 13M 7.8G 1% /run
tmpfs tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
/dev/mapper/rhel-root xfs 118G 13G 106G 11% /
/dev/sda2 xfs 197M 173M 25M 88% /boot
/dev/mapper/bkpVG-bkpLV xfs 300G 33M 300G 1% /Backup
/dev/mapper/dataVG-dataLV xfs 300G 33M 300G 1% /Data
tmpfs tmpfs 1.6G 12K 1.6G 1% /run/user/42
tmpfs tmpfs 1.6G 0 1.6G 0% /run/user/0
Output of ls /boot
:
config-3.10.0-1127.el7.x86_64 initramfs-0-rescue-71be072259f245f5b1a7cc30b3746e8f.img System.map-3.10.0-1127.el7.x86_64
config-3.10.0-1160.el7.x86_64 initramfs-3.10.0-1127.el7.x86_64.img System.map-3.10.0-1160.el7.x86_64
efi initramfs-3.10.0-1127.el7.x86_64kdump.img vmlinuz-0-rescue-71be072259f245f5b1a7cc30b3746e8f
extlinux symvers-3.10.0-1127.el7.x86_64.gz vmlinuz-3.10.0-1127.el7.x86_64
grub2 symvers-3.10.0-1160.el7.x86_64.gz vmlinuz-3.10.0-1160.el7.x86_64
Output of ls /boot/efi/EFI/redhat/
:
BOOT.CSV BOOTX64.CSV fw fwupia32.efi fwupx64.efi mmx64.efi shim.efi shimx64.efi shimx64-redhat.efi
==============================================================================
I tried two methods,
One is executing the following 2 commands and reboot system:
grub2-set-default 0
grub2-mkconfig -o /boot/grub2/grub.cfg
The other one is executing the following 3 commands and reboot system:
dracut -f initramfs-3.10.0-1160.el7.x86_64.img
grub2-set-default 0
grub2-mkconfig -o /boot/grub2/grub.cfg
Please note that the output of grub2-mkconfig -o /boot/grub2/grub.cfg
is:
Generating grub configuration file ...
File descriptor 6 (/dev/pts/0) leaked on vgs invocation. Parent PID 3352: /usr/sbin/grub2-probe
File descriptor 6 (/dev/pts/0) leaked on vgs invocation. Parent PID 3352: /usr/sbin/grub2-probe
Found linux image: /boot/vmlinuz-3.10.0-1160.el7.x86_64
Found linux image: /boot/vmlinuz-3.10.0-1127.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-1127.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-71be072259f245f5b1a7cc30b3746e8f
Found initrd image: /boot/initramfs-0-rescue-71be072259f245f5b1a7cc30b3746e8f.img
File descriptor 6 (/dev/pts/0) leaked on vgs invocation. Parent PID 3651: /usr/sbin/grub2-probe
File descriptor 6 (/dev/pts/0) leaked on vgs invocation. Parent PID 3651: /usr/sbin/grub2-probe
done
Both of these solution eventually failed to make the OS boot into system and the error messages on the screen during the boot are similar that the root fs cannot be mounted, as shown below:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
CPU: 1 PID: 1 Comm: swapper/0 Not tainted 3.10.0-1160.el7.x86_64 #1
Can anyone provide some tips on troubleshooting why new kernel cannot be booted please?
Asked by user53815
(57 rep)
Jan 8, 2025, 02:24 PM