Tazlito—SliTaz Live Tool.
tazlito [command] [list|iso|flavor] [dir]
Tazlito is a small utility to extract a LiveCD, rebuild the ISO image and regenerate the root filesystem of the LiveCD. Tazlito can also generate a distribution from a list of packages previously downloaded. To run, Tazlito uses the configuration file /etc/tazlito/tazlito.conf or an easily generated tazlito.conf found in the current directory. It specifies the name of the ISO, volume, maintainer and the paths of the packages to distribute and the generated ISO. Tazlito can also set up a directory containing additional files which will be copied to the LiveCD when generating the distribution.
Tazlito is distributed under the free GNU licence GPL v.3, installed by default on SliTaz and installed/successfully tested on Debian GNU/Linux. You will find additional information about creating a LiveCD in the Handbook.
usage command displays a summary of available commands with
a short description:
# tazlito usage
stats displays the configuration variables, the paths to the
various files and directories, and information on the ISO image:
# tazlito stats
gen-config command allows you to generate a configuration
file ready to be edited. By default the file is created in the current
directory, but can be in another directory if specified via the command line:
# tazlito gen-config # tazlito gen-config /path/to/distro
This command configures the system configuration file or one found in the current directory:
# tazlito configure
gen-iso command can generate a new LiveCD image following
modifications and additions to the root filesystem of the CD-ROM. To function,
this command needs a directory containing the distro-tree of the Live system.
This tree can easily be built with the
extract-distro command, modified and
# tazlito gen-iso
gen-initiso command will do the same work as
gen-iso, but it rebuilds the initramfs compressed system prior.
The initramfs contains the root filesystem and must be rebuilt if modified:
# tazlito gen-initiso
list-flavors command downloads (if necessary) and displays
a list of the different flavors available. You can force the download with the
# tazlito list-flavors # tazlito list-flavors --recharge
get-flavor command downloads (if necessary) and prepares the
gen-distro to generate
# tazlito get-flavor particular-flavor
show-flavor command displays the description of the flavor
and its size after regeneration. The options
--noheader reduce the output displayed:
# tazlito show-flavor particular-flavor # tazlito show-flavor particular-flavor --brief # tazlito show-flavor particular-flavor --brief --noheader
gen-flavor command creates a description file of a new
flavor from the results of generating a distro
gen-distro). The .flavor file
can then be sent to slitaz.org:
# tazlito gen-flavor new-flavor
gen-liveflavor command creates a description file of a new
flavor from the results of generating a distro based on the current system. The
--help option provides more information:
# tazlito gen-liveflavor # tazlito gen-liveflavor --help
upgrade-flavor command refreshes a flavor file by updating
the list of packages with the latest versions available:
# tazlito upgrade-flavor this-flavor
extract-flavor command converts a flavor into an easily
modifiable tree structure in /home/slitaz/VERSION/flavors which can be
managed with mercurial:
example on cooking you will have the work directory in
# tazlito extract-flavor this-flavor
pack-flavor command converts a tree structure in
/home/slitaz/VERSION/flavors into a flavor file (.flavor).
It is inverse of
# tazlito pack-flavor this-flavor
extract-distro command is used to extract an ISO image from
the LiveCD to rebuild the structure of the root CD-ROM and system. It is then
possible to make the desired changes or additions and rebuild the ISO image via
gen-initiso. Example of use:
# tazlito extract-distro slitaz-cooking.iso
The Generate Distribution command can generate the distro-tree and
an ISO image via a list of packages. To function, this command needs a list of
packages, a directory containing all the (.tazpkg) packages on the
list, and a directory to generate the distribution. The list of packages can be
extracted from a flavor with the
get-flavor command. If one uses the
LiveCD, the options
--iso= permit the
regeneration of packages that place files in /boot without being
obliged to download them and recovers the additional files of the LiveCD. The
path to the various directories are configured in the configuration file and
packages can be downloaded from the SliTaz mirrors or generated by Cookutils.
To generate a distribution:
# tazlito gen-distro # tazlito gen-distro --cdrom # tazlito gen-distro --iso=slitaz.iso # tazlito gen-distro package-list
Removes all files generated or extracts of the structure of the LiveCD:
# tazlito clean-distro
This command simply verifies if files installed by the packages are present on the system:
# tazlito check-distro
This command will write the current filesystem to a cpio archive (rootfs.gz) and then generate a bootable ISO image. Writeiso can be used in a HD install or in live mode and will also archive your current /home directory. This command lets you easily remaster and build your own LiveCD image, just boot, modify any files, and then:
# tazlito writeiso [gzip|lzma|none] # tazlito writeiso gzip # tazlito writeiso gzip image-name
Checks if the distro-packages.list is updated with the latest package versions:
# tazlito check-list
Recompresses the rootfs with the best possible compression:
# tazlito repack slitaz.iso
Combines several flavors like nested Russian dolls. Each rootfs is a subset of the previous. The first rootfs is extracted from the ISO image used in the third argument. The flavor will then be chosen to launch at startup according to the amount of RAM available:
# tazlito merge 160M slitaz-core.iso 96M rootfs-justx.gz 32M rootfs-base.gz
Creates an ISO image flavor for low RAM systems from a SliTaz ISO image. You can build a flavor with / always in RAM or where / resides on the CD-ROM:
# tazlito build-loram slitaz.iso loram.iso # tazlito build-loram slitaz.iso loram-cdrom.iso cdrom
emu-iso command uses the Qemu emulator to start and run
SliTaz. Qemu is used to test the newly built ISO image without burning to a
CD-ROM or booting into frugal mode:
# tazlito emu-iso # tazlito emu-iso path/to/image.iso
burn-iso will guess the CD-ROM device and its speed, and wodim
(part of cdrkit) will begin to burn an ISO image. The default ISO image is the
one located in the current configuration file, but it's possible to specify
a different image via the command line:
# tazlito burn-iso # tazlito burn-iso slitaz-hacked.iso
A .flavor file contains just a few KB of information needed to (re)manufacture a custom LiveCD of SliTaz.
Manufacture a flavor
You can choose the flavor to (re)manufacture from among those available:
# tazlito list-flavors List of flavors ================================================================================ Name ISO Rootfs Description ================================================================================ base 6.9M 13.1M Minimal set of packages to boot core-3in1 31.5M 105.6M SliTaz core system with justX and base alternatives core 31.5M 104.6M SliTaz core system eeepc 31.2M 105.4M SliTaz eeepc system justX 16.1M 51.2M SliTaz with a minimal X environment
We will start by remanufacturing the eeepc flavor which uses 105.4M of RAM and has a CD-ROM size of 31.2M:
# tazlito clean-distro # tazlito get-flavor eeepc # tazlito gen-distro
Create a flavor
To create a flavor, you must:
- Either create an ISO image with
tazlito gen-distroand then create a flavor file with
- Either directly create the tree structure that defines the flavor
tazlito extract-flavor) and then create the flavor with
- Either use the online builder
Post a flavor
Because a .flavor file contains just a few KB, it can be easily sent via the mailing list.
This tree includes:
- A receipt file describing the flavor thanks to the variables:
- FLAVOR: The flavor name.
- SHORT_DESC: Short description.
- VERSION: Free format.
- MAINTAINER: Email address of maintainer.
- FRUGAL_RAM: Minimum RAM required (optional).
- ROOTFS_SIZE: Size of rootfs.gz decompressed into RAM (optional).
- INITRAMFS_SIZE: Size of rootfs.gz on the CD-ROM (optional).
- ISO_SIZE: Size of CD-ROM (optional).
- ROOTFS_SELECTION: Optional, see Meta flavor below.
- The file packages.list containing the list of packages without specifying the version (tazlito uses the latest available). This file is missing if ROOTFS_SELECTION exists in the receipt.
- The optional mirrors file containing the list of unofficial mirrors (undigest) to be added to include personal packages.
- The optional directory rootfs containing the tree to add to the root filesystem rootfs.gz (configuration files usually).
- The optional directory rootcd containing the tree to add to the root of the CD-ROM.
Adapt a flavor
It is often easier to modify an existing flavor than to create one from scratch. To adapt the eeepc flavor for example:
# tazpkg get-install mercurial # cd /home/slitaz # hg clone http://hg.slitaz.org/flavors # cd flavors # cp -a eeepc myslitaz
Files in myslitaz can then be changed, and:
# tazlito pack-flavor myslitaz
Will simply create the new flavor.
Tip: you can skip mercurial installation by extracting a flavor. Using the previous example:
# tazlito get-flavor eeepc # tazlito extract-flavor eeepc.flavor # cd /home/slitaz/flavors # cp -a eeepc myslitaz
A meta flavor contains several flavors like nested Russian dolls. The flavor will be launched at startup according to the amount of RAM available. The ROOTFS_SELECTION variable defines the minimum RAM and corresponding flavor parameters, example:
ROOTFS_SELECTION="160M core 96M justX 32M base"
A meta flavor doesn't contain a list of packages (packages.list). SliTaz kernels prior to 2.6.30 do not support meta flavors.
Christophe Lincoln <pankso at slitaz.org>
Pascal Bellard <pascal.bellard at slitaz.org>