website annotate pt/doc/scratchbook/index.html @ rev 537

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