LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Compiling kernel 2.4 in FC4 (https://www.linuxquestions.org/questions/linux-newbie-8/compiling-kernel-2-4-in-fc4-347363/)

ilyushin 07-27-2005 01:47 PM

Compiling kernel 2.4 in FC4
 
Hi all,

I have both FC1(2.4.22-1.2115.nptl) and FC4(2.6.11-1.1369_FC4) installed in my system. The reason I keep FC1 is because my PCTel HSP56 micromodem currently works only with the 2.4 kernel. Therefore I cannot access the internet from FC4. I use the GRUB bootloader of FC1 to boot both FC1 and FC3.

Now I thought about trying to compile the 2.4 kernel for FC4. In that way, I might be able to boot FC4 using the 2.4 kernel, install the modem driver and access the internet. Therefore, I copied and extracted kernel-source rpm (kernel-source-2.4.22-1.2115.nptl.i386.rpm) from FC1 installation CD. I gave "make xconfig" and enabled the SCSI CDROM driver (as 2.4 kernel reportedly needs this to burn CDs) and gave "make dep" and "make clean". Then I gave the "make bzImage" command. After compiling for some time, it showed me the following error:

arch/i386/kernel/kernel.o(.text.init+0x5328): In function `acpi_parse_lapic':
acpi.c: undefined reference to `acpi_table_print_madt_entry'
arch/i386/kernel/kernel.o(.text.init+0x5398): In function `acpi_parse_lapic_nmi':
acpi.c: undefined reference to `acpi_table_print_madt_entry'
arch/i386/kernel/kernel.o(.text.init+0x548f): In function `acpi_boot_init':
: undefined reference to `acpi_table_init'
arch/i386/kernel/kernel.o(.text.init+0x54a7): In function `acpi_boot_init':
: undefined reference to `acpi_table_parse'
arch/i386/kernel/kernel.o(.text.init+0x54d2): In function `acpi_boot_init':
: undefined reference to `acpi_table_parse_madt'
arch/i386/kernel/kernel.o(.text.init+0x5507): In function `acpi_boot_init':
: undefined reference to `acpi_table_parse_madt'
arch/i386/kernel/kernel.o(.text.init+0x5525): In function `acpi_boot_init':
: undefined reference to `acpi_table_parse_madt'
make[1]: *** [kallsyms] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4.22-1.2115.nptl'
make: *** [vmlinux] Error 2

What could be the reason for this? Can somebody shed a light on this?
Or, is there any way in which I can use the precompiled kernel image of FC1 for FC4 also? I tried copying the vmlinuz-*.img, initrd-*.img and System.map* from FC1's boot folder to FC3's boot folder and gave the GRUB entry thus:

title Fedora Core 1 (2.4.22-1.2115.nptl)
root (hd0,7)
kernel /vmlinuz-2.4.22-1.2115.nptl ro root=LABEL=/1 hdc=ide-scsi rhgb
initrd /initrd-2.4.22-1.2115.nptl.img

title Fedora Core 4 (2.6.11-1.1369_FC4)
root (hd0,10)
kernel /vmlinuz-2.6.11-1.1369_FC4 ro root=/dev/hda13
initrd /initrd-2.6.11-1.1369_FC4.img

title Fedora Core 4 (2.4.22-1.2115.nptl)
root (hd0,10)
kernel /vmlinuz-2.4.22-1.2115.nptl ro root=/dev/hda13 hdc=ide-scsi
initrd /initrd-2.4.22-1.2115.nptl.img

title DOS/Windows
rootnoverify (hd0,0)
chainloader +1

But on booting with this option, I got the following error:

kjournald starting. Commit interval 5 seconds
EXT3-fs:mounted filesystem with ordered data mode.
pivotroot: pivot_root(/sysroot, sysroot/initrd) failed:2
umount /initrd/proc failed:2
Freeing unused kernel memory: 136K freed
kernel panic: No init found. Try passing init= option to kernel.

Is there something else I can do with this 'initrd' problem?

Maybe this method is ridiculous. I am still much of a Linux newbie and this is the first time that I have attempted to compile the kernel. And I want to succeed in this. :-))

Any little help is most welcome.

Thanks,
Ilyushin

biophysics 07-28-2005 07:21 AM

May be you can better download the kernel source from ftp.in.kernel.org get your 2.4-version.

Boot into your 2.4 kernel and copy the **existing** config-2.4.--- from your /boot directory.

type
#> cd /usr/src/linux-2.4---
#> cp /boot/config-2.4---- .config
#> make oldconfig

Repeat the kernel compile process.

ilyushin 07-28-2005 08:34 AM

Thanks. That's what I did just now. But a new problem has cropped up. I downloaded 2.4.22 kernel from kernel.org and the make oldconfig, make dep, make clean and make modules went without a glitch. However, in "make modules_install", it complained that it needed an older depmod.old version. I symlinked depmod to depmod.old. Thus "make modules_install" was also completed.

Now came the problem. When I gave "/sbin/mkinitrd -v /boot/initrd-2.4.22.img 2.4.22" the output was this:

Creating old-style initrd
Looking for deps of module ide-disk
Looking for deps of module ext3
Using modules: ./kernel/fs/ext3/ext3.o
/tmp/initrd.img.JG3788: Permission denied

Each time I gave this command, a new "initrd.img.XXX" file was being created in /tmp. But permission was being denied for something. Why is this so, given that I am root?

Any ideas??

Thanks.
Ilyushin

TheOracle 07-28-2005 11:23 AM

Get XEN virtual machine then you can run both...
Hope this helps
;)

biophysics 07-29-2005 07:47 AM

Quote:

Originally posted by ilyushin
Thanks. That's what I did just now. But a new problem has cropped up. I downloaded 2.4.22 kernel from kernel.org and the make oldconfig, make dep, make clean and make modules went without a glitch. However, in "make modules_install", it complained that it needed an older depmod.old version. I symlinked depmod to depmod.old. Thus "make modules_install" was also completed.

Now came the problem. When I gave "/sbin/mkinitrd -v /boot/initrd-2.4.22.img 2.4.22" the output was this:

Creating old-style initrd
Looking for deps of module ide-disk
Looking for deps of module ext3
Using modules: ./kernel/fs/ext3/ext3.o
/tmp/initrd.img.JG3788: Permission denied

Each time I gave this command, a new "initrd.img.XXX" file was being created in /tmp. But permission was being denied for something. Why is this so, given that I am root?

Any ideas??

Thanks.
Ilyushin


Check the syntax of mkinitrd:

mkinitrd -b /boot -k <kernelname> -i <initrd-name>

helmut_hed 07-30-2005 10:57 AM

Support for PCTel modems (probably including yours) under the 2.6 kernel was released within the last week. Hopefully this will mean you don't have to do all this work to get 2.4 compiled...

http://linmodems.technion.ac.il/pcte...x/welcome.html

(2.6 support is in pctel-0.9.7-9-rht-4.tar.gz)

Regards,
Jeff

foo_bar_foo 07-31-2005 01:10 AM

you need old module utilities for the old kernel
lets see when we were making the transition we had the old modutils installed and the new module-init-utils had a script that you ran once after they were installed to set up so both 2.4 and 2.6 kernels could work.

i guess you have to try to set that up like that

ilyushin 08-09-2005 02:30 AM

Thanks. I downloaded the new pctel driver for 2.6 kernel. Still trying to get it working... but am confident that it'll work sooner or later. It's a lot better than trying to get the 2.4 kernel working...

Thanks everyone. :-)


All times are GMT -5. The time now is 09:58 AM.