LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-25-2006, 09:54 AM   #1
JMCraig
Member
 
Registered: Feb 2003
Location: Utah, USA
Distribution: Red Hat EL/CentOS, Ubuntu/Debian
Posts: 113

Rep: Reputation: 15
Kernel confusion on SMP system--get rid of excess RPMs?


Hi Folks,

It appears from things I've read in other posts and in the RH docs that I have RPMs for non-SMP kernels on my system and that I don't need the non-SMP stuff. Can someone verify what's excess junk and what is not? And, give me some clarification on how to remove the excess junk?

The distro is RH ES 3 (32-bit version)
The box is a dual Opteron (single-core processors)
I'm using the 32-bit version because the DBMS version I need to run is a 32-bit version.

Here's the kernel RPMs that are apparently installed:

#rpm -qa | grep kernel
kernel-smp-2.4.21-32.EL
kernel-2.4.21-32.0.1.EL
kernel-utils-2.4-8.37.12
kernel-smp-2.4.21-37.0.1.EL
kernel-pcmcia-cs-3.1.31-13
kernel-smp-2.4.21-32.0.1.EL
kernel-smp-2.4.21-37.EL
kernel-2.4.21-32.EL

On the other hand, the GRUB configuration seems to be mostly SMP stuff (but there's a lot of options):

#cat /boot/grub/grub.conf
# 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/md1
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Enterprise Linux ES (2.4.21-37.0.1.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.4.21-37.0.1.ELsmp ro root=/dev/md1
initrd /initrd-2.4.21-37.0.1.ELsmp.img
title Red Hat Enterprise Linux ES (2.4.21-37.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.4.21-37.ELsmp ro root=/dev/md1
initrd /initrd-2.4.21-37.ELsmp.img
title Red Hat Enterprise Linux ES (2.4.21-32.0.1.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.4.21-32.0.1.ELsmp ro root=/dev/md1
initrd /initrd-2.4.21-32.0.1.ELsmp.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/md1
initrd /initrd-2.4.21-32.0.1.EL.img
title Red Hat Enterprise Linux ES (2.4.21-32.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.4.21-32.ELsmp ro root=/dev/md1
initrd /initrd-2.4.21-32.ELsmp.img
title Red Hat Enterprise Linux ES-up (2.4.21-32.EL)
root (hd0,0)
kernel /vmlinuz-2.4.21-32.EL ro root=/dev/md1
initrd /initrd-2.4.21-32.EL.img


So, it appears that I should:

1. Use rpm to remove the following:
kernel-2.4.21-32.0.1.EL
kernel-2.4.21-32.EL

But what about these:
kernel-utils-2.4-8.37.12
--leave installed, right?
kernel-pcmcia-cs-3.1.31-13
--it's a rackmounted server; no pcmcia hardware or capability; remove?

2. In the future, do not retrieve non-SMP kernel updates via up2date

3. Remove some of the options from /boot/grub/grub.conf
Does this really make any difference?
Is there some special tool for removing older kernel versions from the /boot area or is rpm all I need?
Do you just edit this file (using vi, for instance) and remove the 'title' entries that are not needed after the old kernel versions have been removed?

Final question: is there a command that shows the kernel version of a running system? (As opposed to what the bootable kernel choices are?)

Thanks for any advice and clarification.

John
 
Old 02-25-2006, 10:11 AM   #2
PenguinPwrdBox
Member
 
Registered: Oct 2003
Posts: 568

Rep: Reputation: 30
Sounds like you have a good grip on the situation.
In the future....if you want to be a little more sure of what you should and should not remove....you can use rpm to tell you what files a package provides - and then you can figure out if you want to remove it or not:

Code:
rpm -ql <packagename>
Other than that, I would comment grub - not delete the title lines...and then reboot to make sure that it comes up with the kernel you expect. Then, start removing packages...
 
Old 02-25-2006, 10:15 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
I wish I could claim to have read every word in your post, but......

First, what is the problem that needs solving? Low on disk space? If you set out to remove every unused file, you will die at your monitor.

In addition to your working kernel(s), you will also have one or more of the following: sources, config files for compiling, documentation files----etc. Not only do you have these things for the kernel, but possibly for many other things on your system. As a general rule, it would be more trouble thatn its worth to find everything that's not used. Also, it could be like cleaning a garage---as soon as you discard something, THEN you'll need it.

To see what kernels are actually installed, go to /boot.

Version that's running: uname -a
 
Old 02-25-2006, 10:20 AM   #4
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 57
Quote:
Originally Posted by JMCraig
Hi Folks,

It appears from things I've read in other posts and in the RH docs that I have RPMs for non-SMP kernels on my system and that I don't need the non-SMP stuff. Can someone verify what's excess junk and what is not? And, give me some clarification on how to remove the excess junk?

The distro is RH ES 3 (32-bit version)
The box is a dual Opteron (single-core processors)
I'm using the 32-bit version because the DBMS version I need to run is a 32-bit version.

Here's the kernel RPMs that are apparently installed:

#rpm -qa | grep kernel
kernel-smp-2.4.21-32.EL
kernel-2.4.21-32.0.1.EL
kernel-utils-2.4-8.37.12
kernel-smp-2.4.21-37.0.1.EL
kernel-pcmcia-cs-3.1.31-13
kernel-smp-2.4.21-32.0.1.EL
kernel-smp-2.4.21-37.EL
kernel-2.4.21-32.EL

On the other hand, the GRUB configuration seems to be mostly SMP stuff (but there's a lot of options):

#cat /boot/grub/grub.conf
# 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/md1
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Enterprise Linux ES (2.4.21-37.0.1.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.4.21-37.0.1.ELsmp ro root=/dev/md1
initrd /initrd-2.4.21-37.0.1.ELsmp.img
title Red Hat Enterprise Linux ES (2.4.21-37.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.4.21-37.ELsmp ro root=/dev/md1
initrd /initrd-2.4.21-37.ELsmp.img
title Red Hat Enterprise Linux ES (2.4.21-32.0.1.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.4.21-32.0.1.ELsmp ro root=/dev/md1
initrd /initrd-2.4.21-32.0.1.ELsmp.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/md1
initrd /initrd-2.4.21-32.0.1.EL.img
title Red Hat Enterprise Linux ES (2.4.21-32.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.4.21-32.ELsmp ro root=/dev/md1
initrd /initrd-2.4.21-32.ELsmp.img
title Red Hat Enterprise Linux ES-up (2.4.21-32.EL)
root (hd0,0)
kernel /vmlinuz-2.4.21-32.EL ro root=/dev/md1
initrd /initrd-2.4.21-32.EL.img


So, it appears that I should:

1. Use rpm to remove the following:
kernel-2.4.21-32.0.1.EL
kernel-2.4.21-32.EL
If you want to, use rpm -e kernel-<version_number_here> to do so


Quote:
But what about these:
kernel-utils-2.4-8.37.12
--leave installed, right?
kernel-pcmcia-cs-3.1.31-13
--it's a rackmounted server; no pcmcia hardware or capability; remove?
Keep the utils rpm, you can remove the pcmcia if you want.


Quote:
2. In the future, do not retrieve non-SMP kernel updates via up2date

3. Remove some of the options from /boot/grub/grub.conf
Does this really make any difference?
Is there some special tool for removing older kernel versions from the /boot area or is rpm all I need?
Do you just edit this file (using vi, for instance) and remove the 'title' entries that are not needed after the old kernel versions have been removed?

Final question: is there a command that shows the kernel version of a running system? (As opposed to what the bootable kernel choices are?)

Thanks for any advice and clarification.

John
When you remove the unwanted kernel rpms via the rpm command the entries in /boot/grub/grub.conf should be removed automagically.
 
Old 02-25-2006, 10:29 AM   #5
JMCraig
Member
 
Registered: Feb 2003
Location: Utah, USA
Distribution: Red Hat EL/CentOS, Ubuntu/Debian
Posts: 113

Original Poster
Rep: Reputation: 15
pixellany asks:

Quote:
First, what is the problem that needs solving? Low on disk space? If you set out to remove every unused file, you will die at your monitor.
A fair question. Mostly, I don't bother with excess stuff, but it seemed to me that having spurious kernels isn't quite the same as having spurious doc or man files. Also, I wanted to have someone confirm that if I'm running an SMP box, I don't need non-SMP kernels so I can be confident that I only have the best-performing kernels available. I also want to avoid having to tell my clients I need to reboot (which is inconvenient for them and for me because the system can be in use essentially all the time: 24/7)--so, if I run up2date and it says there's a new kernel, but it's not an smp version, it doesn't apply and I don't need to plan a reboot--but I wanted to be sure: I haven't been able to find anything that is definitive in the docs and posts I've looked through.

So, what I'm really asking for is knowledge/insight/confirmation; not a solution to a problem per se. Thanks for taking time to reply.

John
 
Old 02-25-2006, 10:44 AM   #6
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 62
There are a few bugs out there with some apps and some modules with smp kernels. I cannot remember any specfically. I myself just keep the orginal and the latest after running for about two weeks. Then remove the older one I was using. I don't use any of the precompiled kernels myself and just compile one from the latest release. Some of my hardware is not in those precompiled kernels is why. My desktop runs smp kernels and have never had any problems with my setup so I never compile a non smp kernel. Just love compiling kernel with the -j4 option. Kernel compiling is cut in less than half on dual processors.

Brian1
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ksoftirqd SMP system skyraven Linux - General 6 01-02-2008 12:17 PM
Any reason to keep a non-smp kernel installed on a smp FC3 machine? jim-j Fedora 2 03-12-2006 08:06 AM
is my SMP system using both CPU's? Oderus Slackware 3 10-25-2004 09:33 AM
Removing Excess Options on Boot TK587 Debian 1 06-16-2004 02:50 PM
File System confusion hotrodowner Linux - Software 1 07-04-2002 09:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration