Kamis, November 22, 2007

How to build a Live distro

Linux Live is a set of shell scripts which allows you to create own Live Linux from your installed Linux distribution. The Live system you create will be bootable from CD-ROM or a disk device, for example USB Flash Drive, USB Pen Drive, Camera connected to USB port, and so on. People use Linux Live scripts to boot Linux from iPod as well.

How to build a Live distro:

1) Install your favourite distro to disk partition, or into a folder on your existing system.

Slackware is recommended but not required.

2) Build aufs kernel module and squashfs kernel module (optionally patched to support LZMA). The step above is not required if you use precompiled Linux Kernel from this website. Install kernel modules to the newly installed distro to /lib/modules/`uname -r`/fs/. Make sure you are running the same kernel you used to compile modules

3) Remove all unnecessary files (for example man pages and all other files you don't need), to make your Live Linux system as small as possible (this step is optional).

4) Download Linux Live scripts from this website and unpack it in /tmp

Read ./DOC/requirements.txt to find out what linux-live scripts need. Edit .config file if you need to modify some variables

5) Finally login as root and run ./build

Live distribution's 'directory tree' will be created in /tmp/live_data_1234

where 1234 is a random number

6) To make ISO image, run make_iso.sh

To make a bootable (usb) disk, run bootinst.sh

Working example

If you're just looking for a working Linux Live system, visit www.slax.org

Download e-book

Luc Parson wrote a nice e-book called Creating your own Linux Live CD, which provides a step by step installation manual for creating a Linux Live CD based on Slackware Linux. (PDF 260KB).