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