Results 1 to 3 of 3

Thread: sanity check for custom kernel

  1. #1
    Junior Member
    Join Date
    Apr 2003
    Posts
    9

    sanity check for custom kernel

    I'm building a custom kernel for a new CD remaster not a HD-Install. I've followed the custom kernel howto, but there's something I'm missing. Here's what I'm doing:

    First, I've dl'ed the 2.4.21 vanilla from kernel.org. I skip the xfs patch, but apply the ntfs and openmosix patches.

    make clean
    make mrproper

    copy the Knoppix 3.2 .config to the new kernel dir then

    make menuconfig

    I enable all openmosix options and leave the rest as is. Save the kernel.

    I apply the knoppix-kernel.patch then:

    make dep
    make modules (read Brothers Karamazov)
    make modules_install
    make bzImage

    So far so good? No errors, no problems. But now some confusion.

    The kernel only needs to be put on the boot.img or does it also need to be copied to /boot/vmlinuz on the compressed fs KNOPPIX? What about System.map? Copy it to /boot before you make the KNOPPIX compressed fs? What about the /usr/src/linux/modules, do they need to be copied out?

    I put the new kernel in both places to be safe (boot.img and /boot before compressing).

    My kernel was larger than the 1.44 MB boot.img could take so I expanded it 2.88MB as follows:

    #make the 2.88 img
    dd if=/dev/zero of=288boot.img bs=512 count=5760
    #loop img
    losetup /dev/loop0 288boot.img
    #format img
    mkfs.vfat /dev/loop0
    #make it bootable
    syslinux -s /dev/loop0
    #mount the bootable img to a boot dir I made
    mount -o loop /dev/loop0 boot/
    #copy all the files from the original
    #boot disk (previously mounted under orig-boot/
    cp orig-boot/* boot/
    #copy the new kernel
    cp bzImage boot/vmlinuz
    #unmount the image
    umount boot/
    #copy the new 2.88 boot.img to the CD fs
    cp 288boot.img /mnt/hda1/cdrom/KNOPPIX/boot.img

    [I didn't copy a new cloop.o to the miniroot.gz modules/ directory or any scsi modules.]

    At last I create a new CD and it refuses to boot at all. SYSLINUX doesn't even start.

    I follow the same process as above (more or less) to create a 1.722 boot floppy with the same new kernel and it let's me boot the CD. SYSLINUX loads and finds the KNOPPIX fs, but then I get the following module errors:

    kernel-module version mismatch cloop.o was compiled for 2.4.21-xfs while this kernel is 2.4.21-openmosix-1

    modprobe error: /lib/modules/2.4.21-openmosix-1/modules.dep does not exist.

    Obviously it is getting this kernel version from the openmosix patch, but where do you modify this to read 2.4.21-xfs?

    Finally, any ideas as to why the CD won't boot with my 2.88MB boot.img on the CD but will try to boot with the 1.722MB floppy?

    Thanks for taking the time to read this novel.

    L.G. Riske

  2. #2
    Senior Member registered user
    Join Date
    Mar 2003
    Posts
    872
    it won't work. The /lib/modules/* is only good for the kernel compiled by Klaus, any customized kernel won't like it, even you cheat and change your kernel tag to '2.4.21-xfs' You must do a full HD install and then the remaster from there(or at least expand the compressed image) and build from there.

    It is a myth that one can just replace bzImage(vmlinuz), there is another 30M+ modules that must go hand in hand.

  3. #3
    Junior Member
    Join Date
    Apr 2003
    Posts
    9
    Ahhh. thanks gary. I knew it was something obvious.

    make modules_install populated /lib/modules (like you say, you can't just take a new bzImage and put it on a CD). But all of the modules installed under /lib/modules/2.4.21-openmosix-1

    So if I delete the old modules directory:

    Code:
    rm -rf /lib/modules/2.4.21-xfs
    then move my new modules dir to the old name:

    Code:
    mv /lib/modules/2.4.21-openmosix-1 /lib/modules/2.4.21-xfs
    I'll try it out and let you know. Now the other problem is why my boot.img isn't being read from the CD...

    [edit 9:26] The openmosix-1 reference comes from the kernel Makefile.

    EXTRAVERSION = openmosix-1

Similar Threads

  1. custom kernel placement q- 3.4
    By dkennedy in forum Customising & Remastering
    Replies: 1
    Last Post: 11-02-2004, 02:05 AM
  2. Custom Kernel???
    By ying-yang7 in forum Customising & Remastering
    Replies: 1
    Last Post: 09-19-2004, 09:35 AM
  3. Custom kernel ?
    By nizedude in forum Customising & Remastering
    Replies: 3
    Last Post: 12-11-2003, 08:49 PM
  4. kernel panic with custom kernel
    By cYmen in forum Customising & Remastering
    Replies: 0
    Last Post: 07-14-2003, 10:17 AM
  5. How to check if AGPGART is compiled in the kernel
    By garyng in forum Hardware & Booting
    Replies: 19
    Last Post: 04-03-2003, 11:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Cores / 64gb / Raid / 2x 1Tb picture

Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Cores / 64gb / Raid / 2x 1Tb

$374.99



Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram  2x 550W PSU No HDD picture

Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram 2x 550W PSU No HDD

$275.00



Dell PowerEdge R730XD 28 Core Server 2X Xeon E5-2680 V4 H730 32GB RAM No HDD picture

Dell PowerEdge R730XD 28 Core Server 2X Xeon E5-2680 V4 H730 32GB RAM No HDD

$378.93



Dell PowerEdge R730 Server 2x Xeon E5-2630 V4 64GB DDR4 2TB HDD Rackmount picture

Dell PowerEdge R730 Server 2x Xeon E5-2630 V4 64GB DDR4 2TB HDD Rackmount

$489.99



Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Core | HBA330 | No RAM or HDD picture

Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Core | HBA330 | No RAM or HDD

$149.99



Dell Poweredge R730xd 12LFF 2*2660v4 4*1Gbe h730 2x 750W Server CTO picture

Dell Poweredge R730xd 12LFF 2*2660v4 4*1Gbe h730 2x 750W Server CTO

$248.00



Dell PowerEdge C4130 1U AI GPU Server | 2x E5-2690 v3 | 64gb Ram | 2x 1600W picture

Dell PowerEdge C4130 1U AI GPU Server | 2x E5-2690 v3 | 64gb Ram | 2x 1600W

$524.99



Dell PowerEdge R640 10SFF 2x Gold 6140 2.3GHz 36-Cores 64gb H730p 2x Trays picture

Dell PowerEdge R640 10SFF 2x Gold 6140 2.3GHz 36-Cores 64gb H730p 2x Trays

$599.99



Dell PowerEdge R530 2x E5-2630v4 H330 iDRAC8 Port Card Riser No PSU/RAM/HDD picture

Dell PowerEdge R530 2x E5-2630v4 H330 iDRAC8 Port Card Riser No PSU/RAM/HDD

$99.99



Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Cores | 32gb | HBA330 | 2x 1... picture

Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Cores | 32gb | HBA330 | 2x 1...

$324.99