Link to home
Start Free TrialLog in
Avatar of elpmet
elpmet

asked on

What files are OK to delete?

Hi,

I'm running Redhat Linux 7.1 (2.4.9-34smp) on my dual-CPU box.
I'd like to delete unnecessary files in my /boot directory to save some space for new updates.

Since I have 2 CPUs, it is Ok to delete all files that do not have .smp extension?  Can I also delete .img files too?

[root@somesystem /boot]# ls
boot.0800                    module-info-2.4.18-17.7.x
boot.b                       module-info-2.4.18-17.7.xsmp
chain.b                      module-info-2.4.9-34
config-2.4.18-17.7.x         module-info-2.4.9-34smp
config-2.4.18-17.7.xsmp      os2_d.b
initrd-2.4.18-17.7.x.img     System.map
initrd-2.4.18-17.7.xsmp.img  System.map-2.4.18-17.7.x
initrd-2.4.2-2.img           System.map-2.4.18-17.7.xsmp
initrd-2.4.2-2smp.img        System.map-2.4.9-34
initrd-2.4.9-34.img          System.map-2.4.9-34smp
initrd-2.4.9-34smp.img       vmlinux-2.4.18-17.7.x
kernel.h                     vmlinux-2.4.18-17.7.xsmp
kernel.h-2.4.9               vmlinuz
lost+found                   vmlinuz-2.4.18-17.7.x
map                          vmlinuz-2.4.18-17.7.xsmp
message                      vmlinuz-2.4.9-34
message.ja                   vmlinuz-2.4.9-34smp


For example, given the following files,

config-2.4.18-17.7.x
config-2.4.18-17.7.xsmp
initrd-2.4.18-17.7.x.img
initrd-2.4.18-17.7.xsmp.img

can I delete the first one (because I'm running multiple CPU), and the 3rd and 4th ones (because they are images?)


Thanks for your help!!
Avatar of jlevie
jlevie

Don't delete the uniprocessor kernel for the SMP kernel that you are running. An SMP kernel won't fit on a boot floppy and you need the uniprocessor kernel available to be able to make a boot floppy.

There are things in /boot that you can safely remove, the  2.4.2-2 & 2.4.9-34 kernels would be good candidates. Personally I keep the original distribution kernel and the current one and toss the intervening ones. To do it the right way one should use rpm to remove the older, un-needed, kernels. Do an 'rpm -qa | grep kernel' and remove the packages associated with the old kernels that you don't want any more.
Avatar of elpmet

ASKER

Hi jlevie!

Thanks for looking at my question again, and for your suggestion!!
I ran the command you told me again, which showed the following:

[root@somesystem /boot]# rpm -qa | grep kernel
kernel-smp-2.4.9-34
kernel-2.4.18-17.7.x
kernel-2.4.9-34
kernel-headers-2.4.9-34
kernel-smp-2.4.18-17.7.x

You told me it's Ok to dump "2.4.9-34," but my current kernel is "smp2.4.9-34."  Should I keep this uniprocessor version to make a bootable floppy?

Also, is it safe to delete files ending with ".img" too?

The reason I'm asking this question again is that I'm getting another similar error message when updating my linux ("installing kernel-2.4.18-18.7.x needs 3Mb on the /boot filesystem").  By the way, does this ".x" extension mean "x window" file...?

"df" says:
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/sda3                23333     14347      7782  65% /boot

I'm sorry, jlevie, for asking this seemingly basic question again.  I'd be grateful if you could come back to me.  Thanks!

elpmet

p.s.  Are all Linux administrators having this problem?  Is there a tool to clean up old files automatically...?
ASKER CERTIFIED SOLUTION
Avatar of jlevie
jlevie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial