Linux Live scriptsthe ultimate way to bring your linux to life | ||||||||||||||
![]() howtos | ![]() download | ![]() changes | ||||||||||||
|
Linux Live is a set of shell scripts which allows you to create your own Live Linux from an already 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 websiteInstall 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 modules3)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 /tmpRead ./DOC/requirements.txt to find out what linux-live scripts needEdit .config file if you need to modify some variables5)Finally login as root and run ./buildLive distribution's 'directory tree' will be created in /tmp/live_data_1234where 1234 is a random number6)To make ISO image, run make_iso.shTo make a bootable (usb) disk, run bootinst.sh
Working exampleIf you're just looking for a working Linux Live system, visit www.slax.org
Interesting features of Linux Live scripts1)persistent changesUse 'changes=...' boot parameter to specify persistent changes directory or file. If a directory is used, eg. changes=/some_dir/ and the /some_dir/ is found on some partition on your disk, then all the changes made to the root filesystem will be saved to that directory. This works even if /some_dir/ is on NTFS or VFAT, thanks to posixovl overlay (an userspace filesystem, already included). Important note: if you plan to save changes on VFAT, make sure to modify your distribution's shutdown scripts. It must not execute killall, else posixovl is killed and everything is wrong. Instead, call the cleanup script from /mnt/live/cleanup. If a file is specified for the changes boot parameter, eg. changes=/path/file.dat, and the file has a valid filesystem inside, then the file will be loop-mounted and changes written to it. You may also use changes=/dev/sda1/path/ and changes=/dev/sda1/path/file.dat ... to specify particular device where to look for. Other devices will be skipped (will not be even mounted). 2)adding modules on the flyIn the ./tools/ directory of Linux Live, you will find 'activate' and 'deactivate' scripts. You may use these two to add and remove additional LZM modules to the root filesystem on the fly, while your Live OS is running. 3)installable system to diskAs mentioned in the previous section, there exists a
script called bootinst.sh (and bootinst.bat) to setup a
boot sector to boot Live Linux from disk. If you
combine that with persistent changes, your Live distro
will behave like INSTALLED, all changes are
transparently stored to the boot media (even to USB),
and you can still use 'activate' and 'deactivate'
commands to manipulate the root filesystem.
1)Download Linux Live scripts
2)Download precompiled kernel with aufs and squashfs modules(if you are lazy to build kernel and modules yourself)
You may want to build your own kernel from sources(most people don't need this)
I prepared build-scripts with sources for you here, so just download all the files and directories from there. Feel free to replace my config by your own kernel configuration and run ./build.kernel script. It will make a 2.6.27.7 kernel for you. Linux Live scripts version 6 are the most innovative scripts available. AuFS provides better stability compared to old unionfs, squashfs with LZMA support provides great compression ratio and amazing decompression speed. What's new compared to old Linux Live scripts v 5?
- aufs is used instead of unionfs, brings great stability and features
(c) 2009 Tomas M. (www.slax.org)
- I will be happy for all feedback, mail me!
| ||||||||||||||


