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