LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   CentOS Kernel (https://www.linuxquestions.org/questions/linux-newbie-8/centos-kernel-879468/)

MartinPrestovic 05-08-2011 07:43 AM

CentOS Kernel
 
Hey Guys,

When I run yum list installed command the output shows two kernels:

Code:

kernel.i686                              2.6.18-238.el5                installed
kernel-PAE.i686                          2.6.18-238.el5                installed

Running the command: uname -r

Returns: 2.6.18-238.el5PAE

Would it therefore be safe to remove the first kernel in the installed list to save having two kernels being updated everytime I run yum update? Or is the PAE kernel dependant upon the original?

carltm 05-08-2011 07:51 AM

Yes, it is safe to remove the one you're not using.

Question, do you have less than 4 GB of ram? If so,
there is no advantage to keeping the PAE version.

MartinPrestovic 05-08-2011 07:58 AM

Quote:

Originally Posted by carltm (Post 4349978)
Yes, it is safe to remove the one you're not using.

Question, do you have less than 4 GB of ram? If so,
there is no advantage to keeping the PAE version.

Yes, the server has 2GB of ram.

CentOS was installed by the datacenter, so I have no idea how to change kernels.

carltm 05-08-2011 09:00 AM

Assuming that you are using yum, it will make sure that
you have a kernel. If you delete the one you are currently
using, it will select another one. So in this case you
can just run "yum erase kernel-PAE" and it will automatically
set up the existing kernel for you.

It would be a good idea to reboot the server and early in
the boot process you'll be able to select the kernel. Choose
the non-PAE one to make sure that it works. You can then
safely remove the PAE version.

RockDoctor 05-08-2011 09:24 AM

Quote:

Originally Posted by carltm (Post 4350014)
It would be a good idea to reboot the server and early in
the boot process you'll be able to select the kernel. Choose
the non-PAE one to make sure that it works. You can then
safely remove the PAE version.

Make that a very good idea. I now boot the kernel I'm keeping and ensure that X starts and doesn't lock up within the first 15 seconds of use before deleting an old kernel. I didn't always do this - and paid the price.

MartinPrestovic 05-08-2011 05:06 PM

Hey Guys,

Thanks for your help. I have now removed the -PAE kernel, although I did it a slightly different way as I don't have physical access to the machine. I found a thread on the CentOS forum where a user was switching from -xen back to base and used that for guidance.

Edited: /boot/grub/grub.conf

Removed:

Code:

title CentOS (2.6.18-238.el5PAE)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-238.el5PAE ro root=LABEL=/
        initrd /initrd-2.6.18-238.el5PAE.img

Which left just the base kernel.

Edited: /etc/sysconfig/kernel

Changed:

Code:

# DEFAULTKERNEL specifies the default kernel package type
DEFAULTKERNEL=kernel-PAE

To:

Code:

# DEFAULTKERNEL specifies the default kernel package type
DEFAULTKERNEL=kernel

Rebooted the machine and ran uname -r to make sure the correct kernel was running. Then removed the -PAE kernel using: yum remove kernel-PAE

Everything is up and running fine.

carltm 05-08-2011 07:04 PM

Very cool. Thanks for letting us know that it worked!


All times are GMT -5. The time now is 05:06 PM.