RHEL7 grub2-mkconfig breaks order of kernel menu entries

Solution Verified - Updated -

Issue

  • Running grub2-mkconfig breaks the expected boot order of kernels -- the latest kernel is no longer in position 0.

  • grub2-mkconfig command is not appending proper kernel menu entries in /boot/grub2/grub.cfg file. It is causing system to boot with older kernel.

  • Install latest (or multiple) kernel on RHEL7 and run grub2-mkconfig -o /boot/grub2/grub.cfg command. It is not sorting entries from latest kernel to older one. To Verify:

    grub2-mkconfig | grep ^menuentry
    

Environment

  • Red Hat Enterprise Linux 7
  • grub2 less than or equal to version grub2-2.02-0.16.el7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content