slitaz-doc-wiki-data view pages/en/handbook/genlivecd.txt @ rev 7

Add pages/en folder.
author Christopher Rogers <slaxemulator@gmail.com>
date Sat Feb 26 12:17:18 2011 +0000 (2011-02-26)
parents
children
line source
1 ====== Generating a Customised LiveCD ======
3 //Tazlito// can create your own, personalised SliTaz LiveCD in very little time. You can choose precisely the software packages that you want and the support of flavors permits you to generate a customized LiveCD amended by a list of packages or flavors created by the SliTaz community. Tazlito is a command line tool that is not too demanding, you can have your own ISO image in two commands or burned in one.
5 \\
7 === Overview ===
9 Tazlito automates the process of building a LiveCD, although the method is quite straight-forward:
11 - download a template (flavor) to work on
12 - customise its packages
13 * //optional: include additional files, added after the packages//
14 - compress the generated pseudo-file-system
15 - create an ISO image
17 \\
19 === Notes ===
21 * Creating a LiveCD requires a minimum of 256MB of RAM.
22 * Compressing the file-system with LZMA may take some time. GZip can also be used, though its compression ratio is not as effective.
23 * It's possible to create a distribution from the LiveCD or from an installed system. In LiveCD mode, it's advisable to use persistent media or an USB drive to store generated files and save space in RAM.
25 * Tazlito is used by developers to generate the official LiveCD. The only prerequisite is to have Tazlito installed. It is installed by default on SliTaz, but you can generate from another LiveCD distribution if they have the necessary packages (they can be downloaded if not). See the [[#installing-tazlito-on-another-distribution|instructions]] at the bottom of the page for more details.
27 \\
29 ===== A LiveCD in Two Commands =====
31 A good way of becoming familiar with Tazlito is to re-build the LiveCD. To do this, download the default //core// flavor (a //.flavor// file that contains all the necessary information to create a LiveCD) and build it with the default options. This takes only two commands and will demonstrate the process:
32 \\
34 * Get the default (//core//) flavor:
36 # tazlito get-flavor core
38 * //Optional: Amend the list of packages or add additional files.//
40 * Create the LiveCD:
42 # tazlito gen-distro
44 \\
46 That's it! You will find the LiveCD ISO image in ///home/slitaz/distro//.
48 \\
50 ===== Part I: Downloading a Flavor =====
52 Flavors can be used to build various styles of LiveCDs by containing the list of packages (//distro-packages.list//) and sometimes additional files. This saves you the effort of saving the configuration files and provides a quick way of switching between them. of A list of flavors available on the SliTaz servers can be downloaded and updated with Tazlito:
54 # tazlito list-flavors
55 Or :
56 # tazlito list-flavors --recharge
58 \\
60 The list of flavors will be automatically displayed, showing the size of the LiveCD and a brief description. To use a flavor, use the get-flavor command to download the flavor file, automatically extract the package list and description in the current directory, and put additional files in the ///home/slitaz/distro/addfiles// directory:
62 # tazlito get-flavor name
64 \\
66 The description of the flavor can be displayed with the //show-flavor// command. Once your chosen flavor is downloaded, you can start to customise your distribution!
68 <note tip>To store flavors, we suggest that you use a specific directory such as ///home/slitaz/flavors//. You can create this yourself and proceed inside:
70 # mkdir -p /home/slitaz/flavors
71 # cd /home/slitaz/flavors
72 </note>
75 \\
77 ===== Part II: Generating the Distribution =====
79 <note important>When generating a distro, there are some essential //base-system// packages that must be included. The dependency information in each package will take effect so these will be automatically included, even if they are not specified in the package list.</note>
81 For your first ISO, we advise you re-build the default LiveCD without modifying the list. When you are comfortable with the process, you can start to delete or add packages as required. The gen-distro command generates an ISO image with all the packages on the list. All dependencies will be fulfilled automatically, just as with normal package installation. It must be run as root and be in the same directory as the list and the configuration file.
83 Tazlito uses the //distro-packages.list// file to download each package and 'install' it into a pseudo-file-system. This is the distro tree and contains the whole of the LiveCD's operating system. This is not unlike //chroot//-ing in to another system from a LiveCD. It is then compressed and added to a CD ISO image with booting information.
85 To generate a LiveCD:
87 # tazlito gen-distro
89 VoilĂ ! Your first LiveCD ISO image is generated in ///home/slitaz/distro//!
91 \\
93 === Cleaning & Re-Generating ===
95 As you have generated a LiveCD, you need to clean-up so another can be generated. Removing the resulting ISO image, cleaning the generated distro tree (but not your additional files!) can be done through the //clean-distro// option:
97 # tazlito clean-distro
99 \\
101 You can now customise your LiveCD further. To start, add one or two packages to the list. When you are ready, re-generate a new ISO image with the //gen-distro// command:
103 # tazlito gen-distro
105 \\
107 All the customisations applied so far should be effective on your new LiveCD ISO image.
109 <note tip> Tazlito also offers several possibilities such as burning the ISO, copying additional files into the system or directly on to the CD-ROM. See the Tazlito [[http://hg.slitaz.org/tazlito/raw-file/tip/doc/tazlito.en.html|Manual]] for more information.</note>
111 \\
113 === The 'Hacker' User ===
115 If you want to have a hacker user account, we must decompress the root file-system, add the account, then re-compress the root file-system. The first two stages can be executed as one command, the last stage another:
117 # tazlito addhacker
118 # tazlito gen-initiso
120 This adds the account only to the LiveCD; your running system will not be affected.
122 \\
124 ===== Including Additional Files =====
126 The files containing flavors usually have additional files copied directly into the file-system or the root of the CD-ROM. The path to the files used is specified in the configuration file //tazlito.conf// - by default, these files are located in ///home/slitaz/distro/addfiles//. The additional files the core flavor provides are for example: the window manager JWM and some wallpapers. It is easy enough to modify, add or delete files in the root file-system (rootfs) or the root of the CD (rootcd) and regenerate the distribution. To clean and regenerate the distribution:
128 # tazlito clean-distro
129 # tazlito gen-distro
131 \\
133 ===== Packages Used =====
135 To create your distro, you need SliTaz packages. You can easily create your own packages with Tazpkg, or recreate packages from a SliTaz system in operation with Tazlito. By default, SliTaz packages are located in the ///home/slitaz/packages// directory but you can change this in the Tazlito configuration file (see [[#configuration-file|the bottom of this page]] for more information).
137 If you want to retrieve packages manually, you can use FTP software such as gFTP (installed by default on SliTaz) or the command line and //wget//. The direct URL to package versions is: ''ftp://download.tuxfamily.org/slitaz/packages/''
139 You can also use your own packages by putting them in the packages directory. For more information on creating your own SliTaz packages, see the [[en:cookbook:start|Cookbook]].
141 \\
143 ===== Configuration File =====
145 Tazlito uses the //tazlito.conf// located in the current directory, if it exists, or defaults to the system configuration file ///etc/tazlito/tazlito.conf//. This means that you can use the default file or a configuration file specific to the distro you want to create.
147 This file specifies a number of properties:
149 * the name of the ISO image (//ISO_IMAGE//)
150 * the label used when mounted (//VOLUME_NAME//)
151 * the name of the maintainer (//PREPARED//)
153 * the paths to the working directories:
154 * where the distro tree is located (//DISTRO//)
155 * default: ///home/slitaz/distro//
156 * any packages that may be installed (//PACKAGES_REPOSITORY//)
157 * default: ///home/slitaz/packages//
158 * the files that should be added to the built LiveCD (//ADDFILES//)
159 * default: //$DISTRO/addfiles//
161 * options for running Tazlito inside QEMU (//QEMU_OPTS//)
163 * the compression algorithm used on the root file-system (//COMPRESSION//):
164 * lzma //(default)//
165 * gzip
166 * bzip2
168 To create and configure your own configuration file, you just need to run Tazlito with the //configure// command from the working directory of the distro. Assuming you have the tree of the distro in ///home/slitaz/distro// and you're working from it, use the command:
170 $ tazlito configure
172 Once you've answered the questions, you can either create the ISO image, rebuild the root file-system and ISO, or generate a new distro with the list of packages.
174 <note tip> If you generate many LiveCDs, including the //date// command in the ISO name may be beneficial. To do this, use a line such as:
175 ISO_NAME="MyLiveCD-`date +%Y%m%d-%H%M`" </note>
177 \\
179 ===== Advanced: Creating a Flavor =====
181 Tazlito allows you to easily create your own flavor from the results of generating the distribution (//gen-distro//). The flavor will contain all the additional files, a description and a list of packages (which can be reused and updated later, according to their versions). To generate your own flavor responding to one or two questions:
183 # tazlito gen-flavor new-flavor
185 Once your flavor is fully-functioning and well-tested, you can send it to SliTaz to make it available to everyone! It will then be listed via //list-flavor// and usable via //get-flavor//. You can send a flavor by several ways:
187 * announce through a post on the [[http://www.slitaz.org/en/mailing-list.html|Mailing List]];
188 * save the file on-line and report on the [[http://forum.slitaz.org/|Forum]];
189 * send an e-mail to a SliTaz contributor.
191 A contributor with sufficient privileges will then publish your flavor on the SliTaz servers.
193 \\
195 ===== Installing Tazlito on Another Distribution =====
197 Tazlito does not generate dependencies for the LiveCD, but it depends on Cdrkit to burn the image and Tazpkg to regenerate SliTaz packages you want installed. To retrieve and install Tazlito, follow the instructions in the README file in the [[http://download.tuxfamily.org/slitaz/sources/tazlito/|sources of Tazlito]].
200 ----
201 \\
202 ^ Page Review Section ^^
203 |Quality| Good |
204 |Review| Minor Updates FIXME |
205 |Priority| High |
206 |Problems| add a [[http://forum.slitaz.org|forum post link]]|
207 |::: | OR add a [[http://labs.slitaz.org/issues |lab issue tracker link ]]|
208 |How to Improve| Suggest briefly, e.g.,|
209 |::: | add more information to the Hacker user section |
210 |::: | Add new rows like this ;-) |
212 \\
213 ----