While the scripts covered in this feature simplify the process of converting a Linux installation into a Live distributable medium, it’s pretty simple to step through the process manually. The advantage of this approach is that you can customise any distribution irrespective of the one running on the host. So for example, you can use this to create a customised Ubuntu-based distro using a Fedora installation.
Before you get started, you’ll need the squashfs-tools package to compress the filesystem of your custom distro as well as the
genisoimage package to roll your distro into an ISO image. Both of these are usually available in the official repositories of most distributions. Next, grab the ISO image of the distro you wish to customise and loopback mount it. Then extract its contents into a folder. Use the unsquashfs command (part of the squashfs-tools ) to extract the compressed filesystem. For Ubuntu-based distros like Mint this is the filesystem.squashfs file under the casper directory. For Fedora it’s squashfs.img under the LiveOS directory.
After uncompressing the filesystem, chroot into it. Preparing the chroot environment needs to be done carefully. Once inside the uncompressed filesystem you can use the distro’s package management system to add and remove packages and also modify any configuration file. Then remove any temp files before exiting the chroot environment. Now all you need to do is regenerate the manifest, compress the filesystem and roll it into an ISO image.
Use JLiveCD to prepare the chroot environment and create custom Debian, Ubuntu and Arch-based distros.