-
Senior Member
registered user
I don't know too much dtail about linux kernel and loadable module but it seems that unlike Windows DLL which resolved with function name only meaning that so long the function behave the same with the same function name they are freely replacable, linux kernel and its loadable modules must come as a whole(a new kernel means a recompile of all modules). So if it is a hard disk install, custom kernel should be relatively safe(as the installation is complete) but if it is non-hd install, one cannot expect it to work by just replacing the vmlinuz and use the modules on the CD.
-
Junior Member
registered user
Re: changing kernel nightmares
Originally Posted by
Dave_Bechtel
--Since installing the latest KPX 2003-0503 to my HD, I haven't gotten LILO to work at *all*. I'm still booting with a floppy, and planning on switching to GRUB. Had to redo the entire hdinstall due to a bad floppy disk, and the system would NOT boot.
--Anyway, access my linuxtips site and read the instructions on how to compile a kernel there. Make sure you changed the "preferred" link in /lib/modules, and try using a non-lilo method of booting the system. (man grub) or (man rdev)+ DD the bzImage directly to a floppy and boot from there. Only drawback to that is you can't specify kernel parms, but perhaps the system will boot.
--I'll be working on getting my sys to boot w/ a recompiled kernel myself, so best of luck and keep us informed.
Originally Posted by
davros4269
Hi all,
Like the original poster, all I want to do is to compile something which needs the kernel source.
I've tried every method described above, with limited success...
I used both the "Debian" method and the "long" method. Both produced the kernel, neither would load. I compiled without XFS support. Booting fails citing modules compiled against the old kernel *2.4.20-xfs". I seem to have modules (.o files) under both xfs and plain 2.4.20...
Rather, what seems to be happening, is that modules aren't being loaded, and therefore, the booting process stops, because needed parts of the system are missing...the reason given for failure to load is the version conflict.
I then tried to apt-get install kernel-image-2.4.20-1-686 (or something quite similar). It seemed to install, yet lilo won't boot it, citing "crampfs wrong magic" or something similar. I tried using the initrd image file that I had, and one that came with it, each yielding slightly different error messages...I tried both having the post-install script rewrite lilo completly and adding it into the current lilo by hand...
I've also tried to cheat, by renaming the xfs source and linking the 2.4.20 source to try and fool the compile process; it allowed it to begin, but then aborted out realizing that version conflict.
All I want is a running kernel matching a kernel source, so that I can compile this damn thing! I don't care about xfs support...
I'm trying to compile the Zoran video decoder card drivers for an Iomega Buz, btw...
Any help would be appreciated!
It does seem to be module related. It will start to boot my custom kernel - I don't think my problem is lilo - but it complains about the modules being compiled for 2.4.20-xfs and refuses to load them - the boot process then stops because, I assume, it needs them to complete the loading of the system correctly.
I can find no one link to "modules". in /lib/modules there are various folders representing various modules for various kernels that I've compiled - each contain modules! i cannot seem to get the system to recognize the modules that go with any other kernel besides 2.4.20-xfs!! I thought there must be a link someplace pointing to THEE modules, the ones meant to be used...perhaps the initrd image hard codes the path to the -xfs modules...don't know enough about the process...
I'm working with a hard dive install of course - not sure how moduels relate to dlls - i thought that libraries were similar to dlls, while modules were basicaly drivers of one sort or another...
I've never used grub, never had a reason to. Once, during my many attempts, I did it the debian way, asking it to install 2.4.20-1-686 using apt and allowed the post install script to rewrite lilo. This rendered the system unbootable, but I then simply used the knoppix cd as a rescue disk, chrooted in and reconstructed a working lilo with the old kernel in no time...
I've been using linux for a few years now and have never needed to compile a kernel - I guess my lazyness has caught up with me
-
Senior Member
registered user
the module directory it looks for is :
/lib/modules/kernel/`uname -r`
So you need a `uname -r` to see what kernel you are booting with then you can trace further. As for the initrd, I don't know how the hd-install handle initrd but it is in general not needed and even if there is one, no modules should be in there.
-
Junior Member
registered user
bingo
After i removed the initrd line from it's lilo stanza, the new kernel boot like a charm!
Now to compile the 686 kernel for those few extra performance percentage points!
-
Re: infomania,
Originally Posted by
VeeDubb
Your directions look great for people who know what they are doing, but in my attempts to follow them I have now rendered my computer unbootable and been forced to reinstall linux SEVERAL times. Would it be possible for you or anyone to post a straight forward, plain english, "script" (I mean the kind used in theater, not a shell script) for how to do this. No, "you might want" no vague instructions like "apply the patch". No options period. Just a list of the correct commands to enter in the correct order to patch the kernel for the most common options that would apply to those new to linux.
If you or some one could do this I I can't tell you how much I would appreciate it. Thank you in advance.
How to rebuild the knoppix 2.4.20-xfs kernel.
# cd /usr/src
# wget http://kernel.org/pub/linux/kernel/v...2.4.20.tar.bz2
# tar xvfj linux-2.4.20.tar.bz2
# apt-get install kernel-patch-xfs
apt-get will creat the directory tree /usr/src/kernel-patches
# rm -f linux
# ln -s linux-2.4.20 linux
# patch -sp0 < knoppix-kernel.patch
# patch -sp0 < linux-2.4.20-ptrace.patch
# zcat kernel-patches/all/xfs/xfs-snapshot-2.4.20-all.patch.gz | patch -sp0
1 out of 13 hunks FAILED -- saving rejects to file linux/fs/buffer.c.rej
[ignore that message, after all it's Linux what did you expect?]
# cd linux
Then edit the fourth line of Makefile changing
EXTRAVERSION =
to
EXTRAVERSION = -xfs
# cp ../linux-2.4.20-xfs/.config .
# make-kpkg configure
[...typical linux "verbal diarrhea"-style output...]
Intel I810 (CONFIG_DRM_I810) [M/n/?]
Enabled XFree 4.1 ioctl interface by default (CONFIG_DRM_I810_XFREE_41) [N/y/?] (NEW) y
[...]
SiS (CONFIG_DRM_SIS) [N/m/?] (NEW) m
[...]
ACL support (CONFIG_XFS_POSIX_ACL) [N/y/?] (NEW) y
# fakeroot make-kpkg kernel-image
[...wait a lot...]
-
Re: infomania,
Originally Posted by
Baby Peanut
Originally Posted by
VeeDubb
Your directions look great for people who know what they are doing, but in my attempts to follow them I have now rendered my computer unbootable and been forced to reinstall linux SEVERAL times. Would it be possible for you or anyone to post a straight forward, plain english, "script" (I mean the kind used in theater, not a shell script) for how to do this. No, "you might want" no vague instructions like "apply the patch". No options period. Just a list of the correct commands to enter in the correct order to patch the kernel for the most common options that would apply to those new to linux.
If you or some one could do this I I can't tell you how much I would appreciate it. Thank you in advance.
How to rebuild the knoppix 2.4.20-xfs kernel.
# cd /usr/src
# wget
http://kernel.org/pub/linux/kernel/v...2.4.20.tar.bz2
# tar xvfj linux-2.4.20.tar.bz2
# apt-get install kernel-patch-xfs
apt-get will creat the directory tree /usr/src/kernel-patches
# rm -f linux
# ln -s linux-2.4.20 linux
# patch -sp0 < knoppix-kernel.patch
# patch -sp0 < linux-2.4.20-ptrace.patch
# zcat kernel-patches/all/xfs/xfs-snapshot-2.4.20-all.patch.gz | patch -sp0
1 out of 13 hunks FAILED -- saving rejects to file linux/fs/buffer.c.rej
[ignore that message, after all it's Linux what did you expect?]
# cd linux
Then edit the fourth line of Makefile changing
EXTRAVERSION =
to
EXTRAVERSION = -xfs
# cp ../linux-2.4.20-xfs/.config .
# make-kpkg configure
[...typical linux "verbal diarrhea"-style output...]
Intel I810 (CONFIG_DRM_I810) [M/n/?]
Enabled XFree 4.1 ioctl interface by default (CONFIG_DRM_I810_XFREE_41) [N/y/?] (NEW) y
[...]
SiS (CONFIG_DRM_SIS) [N/m/?] (NEW) m
[...]
ACL support (CONFIG_XFS_POSIX_ACL) [N/y/?] (NEW) y
# fakeroot make-kpkg kernel-image
[...wait a lot...]
Fail on undefined reference to 'DQUOT_SYNC'
Rip Knoppix off box and install FreeBSD.
Sigh with relief as the kernel can now be build with just "make kernel".
-
Senior Member
registered user
Remember to use GCC 2.95 not 3.2
By defalt in recent Knoppixes the default gcc compiler is version 3.2 or 3.3. This doesn't not compile the default knoppix kernel.
To use gcc 2.95 to compile the kernel,
change they symlink /usr/bin/gcc to point to /usr/bin/gcc-2.95 :
Code:
rm /usr/bin/gcc
ln -s /usr/bin/gcc-2.95 /usr/bin/gcc
( or edit the kernel Makefile )
-
Senior Member
registered user
--Umm, I compiled my kernel with 3.2:
$ cat /proc/version
Linux version 2.4.21 (root@knopperbox32) (gcc version 3.2.3 20030415 (Debian prerelease)) #2 Sat Jun 28 20:44:02 CDT 2003
--Only problem is sound doesn't work at all (trident driver) - either with stock kernel drivers OR alsa. Knoppix DVD beta kernel 2.4.21 was compiled with gcc 2.95 and trident doesn't work with that either.
--Different method to change compiler without changing the symlink:
' export CC=/usr/bin/gcc-2.95 ' == This changes the compiler only for your current shell and is not permanent.
Originally Posted by
eadz
Remember to use GCC 2.95 not 3.2
By defalt in recent Knoppixes the default gcc compiler is version 3.2 or 3.3. This doesn't not compile the default knoppix kernel.
To use gcc 2.95 to compile the kernel,
change they symlink /usr/bin/gcc to point to /usr/bin/gcc-2.95 :
Code:
rm /usr/bin/gcc
ln -s /usr/bin/gcc-2.95 /usr/bin/gcc
( or edit the kernel Makefile )
-
Senior Member
registered user
Sure 3.2 _might_ work in some cases.
Things to remember :
The official Knoppix Kernel is compiled with 2.95 so if you want it to be like that use that compiler.
The default compiler on the DVD is 3.3. Using the default knoppix .config it didn't compile.
Similar Threads
-
By pau1knopp in forum General Support
Replies: 2
Last Post: 08-02-2006, 03:41 PM
-
By EdeS in forum Customising & Remastering
Replies: 4
Last Post: 08-17-2004, 11:13 AM
-
By Nils_ in forum Hardware & Booting
Replies: 1
Last Post: 02-28-2004, 10:19 PM
-
By astormchaser in forum Customising & Remastering
Replies: 3
Last Post: 06-05-2003, 10:16 PM
-
By garyng in forum Customising & Remastering
Replies: 1
Last Post: 04-13-2003, 09:37 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
WD 2TB Certified Refurbished Elements, External Hard Drive - RWDBU6Y0020BBK-WESN
$49.99
WD Green SATA HDD - 3TB
$59.99
Seagate Exos X16 ST14000NM001G 14TB 512E SATA 6Gb/s 3.5" Enterprise Hard Drive
$169.99
WD 4TB Certified Refurbished Elements SE, Hard Drive - RWDBJRT0040BBK-WESN
$79.99
HGST Ultrastar DC HC520 12TB SATA 6Gb 256MB 3.5" Enterprise HDD- HUH721212ALE601
$89.99
Seagate Exos 7E10 ST2000NM000B 2TB 7200RPM SATA 6.0Gb/s 3.5" Internal Hard Drive
$29.99
HGST HUS724040ALS640 4TB 7200RPM 64MB Cache 6Gbps SAS 3.5" Hard Drive HDD SERVER
$19.99
HGST Ultrastar HE10 HUH721010ALE600 10TB SATA 6Gb/s 7200RPM 3.5" Enterprise HDD
$69.99
WD 16TB Elements Desktop, Certified Refurbished Hard Drive - RWDBWLG0160HBK-NESN
$209.99
2 PACK Seagate ST1000LM035 Mobile HDD 1TB 2.5" SATA III Laptop Hard Drive
$26.89