Your Webhosting Questions
Answered by the Webhosting Experts
Tags
...
...

Change the default kernel that boots from GRUB

The GRUB configuration file can be found in /boot/grub/.

[root@root /boot/grub]# ls -la grub.conf menu.lst
-rw——- 1 root root 1037 Oct 28 11:41 grub.conf
lrwxr-xr-x 1 root root 11 Jan 1 2003 menu.lst -> ./grub.conf
If grub.conf does not exist then simply edit menu.lst which should be a file instead of a symlink to grub.conf.

Here is an example configuration:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hda3
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Enterprise Linux ES (2.4.21-37.EL)
root (hd0,0)
kernel /vmlinuz-2.4.21-37.EL ro root=/dev/hda3
initrd /initrd-2.4.21-37.EL.img
title Red Hat Enterprise Linux ES (2.4.21-32.0.1.EL)
root (hd0,0)
kernel /vmlinuz-2.4.21-32.0.1.EL ro root=/dev/hda3
initrd /initrd-2.4.21-32.0.1.EL.img
title Red Hat Enterprise Linux ES (2.4.21-27.0.4.EL)
root (hd0,0)
kernel /vmlinuz-2.4.21-27.0.4.EL ro root=/dev/hda3
initrd /initrd-2.4.21-27.0.4.EL.img
title Red Hat Enterprise Linux ES (2.4.21-27.0.2.EL)
root (hd0,0)
kernel /vmlinuz-2.4.21-27.0.2.EL ro root=/dev/hda3
initrd /initrd-2.4.21-27.0.2.EL.img
The default line is the line we want to change. The first title is 0. So if I wanted title Red Hat Enterprise Linux ES (2.4.21-27.0.2.EL) to be the default kernel I would set defualt= to 4.
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hda3
# initrd /initrd-version.img
#boot=/dev/hda
default=4
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Enterprise Linux ES (2.4.21-37.EL)
root (hd0,0)
kernel /vmlinuz-2.4.21-37.EL ro root=/dev/hda3
initrd /initrd-2.4.21-37.EL.img
title Red Hat Enterprise Linux ES (2.4.21-32.0.1.EL)
root (hd0,0)
kernel /vmlinuz-2.4.21-32.0.1.EL ro root=/dev/hda3
initrd /initrd-2.4.21-32.0.1.EL.img
title Red Hat Enterprise Linux ES (2.4.21-27.0.4.EL)
root (hd0,0)
kernel /vmlinuz-2.4.21-27.0.4.EL ro root=/dev/hda3
initrd /initrd-2.4.21-27.0.4.EL.img
title Red Hat Enterprise Linux ES (2.4.21-27.0.2.EL)
root (hd0,0)
kernel /vmlinuz-2.4.21-27.0.2.EL ro root=/dev/hda3
initrd /initrd-2.4.21-27.0.2.EL.img

Need More Personalized Help?

If you have any further issues, questions, or would like some assistance checking on this or anything else, please reach out to us from your my.hivelocity.net account and provide your server credentials within the encrypted field for the best possible security and support.

If you are unable to reach your my.hivelocity.net account or if you are on the go, please reach out from your valid my.hivelocity.net account email to us here at: [email protected]. We are also available to you through our phone and live chat system 24/7/365.

Tags +
...