-
Senior Member
registered user
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
Similar Threads
-
By Albert in forum Customising & Remastering
Replies: 7
Last Post: 10-26-2004, 05:26 PM
-
By Smoke187 in forum General Support
Replies: 1
Last Post: 02-25-2004, 12:58 AM
-
By eracerbit in forum Hdd Install / Debian / Apt
Replies: 0
Last Post: 01-22-2004, 12:48 AM
-
By arkaine23 in forum Customising & Remastering
Replies: 3
Last Post: 08-20-2003, 02:11 PM
-
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
-
Forum Rules

OPNsense pfSense 8-Core Atom C3758 2.2GHz 8GB DDR4 64GB SSD 8x NIC QAT AES VPN
$145.00

pfSense Firewall 16-Core Atom C3958 8GB DDR4 RAM 64GB SSD 8x 1Gbe QAT AES-NI VPN
$184.99

OPNsense pfSense 16-Core Atom C3958 16GB ECC RAM 512GB SSD 8-Port QAT AES-NI VPN
$258.00

SonicWall TZ280 Firewall 03-SSC-6933 Advanced Edition 3YR NEW SEALED
$999.99

Firewalla Purple : Cyber Security Firewall for Home & Business,
$299.00

Fortinet FortiGate 60F FG-60F P24286-03-13 Network Firewall Security Appliance
$155.75

Firewalla Gold Pro - 10 Gbps Cyber Security Firewall
$680.00

Palo Alto PA-220 Next-Gen Firewall 520-000309-00J
$40.00

Zero Trace Pen: All-in-one Tor Network Anonymous Drive + Cryptocurrency Wallet
$147.00

Cisco Meraki MX67-HW Security Appliance Firewall NEW Unused Unclaimed
$202.50