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