Change Default Boot Kernel CentOS

Download PDF

In my previous post I wrote on how to remove linux kernel. In this post I will show you how to change default kernel if you don’t want to remove it.

Selecting default OS or kernel in GRUB boot loader

If you are wishing to change the default OS or kernel in GRUB boot loader, you can easily make the changes

# /boot/grub/grub.conf

Change the  default=0 to 1 of other numeric if that is the kernel or OS you wish to use.

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,0)
#          kernel /boot/vmlinuz-version ro root=/dev/sda1
#          initrd /boot/initrd-version.img
#boot=/dev/sda
default=1
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-238.19.1.el5.centos.plus)         <<<<<<<<<<<<<<<<<<<<<<<<<< THIS BEING 0
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.18-238.19.1.el5.centos.plus ro root=LABEL=/ rhgb quiet
        initrd /boot/initrd-2.6.18-238.19.1.el5.centos.plus.img
title CentOS (2.6.18-238.19.1.el5)                 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< THIS BEING 1
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.18-238.19.1.el5 ro root=LABEL=/ rhgb quiet
        initrd /boot/initrd-2.6.18-238.19.1.el5.img
2 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply