LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 08-28-2006, 05:24 AM   #1
Ljo
LQ Newbie
 
Registered: Aug 2006
Posts: 7

Rep: Reputation: 0
Kernel problems on Redhat ES 4


I got this when I running make in the kernelsrc dir..

[root@lnxtest02 2.6.9-34.EL-i686]# make
CHK include/linux/version.h
SPLIT include/linux/autoconf.h -> include/config/*
CHK include/asm-i386/asm_offsets.h
HOSTCC scripts/genksyms/genksyms.o
HOSTCC scripts/genksyms/lex.o
HOSTCC scripts/genksyms/parse.o
HOSTLD scripts/genksyms/genksyms
CC scripts/mod/empty.o
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
make[1]: *** No rule to make target `init/main.o', needed by `init/built-in.o'. Stop.
make: *** [init] Error 2

Anyone know how to solve this??
 
Old 08-28-2006, 06:11 AM   #2
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: 56
Looks like you are missing something like the kernel .config file or the kernel development tools. What steps did you take just prior to this step?

Extracting (installing the kernel source;

rpm -ivh kernel-<version>,src.rpm

After extracting and before building (this is required);

cd /usr/src/redhat/SPECS
rpmbuild -bp --target $(arch) kernel-2.6.spec

Starting from where the kernel source is;

<optional -- apply additional patches here>
make mrproper
<optional -- copy a known working config here>
make menuconfig (or gconfig ;this is where you configure the kernel)
make
make modules_install
make install
 
Old 08-28-2006, 09:04 AM   #3
Ljo
LQ Newbie
 
Registered: Aug 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Lenard
Looks like you are missing something like the kernel .config file or the kernel development tools. What steps did you take just prior to this step?

Extracting (installing the kernel source;

rpm -ivh kernel-<version>,src.rpm

After extracting and before building (this is required);

cd /usr/src/redhat/SPECS
rpmbuild -bp --target $(arch) kernel-2.6.spec

Starting from where the kernel source is;

<optional -- apply additional patches here>
make mrproper
<optional -- copy a known working config here>
make menuconfig (or gconfig ;this is where you configure the kernel)
make
make modules_install
make install
Thanks for the help.. but I seem's to be some more problems..

New problems when running "make mrproper"

[root@lnxtest02 tmp]# rpm -ivh kernel-2.6.9-34.EL.src.rpm
warning: kernel-2.6.9-34.EL.src.rpm: V3 DSA signature: NOKEY, key ID db42a60e
1:kernel ########################################### [100%]
[root@lnxtest02 tmp]# cd /usr/src/redhat/SPECS

[root@lnxtest02 SPECS]# rpmbuild -bp --target i686 kernel-2.6.spec
Building target platforms: i686
Building for target i686
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.92573
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /usr/src/redhat/BUILD
+ rm -rf kernel-2.6.9
+ /bin/mkdir -p kernel-2.6.9
+ cd kernel-2.6.9
+ /usr/bin/bzip2 -dc /usr/src/redhat/SOURCES/linux-2.6.9.tar.bz2
+ tar -xf -

MANY ROWS LATER

removed `./arch/s390/kernel/traps.c.orig'
removed `./arch/s390/kernel/head64.S.orig'
removed `./arch/s390/kernel/ptrace.c.orig'
removed `./arch/s390/mm/init.c.orig'
removed `./arch/s390/Makefile.orig'
+ find . -name '*~' -exec rm -fv '{}' ';'
+ exit 0
[root@lnxtest02 SPECS]#


[root@lnxtest02 2.6.9-34.EL-i686]# pwd
/usr/src/kernels/2.6.9-34.EL-i686
[root@lnxtest02 2.6.9-34.EL-i686]# make mrproper
CLEAN init
CLEAN .tmp_versions
CLEAN include/asm-i386/asm_offsets.h
scripts/Makefile.clean:10: Documentation/DocBook/Makefile: No such file or directory
make[1]: *** No rule to make target `Documentation/DocBook/Makefile'. Stop.
make: *** [_mrproper_Documentation/DocBook] Error 2
 
Old 08-28-2006, 09:06 AM   #4
Ljo
LQ Newbie
 
Registered: Aug 2006
Posts: 7

Original Poster
Rep: Reputation: 0
These are the packeges that are installed..
Why dosent I see the src pkg I just installed??

[root@lnxtest02 2.6.9-34.EL-i686]# rpm -qa | grep kernel
kernel-utils-2.4-13.1.80
kernel-2.6.9-34.EL
kernel-devel-2.6.9-34.EL
[root@lnxtest02 2.6.9-34.EL-i686]#
 
Old 08-28-2006, 04:39 PM   #5
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: 56
Well normally source rpm packages are not really installed but rather extracted in preperation of building the binary installable rpm package(s). In other words since they are not installed binary packages, which is what the output shows.

Quote:
[root@lnxtest02 2.6.9-34.EL-i686]# pwd
/usr/src/kernels/2.6.9-34.EL-i686
Your not in the correct directory;

# pwd
/usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9
[root@Aspire5000 linux-2.6.9]# make mrproper
CLEAN scripts/basic
CLEAN scripts/kconfig
CLEAN .config .config.old include/linux/autoconf.h

It seems that you already have the 2.6.9-34.EL kernel installed, so if I may ask why are you rebuilding the kernel???
 
Old 08-29-2006, 12:30 AM   #6
Ljo
LQ Newbie
 
Registered: Aug 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks, I maybe got it now..

Last edited by Ljo; 08-29-2006 at 12:48 AM.
 
Old 08-29-2006, 02:43 AM   #7
Ljo
LQ Newbie
 
Registered: Aug 2006
Posts: 7

Original Poster
Rep: Reputation: 0
I'am about to create kernelmodules for mcafee linuxshield..

And I have followed the instructions in this document.. http://firefly.ibk.se/~linus/inst.pdf

Some of the steps work fine now when i know what directory that is the real kernelsrc directory..

but there are stil problems..

I'am running "rpmbuild -bp --target i386 kernel-2.6.spec" from /usr/src/redhat/SPECS and it works fine!

Then I going to the /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9 and running make mrproper
after that I copy the config file I use from /boot to /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/.config and running "make oldconfig" it's works fine.. when I then running "make bzImage"
it says

----------------------------------------------------------------
CC arch/i386/kernel/process.o
CC arch/i386/kernel/semaphore.o
CC arch/i386/kernel/signal.o
arch/i386/kernel/signal.c: In function `setup_sigcontext':
arch/i386/kernel/signal.c:275: warning: unused variable `eflags'
AS arch/i386/kernel/entry.o
gcc32: installation problem, cannot exec `tradcpp0': No such file or directory
make[1]: *** [arch/i386/kernel/entry.o] Error 1
make: *** [arch/i386/kernel] Error 2
[root@lnx03 linux-2.6.9]#


IF I just make the kernelmodules, I got som warnings but the modules are created but they dont work when I try to insert them.. I got this:

insmod: error inserting '/lib/modules/2.6.9-34.0.2.ELsmp/nai/linuxshield.o': -1 Invalid module format





Quote:
Originally Posted by Lenard
Well normally source rpm packages are not really installed but rather extracted in preperation of building the binary installable rpm package(s). In other words since they are not installed binary packages, which is what the output shows.



Your not in the correct directory;

# pwd
/usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9
[root@Aspire5000 linux-2.6.9]# make mrproper
CLEAN scripts/basic
CLEAN scripts/kconfig
CLEAN .config .config.old include/linux/autoconf.h

It seems that you already have the 2.6.9-34.EL kernel installed, so if I may ask why are you rebuilding the kernel???
 
Old 08-29-2006, 10:23 AM   #8
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: 56
As I have aleady shown the steps in order are;

make mrproper
make menuconfig (yes make oldconfig is OK here instead)
make
make modules_install
make install

Do not use the old 'make bzImage' and 'make modules' commands the 'make' command by itself takes the place of both. The 'make dep' command is no longer needed in the 2.6 kernel series, please get used to all of this.

FYI: please read page 10 of the manual you provided the link to, the kernel you are working with is not in the supported list( Table 2-1).

Please consider using something that is a bit easier to use like; http://www.clamav.net/
Adding the rpmforge release repo may be a good idea;

http://dag.wieers.com/home-made/apt/FAQ.php#B

Because then you could do something like;

up2date install clamav clamd clamav-milter clamav-db clamtk
yum install clamav clamd clamav-milter clamav-db clamtk

Or just get the latest version from;

http://dag.wieers.com/packages/clamav/
http://dag.wieers.com/packages/clamtk/

Opps sorry almost forgot the frontend to clamav.......

Last edited by Lenard; 08-29-2006 at 10:38 AM.
 
Old 08-30-2006, 12:16 AM   #9
Ljo
LQ Newbie
 
Registered: Aug 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Lenard
FYI: please read page 10 of the manual you provided the link to, the kernel you are working with is not in the supported list( Table 2-1).
That list is on the kernelmodules that are included whit the isntallation, if you have another kernel you have make them yourself..

Thanks for all the help! I'we got i working now thanks to you and the on-access scan is also working!

[root@lnx03 ~]# /etc/init.d/nails start
starting the LinuxShield daemon...
started pid: 5468
starting the LinuxShield monitor gateway...
started pid: 5478
/opt/NAI/LinuxShield/apache/bin/apachectl startssl: nailswebd started
[root@lnx03 ~]#
 
Old 11-11-2006, 01:35 PM   #10
twebb
LQ Newbie
 
Registered: Nov 2006
Posts: 1

Rep: Reputation: 0
I'm using CentOS4.4, and I found 'a' solution to the DocBook problem when attempting a 'make mrproper'. When I attempt it after just downloading the kernel source (kernel-devel), I got the following:

# make mrproper
scripts/Makefile.clean:10: Documentation/DocBook/Makefile: No such file or directory
make[1]: *** No rule to make target `Documentation/DocBook/Makefile'. Stop.
make: *** [_mrproper_Documentation/DocBook] Error 2

Here is how I got the kernel source and docs and got it to work:

# yum install kernel-devel
# yum install kernel-doc
# ln -s /usr/src/kernels/2.6.9-42.0.3.EL-x86_64 /usr/src/linux
# ln -s /usr/src/kernels/2.6.9-42.0.3.EL-x86_64 /usr/src/linux-2.6
# ln -s /usr/share/doc/kernel-doc-2.6.9/Documentation /usr/src/linux-2.6/.
# cd /usr/src/linux-2.6
# make mrproper

Wahoo!

The problem seems to be that for my os and version, kernel-doc is not installed in the kernel source tree. so the symbolic link fixed the issue, after I discovered where kernel-doc was installed at.

Not sure if this is the 'correct' way to solve the issue, but it worked for me...
 
  


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
Problems compiling 2.6.x kernel on RedHat 8.0 africantiger Linux - Newbie 0 07-13-2004 09:42 PM
Redhat 9 kernel problems Uchiha sasuke Linux - General 5 10-28-2003 10:02 PM
recompling a kernel in redhat, with problems riddlebox80 Linux - Distributions 2 08-11-2003 10:29 AM
More RedHat kernel problems Tuzinor Linux - General 1 12-06-2002 05:10 PM
RedHat 8.0 kernel 2.4.19 problems Tuzinor Linux - General 4 11-16-2002 04:40 AM


All times are GMT -5. The time now is 03:40 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration