Skip to content

Instantly share code, notes, and snippets.

@dcode
Created October 29, 2015 15:13
Show Gist options
  • Select an option

  • Save dcode/0d641671392891e3ac8a to your computer and use it in GitHub Desktop.

Select an option

Save dcode/0d641671392891e3ac8a to your computer and use it in GitHub Desktop.

Change Default Kernel in EL7

Following command can be used to list the kernels in centos 7

# egrep ^menuentry /etc/grub2.cfg | cut -f 2 -d \'
Linux Server, with Linux 3.10.0-123.el7.x86_64
Linux Server, with Linux 3.10.0-123.4.4.el7.x86_64
Linux Server, with Unbreakable Enterprise Kernel 3.8.13-35.3.2.el7uek.x86_64
Linux Server, with Unbreakable Enterprise Kernel 3.8.13-35.3.1.el7uek.x86_64
Linux Server, with Linux 0-rescue-d3e0313c0f6d48a0bb72495d2x32r1

You can use grub2-set-default command to set default boot kernel, to set first kernel in grub2.cfg as default run and reboot.

grub2-set-default 0

Reference: http://blog.supportmonk.com/linux/listchange-kernel-in-centos-7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment