CHAPTER ZERO: CREDITS
The Dao of ULTILEX is free for redistribution and/or publishing anywhere in any format as long as you keep and respect the copyright notice on the next few lines. If you make any changes in this document, you are still required to publish the following copyright notice, but you may (or may not, your choice) add your name, contact info and any other information under the same copyright notice. You are also allowed to correct any spelling and/or grammar mistakes if you find any. :)
Original document: "The Dao of ULTILEX"
Original author: Ivan Davidov (davidov *dot* i [at] gmail (dot) com, Sofia, Bulgaria)
Original web site: http://ultilex.linux-bg.org
Redistributed by: put your name and contact info here
put any other info you would like
CHAPTER ONE: UNIVERSE
Patience is the key. Be patient, wait, watch and learn. Become part of The Universe and let it be part of you.
CHAPTER TWO: LESSONS
You cannot remaster ULTILEX until you remaster yourself. Watch out and learn The Lessons first.
LESSON ONE: Master your patience. Patience is the key. Find your way ahead ONLY after you have mastered The First Lesson. The path is hard, but a reward is waiting at the end.
LESSON TWO: Master the tools. You need to know how to extract files from CD, add files to CD, change the CD boot image and burn CD image to disc. If you are experienced Linux user, you may have mastered This Skill already. If you are experienced Windows user, you may have mastered This Skill already. In any other case, you will find the truth on the half way to the third lesson.
LESSON TWO (AND A HALF): Under Linux you might consider using K3B (excellent choice) and/or IsoMaster. Under Windows you might consider using Nero and probably WinRAR (to extract files from CD). Master the tools for your OS first and then continue your journey.
LESSON THREE: The song of a nightingale worths more than 1000 ounces of gold. One breath of fresh air is more precious than 1000 diamonds. Respect and honor the surrounding nature. THIS LESSON is the most important one!
LESSON FOUR: Wisdom comes after burning 99 bad CD discs. Use emulators (like QEMU or VirtualBox) to test your results first. Combine with what you have learned in Lesson One and you are ready to continue.
CHAPTER THREE: PREPARATIONS
Take care of your computer. You will need it.
Take care of your Hard Disk Drive. Don't allow it to become softer. If it is soft - change it.
The water in the river flows in one direction, but the fish chooses its own path. Do you have at least 256MB RAM?
Grit or rock - depends if you are ant or elephant. Do you have at least 2GB free space on your HDD?
The more you know, the more you want to know. Did you master The Lessons?
With great power comes greater responsibility. Do you own a bazooka?
If you have at least three positive answers - you are ready to continue your journey.
If you have four positive answers - don't try to contact me EVER (please)!
CHAPTER FOUR: TRUTH
So far you have mastered The Lessons and you went through The Preparations. Now it's time for you to learn The Truth.
Download the CD ISOs of the following live Linux distributions: Slax (http://www.slax.org) and Finnix (http://www.finnix.org). While downloading use what you have learned in Lesson One. Then use what you have learned in Lesson Two to extract the contents of the both distributions in separate folders. You should also keep at least the original Slax CD ISO.
Now it is the best time to familiarize yourself with the common structure of (almost) all live Linux distributions.
Both Slax and Finnix use ISOLINUX as their boot engine. When the computer boots from the CD, ISOLINUX tries to locate a configuration file called "isolinux.cfg" in one of the following locations in this exact order:
1) /boot/isolinux/isolinux.cfg
2) /isolinux/isolinux.cfg
3) /isolinux.cfg
In Slax the configuration file is located at "/boot/isolinux/isolinux.cfg".
In Finnix the configuration file is located at "/isolinux/isolinux.cfg".
Let's have a look at the Slax's "isolinux.cfg" file as we will use it as a base in our example.
The only entry we see in "isolinux.cfg" is: "INCLUDE /boot/slax.cfg"
It means that the actual boot configuration is located in the file "/boot/slax.cfg". Open it.
What you see now is a lot of configuration with boot entries like this one:
======================================
### SOME CONFIGURATION ABOVE ###
LABEL xconf
MENU LABEL Slax Graphics mode (KDE)
KERNEL /boot/vmlinuz
APPEND initrd=/boot/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw autoexec=xconf;telinit~4 changes=/slax/
TEXT HELP
More about currently selected:
Run Slax the best way we can.
Try to autoconfigure graphics
card and use the maximum
allowed resolution
ENDTEXT
### OTHER BOOT ENTRIES BELOW ###
======================================
You should already know that the main boot entry point for every Linux distribution (not the CD itself) is something called "Linux kernel". The boot entry above uses a kernel (i.e. a file in non-readable format, don't bother opening it) located at "/boot/vmlinuz". The kernel itself accepts several parameters defined on the line starting with "APPEND". You should look closely at the boot entry and take note of the elements which contain paths and files. In this case the elements we care about are:
1) The kernel (very important) located at "/boot/vmlinuz".
2) The initrd image located at "/boot/initrd.gz".
3) The changes directory located at "/slax/".
The entry "root=/dev/ram0" also contains a path, but we are not interested in it because it is used internally by Slax.
Now let's have a look at one boot entry in Finnix (we already know which file to open - "/isolinux/isolinux.cfg"):
======================================
### SOME CONFIGURATION ABOVE ###
LABEL finnix
MENU DEFAULT
MENU LABEL Boot Finnix (x86)
TEXT HELP
Boot Finnix with a 32-bit kernel in normal 1024x768 pixel mode.
ENDTEXT
KERNEL linux
APPEND apm=power-off vga=791 initrd=minirt quiet
### OTEHR BOOT ENTRIES BELOW ###
======================================
The kernel is defined as "linux" with no path elements (no "/" signs), which means that the file is located in the same directory as the configuration file. In other words, the kernel is "/isolinux/linux".
The same applies for the initrd image. It is defined as "minirt" and it is located at "/isolinux/minirt".
There are no other interesting file/path elements.
Now comes the magic part: in order to "merge" Slax and Finnix we need to:
1) Merge the file structure of both Slax and Finnix.
2) create additional boot entry in the file "/boot/slax.cfg" (remember - we will use Slax as base).
After short examination of the Finnix's file structure we determine that we can do the following:
1) Copy the folder "FINNIX" with its content in the root folder of "Slax" (you don't need the file "md5sums").
2) Copy the files "/isolinux/linux" and "/isolinux/minirt" in the newly copied "FINNIX" folder.
Now your extracted Slax structure should look like this:
======================================
### SLAX CD ROOT FOLDER ###
|
+--boot ###EXISTING SLAX FOLDER ###
|
+--slax ### EXISTING SLAX FOLDER ###
|
+--FINNNIX ### NEW FOLDER ###
|
+--FINNIX ### COPIED FILE ###
|
+--linux ### COPIED KERNEL FILE ###
|
+--minirt ### COPIED INITRD FILE ###
======================================
Ready? The next step is obvious. We need to create additional boot entry in the file "/boot/slax.cfg" to point to our Finnix.
Open "/boot/slax.cfg" and locate a spot where you would like to put the boot entry. I advise you to put it on the top just for the example.
If you copy/paste the original Finnix boot entry (the same one we used to examine the structure) and you put it on the top, your final result should be something like this:
======================================
### SOME CONFIGURATION ABOVE ###
LABEL finnix
MENU DEFAULT
MENU LABEL Boot Finnix (x86)
TEXT HELP
Boot Finnix with a 32-bit kernel in normal 1024x768 pixel mode.
ENDTEXT
KERNEL linux
APPEND apm=power-off vga=791 initrd=minirt quiet
LABEL xconf
MENU LABEL Slax Graphics mode (KDE)
KERNEL /boot/vmlinuz
APPEND initrd=/boot/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw autoexec=xconf;telinit~4 changes=/slax/
TEXT HELP
More about currently selected:
Run Slax the best way we can.
Try to autoconfigure graphics
card and use the maximum
allowed resolution
ENDTEXT
### OTHER BOOT ENTRIES BELOW ###
======================================
BE CAREFUL: THE "COPY/PASTE"-ED ENTRY ABOVE IS WRONG AND IT WILL NOT WORK!!!
Remember that we moved the kernel file and initrd image at new location? Now we need to update the "copy/paste"-ed boot entry with the new locations of the kernel and initrd. So, the actual new boot entry should look like this:
======================================
### SOME CONFIGURATION ABOVE ###
LABEL finnix
MENU DEFAULT
MENU LABEL Boot Finnix (x86)
TEXT HELP
Boot Finnix with a 32-bit kernel in normal 1024x768 pixel mode.
ENDTEXT
KERNEL /FINNIX/linux
APPEND apm=power-off vga=791 initrd=/FINNIX/minirt quiet
LABEL xconf
MENU LABEL Slax Graphics mode (KDE)
KERNEL /boot/vmlinuz
APPEND initrd=/boot/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw autoexec=xconf;telinit~4 changes=/slax/
TEXT HELP
More about currently selected:
Run Slax the best way we can.
Try to autoconfigure graphics
card and use the maximum
allowed resolution
ENDTEXT
### OTHER BOOT ENTRIES BELOW ###
======================================
In summary we have the following final structure:
======================================
### SLAX CD ROOT FOLDER ###
|
+--boot ### EXISTING SLAX FOLDER ###
| |
| +--slax.cfg ### MODIFIED WITH NEW BOOT ENTRIES ###
|
+--slax ### EXISTING SLAX FOLDER, NO CHANGES ###
|
+--FINNNIX ### NEW FOLDER ###
|
+--FINNIX ### COPIED FILE FROM FINNIX ###
|
+--linux ### COPIED KERNEL FILE FROM FINNIX ###
|
+--minirt ### COPIED INITRD FILE FROM FINNIX ###
======================================
If you are ready, save your work, open the SLax CD ISO with your favorite CD ISO manipulation program (remember I told you to keep the originally download Slax CD ISO), update the file "/boot/slax.cfg" with the modified version and put the new "FINNIX" directory structure. In other words, just apply all the changes we did. Then save the CD ISO and burn it.
CHAPTER FIVE: END OF GAME
Everything starts from "isolinux.cfg" (or in Slax's case - "slax.cfg").
Always check the boot entries when you make changes to the file structure.
Not all live Linux CDs are easy to integrate. Sometimes there are files which have to exist in their exact original location.
You should try to keep all live Linux CD files in separate folder, although it is not always possible. In this way future updates are much easier (everything is located in one main sub-root folder and you just replace files).
In the example above you still keep the Slax's functionality to install the SLAX-FINNIX merged CD on USB flash device. Just follow the instructions:
1) Copy all files and folders from the CD to your USB flash device.
2) Execute the file "/boot/bootinst.sh" or "\boot\bootinst.bat" depending on which OS you use.
3) Enjoy your newly created multi-boot USB flash device.
You can install your newly created multi-boot CD even on your hard drive, if it is formatted wit FAT. In fact the scripts "bootinst.bat" and "bootinst.sh" will install your newly created merged live Linux CD on everything which is FAT formatted.
CHAPTER SIX: RISKS
The only person you can blame if anything goes wrong is you. I strongly advise you to use emulators during your tests in order to minimize the risk of data loss. You should also know that FAT is not a reliable file system => you should not trust it for everyday use. The ULTILEX project tries to minimize the FAT unreliability by simply defaulting to boot entry which never writes to persistent media (Slax Always Fresh).
CHAPTER SEVEN
Have fun! :)