How to Build a Live Linux ISO with Linux Live Kit
Updated
Linux Live Kit builds a bootable Live ISO from a Linux installation you already have. You install your preferred distribution to a disk partition or a folder, confirm the kernel supports squashfs plus aufs or overlayfs, then download the kit to /tmp, optionally edit .config, and run ./build as root. The resulting ISO and TAR archive land in /tmp; unpack the TAR to a USB device and run bootinst.sh to make it bootable. This works best when you start from a clean, minimal installation — Debian is recommended but not required.
What you need before starting
- A Linux distribution installed either to a disk partition or into a folder on your existing system.
- Kernel support for
squashfsand eitheraufsoroverlayfs. Most distributions include these automatically, but you should verify. - Root access, since the build script must run as root.
- Enough free space in
/tmpfor the generated ISO and TAR archive.
Step-by-step build
Step 1: Install your distribution
Install your favourite distro to a disk partition, or into a folder on your existing system. Debian is recommended but not required — any distribution should work if the kernel modules below are available.
Step 2: Confirm kernel module support
Make sure squashfs and either aufs or overlayfs are supported by your kernel. Chances are your distribution supports them automatically. If not, you will need to enable them before the build can succeed.
Step 3: Trim unnecessary files (optional)
Remove all unnecessary files to make the Live Linux system as small as possible. This step is optional but recommended. It is also recommended to remove udev's persistent net rules and other distribution-specific settings, which may prevent the system from functioning correctly on different hardware.
Step 4: Download Linux Live Kit
Download Linux Live Kit from GitHub and put it in /tmp. Reading the files in ./DOC/ to learn how it works is optional. If you need to modify variables, edit the .config file.
Step 5: Run the build script
Log in as root and run:
./build
Your Live Kit ISO image will be created in /tmp.
Step 6: Make a bootable USB
To make a bootable USB, unpack the generated TAR archive (also from /tmp) to your USB device, then run bootinst.sh from the boot sub-directory. The install script can make your device boot in both Linux and Windows.
What the kit gives you
Linux Live Kit uses aufs or overlayfs instead of the older unionfs, which brings greater stability. squashfs supports XZ compression including BCJ filters for a strong compression ratio and fast decompression. The CD tree is simplified, so you can name your distro whatever you like (for example slax or knoppix). It supports booting from USB devices as well as CD/DVD discs, and DynFileFS provides dynamic-size filesystem support for writing persistent changes even to VFAT or NTFS. You can also load your LiveKit data from a different directory or even from an ISO file.
Common snags
- Missing kernel modules. If
squashfsor your chosen union filesystem is not available, the build will fail. Check this before Step 4. - Hardware-specific settings. Persistent net rules and similar distro settings can stop the Live system from working on different hardware — remove them in Step 3.
- Not running as root. The
./buildscript requires root; running it as a normal user will not produce the ISO. - Forgetting the second stage for USB. The ISO alone is not enough for a USB stick — you must unpack the TAR and run
bootinst.sh.