Creating numerous configuration modules eventually will use a lot of system resources, slow down the boot process, and consume an inordinate amount of drive space. A more efficient way to manage the customized configuration modules in SLAX is to use the second option of this article: combine them into a single module providing all of the desired changes from the basic set-up. There are scripts on the internet that do this automatically, but the essence of the procedure will be covered here. At the heart of the processs are two operations: extracting module components into an existing folder via the "lzm2dir" command and building a module from a folder via the "dir2lzm" command. What is special about module extraction is that multiple modules can be extracted to the same folder, and files are written on a one for one basis.
For example, /root and /usr are extracted from a module, and are written as subfolders into a folder called "NEWCONFIG", which will take data from the user\'s dozens of config modules. Files in /root and /usr will be untouched unless a subsequent config module contains files with identical names in its versions of /root and /usr. If the user has the latest version of Firefox, with all of his favorite plug-ins, only the last extracted versions of particular files will remain. After some basic file pruning, a new module is then created with all prior changes incorporated. Below is a procedure for combining numerous customized SLAX configuration modules into one:
- On a hard drive or flash memory device, create a folder named NEWCONFIG (for example, /mnt/sda1/NEWCONFIG/).
- Navigate to the /slax/modules folder, and open a console window.
- In sequence, from oldest to newest, extract files from all config modules into the new folder (lzm2dir slaxconf1 /mnt/sda1/NEWCONFIG/)
- Close the console window.
- Navigate to the NEWCONFIG folder and examine its contents; there should be a series of folders resembling the Linux file system.
- Remove anything not intended to go into the new configuration module, or edit files you want to start clean.
- Navigate up one level, to the folder containing "NEWCONFIG" and open a new console window.
- Execute the command "dir2lzm NEWCONFIG slaxconf_all.lzm" to create a customized SLAX configuration module.
- Close the console window, and move the new module into the /slax/modules folder.
- Move all of the old modules to a safe location, or append "~" to their filenames to prevent loading at next start-up.
- Reboot into SLAX and verify that the new module properly incorporates the SLAX customization from old configuration modules.
Making small changes to the module is simple, and can be done on the desktop. Simply copy the module onto the desktop, extract the contents into a folder, then make the desired file and folder changes. Execute a dir2lzm command on the folder, and place the new module into the /modules directory. Reboot and test.
Now consider the third option for customizing SLAX: remaking the core modules. This technique consumes the least drive space and the least resources overall, though it must be re-accomplished after any upgrades to SLAX are published. In other words, if you have SLAX version 6.07 and download version 6.08, the changes for the core modules must be saved and re-written onto the new system. Otherwise, the procedure is similar to creating a unified SLAX configuration module:
- On a hard drive or flash memory device, create a folder named NEWCORE (for example, /mnt/sda1/NEWCORE/).
- Navigate to the /slax/base/ folder, and open a console window.
- Extract files from the module "001-core.lzm" into the NEWCORE folder (lzm2dir 001-core.lzm /mnt/sda1/NEWCORE/)
- Close the console window.
- Navigate to the NEWCORE folder and examine its contents; there should be a series of folders resembling the Linux file system.
- Remove anything not intended to go into the new core module, or edit files you want to start clean.
- Navigate up one level, to the folder containing "NEWCORE" and open a new console window.
- Execute the command "dir2lzm NEWCORE 001-core.lzm" to create a customized SLAX core module.
- Close the console window, and move the new module into the /slax/base folder.
- Move the old 001-core module to a safe location, or append "~" to its filename to prevent loading at next start-up.
- Reboot into SLAX and verify that the new core module properly incorporates the SLAX customization.
In conclusion, there are a number of ways to accomplish SLAX customization as well as the implementation of persistent changes for specific things the user intends to retain after system reboots. When incorporated into modules, a SLAX customization may edited to suit the user, stored for safekeeping, and shared with others who want the same operating charachteristics. These ideas are not strictly limited to customizing SLAX, and may be applied to other similar Linux distributions. For example, Backtrack uses a similar modular format, and though it has a long upgrade cycle, it is easily customized and numerous special versions exist. Puppy Linux also comes to mind representing a modular Debian based distribution. Go ahead and imagine what your favorite distro could be, and then customize it until it is perfect for your needs!
Tags: SLAX, Customize Linux, Tweak SLAX, Customize SLAX