Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: The easiest kernel install yet and no xfs patch either!

  1. #1
    Senior Member registered user
    Join Date
    Mar 2003
    Location
    colorado springs, colorado
    Posts
    1,933

    The easiest kernel install yet and no xfs patch either!

    After reading and trying some of the various methods I've seen for recompiling a Knoppix hdinstalled kernel, I have simplified it just a bit and we won't be using the xfs patch. This is more or less just the standard Debian way of installing a new kernel.

    *NOTE* I (not wishing to tempt fate) am behind a very secure firewall and do not concern myself with logging in as root to get things done when necessary. You can log in as user, become root, apt-get install kernel-source blah and then relog in as root to build your new kernel if it makes you more comfortable.

    You need to log in as root or you risk having permission problems. You can use fakeroot but this is one less thing to bother with in the process.

    # apt-cache search ^ kernel-source
    # apt-get install debhelper modutils kernel-package libncurses5
    # apt-get install kernel-source-2.4.21

    or whichever kernel you'd like to use.

    # mcedit /etc/kernel-pkg.conf
    Enter your name and email.
    # cd /usr/src
    # tar --bzip2 -xvf kernel-source-2.4.21.tar.bz2
    # cd kernel-source-2.4.21

    Now you have a choice. You can do this:

    # cp /boot/config-2.4.20xfs.config

    A) You can either keep the 2.4.20xfs.config file you just copied as it is or change it as you like. Then go on to the make xconfig step.

    -OR- (my preference) you can skip that cp step and create your own .config file from scratch (from the default configuration actually). This can be a time consuming, hair yanking process but it is a very worthwhile effort that will produce a slimmer, trimmer, faster, tailor-made kernel.
    Take your time and read about anything that you aren't familiar with. You can save the file and return to it later too.

    # make xconfig

    *NOTE* Make sure to select cramfs and initrd!!!

    Of course do not forget to save your configuration.

    # make-kpkg clean
    # make-kpkg --initrd --revision=custom.1.0 kernel_image modules

    *NOTE* adding the modules target to the above line is critical or your new kernel will fail to boot because the existing modules were compiled for 2.4.20xfs instead of 2.4.21 Also it eliminates making another kpkg and installing another kpkg.

    # cd ..

    (yes that IS cd<single space>..)
    # dpkg -i kernel-image-2.4.21_custom.1.0_i386.deb

    Make the boot floppy if you can. It is possible that your kernel will be too big to fit on a floppy(if you copied the xfs.config for example) Select yes to Install LILO. I cannot guide you specifically as I don't know what your setup is like. I can however briefly explain how my system boots as an example:

    In /dev/hda1 I have installed GRUB. I highly recommend it as a boot manager. I never install anything else to /dev/hda1, instead I only edit the grub.conf file as necessary and add or remove partitions I would like to boot. You should be safe choosing to use the /etc/lilo.conf file that you already have. Just be sure to add your new kernel to /etc/lilo.conf. Here's mine:

    Code:
    # Boot up Linux by default.
    #
    default=Linux
    
    image=/boot/vmlinuz-2.4.20-xfs
    	label=Linux
    	initrd=/boot/initrd.gz
    	read-only
    Then, just add the new kernel like this:

    Code:
    image=/boot/vmlinuz-2.4.21
    	label=NewKernel
    	initrd=/boot/initrd.img-2.4.21
    	read-only

    Now do /sbin/lilo and if there are no errors it's time to reboot! Select "NewKernel" (or whatever you have called your new kernel) and see if it boots. By not removing the original you can reboot and select it instead so that you aren't left with an unbootable system.

    What if after I do make-kpkg --revision=custom.1.0 kernel_image modules it errors and fails to compile?

    # make-kpkg clean

    *TIP* If it fails while making the modules then change your command to this:

    make-kpkg --revision=custom.1.0 kernel_image

    This way, you can build the kernel package and then the modules. If it fails on the modules a second time you won't be recompiling the kernel too.

    If it failed compiling the kernel then continue...

    Then try again from make xconfig. Enter the error into G4L to find out what it is in your configuration that isn't working if you can't figure it out. Sometimes if you select option A you must also select option B and visa-versa. There's really only one way to learn and that's by just doing it.

    Remember- you don't have to finish it, you can always come back to it later.

    Recommended reading: man make-kpkg

    *HINT* If you installed Knoppix to a 3G partition and haven't at least moved your /home directory to another partition you might run out of room when compilng this kernel. Make sure you have enough room before you start.

    gluck

  2. #2
    Senior Member registered user
    Join Date
    Apr 2003
    Posts
    220
    Do not make the mistake of thinking that logging in as root is equivalent to suing to root- they are not the same thing! You need to log in as root or you will have nasty permissions problems
    tried 'su -' instead of just 'su' .. that works for me and no nasty permission problems..

  3. #3
    Senior Member registered user
    Join Date
    Mar 2003
    Location
    colorado springs, colorado
    Posts
    1,933
    Quote Originally Posted by Ghandalfar
    tried 'su -' instead of just 'su' .. that works for me and no nasty permission problems..
    I certainly won't argue with you but it is possible that these permission problems could show up at a later date. You never know.

    At any rate- I presume everything else worked out ok?

  4. #4
    Senior Member registered user
    Join Date
    Nov 2002
    Posts
    1,353
    Pardon me, but how is "su -" different from "su" I enjoy finding out about helpful things like this, but I'm just wondering what's the difference.

  5. #5
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Nova Scotia, Canada
    Posts
    2,479
    Quote Originally Posted by aay
    Pardon me, but how is "su -" different from "su" I enjoy finding out about helpful things like this, but I'm just wondering what's the difference.
    IIRC su - keeps your environment when you become super user also adding yourself to the group src should solve most problems when compiling.

  6. #6
    Senior Member registered user
    Join Date
    Nov 2002
    Posts
    1,353
    Ok. Thanks. "man su" says "su -" "makes this a login shell." Helpful.

  7. #7
    Senior Member registered user
    Join Date
    Mar 2003
    Location
    colorado springs, colorado
    Posts
    1,933
    Well guys (& gals) I am having a minor major difficulty after my recompile. I have a Radeon 7200 and of course wish to use the radeon Xserver BUT- it seems that on recompile the old radeon.o module is used. So........off to Xfree86.org, dl their latest drivers from the cvs tree, and replace the radeon.o driver. Still tho- the problem persists. Still working the issue. I'll post some more specific errors when I get home- anybody else having module problems?

  8. #8
    Senior Member registered user
    Join Date
    Mar 2003
    Location
    Germany
    Posts
    297

    Re: The easiest kernel install yet and no xfs patch either!

    Thats a nice tutorial!

    Thanks, for mailing me .

    I have however some additions:

    First in the config you should have: CRAMFS=Y as its used by the Debian initrd or even better builtin the Filesystem of your choice. (ext3/reiserfs) So you won't need an initrd at all ...

    Btw. You config is problematic:

    initrd=/boot/initrd.gz is at old and new kernel ...

    So one kernel will get difficulty ...

    Perhaps make a backup of the initrd.gz before ?

    Withe the radeon-drivers, just get the tree from http://dri.sf.net and compile it for your kernel.

    Also don't forget: pcmcia-modules, wlang-ng-modules and perhaps alsa. If you need any of these things ...

    cu

    Fabian

  9. #9
    Member registered user
    Join Date
    Jul 2003
    Location
    France / Finland
    Posts
    61
    Thxs for this!!!
    Know I now how to recompil kernel

    but I found somewhere, that you have to apply a patch before recompiling kernel, knoppix-kernel.patch
    Is it really important or there is no need to do that??

    Thxs
    Ludo

  10. #10
    Member registered user
    Join Date
    Jul 2003
    Location
    France / Finland
    Posts
    61
    And I forgot to ask!!

    If I want to add the patch to have the acpi for my latop, when do I need to patch in this process?
    And what is the command line: patch -p0 acpi*****

    Argh, I'm sure I will soon be able to use linux
    eheh
    ludo

Page 1 of 2 12 LastLast

Similar Threads

  1. cloop kernel patch
    By Albert in forum Customising & Remastering
    Replies: 7
    Last Post: 10-26-2004, 05:26 PM
  2. How do u patch a kernel?
    By Smoke187 in forum General Support
    Replies: 1
    Last Post: 02-25-2004, 12:58 AM
  3. How to install supermount kernel patch?
    By eracerbit in forum Hdd Install / Debian / Apt
    Replies: 0
    Last Post: 01-22-2004, 12:48 AM
  4. Would someone please patch the knoppix kernel with i2c?
    By arkaine23 in forum Customising & Remastering
    Replies: 3
    Last Post: 08-20-2003, 02:11 PM
  5. Knoppix-kernel.patch
    By ozfrog in forum Customising & Remastering
    Replies: 4
    Last Post: 06-21-2003, 04:30 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
  •  


Extron RGB-160XI Analog Computer Video 60-378-01 picture

Extron RGB-160XI Analog Computer Video 60-378-01

$187.06



The analog thing modern open source, educational, low-cost analog computer picture

The analog thing modern open source, educational, low-cost analog computer

$800.00



Vintage 1960s Donner Model 3000 Analog Computer ~ MUSEUM PIECE Extremely Rare picture

Vintage 1960s Donner Model 3000 Analog Computer ~ MUSEUM PIECE Extremely Rare

$4000.00



Apple Macintosh SE/30 M5119 Computer 8MB RAM Recapped Working *See Description* picture

Apple Macintosh SE/30 M5119 Computer 8MB RAM Recapped Working *See Description*

$475.00



NEW Aquarius+ Computer Signature Edition - 8Bit Retro System picture

NEW Aquarius+ Computer Signature Edition - 8Bit Retro System

$239.00



IBM Modem Saver Phone Line Tester picture

IBM Modem Saver Phone Line Tester

$7.99



Landen Computer. Circa 1898. the Rapid Computer Company.  With Original Case. picture

Landen Computer. Circa 1898. the Rapid Computer Company. With Original Case.

$425.00



Burr Brown Analog Computer parts Circuit boards w Helipot Potentiometers 1631a  picture

Burr Brown Analog Computer parts Circuit boards w Helipot Potentiometers 1631a

$85.00



Two (2) vintage The Analog Computing Pocket Reference Cards, 1985 picture

Two (2) vintage The Analog Computing Pocket Reference Cards, 1985

$19.99



ACASIS PCIE Capture Card HDMI 1.4 1080P60HZ PCIE 2.0 X4 20Gbps for Video Capture picture

ACASIS PCIE Capture Card HDMI 1.4 1080P60HZ PCIE 2.0 X4 20Gbps for Video Capture

$248.99