website view en/doc/scratchbook/index.html @ rev 866
pt: add contribution box
author | Claudinei Pereira <claudinei@slitaz.org> |
---|---|
date | Tue Jun 07 12:49:59 2011 -0300 (2011-06-07) |
parents | 0e0bc81a63ee |
children | c2f9d5d0f314 |
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</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">SliTaz doc</a>
22 </div>
23 <h1><font color="#3E1220">SliTaz Scratchbook</font></h1>
24 </div>
26 <!-- Content. -->
27 <div id="content">
28 <div class="content-right"></div>
31 <h2><font color="#df8f06">Scratchbook</font></h2>
32 <p>
33 Index of documents, step by step construction of a mini GNU/LINUX
34 LiveCD and installation instructions.
35 </p>
36 <h3><font color="#6c0023">Table of contents</font></h3>
37 <h4>LiveCD</h4>
38 <ul>
39 <li><a href="index.html#intro">Introduction.</a></li>
40 <li><a href="index.html#org">Organize a working directory.</a></li>
41 <li><a href="base-system.html">Construction of the base SliTaz system.</a></li>
42 <li><a href="base-apps.html">Base applications.</a></li>
43 <li><a href="base-ncurses.html">Ncurses libraries and applications.</a></li>
44 <li><a href="locale.html">Install and configure Locale & i18n.</a></li>
45 <li><a href="boot-scripts.html">Boot scripts.</a></li>
46 <li><a href="x-window-system.html">X window system.</a></li>
47 <li><a href="gtk-libs.html">GTK+ packages and libraries.</a></li>
48 <li><a href="gtk-apps.html">GTK+ applications.</a></li>
49 <li><a href="xorg.html">Xorg.</a></li>
50 </ul>
52 <a name="intro"></a>
53 <h3><font color="#6c0023">Introduction</font></h3>
54 <p>
55 The scratchbook allows you to track the creation of the first public
56 release of SliTaz and make a trip to the heart of GNU/LINUX. You'll
57 be able to customize your new system or create your own autonomous
58 distro running in system memory (RAM) that's fully installable on
59 a hard drive or USB key. Once started you'll be able to remove the
60 CD-ROM and still have SliTaz working. SliTaz can also be used as an
61 environment in which we can chroot or use the cdrom for multitasking.
62 The only prerequisite is a host distribution in which you can store
63 libraries, use a compiler and development tools, etc. The host
64 system can be a chrooted development environment, a minimal
65 distro, SliTaz installed on a hard drive or a 'general' distro such
66 as Debian, Slackware, Fedora, Gentoo, Mandriva, Arch, etc. Note
67 that nothing is installed in the host system by our commands.
68 </p>
69 <p>
70 SliTaz uses the 'Swiss Army Knife' BusyBox as the basis of the system and
71 the Linux Kernel, it runs embedded using a small memory footprint and
72 provides many files. BusyBox is our main source of information
73 and it's a utility of the Debian project which we use and cherish.
74 </p>
75 <p>
76 SliTaz uses the Syslinux bootloader and an archived initramfs
77 compressed with cpio. This archive is then decompressed in memory
78 at boot by the kernel into a system of no fixed size, retaining
79 control over init. At the time of compilation or copying of
80 applications, we use strip to clean the repositoiries. The system commands
81 genisoimage or mkisofs are used to create the iso images. To
82 finish, you can test the iso image with Qemu or engrave the
83 generated iso on to a rewritable cdrom.
84 </p>
85 <a name="org"></a>
86 <h3><font color="#6c0023">Organize a working directory</font></h3>
87 <p>
88 To create SliTaz, we need a working directory and several subdirectories
89 Whether you have a chrooted environment for developing or a host
90 system, we advise to use a directory named distro/ in which to
91 work. The distro/ directory can be a simple folder or a partition,
92 but you are obviously free to put all of this elsewhere.
93 </p>
94 <h4>distro/</h4>
95 <p>Contents of a working directory:
96 </p>
97 <ul>
98 <li>rootfs/ --> The root filesystem - this is the root system, designed
99 to operate in RAM, it is used to generate the initramfs image.</li>
100 <li>rootfs.gz --> The initramfs image of our system - a cpio
101 archive compressed with gzip.</li>
102 <li>rootcd/ --> The rootcd. This is the root of the cdrom files.</li>
103 <li>src/ --> The sources, Kernel, Syslinux, Busybox, Dropbear,
104 etc (it can also be a symbolic link).</li>
105 </ul>
106 <p>
107 Thereafter, the initramfs and bootable ISO image (slitaz-cooking.iso)
108 will be created in the root directory of our work named SliTaz/.
109 </p>
110 <h4>Option: rootfs.ext2 - using a virtual hard drive</h4>
111 <p>
112 Option: rootfs.ext2 (root filesystem in ext2) is a virtual hard disk
113 formatted with ext2 and mounted on a (rootfs) loop. A device loop allows
114 a file to be used as a standard device (hard drive, floppy, etc) to build
115 a filesystem inside. This file can be any number of megabytes, we propose
116 20,480, which corresponds to 20MB:
117 </p>
118 <pre> # dd if=/dev/zero of=rootfs.ext2 bs=1k count=20480
119 </pre>
120 <p>
121 Create a ext2 filesystem named rootfs.ext2, the option -F formats the
122 file. Note that the -m 0 option doesn't allocate any space for the user
123 root - by default it occupies approximately 5% and the -t option defines
124 the type of filesystem to be used, such as ext2 or ext3:
125 </p>
126 <pre> # mkfs -t ext2 -F -m 0 rootfs.ext2
127 </pre>
128 <p>
129 We can now assemble rootfs.ext2 with a loop, thanks to the -o loop option
130 provided by the mount utility in the rootfs/ directory. You can check if
131 the assembly went well with the <code>df-h</code> command:
132 </p>
133 <pre> # mkdir rootfs
134 # mount -o loop rootfs.ext2 rootfs
135 # df -h
136 </pre>
137 <p>
138 At the end of the session, you can dismount the volume with umount:
139 </p>
140 <pre> # umount rootfs
141 </pre>
142 <p>
143 Now we can proceed to the construction of the <a href="base-system.html">base SliTaz system</a>.
144 </p>
146 <!-- End of content -->
147 </div>
149 <!-- Footer. -->
150 <div id="footer">
151 <div class="footer-right"></div>
152 <a href="index.html#top">Top of the page</a> |
153 <a href="index.html">Table of contents</a>
154 </div>
156 <div id="copy">
157 Copyright © <span class="year"></span> <a href="http://www.slitaz.org/en/">SliTaz</a> -
158 <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
159 Documentation is under
160 <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
161 and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
162 </div>
164 </body>
165 </html>