Why is default=1 geting updated in grub file after system update?

Solution Unverified - Updated -

Environment

  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7

Issue

  • After yum update default=1 getting updated in grub file

Resolution

  • In /etc/sysconfig/kernel change DEFAULTKERNEL=kernel-xen to DEFAULTKERNEL=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

  • DEFAULTKERNEL is set to kernel-xen, yum changed the default=0 in grub file to be default=1 so 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 setting default= from 0 to x caused 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.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.