Why is default=1 geting updated in grub file after system update?
Environment
- Red Hat Enterprise Linux 5
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
Issue
- After yum update
default=1getting updated in grub file
Resolution
- In /etc/sysconfig/kernel change
DEFAULTKERNEL=kernel-xentoDEFAULTKERNEL=kernel
$ cat /etc/sysconfig/kernel
# UPDATEDEFAULT specifies if new-kernel-pkg should make
# new kernels the default
UPDATEDEFAULT=yes
# DEFAULTKERNEL specifies the default kernel package type
DEFAULTKERNEL=kernel
Root Cause
DEFAULTKERNELis set to kernel-xen, yum changed thedefault=0in grub file to bedefault=1so that the system would boot the xen kernel by default. But since the machine does not have the xen versions loaded, nor are they specified in the grub file, changing the settingdefault=from0toxcaused the system to boot the old kernel version.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
