jonf
Group: Members
Posts: 1
Joined: June 2005 |
|
Posted: June 06 2005,19:45 |
|
Here is a step by step kernel recompile. I did this in Debian, because that happens to be my distro of choice.
You need the kernel-source, cloop-source, dsl*.iso, and the kernel-source.dsl from the repository.
I will assume you have all the dependencies for compiling a kernel. With debian you can do apt-get builddeps kernel-package to get everything you need.
I used 2.4.31 from http://kernel.org. I couldn't find the cloop sources so I got them from my debian repositories apt-get install cloop-src. Downloaded the dsl package from the dsl rearpository.
# make a directory to work with mkdir ~/dsl export dsl_work_dir=~/dsl cd $dsl_work_dir
# get the kernel sources wget http://www.kernel.org/pub/linux/kernel/v2.4/linux-2.4.31.tar.bz2
# get kernelsource.dsl wget http://gulus.usherbrooke.ca/pub....rce.dsl
# get dsl, you need the KNOPPIX file and minirt.gz # I got mine off my pen drive, but I'll assume you are using a CD wget http://gulus.usherbrooke.ca/pub....1.1.iso
# get the cloop source, maybe you can get it here, I couldn't # http://www.knopper.net/download/knoppix/ # I got it from a debian repository # http://packages.debian.org/testing/misc/cloop-src.html # because the first link was down when I tried, and I got the # deb, I will be going off that.
# rename dsl package because gzip is too smart for its own good. mv kernelsource.dsl kernelsource.tar.gz
# extract you kernel-sources tar jxvf linux-2.4.31.tar.bz2
# extract kernelsource dsl tar jxvf kernelsource.tar.gz
# The debian package of cloop-src installed in /usr/src # lets get it into our dir cp /usr/src/cloop.tar.gz $dsl_work_dir
# and extract it tar -zxvf cloop.tar.gz
# copy dsl .config to out new sources cp usr/src/linux/.config linux-2.4.31/
# go into our kernel-source dir cd linux-2.4.31
# configure kernel make oldconfig
# If you need to make any changes now it the time to do it. # You shouldn't need to and if you are reading this, you # probably shouldn't do it any way, but its here for completeness make menuconfig
# apply knoppix patch patch -p1 < ../usr/src/knoppix-kernel.patch
# Our kernel is now ready to compile make dep; make bzImage; make modules
if [ ! -d ../modules ] && mkdir ../modules
# There is probably a better way to do this, but I don't know it sudo make modules_install cp /lib/modules/2.4.31 ../modules/ sudo rm -rdf /usr/src/2.4.31
# If you made it this far without errors, have a cookie # now on to the cloop module # this assumes you used the debian package it extracts to # modules/cloop which we extracted in $dsl_work_dir cd $dsl_work_dir/modules/cloop make $KERNEL_DIR=$dsl_work_dir/linux-2.4.31 cd $dsl_work_dir
# lets extract our iso mkdir iso_source sudo mount dsl-1.1.iso /mnt -o loop cp -a /mnt/* $dsl_work_dir/iso_source/ umount /mnt
# This assumes that you have cloop up and running on your current system, if not you can do this with dsl by adapting the remastering howto. sudo /sbin/modprobe cloop file=$dsl_work_dir/iso_source/KNOPPIX/KNOPPIX mkdir KNOPPIX sudo mount /dev/cloop0 ./KNOPPIX cp -a modules/2.4.31 ./KNOPPIX/lib/modules/ rm -rdf ./KNOPPIX/lib/modules/2.4.26 umount ./KNOPPIX sudo /sbin/modprobe -r cloop
# KNOPPIX file is done, onto the minirt.gz cd iso_source/boot/isolinux gunzip minirt.gz mkdir tmp sudo mount minirt tmp cd tmp/modules cp $dsl_work_dir/modules/cloop/cloop.o ./ cd ../../ sudo umount tmp/ rmdir tmp/ gzip minirt
# lets replace out kernel cp $dsl_work_dir/linux-2.4.31/arch/i386/boot/bzImage ./linux24
cd $dsl_work_dir
Now you just need to make the iso, burn and boot it. mkisofs -no-pad -l -r -J -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -hide-rr-moved -o newdsl.iso iso_source
There are probably numerous errors, this was adapted from a usb pendrive method from memory and my memory isn't that great, I will update it if anyone finds any errors.
|