website diff en/doc/scratchbook/index.html @ rev 197

en: Add tiny scratchbook to website
author Paul Issott <paul@slitaz.org>
date Wed Nov 26 17:59:31 2008 +0000 (2008-11-26)
parents
children b5fc4c39964f
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/en/doc/scratchbook/index.html	Wed Nov 26 17:59:31 2008 +0000
     1.3 @@ -0,0 +1,157 @@
     1.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     1.5 +    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     1.6 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
     1.7 +<head>
     1.8 +    <title>SliTaz Scratchbook</title>
     1.9 +    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
    1.10 +    <meta name="description" content="" />
    1.11 +    <meta name="expires" content="never" />
    1.12 +    <meta name="modified" content="2008-11-22 17:00:00" />
    1.13 +    <meta name="publisher" content="www.slitaz.org" />
    1.14 +    <meta name="author" content="Christophe Lincoln"/>
    1.15 +    <link rel="shortcut icon" href="favicon.ico" />
    1.16 +    <link rel="stylesheet" type="text/css" href="book.css" />
    1.17 +</head>
    1.18 +<body bgcolor="#ffffff">
    1.19 +
    1.20 +<!-- Header and quick navigation -->
    1.21 +<div id="header">
    1.22 +<div align="right" id="quicknav">
    1.23 +    <a name="top"></a>
    1.24 +    <a href="../index.html">SliTaz doc</a>
    1.25 +</div>
    1.26 +<h1><font color="#3E1220">SliTaz Scratchbook</font></h1>
    1.27 +</div>
    1.28 +
    1.29 +<!-- Content. -->
    1.30 +<div id="content">
    1.31 +<div class="content-right"></div>
    1.32 +
    1.33 +
    1.34 +<h2><font color="#df8f06">SliTaz Scratchpad</font></h2>
    1.35 +<p>
    1.36 +Index of documents, step by step construction of a mini GNU/LINUX
    1.37 +LiveCD and installation instructions.
    1.38 +</p>
    1.39 +<h3><font color="#6c0023">Table of contents</font></h3>
    1.40 +<h4>LiveCD</h4>
    1.41 +<ul>
    1.42 +	<li><a href="#intro">Introduction.</a></li>
    1.43 +	<li><a href="#org">Organize a working directory.</a></li>
    1.44 +	<li><a href="base-system.html">Construction of the base SliTaz system.</a></li>
    1.45 +</ul>
    1.46 +
    1.47 +<a name="intro"></a>
    1.48 +<h3><font color="#6c0023">Introduction</font></h3>
    1.49 +<p>
    1.50 +The scratchbook allows you to track the creation of the first public 
    1.51 +release of SliTaz and make a trip to the heart of GNU/LINUX. You'll
    1.52 +be able to customize your new system or create your own autonomous
    1.53 +distro running in system memory (RAM) that's fully installable on
    1.54 +a hard drive or USB key. Once started you'll be able to remove the
    1.55 +CD-ROM and still have SliTaz working. SliTaz can also be used as an
    1.56 +environment in which we can chroot or use the cdrom for multitasking. 
    1.57 +The only prerequisite is a host distribution in which you can store
    1.58 +libraries, use a compiler and development tools, etc. The host
    1.59 +system can be a chrooted development environment, a minimal
    1.60 +distro, SliTaz installed on a hard drive or a 'general' distro such
    1.61 +as Debian, Slackware, Fedora, Gentoo, Mandriva, Arch, etc. Note
    1.62 +that nothing is installed in the host system by our commands.
    1.63 +</p>
    1.64 +<p>
    1.65 +SliTaz uses the 'Swiss Army Knife' BusyBox as the basis of the system and 
    1.66 +the Linux Kernel, it runs embedded using a small memory footprint and 
    1.67 +provides many files. BusyBox is our main source of information 
    1.68 +and it's a utility of the Debian project which we use and cherish.
    1.69 +</p>
    1.70 +<p>
    1.71 +SliTaz uses the Syslinux bootloader and an archived initramfs 
    1.72 +compressed with cpio. This archive is them decompressed in memory
    1.73 +at boot by the kernel into a system of no fixed size, retaining
    1.74 +control over init. At the time of compilation or copying of 
    1.75 +applications, we use strip to clean the repositoiries. The system commands
    1.76 +genisoimage or mkisofs are used to create the iso images. To
    1.77 +finish, you can test the iso image with Qemu or engrave the 
    1.78 +generated iso on to a rewritable cdrom.
    1.79 +</p>
    1.80 +<a name="org"></a>
    1.81 +<h3><font color="#6c0023">Organize a working directory</font></h3>
    1.82 +<p>
    1.83 +To create SliTaz, we need a working directory and several subdirectories
    1.84 +Whether you have a chrooted environment for developing or a host
    1.85 +system, we advise to use a directory named distro/ in which to 
    1.86 +work. The distro/ directory can be a simple folder or a partition,
    1.87 +but you are obviously free to put all of this elsewhere.
    1.88 +</p>
    1.89 +<h4>distro/</h4>
    1.90 +<p>Contents of a working directory:
    1.91 +</p>
    1.92 +<ul>
    1.93 +	<li>rootfs/ --&gt; The root filesystem - this is the root system, designed 
    1.94 +	to operate in RAM, it is used to generate the initramfs image.</li>
    1.95 +	<li>rootfs.gz --&gt; The initramfs image of our system - a cpio 
    1.96 +	archive compressed with gzip.</li>
    1.97 +	<li>rootcd/ --&gt; The rootcd. This is the root of the cdrom files.</li>
    1.98 +	<li>src/ --&gt; The sources, Kernel, Syslinux, Busybox, Dropbear,
    1.99 +	etc (it can also be a symbolic link).</li>
   1.100 +</ul>
   1.101 +<p>
   1.102 +Thereafter, the initramfs and bootable ISO image (slitaz-cooking.iso)
   1.103 +will be created in the root directory of our work named SliTaz/.
   1.104 +</p>
   1.105 +<h4>Option: rootfs.ext2 - using a virtual hard drive</h4>
   1.106 +<p>
   1.107 +Option: rootfs.ext2 (root filesystem in ext2) is a virtual hard disk
   1.108 +formatted with ext2 and mounted on a (rootfs) loop. A device loop allows
   1.109 +a file to be used as a standard device (hard drive, floppy, etc) to build
   1.110 +a filesystem inside. This file can be any number of megabytes, we propose
   1.111 +20,480, which corresponds to 20MB:
   1.112 +</p>
   1.113 +<pre> # dd if=/dev/zero of=rootfs.ext2 bs=1k count=20480
   1.114 +</pre>
   1.115 +<p>
   1.116 +Create a ext2 filesystem named rootfs.ext2, the option -F formats the
   1.117 +file. Note that the -m 0 option doesn't allocate any space for the user
   1.118 +root - by default it occupies approximately 5% and the -t option defines
   1.119 +the type of filesystem to be used, such as ext2 or ext3:
   1.120 +</p>
   1.121 +<pre> # mkfs -t ext2 -F -m 0 rootfs.ext2
   1.122 +</pre>
   1.123 +<p>
   1.124 +We can now assemble rootfs.ext2 with a loop, thanks to the -o loop option
   1.125 +provided by the mount utility in the rootfs/ directory. You can check if 
   1.126 +the assembly went well with the <code>df-h</code> command:
   1.127 +</p>
   1.128 +<pre> # mkdir rootfs
   1.129 + # mount -o loop rootfs.ext2 rootfs
   1.130 + # df -h
   1.131 +</pre>
   1.132 +<p>
   1.133 +At the end of the session, you can dismount the volume with umount:
   1.134 +</p>
   1.135 +<pre> # umount rootfs
   1.136 +</pre>
   1.137 +<p>
   1.138 +Now we can proceed to the construction of the <a href="base-system.html">base SliTaz system</a>.
   1.139 +</p>
   1.140 +
   1.141 +<!-- End of content -->
   1.142 +</div>
   1.143 +
   1.144 +<!-- Footer. -->
   1.145 +<div id="footer">
   1.146 +	<div class="footer-right"></div>
   1.147 +	<a href="#top">Top of the page</a> | 
   1.148 +	<a href="index.html">Table of contents</a>
   1.149 +</div>
   1.150 +
   1.151 +<div id="copy">
   1.152 +    Copyright &copy; 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
   1.153 +    <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
   1.154 +    Documentation is under
   1.155 +    <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
   1.156 +    and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
   1.157 +</div>
   1.158 +
   1.159 +</body>
   1.160 +</html>