Default kernel

General support questions
Post Reply
cornish
Posts: 67
Joined: 2013/12/05 19:30:11

Default kernel

Post by cornish » 2017/07/04 22:14:30

Hi can anyone help me please in root/boot/grub.conf i have this below but i am 100% sure that default=1 is not the newest ? and wanted to know how i set this to loads from the latest kernel please.


#boot=/dev/sda
default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Default kernel

Post by TrevorH » 2017/07/04 23:09:18

Since you didn't show us the rest of the file, we don't know which entry should be default. It can be 1 and still be correct. Post the whole file.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

cornish
Posts: 67
Joined: 2013/12/05 19:30:11

Re: Default kernel

Post by cornish » 2017/07/04 23:13:22

Sorry not sure why i never, i want to make it so when i install new kernel in the future it boots from that.

Code: Select all

# 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/sda3
#          initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32-696.3.2.el6.x86_64)
	root (hd0,0)
	kernel /vmlinuz-2.6.32-696.3.2.el6.x86_64 ro root=UUID=9f9160ff-79c7-4cc8-b081-6ec55e247592 rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=uk LANG=en_GB rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_NO_LVM rd_NO_DM rhgb quiet
	initrd /initramfs-2.6.32-696.3.2.el6.x86_64.img
title CentOS (2.6.32-696.1.1.el6.x86_64)
	root (hd0,0)
	kernel /vmlinuz-2.6.32-696.1.1.el6.x86_64 ro root=UUID=9f9160ff-79c7-4cc8-b081-6ec55e247592 rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=uk LANG=en_GB rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_NO_LVM rd_NO_DM rhgb quiet
	initrd /initramfs-2.6.32-696.1.1.el6.x86_64.img
title CentOS (2.6.32-642.11.1.el6.x86_64)
	root (hd0,0)
	kernel /vmlinuz-2.6.32-642.11.1.el6.x86_64 ro root=UUID=9f9160ff-79c7-4cc8-b081-6ec55e247592 rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=uk LANG=en_GB rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_NO_LVM rd_NO_DM rhgb quiet
	initrd /initramfs-2.6.32-642.11.1.el6.x86_64.img
title CentOS (2.6.32-642.3.1.el6.x86_64)
	root (hd0,0)
	kernel /vmlinuz-2.6.32-642.3.1.el6.x86_64 ro root=UUID=9f9160ff-79c7-4cc8-b081-6ec55e247592 rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=uk LANG=en_GB rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_NO_LVM rd_NO_DM rhgb quiet
	initrd /initramfs-2.6.32-642.3.1.el6.x86_64.img
title CentOS (2.6.32-573.18.1.el6.x86_64)
	root (hd0,0)
	kernel /vmlinuz-2.6.32-573.18.1.el6.x86_64 ro root=UUID=9f9160ff-79c7-4cc8-b081-6ec55e247592 rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=uk LANG=en_GB rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_NO_LVM rd_NO_DM rhgb quiet
	initrd /initramfs-2.6.32-573.18.1.el6.x86_64.img
	

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Default kernel

Post by TrevorH » 2017/07/04 23:22:09

You are correct, it should be 0. That would point it at the line starting "title CentOS (2.6.32-696.3.2.el6.x86_64)" which is the current kernel. Starting at 0 it counts the title lines as they appear and your most recent one is the first in the file.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

cornish
Posts: 67
Joined: 2013/12/05 19:30:11

Re: Default kernel

Post by cornish » 2017/07/04 23:23:32

That's great but how do i change it please ?

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Default kernel

Post by TrevorH » 2017/07/04 23:32:05

Pick your favorite editor, edit the file as root, change default=1 to default=0 then save it, reboot.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

cornish
Posts: 67
Joined: 2013/12/05 19:30:11

Re: Default kernel

Post by cornish » 2017/07/04 23:35:00

Sorry but i am not 100% sure.

Do you mean open it with nano and just put change default=1 to default=0 ? or do i need to open the file first if so can you please explain how.

cornish
Posts: 67
Joined: 2013/12/05 19:30:11

Re: Default kernel

Post by cornish » 2017/07/04 23:42:39

It's ok i used nano /boot/grub/grub.conf and went to that line and changed it to 0 and saved

Post Reply