Posts: 82
Threads: 10
Joined: Jul 2009
Reputation:
0
08-16-2009, 04:13 AM
(This post was last modified: 08-16-2009, 04:19 AM by SBT.)
OS: CentOS 5 64 bit
Patch: 2.6.26.8-rt16
I followed all the steps and when I get to:
"make && make install modules_install"
I run into some trouble. The first time I ran the command, it took a while to compile the kernel and it went on for about 30 minutes. After it finished most of it at the end I got:
Quote: CHK include/linux/version.h
CHK include/linux/utsrelease.h
CALL scripts/checksyscalls.sh
CHK include/linux/compile.h
Kernel: arch/x86/boot/bzImage is ready (#1)
Building modules, stage 2.
MODPOST 1025 modules
WARNING: modpost: Found 3 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
sh /usr/src/linux-2.6.26.8/arch/x86/boot/install.sh 2.6.26.8-rt16 arch/x86/boot/bzImage System.map "/boot"
WARNING: Couldn't open directory /lib/modules/2.6.26.8-rt16: No such file or directory
FATAL: Could not open /lib/modules/2.6.26.8-rt16/modules.dep.temp for writing: No such file or directory
No modules available for kernel "2.6.26.8-rt16".
mkinitrd failed
make[1]: *** [install] Error 1
make: *** [install] Error 2
Everytime I rerun that command, it will basically just show that part.
Any help to fix this part would be great.
Posts: 1,033
Threads: 13
Joined: Oct 2008
Reputation:
11
08-16-2009, 06:20 AM
(This post was last modified: 08-16-2009, 06:21 AM by pengy.)
First off run a make clean to clean up any old files then
Run this for CENTOS
make bzImage modules modules_install install
Posts: 82
Threads: 10
Joined: Jul 2009
Reputation:
0
Posts: 1,033
Threads: 13
Joined: Oct 2008
Reputation:
11
I just updated the wiki with centos instructions
Posts: 2,031
Threads: 27
Joined: Nov 2008
Reputation:
17
I am sorry, I don't know centos, but I want to understand nevertheless:
What is the difference between "make" and "make bzImage"? AFAIK there should be none, especially it should be all the same on every Linux flavor. The kernel sources are downloaded from kernel.org (or where did you get them?), so why should (or is??) there any difference between the Linux flavors with respect to building the kernel?
Or was it simply that you needed to run a "make clean" before?
And how can centos change the boot loader automatically when you compile a kernel? Or does it simply use the symlinks (e.g. vmlinuz -> vmlinuz-2.6.31-rc4-rt1) so that you don't need to update the menu.lst, because make install updates the symlinks?
Thanks for any insight, this will hopefully help to make the howto a little better ;-)
Posts: 1,033
Threads: 13
Joined: Oct 2008
Reputation:
11
I don't really know, thats all my friend told me to do... and it added it automatically to the menu.lst. The make clean cleans up all old runs of the make, so if you ran the make before, it would delete all of the temporary files and restore it to new.
This is before compile
Code:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-128.4.1.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-128.4.1.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-128.4.1.el5.img
This is after compile
Code:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.28)
root (hd0,0)
kernel /vmlinuz-2.6.28 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.28.img
title CentOS (2.6.18-128.4.1.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-128.4.1.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-128.4.1.el5.img
Posts: 2,031
Threads: 27
Joined: Nov 2008
Reputation:
17
centos seems to be a strange system... ;-)
usualle the kernel does not change the menu.lst, this must be kind of speciality of centos. I wonder how they did this. Sure that you downloaded the kernel sources directly from kernel.org and not via some centos tool some modified package?
Posts: 1,033
Threads: 13
Joined: Oct 2008
Reputation:
11
Yes, i really hate this longer message thing
Posts: 2,031
Threads: 27
Joined: Nov 2008
Reputation:
17
what longer message thing???
Posts: 1,033
Threads: 13
Joined: Oct 2008
Reputation:
11
For the forums, it requires 5 characters minimum
Posts: 2,031
Threads: 27
Joined: Nov 2008
Reputation:
17
rofl. I got the same, because I just wanted to reply a "?" instead of my last post, but I still didn't knew what you meant :-D
thanks anyway, I will stick with recommending debian instead of centos
Posts: 1
Threads: 0
Joined: Sep 2010
Reputation:
0
Posts: 1,033
Threads: 13
Joined: Oct 2008
Reputation:
11
Wow, I havent posted in a long time, but yeah you probably chose the wrong cpu type, just go with generic x86_64 and it should work.
Posts: 2,031
Threads: 27
Joined: Nov 2008
Reputation:
17
looks more like a problem with the root file system. make sure you have included the correct file system driver and the hard disk controller driver in kernel (*not* as a module).
|