[[!meta title="DEvoSL boot from initrd"]] [[!meta date="27 May 07"]] This page is somewhat obsolete and incomplete - I was working on it when DSL came out with a initrd-boot version as a standard option. The info here is still useful to me, since I use it to pack a non-standard version of DSL. It seems to work fine with DSL 4.0 (using kernel and initrd from embedded version - haven't tried other versions - it doesn't make any difference for this application). The one thing you need is to have 'ramdisk_size=100000' on the kernel command-line, otherwise you'll get a complaint about 'out of space' or something like that when you try to boot it. ''''''''''''''''''''''''''''''''''''''''' Packing the DSL cloop file into the initrd means that only kernel/initrd are required to completely boot the machine - no other files, no extra usb flash drive, no cdrom - just the kernel (linux24) and initrd (minirt24.gz). This lets you boot the Evo T20 entirely from internal flash, or via PXE without needing an LTSP server or suchlike. The DSL initrd (initial ramdisk, called minirt24.gz) is just a gzipped disk image. This script just decompresses the file, loop-mounts the resulting disk image, patches the linuxrc file on the "disk" and copies in the great big (50M) DSL cloop file (called KNOPPIX, betraying its ancestry). Then the disk image is unmounted and compressed again. The DSL cloop is itself a compressed disk image (but a different sort from the initrd). If you want to remaster what's in DSL, have a look at this very long forum thread: link:http://damnsmalllinux.org/cgi-bin/forums/ikonboard.cgi?act=ST;f=12;t=7177;st=0[] (the discussion covers several years and multiple versions of DSL) linuxrc is the script which controls much of the early stages of booting linux. It's just a plain text shell script. See link:http://www.damnsmalllinux.org/wiki/index.php/DSL_Boot_Process[] for a little more info on DSL booting. Once you have packed the cloop file into the initrd, you have two obvious choices: * DEvoSL - rename the new initrd to the standard name (minirt24.gz) and copy it into the working directory for the DEvoSL scripts. Then rebuild/reflash DEvoSL. (previous version of this patch required you to patch/reconfigure/rebuild grub as well, but now it should work with the normal DEvoSL grub setup) * PXE - put the new initrd into your tftp server directory and edit your config so it gets used. (previous version of this patch required a kernel command-line option as well - this is no longer required) ****************** Experimental! Not fully tested yet! ****************** This page is all based on things I learnt here: link:http://damnsmalllinux.org/cgi-bin/forums/ikonboard.cgi?act=ST;f=26;t=15960;st=0[] First you need to copy some files from your DSL setup into your working directory (where you will run the script given below): ****************** Warning: This patch was made with the DSL3.3 Embedded version, but should be compatible with the DSL3.3 CD iso version as well. With the embedded version it will say: ------------------------------ Hunk #1 succeeded at 8. Hunk #2 succeeded at 30. Hunk #3 succeeded at 340. Hunk #4 succeeded at 364. ------------------------------ Whereas with the CD version it will complain a little: ------------------------------ Hunk #1 succeeded at 8. Hunk #2 succeeded at 30. Hunk #3 succeeded at 341 with fuzz 1 (offset 1 line). Hunk #4 succeeded at 363 (offset -1 lines). ------------------------------ ****************** * /linux24 * /minirt24.gz * /KNOPPIX/KNOPPIX * Note: if that last file has come off a FAT filesystem then it will probably be called `knoppix` (lowercase) - if this happens then you need to rename the copy in the working directory to `KNOPPIX` (all uppercase). Note also that whilst this image has the same name as a full-size Knoppix image (from which DSL is derived), you can't use the full-size (hundreds of megabytes) image here - it won't fit unless you fiddle with the script! link:http://mowson.org/karl/contact/[Contact me] if you have any problems! Patch the DSL initrd with this script link:initrd-boot-patch.sh[] (Note: syntax highlighting in the script is a bit messy because of the unmatched opening quote in the patch text): [sh] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ include::wip-initrd-boot/initrd-boot-patch.sh[] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^