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?? |
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 |
Quote:
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 |
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]# |
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:
# 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??? |
Thanks, I maybe got it now..
|
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:
|
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....... |
Quote:
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 ~]# |
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... |
All times are GMT -5. The time now is 05:32 AM. |