Creating the base Live CD from SLAXSubmitted by mtesauro on Fri, 04/24/2009 - 17:39 |
Get SLAX ISO
Go and get the latest SLAX ISO. Or if you want to replicate what I did exactly, get the slax-6.0.7.iso
$ mkdir ~/isos/slax
Then grab the ISO with your favorite browser and download the ISO.
Copy ISO Contents
Copy the contents of the ISO to a directory on your computer. see also [1]
- For me, I just mounted the iso as a loopback but you could also just burn a CD and copy it over. To be precise, I copied the contents to /home/mtesauro/isos/slax/contents but you're free to copy it to wherever works for you.
$ mkdir ~/isos/slax/contents $ cp -r /mnt/slax/* ~/isos/slax/contents/
Create a Working Directory
I created a working directory to create modules in - just to keep things separated and neat. So, I created /home/mtesauro/isos/slax/working as well as a fake root directory to represent the root directory of the Live CD after it boots. I also like to put the SLAX tools into the working directory as well as creating a few other directories needed for making modules
$ mkdir ~/isos/slax/working $ mkdir ~/isos/slax/working/fakeroot $ mkdir ~/isos/slax/working/temp $ mkdir ~/isos/slax/working/completed_modules $ cp ~/isos/slax/contents/slax/tools/* ~/isos/slax/working/
Modify the ISO Contents / Add Modules
The above is really about all you need to do to get the build environment up and running. I'll cover what I did to make each module in the Making Modules [PAGE NOT MADE] page. For now lets just assume you've got your module(s) created and moved over to the modules directory (/home/mtesauro/isos/slax/contents/slax/base in my case).
Build A New ISO Image
In the slax directory under the cd contents (/home/mtesauro/isos/slax/contents/slax), there is a script called make_iso.sh. The script is also part of the Linux Live tools. I used this to generate a new ISO image.
$ cd ~/isos/slax/contents/slax $ ./make_iso.sh /home/mtesauro/isos/matt-slax.iso
Test The New ISO
(and hope it works as expected)
Some hints to make ISO testing not so painful
- Get some virtualization software. Many of these are free like Virtual Box, QEMU or VMware Server. see also [2]
- Create a VM which uses your new ISO as the virtual CD drive. You don't need to worry about installing an OS to the virtual hard drive.
- Boot the new VM and make sure the CD is set as one of the boot devices.
Now whenever you generate a new ISO, just restart that virtual machine to see how it does. The other nice thing is you can just click the power off button for that VM when your testing is done since there's nothing to hurt. You can also just over write this ISO with a newly generated one and fire up your VM softare to test the new build. I probably have over written the OWASP Live CD 2008 atleast 2x the number of modules I've built.
FYI: What my working file system looks like
slax
|-- contents
| |-- boot
| | `-- [bunch of files]
| `-- slax
| |-- GNU_GPL
| |-- LICENSE
| |-- base
| | `-- [bunch of files]
| |-- changelog.txt
| |-- cheatcodes.txt
| |-- livecd.sgn
| |-- make_iso.bat
| |-- make_iso.sh
| |-- requirements.txt
| |-- slaxsave.zip
| `-- tools
| `-- [the tools for creating modules, etc]
|-- slax-6.0.7.iso
`-- working
|-- activate
|-- completed_modules
| `-- [directories with each modules creation files inside]
|-- deactivate
|-- deb2lzm
|-- dir2lzm
|-- liblinuxlive
|-- lzm2dir
|-- mksquashfs
|-- temp
| `-- [a scratch directory for use while making modules]
|-- tgz2lzm
`-- unsquashfsThe above is the slightly modified output of tree - thanks tree!
