Operating System - Linux
1827863 Members
1679 Online
109969 Solutions
New Discussion

PSP 7.51, RHEL4 Update 3, and kernel source code?

 
Jeff Costa
Occasional Contributor

PSP 7.51, RHEL4 Update 3, and kernel source code?

What is the correct procedure to prepare the kernel source code to install the PSP? I am running RHEL4 Update 3 on a DL385 G1, and getting an compile error on the build of the e1000 drivers:

A command, "rpmbuild -bb --quiet --clean --rmsource ${RPMDIR}/SPECS/e1000.spec", necessary to complete the installation of this component failed with error code 1: "Operation not permitted"
Installation of this component FAILED.

I then try to build just the e1000 driver manually, and get this error:

make: Entering directory `/usr/src/redhat/BUILD/e1000-6.2.19b/src'
Makefile:97: *** Linux kernel source not configured - missing version.h. Stop.

This leads me to believe the kernel source is not setup properly in the /usr/src directory. Here is what I did to install kernel source:

1) up2date -v --get-source kernel
2) rpm -Uvh /var/spool/up2date/kernel-2.6.9-34.0.2.EL.src.rpm
3) cd /usr/src/redhat/SPECS
4) rpmbuild -bp --target=x86_64 kernel-2.6.spec

This builds a kernel tree in the /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9 directory, but places nothing into the /usr/src/linux- directory. Note that the README file for the e1000 driver says this:

If the /usr/src/linux- directory
does not exist, install the kernel source code per
Red Hat instructions. Once installed, follow the
commands listed below to configure the kernel source to match the running kernel.

# cd /usr/src/linux-
# make mrproper
# make -e KERNELRELEASE=`uname -r` oldconfig
# make -e KERNELRELEASE=`uname -r` dep

Since there is no source code in /usr/src/linux-, I can only do these steps in the /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9 directory. But that still does not put anything into the /usr/src/ directory (the normal location for source code).

What steps am I missing here? What is the proper way to setup the source code?

Jeff
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: PSP 7.51, RHEL4 Update 3, and kernel source code?

Shalom Jeff,

1) e1000 Intel NIC is already built into the kernel, no need to try and do that twice.

2) Kernel source rpms should be downloaded directly then rpm -ivh . up2date should have worked but for some reason did not. After rpm install the source should be there. You may need to rebuild the rpm database, there may be a problem with it, the symptom being the up2date not working.

The procedure looks reasonable.

Try to do an rpm -Uvh or rpm -Fvh on the latest kernel, upgrade to that and then try compiling the source.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jeff Costa
Occasional Contributor

Re: PSP 7.51, RHEL4 Update 3, and kernel source code?

SEP--The up2date method works for downloading the latest kernel source as well. It just puts the RPM file in the /var/spool/up2date directory. Red Hat has a new method for adding kernel source staring in RHEL4. You must build it yourself.

So I should choose the default e1000 NIC drivers, rather than the ones HP provides?
Steven E. Protter
Exalted Contributor

Re: PSP 7.51, RHEL4 Update 3, and kernel source code?

Shalom,

If you are using an HP server or any special software that HP provides, use their drivers.

Otherwise the default redhat ones will work.

I have not had to do anything to get source code onto the dozen or so RH 4 systems I've installed this year. Its just there after the RPM install.

For development servers, we do an everything install, which may explain the discrepency in our experiences.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jeff Costa
Occasional Contributor

Re: PSP 7.51, RHEL4 Update 3, and kernel source code?

That might be it. We do a minimalist install to reduce the number of patches needed downstream (in the future) and to reduce the risk of malicious attack.
David Mundy
New Member

Re: PSP 7.51, RHEL4 Update 3, and kernel source code?

Jeff, article 5109 on the RedHat knowledge base (http://kbase.redhat.com/faq/FAQ_85_5109.shtm) has step-by-step instructions on how to install the kernel source code since there is no longer any kernel-source package in RHEL4. According to their instructions, think that all you're missing is these two commands:

# cp -a /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9 /usr/src

# ln -s /usr/src/linux-2.6.9 /usr/src/linux