PDA

View Full Version : Kernel Build with linux-2.4.20:



TheCyberDude
09-03-2003, 03:01 PM
1. Download the kernel source (linux-2.4.20.tar.gz)
from http://www.kernel.org/pub/linux/kernel/v2.4/.
2. Extract it into your home directory. (/home/knoppix/DOWNLOAD)
(With the following method, all your newly installed programs will work, on both Knoppix
and Fail-Safe linux systems. However, if you install any more - they will only work on the
Linux System you installed (or built) them to. ( AKA Knoppix or Fail-Safe)
3. Log out of knoppix and then log in to knoppix as root. Launch the program Konsole.
4. Move linux-2.4.20 to /usr/src. [mv /home/knoppix/DOWNLOAD/linux-2.4.20 /usr/src]
5. [cd /usr/src]
6. Deleted old symlink to /usr/src/linux. [rm symlink linux]
7. Made new symlink. [ln -s /usr/src/linux-2.4.20 linux]
8. Apply patches if any. [patch -p0 < <filename>] Example: patch -p0 < linux-2.4.20-ptrace.patch
Example: patch -p0 < knoppix-kernel.patch
9. Rename /usr/src/linux-2.4.20 to linux-2.4.20test. [mv linux-2.4.20 linux-2.4.20test]
10. [rm symlink linux] then [ln -s /usr/src/linux-2.4.20test linux]
11. [cp linux-2.4.20-xfs/.config .config]
12. [cd /usr/src/linux]
13. [make xconfig] See line 14 below !
14. Load configuration from file: /usr/src/linux-2.4.20-xfs/.config You can change selections...
Under Processor type and features: Processors family - I changed mine to Athlon/Duron/K7, thats all I did.
15. After xconfig Save & Exit: edit Makefile and change EXTRAVERSION= to EXTRAVERSION=test
Location: /usr/src/linux-2.4.20test/Makefile
[kwrite] Can use this command to edit Makefile, open Makefile.
16. [make dep]
17. [make clean]
18. [make bzImage] Takes 5-10 minutes... AMD ATHLON 1.4GHZ CPU + 512MB MEM
19. [make modules] Takes 20-25 minutes... AMD ATHLON 1.4GHZ CPU + 512MB MEM
20. [make modules_install]
21. [mv /usr/src/linux/arch/i386/boot/bzImage /boot/bzImage-2.4.20test]
22. [mv /usr/src/linux/System.map /boot/System.map-2.4.20]
23. [ln -sf /boot/System.map-2.4.20 /boot/System.map]
24. Add image to /etc/lilo.conf file. [cd /etc] [kwrite] Open lilo.conf file.

boot=/dev/hdg
vga=791
prompt
timeout=50
append = "hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi apm=power-off nomce"

image=/boot/bzImage-2.4.20test <- - - Add these 4 lines (Use your /dev/?)
label=Knoppix
root=/dev/hdg6 <- - - Don't forget to put in you /dev/? !
read-only

image=/boot/vmlinuz-2.4.20-xfs <- - - Rename your orginal (label=knoppix) to Fail-Safe
label=Fail-Safe
root=/dev/hdg6
read-only
initrd=/boot/initrd.gz

other=/dev/hdg1
label=Windows
# optional
# table=/dev/hda

After saving: [lilo] , which will update lilo.conf file.

25. If you have Nvidia Driver installed, you will have to recompile it now before rebooting - or your xserver
XFree86 will not restart!

26. Reboot (This way to compile kernel has never failed for me, if it fails for you - Select Fail-Safe to boot into
your Orginial Linux)