Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 29

Thread: Kernel Source for Knoppix CD's

  1. #11
    Senior Member registered user
    Join Date
    Mar 2003
    Location
    Cleveland, OH
    Posts
    228

    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...

  2. #12
    Senior Member registered user
    Join Date
    Mar 2003
    Location
    Cleveland, OH
    Posts
    228

    Re: Kernel Source for Knoppix CD's

    Quote 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'

  3. #13
    Senior Member registered user
    Join Date
    Feb 2003
    Posts
    202
    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

  4. #14
    Junior Member
    Join Date
    Jan 2003
    Location
    Japan
    Posts
    7
    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.

  5. #15
    Senior Member registered user
    Join Date
    Mar 2003
    Posts
    177

    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.

  6. #16
    Senior Member registered user
    Join Date
    Mar 2003
    Posts
    298
    Quote 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

  7. #17
    Senior Member registered user
    Join Date
    Mar 2003
    Posts
    177
    Anybody?

  8. #18
    Junior Member
    Join Date
    Apr 2003
    Posts
    2

    Re: infomania,

    Quote 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....

  9. #19
    Junior Member registered user
    Join Date
    May 2003
    Posts
    13

    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!

  10. #20
    Senior Member registered user
    Join Date
    Nov 2002
    Location
    USA, IL
    Posts
    1,041

    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.

    Quote 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!

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. No Knoppix kernel headers and source (GPL Violation?)
    By pau1knopp in forum General Support
    Replies: 2
    Last Post: 08-02-2006, 03:41 PM
  2. Kernel Source for 2.4.26 (Knoppix 3.4)
    By EdeS in forum Customising & Remastering
    Replies: 4
    Last Post: 08-17-2004, 11:13 AM
  3. Knoppix V3.3 Kernel Source / Configuration - Please help!
    By Nils_ in forum Hardware & Booting
    Replies: 1
    Last Post: 02-28-2004, 10:19 PM
  4. Can I get knoppix Kernel source and customize? rebuild
    By astormchaser in forum Customising & Remastering
    Replies: 3
    Last Post: 06-05-2003, 10:16 PM
  5. custom kernel, debian source vs kernel.org source
    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
  •  


WD 2TB Certified Refurbished Elements, External Hard Drive - RWDBU6Y0020BBK-WESN picture

WD 2TB Certified Refurbished Elements, External Hard Drive - RWDBU6Y0020BBK-WESN

$49.99



Western Digital 4TB WD Purple Surveillance HDD, Internal Hard Drive - WD43PURZ picture

Western Digital 4TB WD Purple Surveillance HDD, Internal Hard Drive - WD43PURZ

$96.99



Seagate Exos X16 ST14000NM001G 14TB 512E SATA 6Gb/s 3.5

Seagate Exos X16 ST14000NM001G 14TB 512E SATA 6Gb/s 3.5" Enterprise Hard Drive

$169.99



Dell PowerEdge R640 Server | 2x Gold 6132 28 Cores | H730p | Choose RAM / DRIVES picture

Dell PowerEdge R640 Server | 2x Gold 6132 28 Cores | H730p | Choose RAM / DRIVES

$2630.00



HGST Ultrastar DC HC520 12TB SATA 6Gb 256MB 3.5

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

Seagate Exos 7E10 ST2000NM000B 2TB 7200RPM SATA 6.0Gb/s 3.5" Internal Hard Drive

$29.99



HGST Ultrastar HE10 HUH721010ALE600 10TB SATA 6Gb/s 7200RPM 3.5

HGST Ultrastar HE10 HUH721010ALE600 10TB SATA 6Gb/s 7200RPM 3.5" Enterprise HDD

$69.99



2TB 3.5

2TB 3.5" HDD Sata Mixed Brands hard drive Tested Formatted

$18.99



WD 16TB Elements Desktop, Certified Refurbished Hard Drive - RWDBWLG0160HBK-NESN picture

WD 16TB Elements Desktop, Certified Refurbished Hard Drive - RWDBWLG0160HBK-NESN

$209.99



Seagate Barracuda ST3000DM001 3TB 7200 RPM 64MB 6.0Gbs SATA 3.5

Seagate Barracuda ST3000DM001 3TB 7200 RPM 64MB 6.0Gbs SATA 3.5" Internal HDD

$25.89