The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

grub.conf file - Correct way to remove the Debug Kernel from booting

Discussion in 'General Discussion' started by heusdens, Jan 11, 2014.

  1. heusdens

    heusdens Active Member

    Joined:
    Oct 1, 2013
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi

    My grub.conf file looks like this:

    Code:
    # 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/mapper/vg0-root
    #          initrd /initrd-[generic-]version.img
    #boot=/dev/vda
    default=1
    timeout=5
    splashimage=(hd0,0)/grub/splash.xpm.gz
    hiddenmenu
    title CentOS (2.6.32-431.3.1.el6.x86_64.debug)
    	root (hd0,0)
    	kernel /vmlinuz-2.6.32-431.3.1.el6.x86_64.debug ro root=/dev/mapper/vg0-root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg0/swap rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto rd_NO_DM  KEYBOARDTYPE=pc KEYTABLE=us rd_LVM_LV=vg0/root
    	initrd /initramfs-2.6.32-431.3.1.el6.x86_64.debug.img
    title CentOS (2.6.32-431.3.1.el6.x86_64)
    	root (hd0,0)
    	kernel /vmlinuz-2.6.32-431.3.1.el6.x86_64 ro root=/dev/mapper/vg0-root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg0/swap rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto rd_NO_DM  KEYBOARDTYPE=pc KEYTABLE=us rd_LVM_LV=vg0/root
    	initrd /initramfs-2.6.32-431.3.1.el6.x86_64.img
    title CentOS (2.6.32-358.23.2.el6.x86_64.debug)
    	root (hd0,0)
    	kernel /vmlinuz-2.6.32-358.23.2.el6.x86_64.debug ro root=/dev/mapper/vg0-root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg0/swap rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto rd_NO_DM  KEYBOARDTYPE=pc KEYTABLE=us rd_LVM_LV=vg0/root
    	initrd /initramfs-2.6.32-358.23.2.el6.x86_64.debug.img
    title CentOS (2.6.32-358.23.2.el6.x86_64)
    	root (hd0,0)
    	kernel /vmlinuz-2.6.32-358.23.2.el6.x86_64 ro root=/dev/mapper/vg0-root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg0/swap rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto rd_NO_DM  KEYBOARDTYPE=pc KEYTABLE=us rd_LVM_LV=vg0/root
    	initrd /initramfs-2.6.32-358.23.2.el6.x86_64.img
    title CentOS (2.6.32-358.18.1.el6.x86_64.debug)
    	root (hd0,0)
    	kernel /vmlinuz-2.6.32-358.18.1.el6.x86_64.debug ro root=/dev/mapper/vg0-root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg0/swap rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto rd_NO_DM  KEYBOARDTYPE=pc KEYTABLE=us rd_LVM_LV=vg0/root
    	initrd /initramfs-2.6.32-358.18.1.el6.x86_64.debug.img
    title CentOS (2.6.32-220.4.2.el6.x86_64)
    	root (hd0,0)
    	kernel /vmlinuz-2.6.32-220.4.2.el6.x86_64 ro root=/dev/mapper/vg0-root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg0/swap rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto rd_NO_DM  KEYBOARDTYPE=pc KEYTABLE=us rd_LVM_LV=vg0/root
    	initrd /initramfs-2.6.32-220.4.2.el6.x86_64.img
    title CentOS (2.6.32-220.el6.x86_64)
    	root (hd0,0)
    	kernel /vmlinuz-2.6.32-220.el6.x86_64 ro root=/dev/mapper/vg0-root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg0/swap rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto rd_NO_DM  KEYBOARDTYPE=pc KEYTABLE=us rd_LVM_LV=vg0/root
    	initrd /initramfs-2.6.32-220.el6.x86_64.img
    As you can see I have debug kernel versions in there, can I simply remove every section that mentions the debug version and save the conf file to avoid the debug version loading on reboot? Like this?

    Code:
    # 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/mapper/vg0-root
    #          initrd /initrd-[generic-]version.img
    #boot=/dev/vda
    default=1
    timeout=5
    splashimage=(hd0,0)/grub/splash.xpm.gz
    hiddenmenu
    title CentOS (2.6.32-431.3.1.el6.x86_64)
    	root (hd0,0)
    	kernel /vmlinuz-2.6.32-431.3.1.el6.x86_64 ro root=/dev/mapper/vg0-root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg0/swap rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto rd_NO_DM  KEYBOARDTYPE=pc KEYTABLE=us rd_LVM_LV=vg0/root
    	initrd /initramfs-2.6.32-431.3.1.el6.x86_64.img
    title CentOS (2.6.32-358.23.2.el6.x86_64)
    	root (hd0,0)
    	kernel /vmlinuz-2.6.32-358.23.2.el6.x86_64 ro root=/dev/mapper/vg0-root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg0/swap rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto rd_NO_DM  KEYBOARDTYPE=pc KEYTABLE=us rd_LVM_LV=vg0/root
    	initrd /initramfs-2.6.32-358.23.2.el6.x86_64.img
    title CentOS (2.6.32-220.4.2.el6.x86_64)
    	root (hd0,0)
    	kernel /vmlinuz-2.6.32-220.4.2.el6.x86_64 ro root=/dev/mapper/vg0-root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg0/swap rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto rd_NO_DM  KEYBOARDTYPE=pc KEYTABLE=us rd_LVM_LV=vg0/root
    	initrd /initramfs-2.6.32-220.4.2.el6.x86_64.img
    title CentOS (2.6.32-220.el6.x86_64)
    	root (hd0,0)
    	kernel /vmlinuz-2.6.32-220.el6.x86_64 ro root=/dev/mapper/vg0-root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg0/swap rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto rd_NO_DM  KEYBOARDTYPE=pc KEYTABLE=us rd_LVM_LV=vg0/root
    	initrd /initramfs-2.6.32-220.el6.x86_64.img
     
  2. Phincy

    Phincy Member

    Joined:
    Feb 11, 2012
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Basically, the grub will be loading the kernel to which the "default" parameter points to. In your case, it will be title "CentOS (2.6.32-431.3.1.el6.x86_64)". The grub counts from 0. So, as you can see, your second configuration will be loading the kernel "CentOS (2.6.32-358.23.2.el6.x86_64)".
    The second configuration is fine, just with a modification of "default=1" to "default=0", if you want the kernel title CentOS (2.6.32-431.3.1.el6.x86_64) load.

    Hope this helps.
     
  3. heusdens

    heusdens Active Member

    Joined:
    Oct 1, 2013
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thank you this does help, very well explained.

    Regards
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page