| Juanito  
 
  
 
 
 Group: Members
 Posts: 1601
 Joined: Sep. 2005
 | 
|  | Posted: Nov. 29 2006,09:57 |  |  The idea behind this is to test whether you can re-compile your system (without changing anything) and then successfully reboot - if this works then you know that you are correctly set-up for the real thing. Thanks to ^thehatsrule^ for the help.
 
 This was tested using DSL 3.0.1
 
 Back-up your USB stick before proceeding at your own risk.
 
 
 Materials required
 -----------------
 Download gcc-2.95.dsl, gcc1-with-libs.dsl & gnu-utils.dsl from the DSL repository
 Download linux-2.4.26.tar.gz from "www.kernel.org" or mirror sites
 Obtain knoppix 3.4 CD, download KNOPPIX_V3.4-2004-05-04-EN.iso from "http://www.pctips.pl/ftp/linux_342/Knoppix%203.4.html" or download kernelsource.dsl
 
 Preparation
 -----------
 load required dsl packages:
 
 # mydsl-load /path-to-file/gcc-2.95.dsl
 # mydsl-load /path-to-file/gcc1-with-libs.dsl
 # mydsl-load /path-to-file/gnu-utils.dsl
 
 Create a directory for the kernel sources owned by user dsl:
 
 # mkdir /usr/src
 # chown dsl /usr/src
 
 Copy the kernel sources to the new directory and un-pack them:
 
 # cp /path-to-file/linux-2.4.26.tar.gz /usr/src/
 # cd /usr/src
 # tar -xzvf linux-2.4.26.tar.gz -C /usr/src
 # rm linux-2.4.26.tar.gz
 
 Copy the knoppix patch and configuration files from the CD or iso or dsl:
 
 Either
 # mkdir /ramdisk/image
 # mount /path-to-file/KNOPPIX_V3.4-2004-05-04-EN.iso /ramdisk/image -t iso9660 -o loop,ro
 # mkdir /ramdisk/unpack
 # mount /ramdisk/image/KNOPPIX/KNOPPIX /ramdisk/unpack -t iso9660 -o ro,loop=/dev/cloop50
 # cp /ramdisk/unpack/usr/src/* /usr/src
 # cp /ramdisk/unpack/usr/src/linux-2.4.26/.* /usr/src
 # umount /ramdisk/image
 # umount /ramdisk/unpack
 # rmdir /ramdisk/image
 # rmdir /ramdisk/unpack
 
 or
 # mkdir /ramdisk/unpack
 # mount /mnt/your-cd-drive/KNOPPIX/KNOPPIX /ramdisk/unpack -t iso9660 -o ro,loop=/dev/cloop50
 # cp /ramdisk/unpack/usr/src/* /usr/src
 # cp /ramdisk/unpack/usr/src/linux-2.4.26/.* /usr/src
 # umount /ramdisk/unpack
 # rmdir /ramdisk/unpack
 
 or
 # mkdir /ramdisk/unpack
 # cp /path-to-file/kernelsource.dsl /ramdisk/unpack
 # cd /ramdisk/unpack
 # tar xvzf kernelsource.dsl
 # cp /ramdisk/unpack/usr/src/* /usr/src
 # cp /ramdisk/unpack/usr/src/linux-2.4.26/.* /usr/src
 # rm -r /ramdisk/unpack
 
 Apply the knoppix patch to the kernel sources:
 
 # cd /usr/src
 # patch -p1 -d linux-2.4.26 < knoppix-kernel.patch
 
 Note that at this point in a "real re-compile" you would be ready to apply a kernel patch but, since this is a test, omit this step.
 
 Recompile
 ---------
 Prepare sources for re-compilation:
 
 # cd /usr/src/linux-2.4.26
 # make mrproper
 
 Load the knoppix kernel configuration - note that at this point in a "real re-compile" you would be ready to change the kernel configuration, add modules, etc but, since this is a test, just load the knoppix kernel configuration and then save it.
 
 # make menuconfig
 Go to the last but one menu item <load an alternative configuration file>
 tab to <select> and hit enter
 replace text with "/usr/src/.config"
 tab to <OK> and hit enter
 tab to <exit> and hit enter (you will see "Do you wish to save your new kernel configuration?")
 tab to <yes> and hit enter
 
 Build dependencies and cleanup:
 
 # make dep
 # make clean
 
 Build kernel boot image and copy to /boot:
 
 # make bzImage
 # make install
 
 Note that at this point, if you had added additional loadable modules in a "real re-compile", you would issue the commands "make modules" and "make modules_install", but, since this is a test, omit this step.
 
 Prepare to reboot
 -----------------
 
 copy kernel boot image to the root directory of your USB stick:
 
 # cp /boot/vmlinuz-2.4.26 /path-to-boot-usb-root-dir/vmlinuz
 
 make the boot image writeable (required for USB boot):
 
 # rdev -R /path-to-boot-usb-root-dir/vmlinuz 0
 
 Reboot
 -------
 Reboot as normal but when the first DSL screen appears requesting boot options, enter vmlinuz and hit enter.
 
 If eveything went OK, DSL should now start up as usual.
 
 If everything didn't go OK, then you could try deleting the boot option "quiet" from your syslinux.cfg file to get some clues as to what might have gone wrong...
 |