Everytime I try to recompile a kernel, "make modules" always dies with the error:
mv: cannot stat `include/asm-i386/asm_offsets.h.tmp': No such file or directory make: *** [include/asm-i386/asm_offsets.h] Error 1
I installed the src RPM and kernel-devel ... any ideas as to what I could be doing wrong?
Thanks!!
On 11/8/05, Ryan ryanag@zoominternet.net wrote:
Everytime I try to recompile a kernel, "make modules" always dies with the error:
mv: cannot stat `include/asm-i386/asm_offsets.h.tmp': No such file or directory make: *** [include/asm-i386/asm_offsets.h] Error 1
I installed the src RPM and kernel-devel ... any ideas as to what I could be doing wrong?
My first statement would be to say that there is very rarely a need to rebuild a kernel. Nearly everything you could need is provided either in the stock kernel or in the unsupported kernel in the centosplus repository. Doing so on a system like RHEL/centos can jeopardize system stability and may cause upgrades of packages like iptables and others to fail. Centos is not like gentoo or LFS where you're supposed to get down and dirty with building things. The centos/rhel kernel is VERY heavily patched, and the system relies on these.
Now that I've given you the warning, the how-to I'd recommend reading is here -> http://crab-lab.zool.ohiou.edu/kevin/kernel-compilation-tutorial-en/
You'll have to adjust some parts to agree with centos, but it's very general and very good.
Again, I'd really recommend sticking with either centos stock kernel or centosplus.
The driving philosophy behind centos is to be stable, not cutting edge.
-- Jim Perrin System Administrator - UIT Ft Gordon & US Army Signal Center
Jim Perrin wrote:
My first statement would be to say that there is very rarely a need to rebuild a kernel.
Have you actually seen the modules included by default?
Token Ring drivers? ATM support? FDDI drivers? Amiga filesystem support?
Doing so on a system like RHEL/centos can jeopardize system stability and may cause upgrades of packages like iptables and others to fail.
Very fair warning, however, I tend to only strip out the useless (for me) modules, and avoid anything remotely related to what I use.
Now that I've given you the warning, the how-to I'd recommend reading is here -> http://crab-lab.zool.ohiou.edu/kevin/kernel-compilation-tutorial-en/
Great link. Thanks.
On 11/8/05, Ryan ryanag@zoominternet.net wrote:
Jim Perrin wrote:
Have you actually seen the modules included by default?
I have actually. They're nearly all modules, and I'm not trying to fit the kernel on a floppy anymore. My philosophy is that if I don't load them, I don't have to deal with them.
Token Ring drivers? Amiga filesystem support?
What... you don't use these every day? :-P
Very fair warning, however, I tend to only strip out the useless (for me) modules, and avoid anything remotely related to what I use.
So long as you know what you're doing and you're careful. My biggest argument with people rebuilding the kernel is that they take the gentoo "build it all" mentality and apply it to rpm based systems improperly. So long as you're aware of what you're doing and you keep within the rpm mindset, I have 0 argument with tinkering.
Now that I've given you the warning, the how-to I'd recommend reading is here -> http://crab-lab.zool.ohiou.edu/kevin/kernel-compilation-tutorial-en/
Great link. Thanks.
No problem. Hope it works out okay for you. If you have any issues with the instructions I'd like to know about them if you're willing to share.
-- Jim Perrin System Administrator - UIT Ft Gordon & US Army Signal Center
Jim Perrin wrote:
Now that I've given you the warning, the how-to I'd recommend reading is here -> http://crab-lab.zool.ohiou.edu/kevin/kernel-compilation-tutorial-en/
Great link. Thanks.
No problem. Hope it works out okay for you. If you have any issues with the instructions I'd like to know about them if you're willing to share.
Ok get ready for some weirdness...
The CentOS kernel src RPM puts the source in: /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/
I didn't really want to install this kernel as an RPM, so the below steps do not result in a kernel RPM, just a new kernel.
To recompile kernel:
[optional - boot set /etc/inittab to boot to runlevel 3 and reboot, this will free up some resources and make this go faster]
1. Get the kernel source of your choosing. rpm -Uvh kernel.src.rpm
2. Get the development packages yum install kernel-devel ncurses-devel
3. Move into the directory (this assumes you used 2.6.9 source) cd /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/
4, Edit EXTRAVERSION to say -something nano Makefle, "EXTRAVERSION = -something"
6. Get a baseline kernel config to start with. make oldconfig
7. Edit the kernel options (modules and includes) make menuconfig
8. Exit menuconfig and save configuration hit <yes>
9. Get ready to build make clean
10. Create image make bzImage
11. Compile modules make modules && make modules_install
12. Install make install
13. Set system to boot new kernel system-config-boot if in GUI, hack /etc/grub.conf if not
14. Reboot
On 11/9/05, Ryan ryanag@zoominternet.net wrote:
Ok get ready for some weirdness...
The CentOS kernel src RPM puts the source in: /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/
I didn't really want to install this kernel as an RPM, so the below steps do not result in a kernel RPM, just a new kernel.
Any reason why? Centos is an rpm based distribution, so it would stand to reason that things you install should be installed as rpm. The major purpose for this being that if updates happen to require a particular kernel version, and you build yours from source, rpm knows nothing about what you're using, and will either install a kernel you don't want, or will fail miserably trying to solve dependencies you've broken. What harm is there in following the steps to build the rpm? You're chopping out all the stuff you don't want anyway, so you still end up with the same thing, but by building it as an rpm, your packaging system is at least aware of it.
-- Jim Perrin System Administrator - UIT Ft Gordon & US Army Signal Center
On Wed, 2005-11-09 at 12:01 -0500, Jim Perrin wrote:
On 11/9/05, Ryan ryanag@zoominternet.net wrote:
Ok get ready for some weirdness...
The CentOS kernel src RPM puts the source in: /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/
I didn't really want to install this kernel as an RPM, so the below steps do not result in a kernel RPM, just a new kernel.
Any reason why? Centos is an rpm based distribution, so it would stand to reason that things you install should be installed as rpm. The major purpose for this being that if updates happen to require a particular kernel version, and you build yours from source, rpm knows nothing about what you're using, and will either install a kernel you don't want, or will fail miserably trying to solve dependencies you've broken. What harm is there in following the steps to build the rpm? You're chopping out all the stuff you don't want anyway, so you still end up with the same thing, but by building it as an rpm, your packaging system is at least aware of it.
exactly .... bing, bing, bing :)
And what is the harm of having things be there as a module if not loaded?
--- Ryan ryanag@zoominternet.net wrote:
Everytime I try to recompile a kernel, "make modules" always dies with the error:
mv: cannot stat `include/asm-i386/asm_offsets.h.tmp': No such file or directory make: *** [include/asm-i386/asm_offsets.h] Error 1
I installed the src RPM and kernel-devel ... any ideas as to what I could be doing wrong?
Thanks!! _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Same error here when trying to compile on a X86_64.
An additional problem which has been in the scripts at least for the last 8 months is this one:
root@abcd:/usr/src/linux # make xconfig HOSTCXX scripts/kconfig/qconf.o HOSTLD scripts/kconfig/qconf /usr/bin/ld: cannot find -lqt collect2: ld returned 1 exit status make[1]: *** [scripts/kconfig/qconf] Error 1 make: *** [xconfig] Error 2
This one is due to a typo in one of the scripts - exact fix details on the web.
None of these problems come up when compiling stock kernel.