LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxAnswers Discussion
User Name
Password
LinuxAnswers Discussion This forum is to discuss articles posted to LinuxAnswers.

Notices



Reply
 
Search this Thread
Old 06-07-2004, 09:17 PM   #1
mchirico
LQ Newbie
 
Registered: Mar 2004
Distribution: Redhat and direct source
Posts: 27

Rep: Reputation: 15
Post DISCUSSION: How to Compile 2.6 kernel for RedHat 9/8


This thread is to discuss the article titled: How to Compile 2.6 kernel for RedHat 9/8
 
Old 07-14-2004, 07:32 PM   #2
ziox
Member
 
Registered: Apr 2004
Distribution: RedHat, Fedora, Suse, Debian, Gentoo, Mandrake
Posts: 132

Rep: Reputation: 15
kernel 2.6.6 mkinitrd problem..

HellO...
[root@Master linux-2.6.6]# make install
ake[1]: `arch/i386/kernel/asm-offsets.s' is up to date.
CHK include/linux/compile.h
Kernel: arch/i386/boot/bzImage is ready
sh /home/basem/src/kernel/linux-2.6.6/arch/i386/boot/install.sh 2.6.6 arch/i386/boot/bzImage System.map ""

NO module /bin/true found for kernel 2.6.6
mkinitrd failed

make[1]:***[install] Error 1
make:***[install] Error 2




what i'm suppose to do



i already installed
module-init-tools-3.0
modutils-2.4.22-8.ser.rpm

on RedHat ~9

Last edited by ziox; 07-15-2004 at 09:46 AM.
 
Old 07-29-2004, 05:46 PM   #3
xbaez
Member
 
Registered: Mar 2004
Location: USA
Distribution: Ubuntu
Posts: 284

Rep: Reputation: 30
Hello
Thanks for the great tutorial

I followever your tutorial step by step (except for the modutils-2.4.21-22.src.rpm package, which is the only one available from your site

Everything goes fine, except two things:

I have to copy module aic7xxx.ko to module aic7xxx.o, same for sg.ko -> sg.o

When I reboot my machine, I see the followings errors:

Loading aic7xxx.o module
insmod: can't read '/lib/aic7xxx.o'

Loading sg.o module
insmod: can't read '/lib/sg.o'

Initializing USB controller (uhci): FATAL: Module uchi not found
Initializing USB controller (usbcore): FATAL: Module usbcore not found
Initializing USB controller (hid): FATAL: Module hid not found

Mouting USB filesystem
grep: /proc/bus/usb/drivers: No such file or directory:

Initializing USB keyboard: FATAL: Module keybdev not found
Initializing USB mouse: FATAL: Module mousebdev not found

Mounting local filesystems: mount: fs type vfat not supported by kernel

Mount /*proc/bus/usb already mounted or /proc/bus/usb busy

FLushing all current rules and user defined chains: iptables v 1.2.7a: can't initialize iptables table 'filter': iptables who? (do you need insmod?)
Perhaps iptables or your kernel needs to be upgraded

Tons of errors

I followed the tutorial excactly as you mentioned. I will appreciate any response since I've been trying to compile a 2.6.x kernel for a few months now

Regards

Xavier
 
Old 09-30-2004, 11:25 AM   #4
haymaker
LQ Newbie
 
Registered: Jun 2004
Location: New Zealand
Distribution: Red Hat 9
Posts: 4

Rep: Reputation: 0
this seems very nice, but when itry "make menuconfig" and the like, I always get:
"Missing }."
???
How can that be. I've had this problem for SOO long now and never found anything usefull on the net yet about it.
 
Old 02-11-2009, 03:04 AM   #5
madyogi
LQ Newbie
 
Registered: Feb 2009
Location: Poland
Distribution: My own, Fedora, OpenSuse
Posts: 19

Rep: Reputation: 2
Having ext 3 modules...

This is a great post.

But still I allow myself to add here a tiny supplement that shows how to use a kernel that doesn't have the 'ext3.ko' module built in. Yes, it is possible. It worked for me with 2.6.15 original kernel source.

First make sure you have the old 'mkinitrd' package, that came with your RH9 distribution installed.
Build the initrd image the same way as you did for previous 2.4 kernels (yes, I know it will be bad).

$ cd /boot
$ mkinitrd initrd-2.6.x.img 2.6.x
// whre 'x' is a minor version of the kernel.

Now we try to fix the image. It is most likely the gzipped archive.
$ mkdir /mnt/image
$ gzip -dc initrd-2.6.x.img > 26.img
$ mount 26.img /mnt/image -o loop

Look at the directory and see what it contains:
$ cd /mnt/image
$ ls
// looks sweet

Now see what subdir 'lib' contains. It is most likely empty... :/
$ ls lib
// was it?
If so, copy the necessary modules from /lib/modules subdirectory
$ cp /lib/modules/2.6.15/kernel/fs/ext3/jbd.ko ./lib/
$ cp /lib/modules/2.6.15/kernel/fs/ext3/ext3.ko ./lib/

Now replace the old 'insmod' binary, that resided in ./bin or ./sbin subdirectories with the one that is shipped with 'module-init-tools' package.
$ cp /sbin/insmod.static ./sbin/insmod
$ vi linuxrc

Now in the top of the file, before anything else, add the insmod command that inserts both modules to the kernel.
$ insmod /lib/jbd.ko
$ insmod /lib/ext3.ko

Go back to the boot directory and replace the 'initrd' image.
$ cd /boot
$ umount 26.img
$ gzip -c9 26.img > initrd-2.6.15.img

Thats it. Depending on if you're using LILO or GRUB make necessary configuration changes like simply editing 'lilo.conf' or 'grub.conf' and perform a reboot. If everything went fine, the kernel should boot without any problems. Yes, it worked for me...

P.S. If at the boot time you see some QM_MODULES not implemented and you kernel panics then boot back with 2.4 and replace the 'insmod' binary within the initrd image, you have created. Most likely, you've added an old insmod from 'modutils' package and not the one that comes with 'module-init-tools'.

Last edited by madyogi; 06-02-2010 at 02:10 AM.
 
  


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
DISCUSSION: Custom kernel compilaton on RedHat/Fedora Systems Thetargos LinuxAnswers Discussion 2 08-28-2004 06:11 PM
How to compile 2.6 kernel on RedHat Ninja_212 Red Hat 1 03-08-2004 03:18 AM
how to compile the redhat kernel mmoohh Linux - Newbie 5 10-21-2003 08:26 PM
How can I compile a new kernel for Redhat 9? Sgaileach1 Linux - Software 6 07-28-2003 09:40 PM
RedHat 7.1 - Kernel Compile aford Linux - Newbie 18 03-13-2002 02:52 PM


All times are GMT -5. The time now is 11:36 AM.

Main Menu
Advertisement
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