-
Senior Member
registered user
Here's what finally worked for me...
I like the suggestions just made to patch the kernel and make my own kernel source, and I may still try that. However, I did find a solution to my problem... I "downgraded" my kernel version to 2.4.20 (without xfs) and was able to boot and successfully compile... woo hoo!
Here are the steps...
You will need enough space for the entire kernel source (100 Meg or so), and 2) have to DL and decompress the source for 2.4.20 from here:
http://www.kernel.org/pub/linux/kern...2.4.20.tar.bz2
As root:
Unpack the sources into /usr/src/
Optional - You can copy the .config file from your old linux kernel source tree
to new kernel tree (may save time, if you want to reuse the old settings).
cp /usr/src/linux/.config /usr/src/newdirectory/.config
Delete the old symlink /usr/src/linux and create a new one
cd /usr/src/
rm linux
ln -s newdirectory linux
cd /usr/src/linux
make clean;
make mrproper
Note: before running "make menuconfig" you should have obtained a copy of your current config file from
/usr/src/linux/.config and read this into menuconfig rather than creating a
kernel from scratch.
If you opted NOT to do that, bless you, and... the following * are VERY
IMPORTANT and minimal requirements!!! :
*Select proper CPU type - Pentium 3, AMD K6, Cyrix, Pentium
4, Intel 386, DEC Alpha, PowerPC otherwise kernel compile will fail and even if
it compiles will not boot!!
*Select SMP support - whether single CPU or multiple
CPUs
*Filesystems - Select Windows95 Vfat, MSDOS, NTFS as part of kernel and not as
loadable modules. (My personal preference but you are free to pick your own
option).
*Enable the Loadable kernel modules support! With this option you can
load/unload the device drivers dynamically on running linux system on the fly.
Regardless of whether you used the previous .config file (highly recommended) or create your own, the next step you will do will be:
make menuconfig
make dep
Note: LOADABLE MODULES: next two steps required ONLY if you had enabled Loadable
module support in step 3 above. Loadable module are located in /lib/modules. You
MUST do this step if you enabled or disabled any modules, otherwise you will get
'unresolved symbols' errors during or after kernel boot. Check for insmod
command which is extensively used for loading the modules. You probably want to run them, but they are time intensive...
make modules
make modules_install (go balance checkbook)
make bzImage
Note: you can also create bzImage as follows:
bash# cd /usr/src/linux
bash# man nohup
bash# nohup make bzImage &
bash# man tail
bash# tail -f nohup.out (.... to monitor the progress)
This will put the kernel in /usr/src/linux/arch/i386/boot/bzImage
After bzImage is successful, copy the kernel image to /boot directory.
You must copy the new kernel image to /boot directory, otherwise the new kernel
MAY NOT boot.
cp /usr/src/linux/arch/i386/boot/bzImage /boot/2.4.20mar2103
make modules_install (go throw in a load of laundry)
make install
configure LILO or GRUB
vi /etc/lilo.conf and insert the following (or similar for your pc)
image=/boot/2.4.20mar2103
label=mykernel
root=/dev/hda5
read-only
run lilo command to read/write the new partion information
reboot and pray
Optional - run "make clean" (If you want to free up disk space)
Not a perfect or beautiful solution, but one in which I can say afterwards "I compiled my own custom kernel!" Hope this information is helpful,
Paul Knopp
with a name like Knoppix, it's got to be good...
-
Senior Member
registered user
Re: Kernel Source for Knoppix CD's
Originally Posted by
infoMafia
Hi ALL,
How to patch and build the original kernel-source-2.4.20 for XFS;
Get and tar extract the original kernel-source-2.4.20.tar.bz2 in /usr/src.
Get a "kernel-patch-xfs" as below;
# apt-get install kernel-patch-xfs
Above will creat the directory tree /usr/src/kernel-patches/.
Then apply "knoppix-kernel.patch" which is located in /usr/src Knoppix distro.
Perhaps you want below too;
# mv kernel-source-2.4.20 kernel-source-2.4.20-xfs
# ln -s kernel-source-2.4.20-xfs linux
Then you might want to edit the fourth line of Makefile adding;
EXTRAVERSION =-xfs
# cd linux
# export PATCH_THE_KERNEL=YES
# make-kpkg --added-patches=/usr/src/kernel-patches/all/apply/xfs configure
(you might use the configuration file from /boot/config-2.4.20 Knoppix)
Confirm the following lines in linux/.config
CONFIG_XFS_FS=m
CONFIG_XFS_RT=y
CONFIG_XFS_QUOTA=y
CONFIG_XFS_DMAPI=y
# CONFIG_XFS_DEBUG is not set
# fakeroot make-kpkg kernel-image
That's all!
Wow, that sounds a LOT better than what I came up with. Read through the instructions and will try them but one question. Not sure of what to do for the step that says..."Then apply "knoppix-kernel.patch" which is located in /usr/src Knoppix distro." Is that done by the subsequent commands, or am I missing it? Thanks for the thorough recipe'
-
Senior Member
registered user
it is possible recompiling the kernel with kernel-source-2.4.20 (without xfs) with the standard debian method
with
cd /usr/src/kernel-source-2.4.20
make xconfig
load config file /boot/config-2-4-20-xfs
(make your changes)
save
make-kpkg kernel_image
...wait...
cd /usr/src (there is new 8mb files there)
instal l (2click) on kernel-image-2.4.20. deb
edit /etc/lilo.conf to point to your new /boot/kernel... and to your old /boot/kernel... in case somehing goes wrong
then
lilo -v (to save new lilo menu)
reboot
-
Paul,
You write;
[Wow, that sounds a LOT better than what I came up with. Read through the instructions and will try them but one question. Not sure of what to do for the step that says..."Then apply "knoppix-kernel.patch" which is located in /usr/src Knoppix distro." Is that done by the subsequent commands, or am I missing it? Thanks for the thorough recipe']
You can apply patch by the command:
`patch < knoppix-kernel.patch`
Or you can do it by simply edit - changing one line in
linux/arch/i386/kernel/setup.c from COMMAND_LINE_SIZE 256 to
COMMAND_LINE_SIZE 512
Above patch is really easy and VERY required for Knoppix kernel.
If you need further XFS file system feature then you must learn how to do. It's not that easy for newbie but I'm sure you can do after learning.
-
Senior Member
registered user
infomania,
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.
-
Senior Member
registered user
Originally Posted by
oscar
it is possible recompiling the kernel with kernel-source-2.4.20 (without xfs) with the standard debian method with
cd /usr/src/kernel-source-2.4.20
make xconfig
load config file /boot/config-2-4-20-xfs
<snip>
That should be /boot/config-2.4.20-xfs
-
Senior Member
registered user
-
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.
when you try building your own kernel, make sure to give it an unique name before you copy it to /boot and than add a new line for the new kernel if it doesn't work just switch back to the old! And try again....
-
Junior Member
registered user
changing kernel nightmares
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!
-
Senior Member
registered user
Re: changing kernel nightmares
--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!
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
LSI 9305-16i SATA SAS 12Gbs RAID Controller PCIe 3.0 x8 IT-Mode 4* 8643 SATA
$229.99
HPE 727263-003 BL460c G9 Raid BBWC Smartstorage Battery
$24.99
Dell R630 8SFF 2.6Ghz 20-Core 256GB H330 RAID 10GB RJ-45 NIC 2x750W PSU 8x Trays
$576.04
Dell R740XD2 26LFF 2.2Ghz 32-C 64GB H730P MINI RAID 2x10G SFP+ NIC 2x1100W Rails
$5550.08
Inspur LSI 9300-8i Raid Card 12Gbps HBA HDD Controller High Profile IT MODE
$15.98
ORICO Multi Bay RAID Hard Drive Enclosure USB 3.0/ Type-C For 2.5/3.5'' HDD SSDs
$86.99
Inspur LSI YZCA-00424-101 Raid Card 12Gbps HBA Controller Low Profile 9300-8i IT
$15.98
LSI MegaRAID 9361-8i 12Gbps PCIe 3 x8 SATA SAS 3 8 Port RAID + BBU & CacheVault
$39.00
Lenovo 930-16i PCIe SAS RAID Controller FRU P/N: 01KN508 Tested Working
$149.99
ACASIS 2.5/3.5 inch 2 Bay SATA USB 3.0 Hard Drive Disk HDD SSD Enclosure 4 RAID
$58.99