website view pt/doc/scratchbook/base-system.html @ rev 551

Fix c6b2d9c4e031, pt: localy browseable (with file://)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Oct 26 10:30:55 2009 +0100 (2009-10-26)
parents c6b2d9c4e031
children
line source
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>SliTaz Scratchbook - Base System</title>
6 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
7 <meta name="description" content="" />
8 <meta name="expires" content="never" />
9 <meta name="modified" content="2008-11-22 17:00:00" />
10 <meta name="publisher" content="www.slitaz.org" />
11 <meta name="author" content="Christophe Lincoln"/>
12 <link rel="shortcut icon" href="favicon.ico" />
13 <link rel="stylesheet" type="text/css" href="book.css" />
14 </head>
15 <body bgcolor="#ffffff">
17 <!-- Header and quick navigation -->
18 <div id="header">
19 <div align="right" id="quicknav">
20 <a name="top"></a>
21 <a href="index.html">Table of contents</a> |
22 <a href="base-apps.html">Base apps</a>
23 </div>
24 <h1><font color="#3E1220">SliTaz Scratchbook</font></h1>
25 </div>
27 <!-- Content. -->
28 <div id="content">
29 <div class="content-right"></div>
32 <h2><font color="#df8f06">Base System</font></h2>
33 <p>
34 Build a SliTaz GNU/Linux distro running in RAM and using BusyBox.
35 </p>
36 <ul>
37 <li><a href="base-system.html#about">About.</a></li>
38 <li><a href="base-system.html#src">Wget src.</a></li>
39 <li><a href="base-system.html#prepa">Unpack and prepare the Linux kernel.</a></li>
40 <li><a href="base-system.html#rootfs">Creation of the Root System</a>, the root
41 file System (rootfs).</li>
42 <li><a href="base-system.html#config">Configure the box.</a></li>
43 <li><a href="base-system.html#initramfs">Generate the initramfs</a>, compressed cpio archive.</li>
44 <li><a href="base-system.html#rootcd">Construction of the root of the cdrom</a> (rootcd), and the
45 configuration files of Syslinux.</li>
46 <li><a href="base-system.html#mkiso">Create an ISO image with genisoimage or mkisofs.</a></li>
47 <li><a href="base-system.html#testiso">Burn or test the ISO with Qemu.</a></li>
48 </ul>
49 <a name="about"></a>
50 <h3><font color="#6c0023">About</font></h3>
51 <p>
52 This document describes the construction of the SliTaz base system and why we use a
53 Linux Kernel, BusyBox and Syslinux to boot the system. SliTaz uses an initramfs
54 archive unpacked in RAM by the kernel at boot. We will create a box to hold a
55 root of 3 to 4MB and use strip on the libraries and binaries to save space.
56 </p>
57 <p>
58 The scripts and configuration files are created with GNU nano, using the keystroke
59 &lt;ctrl+x&gt; to save and exit. But of course you are free to replace with your own text editor.
60 </p>
61 <p>
62 This document is based on a howto found in the archive of BusyBox, which is itself based on
63 a paper presented by Erik Anderson in the Embedded Systems Conference in 2001.
64 </p>
65 <a name="src"></a>
66 <h3><font color="#6c0023">Wget src</font></h3>
67 <p>
68 Create a src directory for downloading and compiling:
69 </p>
70 <pre> # mkdir -p src
71 # cd src
72 </pre>
73 <ul>
74 <li>Linux Kernel 2.6.20
75 (<a href="http://www.kernel.org/">http://www.kernel.org/</a>).
76 <pre># wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.tar.bz2</pre>
77 </li>
78 <li>Busybox 1.2.2
79 (<a href="http://www.busybox.net/">http://www.busybox.net/</a>).
80 <pre># wget http://www.busybox.net/downloads/busybox-1.2.2.tar.bz2</pre>
81 </li>
82 <li>Syslinux 3.35
83 (<a href="http://syslinux.zytor.com/">http://syslinux.zytor.com/</a>).
84 <pre># wget ftp://ftp.kernel.org/pub/linux/boot/syslinux/syslinux-3.35.tar.gz</pre>
85 </li>
86 <li>SliTaz tools 1.1. Download SliTaz tools, unpack, save the file in src/ and that's it:
87 <pre> # wget http://download.tuxfamily.org/slitaz/sources/tools/slitaz-tools-1.1.tar.gz
88 # tar xzf slitaz-tools-1.1.tar.gz</pre>
89 </li>
90 </ul>
91 <a name="prepa"></a>
92 <h3><font color="#6c0023">Unpack and prepare the Linux Kernel</font></h3>
93 <p>
94 We will begin by compiling a Linux kernel, which may take a little time.
95 </p>
96 <h4>Linux Kernel</h4>
97 <p>
98 Your kernel must support the intramfs filesystem, otherwise the cdrom will not start. You can
99 also install the modules in a directory so as not to touch the host system. The configuration
100 of the Linux kernel sources is done by <code>make menuconfig</code> using ncurses or graphically
101 with <code>make gconfig</code> or <code>make xconfig</code> using GTK development packages and/or
102 QT respectively. You can find in <a href="http://www.slitaz.org/en/doc/cookbook/slitaz-tools.html">SliTaz tools</a>,
103 Makefiles for the various 2.6.xx kernels.
104 </p>
105 <p>
106 A feature of the 2.6 kernels is that if we make menuconfig, xconfig or config for the first time,
107 the setup menu is displayed based on the configuration of our current kernel.
108 </p>
109 <p>
110 The options depend on your needs, you can install module-init-tools to support compressed modules
111 or for a minimal install, you can select only the vital options.
112 </p>
113 <p>
114 We start by changing into the sources, <code>make mrproper</code> to put things in order, then we start a
115 configuration interface: gconfig, xconfig, menuconfig or oldconfig:
116 </p>
117 <pre> # tar xjf linux-2.6.20.tar.bz2
118 # cd linux-2.6.20
119 # make mrproper
120 # cp ../slitaz-tools-1.1/Makefiles/linux-2.6.20-slitaz.config .config
121 # make oldconfig
122 (# make menuconfig)
123 # make bzImage
124 # make modules
125 # make INSTALL_MOD_PATH=$PWD/_pkg modules_install
126 # cd ..
127 </pre>
128 <p>
129 If you want more info on compiling kernels, there are many textbooks. Note that you can install the
130 kernel and after rebooting, you can compile your own kernel following the same instructions.
131 </p>
132 <a name="rootfs"></a>
133 <h3><font color="#6c0023">Creation of the root system (rootfs)</font></h3>
134 <p>
135 The next step will create a file named 'rootfs' - Root File System, in the working directory SliTaz/:
136 </p>
137 <pre> # mkdir ../rootfs
138 </pre>
139 <h4>Install BusyBox</h4>
140 <p>
141 BusyBox (<a href="http://www.busybox.net/">www.busybox.net</a>) is a single executable offering
142 versions of the main tools necessary to use a Linux kernel. It is (mainly) intended to be used
143 embedded and can do almost anything. As well as proposing (coreutils) shell commands and a daemons
144 system, it also provides a websever and client/server (DHCP, udhcpc).
145 </p>
146 <pre> # tar xjf busybox-1.2.2.tar.bz2
147 </pre>
148 <p>
149 Configure and compile, remembering the dumpkmap options, init, etc - you can find help in the Makefile in
150 SliTaz Busybox tools. Make install creates a _install directory in the current directory:
151 </p>
152 <pre> # cd busybox-1.2.2
153 # cp ../slitaz-tools-1.1/Makefiles/busybox-1.2.2.config .config
154 # make oldconfig
155 (# make menuconfig)
156 # make
157 # make install
158 # chmod 4755 _install/bin/busybox
159 </pre>
160 <p>
161 Copy files compiled by BusyBox in the directory _install to the root file system (rootfs):
162 </p>
163 <pre> # cp -a _install/* ../../rootfs
164 </pre>
165 <p>
166 The linuxrc link pointing to /bin/busybox, folders /bin, /lib and /sbin were added to the directory
167 /rootfs - you can check this. It may be that the link isn't there if you didn't select the option
168 initrd support in Busybox. We'll delete the linuxrc link and create a link for init that points to
169 /bin/busybox:
170 </p>
171 <pre> # cd ../../rootfs
172 # ls -CF
173 bin/ linuxrc@ sbin/ usr/
175 # rm linuxrc
176 # ln -s bin/busybox init
177 </pre>
178 <h4>ldd on BusyBox</h4>
179 <p>
180 The ldd command can show any libraries used by a program. Libraries used by Busybox may differ
181 depending on the host system. On Debian for example, copying the libraries in /lib/tls. The following
182 commands are given using 'v' for verbose mode. To eliminate the symbols of executable binaries
183 and shared libraries we can utilize strip. Note you may also use the mklibs or uClibc libraries.
184 </p>
185 <pre> # mkdir lib
186 </pre>
187 <p>
188 SliTaz or another:
189 </p>
190 <pre> # cp /lib/{libcrypt.so.1,libm.so.6,libc.so.6} lib
191 # cp /lib/ld-linux.so.2 lib
192 </pre>
193 <p>
194 Example on Debian Etch:
195 </p>
196 <pre> # cp /lib/tls/{libcrypt.so.1,libm.so.6,libc.so.6} lib
197 # cp /lib/ld-linux.so.2 lib
198 </pre>
199 <p>
200 Cleanup libraries with strip:
201 </p>
202 <pre> # strip -v lib/*
203 </pre>
204 <h4>Linux tree and configuration</h4>
205 <p>
206 Make some directories for a classic Linux branch SliTaz installation. /dev for devices, /etc, /home,
207 /usr, /proc, /root and co. To learn more about the hierarchy of a file system and its contents,
208 there is a File System Hierarchy Standard available in various formats at
209 <a href="http://www.pathname.com/fhs/">www.pathname.com/fhs/</a>.
210 </p>
211 <p>
212 You are free to create your own directory tree. In traditional Unix systems, /usr usually contains
213 files from the distribution, /dev contains devices (devices), /etc contains configuration files,
214 /lib libraries, /home for home users and /var for variable data. Note that we do not create
215 /lib, /bin or /sbin - these are created when BusyBox is installed.
216 </p>
217 <pre> # mkdir -p dev etc root home proc media mnt sys tmp var
218 # mkdir -p usr/{lib,local,games,share} \
219 var/{cache,lib,lock,log,games,run,spool} \
220 media/{cdrom,flash,usbdisk}
221 </pre>
222 <p>
223 Change permissions on the /tmp directory:
224 </p>
225 <pre> # chmod 1777 tmp
226 </pre>
227 <p>
228 Setting up glibc - note /etc/ld.so.conf and /etc/rpc are not essential for a micro system:
229 </p>
230 <pre> # touch etc/ld.so.conf
231 # cp /etc/rpc etc
232 </pre>
233 <h4>Create the devices in /dev</h4>
234 <p>
235 This can be done with the script 'mkdevs.sh' found in BusyBox, or with our script 'mktazdevs.sh' in
236 SliTaz tools. If you want more details, read the scripts. If you use the BusyBox version, we must
237 still create the pts directory:
238 </p>
239 <pre> # cp ../src/slitaz-tools-1.1/utils/mktazdevs.sh bin
240 # ./bin/mktazdevs.sh dev
241 or:
242 # cp ../src/busybox-1.2.2/examples/bootfloppy/mkdevs.sh bin
243 # ./bin/mkdevs.sh dev
244 # mkdir -p dev/{pts,input,shm,net,usb}
245 </pre>
246 <p>
247 Note that we start mdev-s with the rcS script to create devices dynamically at boot.
248 </p>
249 <h4>Support for the resolution of hostnames (DNS)</h4>
250 <p>
251 Copy the libraries libnss_* of the host system into our SliTaz system. These libraries are used for
252 name resolution and are cleaned with strip:
253 </p>
254 <pre> # cp /lib/{libnss_dns.so.2,libnss_files.so.2} lib
255 # cp /lib/libresolv.so.2 lib
256 # strip -v lib/*.so*
257 </pre>
258 <a name="config"></a>
259 <h3><font color="#6c0023">Configuration of your box</font></h3>
260 <p>
261 Create the necessary files in /etc. For more info, just look at the contents of the files.
262 We start by creating some files relevant to the core operating system.
263 </p>
264 <h4>Network</h4>
265 <p>
266 Create basic files used to configure the network:
267 </p>
268 <pre> # echo "127.0.0.1 localhost" &gt; etc/hosts
269 # echo "localnet 127.0.0.1" &gt; etc/networks
270 # echo "slitaz" &gt; etc/hostname
271 # echo "order hosts,bind" &gt; etc/host.conf
272 # echo "multi on" &gt;&gt; etc/host.conf
273 </pre>
274 <h4>/etc/nsswitch.conf</h4>
275 <p>
276 Configuration files used to resolve names:
277 </p>
278 <pre> # nano etc/nsswitch.conf
279 </pre>
280 <pre class="script"># /etc/nsswitch.conf: GNU Name Service Switch config.
281 #
283 passwd: files
284 group: files
285 shadow: files
287 hosts: files dns
288 networks: files
290 </pre>
291 <h4>/etc/securetty</h4>
292 <p>
293 /etc/securetty lists terminals that can connect to root:
294 </p>
295 <pre> # nano etc/securetty
296 </pre>
297 <pre class="script"># /etc/securetty: List of terminals on which root is allowed to login.
298 #
299 console
301 # For people with serial port consoles
302 ttyS0
304 # Standard consoles
305 tty1
306 tty2
307 tty3
308 tty4
309 tty5
310 tty6
311 tty7
313 </pre>
314 <h4>/etc/shells</h4>
315 <p>
316 /etc/shells, a shells list of valid connections. This file is used by the SSH server (Dropbear):
317 </p>
318 <pre> # nano etc/shells
319 </pre>
320 <pre class="script"># /etc/shells: valid login shells.
321 /bin/sh
322 /bin/ash
323 /bin/hush
325 </pre>
326 <h4>/etc/issue and /etc/motd</h4>
327 <p>
328 /etc/issue is displayed at the end of boot and the message of the day is displayed after logging in:
329 </p>
330 <pre> # echo "SliTaz GNU/Linux 1.0 Kernel \r \l" &gt; etc/issue
331 # echo "" &gt;&gt; etc/issue
332 # nano etc/motd
333 </pre>
334 <pre class="script">
335 (°- { Get documentation in: /usr/share/doc.
336 //\ Use: 'less' or 'more' to read files, 'su' to be root. }
337 v_/_
339 SliTaz is distributed in the hope that it will be useful, but
340 with ABSOLUTELY NO WARRANTY.
342 </pre>
343 <h4>/etc/busybox.conf</h4>
344 <p>
345 The configuration file for BusyBox, it can set duties on BusyBox applications. For more information, you can read the
346 <a href="http://www.slitaz.org/en/doc/handbook/security.html">security</a> page in the Handbook. BusyBox.conf file:
348 </p>
349 <pre> # nano etc/busybox.conf
350 </pre>
351 <pre class="script"># /etc/busybox.conf: SliTaz GNU/linux Busybox configuration.
352 #
354 [SUID]
355 # Allow command to be run by anyone.
356 su = ssx root.root
357 passwd = ssx root.root
358 loadkmap = ssx root.root
359 mount = ssx root.root
360 reboot = ssx root.root
361 halt = ssx root.root
363 </pre>
364 <p>
365 For added security, change the permissions on the file:
366 </p>
367 <pre> # chmod 600 etc/busybox.conf
368 </pre>
369 <h4>/etc/inittab</h4>
370 <p>
371 Minimal configuration file for init. It helps to have a root console without having to
372 go through the login and a console on tty2.
373 </p>
374 <pre> # nano etc/inittab
375 </pre>
376 <pre class="script"># /etc/inittab: init configuration for SliTaz GNU/Linux.
378 ::sysinit:/etc/init.d/rcS
379 ::respawn:-/bin/sh
380 tty2::askfirst:-/bin/sh
381 ::ctrlaltdel:/bin/umount -a -r
382 ::ctrlaltdel:/sbin/reboot
384 </pre>
385 <p>
386 You will also find a wider example of an inittab file in the archive of BusyBox.
387 </p>
388 <h4>/etc/profile</h4>
389 <p>
390 This file is read at each login and affects all users. We must use the ./profile
391 config file for each individual user:
392 </p>
393 <pre> # nano etc/profile
394 </pre>
395 <pre class="script"># /etc/profile: system-wide .profile file for the Bourne shells
397 PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
398 LD_LIBRARY_PATH="/usr/lib:/lib"
400 if [ "`id -u`" -eq 0 ]; then
401 PS1='\e[1m\u@\h:\w\#\e[m '
402 else
403 PS1='\e[1m\u@\h:\w\$\e[m '
404 fi
406 DISPLAY=:0.0
408 export PATH LD_LIBRARY_PATH PS1 DISPLAY ignoreeof
409 umask 022
411 </pre>
412 <h4>Users, groups and passwords</h4>
413 <p>
414 Create configuration files of users, groups and passwords in /etc/ {passwd, shadow, group, gshadow}, and adjust permissions:
415 </p>
416 <pre> # echo "root:x:0:0:root:/root:/bin/sh" &gt; etc/passwd
417 # echo "root::13525:0:99999:7:::" &gt; etc/shadow
418 # echo "root:x:0:" &gt; etc/group
419 # echo "root:*::" &gt; etc/gshadow
420 # chmod 640 etc/shadow
421 # chmod 640 etc/gshadow
422 </pre>
423 <p>
424 You can add other users, like hacker is used by the LiveCD mode. You can also configure a password for the root user
425 with the <code>passwd</code> command. To add an existing user to an existing group, you must edit /etc/group and /etc/gshadow because
426 the applet <code>adduser</code> provided by BusyBox doesn't offer all of the options provided by the original program.
427 </p>
428 <h4>/etc/fstab or /etc/mtab</h4>
429 <p>
430 List filesystems to be mounted:
431 </p>
432 <pre> # nano etc/fstab
433 </pre>
434 <pre class="script"># /etc/fstab: information about static file system.
435 #
436 proc /proc proc defaults 0 0
437 sysfs /sys sysfs defaults 0 0
438 devpts /dev/pts devpts defaults 0 0
439 tmpfs /dev/shm tmpfs defaults 0 0
441 </pre>
442 <p>
443 /etc/mtab is used by other mkfs*, for listing the mounted partitions. It needs /proc because there is a link on /proc/mounts:
444 </p>
445 <pre> # chroot . /bin/ash
446 /# ln -s /proc/mounts /etc/mtab
447 </pre>
448 <h4>Keyboard</h4>
449 <p>
450 You can create a kmap file specific to your keyboard with the dumpkmap command provided by BusyBox.
451 You can find some kmap files in SliTaz tools. To create a fr_CH kmap file:
452 </p>
453 <pre> /# mkdir /usr/share/kmap
454 /# /bin/busybox dumpkmap &gt; /usr/share/kmap/fr_CH.kmap
455 /# exit
456 </pre>
457 <p>
458 Once this is done, you can automatically load your keyboard with loadkmap in a /etc/init.d/rcS script:
459 </p>
460 <h4>/usr/share/doc</h4>
461 <p>
462 You can also add various documents, such as a SliTaz user manual, which you can download as a tar.gz from the website:
463 </p>
464 <pre> # mkdir -p usr/share/doc
465 </pre>
466 <h4>Installing the udhcpc script</h4>
467 <p>
468 Udhcpc DHCP client supplied by Busybox is fast and stable, but is developed independently.
469 Web site: <a href="http://udhcp.busybox.net/">http://udhcp.busybox.net/</a>. You can use the default
470 script found in the archive of BusyBox. This script goes into /usr/share/udhcpc/default.script,
471 but this can be changed via the command line. On SliTaz, the client is started at boot by the script
472 /etc/init.d/network.sh via the configuration file /etc/network.conf:
473 </p>
474 <pre> # mkdir usr/share/udhcpc
475 # cp ../src/busybox-1.2.2/examples/udhcp/simple.script \
476 usr/share/udhcpc/default.script
477 # chmod +x usr/share/udhcpc/default.script
478 </pre>
479 <h4>/etc/init.d/rcS</h4>
480 <p>
481 To finish off this draft, you must create the init script /etc/init.d/rcS to mount the filesystems
482 and run some commands. For more information, you can look at the
483 <a href="http://www.slitaz.org/en/doc/cookbook/boot-scripts.html">boot scripts</a> page.
484 You can change the value of the variable KMAP= for the keyboard:
485 </p>
486 <pre> # mkdir etc/init.d
487 # nano etc/init.d/rcS
488 </pre>
489 <pre class="script">#! /bin/sh
490 # /etc/init.d/rcS: rcS initial script.
491 #
493 KMAP=fr_CH
495 echo "Processing /etc/init.d/rcS... "
497 /bin/mount proc
498 /bin/mount -a
499 /bin/hostname -F /etc/hostname
500 /sbin/ifconfig lo 127.0.0.1 up
501 /sbin/loadkmap &lt; /usr/share/kmap/$KMAP.kmap
504 </pre>
505 <pre> # chmod +x etc/init.d/rcS
506 </pre>
507 <h4>Note</h4>
508 <p>
509 Note that you can still install the tazpkg package manager (10 kb) that we created,
510 you will find information to install in the source tarball. You can also install various
511 files from SliTaz tools, such as the licence.
512 </p>
514 <a name="initramfs"></a>
515 <h3><font color="#6c0023">Build an initramfs cpio archive</font></h3>
516 <p>
517 The initramfs is a <code>cpio</code> archive generated from the root of the system,
518 it is decompressed in RAM by the Linux kernel at boot to create the filesystem (also in RAM).
519 To generate an initramfs archive, using the root directory of system files (rootfs), we
520 facilitate a search with <code>find</code> and add some pipes <code>|</code>.
521 Then we create a cpio archive using <code>gzip</code> which we put in the working directory.
522 </p>
523 <p>
524 The SliTaz initramfs <strong>rootfs.gz</strong> is the root system, but with a <code>.gz</code>
525 extension. If you want to change the name, you need to edit the configuration file for
526 isolinux: isolinux.cfg or the menu.lst for GRUB.
527 </p>
528 <p>
529 Generation of the initramfs:
530 </p>
531 <pre> # find . -print | cpio -o -H newc | gzip -9 &gt; ../rootfs.gz
532 </pre>
533 <p>
534 You should have a file rootfs.gz about 1 to 2MB in the working directory SliTaz/.
535 </p>
536 <p>
537 For a new image, when making changes in rootfs, simply copy the new rootfs.gz archive to rootcd/boot
538 and create a new image with <code>genisoimage</code> or <code>mkisofs</code>. For this you can also
539 use <strong>mktaziso</strong> within SliTaz tools. This script will check if the directories are present,
540 create a new compressed cpio archive and generate a new bootable ISO image.
541 </p>
542 <a name="rootcd"></a>
543 <h3><font color="#6c0023">Make rootcd files</font></h3>
544 <p>
545 The following steps will help you create the root of the bootable CD-ROM. We begin by creating the rootcd,
546 boot and isolinux directories for the cd-rom files:
547 </p>
548 <pre> # cd ..
549 # mkdir -p rootcd/boot/isolinux
550 </pre>
551 <p>
552 Optionally, you can create some other directories in which to place various data, such as HTML documents or packages.
553 </p>
554 <a name="linux"></a>
555 <h4>Copy the kernel</h4>
556 <p>
557 Just copy the kernel previously compiled to rootcd/boot:
558 </p>
559 <pre> # cp src/linux-2.6.20/arch/i386/boot/bzImage rootcd/boot
560 </pre>
561 <h4>Copy the initramfs into rootcd/boot</h4>
562 <p>
563 Copy the rootfs.gz to rootcd/boot. We must not forget to generate a new initramfs archive for any changes
564 made to the rootfs (root file system):
565 </p>
566 <pre> # cp rootfs.gz rootcd/boot
567 </pre>
568 <h4>Install the isolinux bootloader</h4>
569 <p>
570 The bootloader isolinux - simply copy the isolinux.bin from the source archive of Syslinux:
571 </p>
572 <pre> # cd src
573 # tar xzf syslinux-3.35.tar.gz
574 # cp syslinux-3.35/isolinux.bin ../rootcd/boot/isolinux
575 # cd ..
576 </pre>
577 <h4>isolinux.cfg - Configure isolinux</h4>
578 <p>
579 Here is an example of an isolinux.cfg file that should work well. You can change it if you wish:
580 </p>
581 <pre> # nano rootcd/boot/isolinux/isolinux.cfg
582 </pre>
583 <pre class="script">display display.txt
584 default slitaz
585 label slitaz
586 kernel /boot/bzImage
587 append initrd=/boot/rootfs.gz rw root=/dev/null vga=788
588 implicit 0
589 prompt 1
590 timeout 80
592 </pre>
593 <p>
594 Here are some changes that you might like to make in isolinux.cfg:
595 </p>
596 <ul>
597 <li>The timeout value is the number of seconds to wait before booting
598 You can make it 0 or delete the line to start instantly, or choose to wait as long as 10s.</li>
599 <li>prompt can be set to 0 to disable the 'boot:' prompt.</li>
600 <li>You can add more lines to view the contents of several text files when the user presses F1, F2, F3, etc.</li>
601 </ul>
602 <h4>display.txt</h4>
603 <p>
604 A small welcome note, powered by isolinux, you can modify this file if you wish:
605 </p>
606 <pre> # nano rootcd/boot/isolinux/display.txt
607 </pre>
608 <pre class="script">/* _\|/_
609 (o o)
610 +----oOO-{_}-OOo---------------------------------------------------+
611 ____ _ _ _____
612 / ___|| (_)_ _|_ _ ____
613 \___ \| | | | |/ _` |_ /
614 ___) | | | | | (_| |/ /
615 |____/|_|_| |_|\__,_/___|
617 SliTaz GNU/Linux - Temporary Autonomous Zone
619 &lt;ENTER&gt; to boot.
621 */
622 </pre>
623 <a name="mkiso"></a>
624 <h3><font color="#6c0023">Create an ISO image with genisoimage or mkisofs</font></h3>
625 <pre> # genisoimage -R -o slitaz-cooking.iso -b boot/isolinux/isolinux.bin \
626 -c boot/isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
627 -V "SliTaz" -input-charset iso8859-1 -boot-info-table rootcd
628 </pre>
629 <p>
630 For each change in the root of the box, you must create a new ISO image.
631 </p>
632 <p>
633 You can create a small script that will generate a new compressed cpio archive and a new image,
634 or use mktaziso within SliTaz tools. Note that you can also use GRUB to boot the box.
635 </p>
636 <a name="testiso"></a>
637 <h3><font color="#6c0023">Burn or test ISO image with Qemu</font></h3>
638 <p>
639 You can burn the ISO image with Graveman, k3b or wodim and boot it. Simple burning command using wodim (also valid for cdrecord), with a 2.6.XX. kernel:
640 </p>
641 <pre># wodim -v -speed=24 -data slitaz-cooking.iso
642 </pre>
643 <h4>Qemu</h4>
644 <p>
645 Note that you can test the ISO image with the software emulator Qemu (On Debian # aptitude install qemu).
646 To emulate the newly created ISO image, simply type:
647 </p>
648 <pre># qemu -cdrom slitaz-cooking.iso
649 </pre>
650 <h4>Following chapter</h4>
651 <p>
652 The next chapter <a href="base-apps.html">Base applications</a> provides all the instructions to install
653 and configure the basic applications and libraries.
654 </p>
656 <!-- End of content -->
657 </div>
659 <!-- Footer. -->
660 <div id="footer">
661 <div class="footer-right"></div>
662 <a href="base-system.html#top">Top of the page</a> |
663 <a href="index.html">Table of contents</a>
664 </div>
666 <div id="copy">
667 Copyright &copy; 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
668 <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
669 Documentation is under
670 <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
671 and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
672 </div>
674 </body>
675 </html>