|
From: K.G.H. N. <kg...@tt...> - 2013-07-14 05:55:41
|
Making a custom Devil Linux 1.6.3 boot CD for a network gateway --------------------------------------------------------------- Boot Devil Linux 1.6.3 CD made from downloaded .iso on machine with spare harddrive. I used an old 4G, freshly formatted with ext3. Log in as root, run setup save-config -d /dev/fd0 save-config -d /dev/hda1 The result is that the configuration that works is in /etc-mods.tar.bz2 on floppy and harddrive. I am about to make a CD that boots to that configuration. I'll then disconnect the harddrive and have a read-only, unmodifiable gateway. The booted system is mostly read-only, but /shm can be modified. Create mount points mkdir /shm/FLOP mkdir /shm/4G mkdir /shm/ISO mkdir /shm/CDRW mkdir /shm/8G Find USB flash drive ls /dev/disk/by-label (my flash drive's label is 8G-KGHN) Mount devices for use mount /dev/hdc /shm/CDRW (the Devil Linux CD) mount /dev/fd0 /shm/FLOP (the floppy, disk must be seated when mounting, optional) mount /dev/hda1 /shm/4G (my 4G harddrive, ext3 format OK, not vfat) /shm/ISO will be used by script, no manual mount needed. mount /dev/disk/by-label/8G-KGHN /shm/8G (USB flash drive, optional) Set up harddrive with files to be written to the new .iso mkdir /shm/4G/NEW mkdir /shm/4G/NEW/config (where configuration file is on CD) mkdir /shm/4G/NEW/boot (wanted by script) mkdir /shm/4G/NEW/doc (wanted by script) Don't add /shm/4G/TEMP because the script wants to create it, and complains if it's there already. cp /shm/4g/etc-mods.tar.bz2 /shm/4G/NEW/config cp /shm/4g/etc-mods.tar.bz2 /shm/4G/NEW (redundant copy in root of CD, may be optional) Make .iso creation environment ready Copy the script to the writable harddisk for editing cp /config/scripts/custom-cd /shm/4G custom-cd script uses mkzftree utility. It is not on the CD. The source files for it are on the Devil Linux website, so I copied zisofs-tools-1.0.8 into /shm/4G (cp -a) but ./configure gave error message that a suitable C compiler was not found. So... Use the flash drive to copy mkzftree from another 32bit Linux system that has zisofs-tools-1.0.8 to the same directory as the script that wants it. Note: 64bit binary gives error message "./mkzftree: cannot execute binary file" when the script is run cp -a /shm/8G/mkzftree /shm/4G Edit /shm/4G/custom-cd script vi /shm/4G/custom-cd Tell custom-cd where to find resources Path to bootcd.iso is /shm/4G (I copied it via flash drive from the computer that made the boot CD), so INPUT=/shm/4G/bootcd.iso ISO=/shm/4G/bootcdnew.iso MP="/shm/ISO" NEW=/shm/4G/NEW TEMP=/shm/4G/TEMP Correct obsolete parameters of mkisofs Modify -L parameter near end of shm/4G/custom-cd script to -allow-leading-dots Modify -P parameter near end of shm/4G/custom-cd script to -publisher Add ./ path to mkzftree to tell custom-cd where to find it ./mkzftree $TEMP $TEMP.z Copy notes on your progress to /shm/4G/NEW/doc if you want them on the finished CD Run the script cd /shm/4G ./custom-cd Copy the new .iso to the flash drive. Take it to the machine with the CD burner and burn it. Disconnect the harddrive, boot the CD, enjoy grc.com reporting perfect "TruStealth" rating. EOF. |