Thursday, February 02, 2006

Custom Live-Cds

This is the first, really useful post I have had time to make in awhile. For the last couple days I have been working on building a live-cd, to deal with a poorly setup computer at school, so I can get something done in class. For those who don't already know, a live-cd is a term for a cd or dvd that has an entire, ready to use, operating system on it. Usually linux is used by live-cds but specialized Windows installs can also boot from a cd. There are a number of premade live-cds available for download on the web (if you have a fast connection, or way too much time) such as knoppix, which will run on just about any computer with no (or almost no) configuration.  Knoppix and many others use a technology called unionfs which allows the operating system's files from the cd to be merged with a ram disk, allowing the user to add programs or save things, up to the amount of ram they have. Any changes made, are of course gone on the next reboot. There is one live-cd, called puppy linux, which can save these changes back to the cd, however this only works if you have a cd burner, so is not an ideal solutions for me. This leaves me with three options, make a live-cd from scratch, "remaster" an existing live-cd, or install to a removable hard drive or flash drive (if the target computer can boot off usb). If you want to find more info about making live-cds from scratch, I suggest the gentoo wiki, or google.
The best choice is to "remaster" an existing disc. Most of the work is already done, all you have to do is add what you need and recreate the iso.  There are two live-cds which are intended to be remastered, and make it very easy to do so:

Slax is slackware based, and is modular. What this means is that you can download modules from the slax website and add them to the cd. In Linux this is done by mounting the iso using a loopback drive (ie, mount -o loop slax-xxx.iso /mnt/tmp) and copying the contents to a temporary directory. In windows it is best to just burn the cd and copy the contents to a folder, unless you have a tool you like. From here you can add any modules to the modules directory of the cd, and use the tools on the cd or from the website to make your own modules. You can also put files in the "rootcopy" directory which will be copied into the main file system at boot time. Then you use the included script and mkisofs to rebuild the iso, which you can test in an emulator and/or burn. (take a look at the documentation for more info)

Morphix is similar to slax, and is debian based.  Morphix is a little harder to remaster, but has better hardware auto detection, and the result is more user friendly. If you want to try putting together your own morphix cd, I suggest you  take a look at the extensive documentation. You can do some simple changes, if you have a FAT/ext2/ext3/ other linux writable partition with some free space, using the " morphing morphix" cd, which includes an interactive tutorial with some automated steps.

If you just want a live-cd to play with, you can find a bunch on google, distrowatch or any of the other linux distribution tracking sites. If you have any favorites, feel free to post them in the comments.

No comments: