Operating System - Linux
1828592 Members
2126 Online
109983 Solutions
New Discussion

Re: problem building kernel v2.4.17

 
K.C. Chan
Trusted Contributor

problem building kernel v2.4.17

All,
I am haing problem building kernel v2,4,17. What I did was copy .config from the old kernel to the new kernel diruectory, then run make menuconfig on the new kernel Make some minor changes and save the config file. Everything went smoothly except when I tried to boot the new kernel, it pukes on /lib/ext3.0 symbol not found. When I boot from the old kernel and went to /lib and check for ext3.0, it's not there. What gives????? Do I need to do something with the initial ramdisk to load this module since my default file system is ext3. Thanks.
Reputation of a thousand years can be determined by the conduct of an hour
8 REPLIES 8
I_M
Honored Contributor

Re: problem building kernel v2.4.17

Hi

When you regen your kernel using your old .config file, use "make oldconfig" instead of "make menuconfig" or "make xconfig".
"make oldconfig" give you series of question if you want to use the new features.

If you want to try one more time, you should start from "make mrproper" to clear everything.
This command also delete your .config. so I advice you to save your .config into other directory.

Good luck.

Eric Ladner
Trusted Contributor

Re: problem building kernel v2.4.17

If you are booting from an ext3 partition (i.e. whereever your kernel lives) it cannot be compiled as a module, but must be built in to the kernel.

Unless of course you're using an initrd image, but you didn't mention that you were.

Cheers
K.C. Chan
Trusted Contributor

Re: problem building kernel v2.4.17

Eric, Yes the original kernel uses initrd. How do I make the initial ramdisk for the new kernel? Is it via mkinitrd command, if so, then how do I make sure that ext3 modules gets loaded during boot up? If it's not via mkinitrd, then where in the new kernel should I copy the file(what file name is it) over to /boot? Thanks.
Reputation of a thousand years can be determined by the conduct of an hour
Eric Ladner
Trusted Contributor

Re: problem building kernel v2.4.17

Personally, I don't use the initrd images, so I don't have a lot of experience with them, but if you do this (for your kernel version)

$ mkinitrd /boot/initrd-2.4.17.img 2.4.17

it should be smart enough to grab all the stuff you need at boot time. I don't know how to verify this though.
K.C. Chan
Trusted Contributor

Re: problem building kernel v2.4.17

I've already make the initial ramdisk, allthough it seem a bit strange, bec i got this warning:
"/sbin/mkinitrd: [: /lib/modules/2.4.17/./kernel/drivers/scsi/sys53c8xx.o: binary operator expected."

after reboot with the new kernel, the new kernel panic bec. of this error: "/lib/ext3.o: symbol not found kmap_high " and so on. It failed to mount ext3 and the kernel PANIC. NOTE: all my filesystem is ext3 including / and /boot.

Does anyone have any suggestions to get this to work? Thanks.
Reputation of a thousand years can be determined by the conduct of an hour
Kodjo Agbenu
Honored Contributor

Re: problem building kernel v2.4.17

Hello,

I personally never use mkinitrd to build my ramdisks, because I don't know what exactly is done.

Here is my method :

cp /boot/ /tmp/initrd.gz
gunzip /tmp/initrd.gz
mkdir /tmp/mnt
mount -oloop /tmp/initrd /tmp/mnt
cd /tmp/mnt/lib
ls -al

Normally, the modules used to boot your kernel are stored there. You can also check "insmod" or "modprobe" commands in /tmp/mnt/linuxrc script file to check needed modules.

Then, go to /lib/modules/2.4.17/kernel/... and copy the newly builded modules into /tmp/mnt/lib.
For ext3 to work, you need :
/lib/modules/2.4.17/kernel/fs/ext3/ext3.o
/lib/modules/2.4.17/kernel/fs/jbd/jbd.o

Of course, you may also need a specific driver if you have your hard disks on scsi :

/lib/modules/2.4.17/kernel/drivers/scsi/sym53c8xx.o

After that :

cd /
umount /tmp/mnt
gzip /tmp/initrd
mv /tmp/initrd.gz /boot/initrd-2.4.17.img

Now, your newly built initrd file is ready to be used. Of course, don't forget to modify your /etc/lilo.conf file accordingly and type /sbin/lilo to refresh the boot area of your disks.

Good luck.

Kodjo
Learn and explain...
K.C. Chan
Trusted Contributor

Re: problem building kernel v2.4.17

Kodjo,
I was able to resolve ext3.0 module problem with step you give me, But I having scsi problem with this module: sym53c8xx.o. I checked, and it is in the initrd file. Here's the error:
/lib/sym53c8xx.o unresolved symbol scsi_bios_param_R8411b54
/lib/sym53c8xx.o unresolved symbol scsi_unregister_module_R81d85a75
/lib/sym53c8xx.o unresolved symbol scsi_unregister_Rf41754fd
/lib/sym53c8xx.o unresolved symbol scsi_register_Ref96d3d9
/lib/sym53c8xx.o unresolved symbol scsi_register_module_Rfa20b7b0
Error: /bin/insmod Exited abnormally
kernel panic: No init found. Try passing init= option to kernel

Does any know what this mean? Thanks in advance for your help.
Reputation of a thousand years can be determined by the conduct of an hour
K.C. Chan
Trusted Contributor

Re: problem building kernel v2.4.17

Kodjo,
It work, all I had to do was re-copy over all the modules I needed for initrd. Thanks for your help. I only wish I could go back and give 10 pts for taking time to help me. Thanks again.
Reputation of a thousand years can be determined by the conduct of an hour