Please Help in Restoring the System files

Latest response

I have accidentally deleted the files under the folder in RHEL 5.6 32 BIT box.

I have RHEL 5.5 full installation DVD.

Can someone please help on how to fix this.

++++++++++++++++++++++++++++

deleting usr/src/kernels/2.6.18-238.el5-i686/sound/parisc/Kconfig
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/parisc/
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/oss/emu10k1/Makefile
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/oss/emu10k1/
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/oss/dmasound/Makefile
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/oss/dmasound/Kconfig
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/oss/dmasound/
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/oss/cs4281/Makefile
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/oss/cs4281/
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/oss/Makefile
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/oss/Kconfig
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/oss/
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/mips/Makefile
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/mips/Kconfig
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/mips/
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/isa/wavefront/Makefile
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/isa/wavefront/
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/isa/sb/Makefile
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/isa/sb/
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/isa/opti9xx/Makefile
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/isa/opti9xx/
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/isa/gus/Makefile
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/isa/gus/
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/isa/es1688/Makefile
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/isa/es1688/
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/isa/cs423x/Makefile
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/isa/cs423x/
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/isa/ad1848/Makefile
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/isa/ad1848/
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/isa/ad1816a/Makefile
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/isa/ad1816a/
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/isa/Makefile
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/isa/Kconfig
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/isa/
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/i2c/other/Makefile
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/i2c/other/
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/i2c/l3/Makefile
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/i2c/l3/
deleting usr/src/kernels/2.6.18-238.el5-i686/sound/i2c/Makefile

Responses

This.. is an assumption - if you ONLY deleted files in /usr/src/kernels/
then, I believe you should be able to ...

yum whatprovides /usr/src/kernels/2.6.18-238.el5-i686
yum reinstall kernel-devel-2.6.18-238.el5  

I tested this on my system

# yum whatprovides /usr/src/kernels/2.6.18-348.4.1.el5-x86_64/
Loaded plugins: rhnplugin, security
This system is receiving updates from RHN Classic or RHN Satellite.
Importing additional filelist information
kernel-devel-2.6.18-348.4.1.el5.x86_64 : Development package for building kernel
                                       : modules to match the kernel.
Repo        : rhel-x86_64-server-5
Matched from:
Filename    : /usr/src/kernels/2.6.18-348.4.1.el5-x86_64/
# yum reinstall kernel-devel-2.6.18-348.4.1.el5.x86_64

Thanks for the Response James. But When I try to do that.
I get a error:

raise up up2dateErrors.RpmError(
up2date_client.up2dateErrors.RpmError:RPM error.The message was:
Could not determine what version of Red Hat Linux you are running.
If you get this error, try running

rpm --rebuilddb

Manikandan,

Did you run
rpm --rebuild -vvvv

already?

Kind regards,

Jan Gerrit Kootstra