website view en/doc/scratchbook/index.html @ rev 222

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