website diff en/doc/scratchbook/base-system.html @ rev 1285

Tiny edits
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Mar 30 01:56:21 2016 +0300 (2016-03-30)
parents c2f9d5d0f314
children
line diff
     1.1 --- a/en/doc/scratchbook/base-system.html	Thu Mar 29 01:59:45 2012 +0300
     1.2 +++ b/en/doc/scratchbook/base-system.html	Wed Mar 30 01:56:21 2016 +0300
     1.3 @@ -1,23 +1,22 @@
     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 +<!DOCTYPE html>
     1.8 +<html lang="en">
     1.9  <head>
    1.10 -    <title>SliTaz Scratchbook - Base System</title>
    1.11 -    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    1.12 -    <meta name="description" content="" />
    1.13 -    <meta name="expires" content="never" />
    1.14 -    <meta name="modified" content="2008-11-22 17:00:00" />
    1.15 -    <meta name="publisher" content="www.slitaz.org" />
    1.16 -    <meta name="author" content="Christophe Lincoln"/>
    1.17 -    <link rel="shortcut icon" href="favicon.ico" />
    1.18 -    <link rel="stylesheet" type="text/css" href="book.css" />
    1.19 +	<meta charset="UTF-8">
    1.20 +	<title>SliTaz Scratchbook - Base System</title>
    1.21 +	<meta name="description" content="">
    1.22 +	<meta name="expires" content="never">
    1.23 +	<meta name="modified" content="2008-11-22 17:00:00">
    1.24 +	<meta name="publisher" content="www.slitaz.org">
    1.25 +	<meta name="author" content="Christophe Lincoln">
    1.26 +	<link rel="shortcut icon" href="favicon.ico">
    1.27 +	<link rel="stylesheet" href="book.css">
    1.28  </head>
    1.29 -<body bgcolor="#ffffff">
    1.30 +<body>
    1.31  
    1.32  <!-- Header and quick navigation -->
    1.33  <div id="header">
    1.34  <div align="right" id="quicknav">
    1.35 -    <a name="top"></a>
    1.36 +    <span id="top"></span>
    1.37      <a href="index.html">Table of contents</a> |
    1.38      <a href="base-apps.html">Base apps</a>
    1.39  </div>
    1.40 @@ -36,22 +35,22 @@
    1.41  <ul>
    1.42      <li><a href="#about">About.</a></li>
    1.43      <li><a href="#src">Wget src.</a></li>
    1.44 -    <li><a href="#prepa">Unpack and prepare the Linux kernel.</a></li>
    1.45 +    <li><a href="#prepa">Unpack and prepare the Linux Kernel.</a></li>
    1.46      <li><a href="#rootfs">Creation of the Root System</a>, the root
    1.47       file System (rootfs).</li>
    1.48      <li><a href="#config">Configure the box.</a></li>
    1.49      <li><a href="#initramfs">Generate the initramfs</a>, compressed cpio archive.</li>
    1.50 -    <li><a href="#rootcd">Construction of the root of the cdrom</a> (rootcd), and the 
    1.51 +    <li><a href="#rootcd">Construction of the root of the CD-ROM</a> (rootcd), and the 
    1.52      configuration files of Syslinux.</li>
    1.53      <li><a href="#mkiso">Create an ISO image with genisoimage or mkisofs.</a></li>
    1.54      <li><a href="#testiso">Burn or test the ISO with Qemu.</a></li>
    1.55  </ul>
    1.56 -<a name="about"></a>
    1.57 -<h3><font color="#6c0023">About</font></h3>
    1.58 +
    1.59 +<h3 id="about">About</h3>
    1.60  <p>
    1.61  This document describes the construction of the SliTaz base system and why we use a
    1.62  Linux Kernel, BusyBox and Syslinux to boot the system. SliTaz uses an initramfs 
    1.63 -archive unpacked in RAM by the kernel at boot. We will create a box to hold a 
    1.64 +archive unpacked in RAM by the Kernel at boot. We will create a box to hold a 
    1.65  root of 3 to 4MB and use strip on the libraries and binaries to save space.
    1.66  </p>
    1.67  <p>
    1.68 @@ -62,8 +61,8 @@
    1.69  This document is based on a howto found in the archive of BusyBox, which is itself based on 
    1.70  a paper presented by Erik Anderson in the Embedded Systems Conference in 2001.
    1.71  </p>
    1.72 -<a name="src"></a>
    1.73 -<h3><font color="#6c0023">Wget src</font></h3>
    1.74 +
    1.75 +<h3 id="src">Wget src</h3>
    1.76  <p>
    1.77  Create a src directory for downloading and compiling:
    1.78  </p>
    1.79 @@ -88,22 +87,22 @@
    1.80   # tar xzf slitaz-tools-1.1.tar.gz</pre>
    1.81      </li>
    1.82  </ul>
    1.83 -<a name="prepa"></a>
    1.84 -<h3><font color="#6c0023">Unpack and prepare the Linux Kernel</font></h3>
    1.85 +
    1.86 +<h3 id="prepa">Unpack and prepare the Linux Kernel</h3>
    1.87  <p>
    1.88 -We will begin by compiling a Linux kernel, which may take a little time.
    1.89 +We will begin by compiling a Linux Kernel, which may take a little time.
    1.90  </p>
    1.91  <h4>Linux Kernel</h4>
    1.92  <p>
    1.93 -Your kernel must support the intramfs filesystem, otherwise the cdrom will not start. You can 
    1.94 +Your Kernel must support the intramfs filesystem, otherwise the CD-ROM will not start. You can 
    1.95  also install the modules in a directory so as not to touch the host system. The configuration 
    1.96  of the Linux kernel sources is done by <code>make menuconfig</code> using ncurses or graphically 
    1.97  with <code>make gconfig</code> or <code>make xconfig</code> using GTK development packages and/or 
    1.98 -QT respectively. You can find in <a href="http://doc.slitaz.org/en:cookbook:slitaztools">SliTaz tools</a>,
    1.99 +Qt respectively. You can find in <a href="http://doc.slitaz.org/en:cookbook:slitaztools">SliTaz tools</a>,
   1.100  Makefiles for the various 2.6.xx kernels.
   1.101  </p>
   1.102  <p>
   1.103 -A feature of the 2.6 kernels is that if we make menuconfig, xconfig or config for the first time, 
   1.104 +A feature of the 2.6 Kernels is that if we make menuconfig, xconfig or config for the first time, 
   1.105  the setup menu is displayed based on the configuration of our current kernel.
   1.106  </p>
   1.107  <p>
   1.108 @@ -126,20 +125,20 @@
   1.109   # cd ..
   1.110  </pre>
   1.111  <p>
   1.112 -If you want more info on compiling kernels, there are many textbooks. Note that you can install the 
   1.113 -kernel and after rebooting, you can compile your own kernel following the same instructions.
   1.114 +If you want more info on compiling Kernels, there are many textbooks. Note that you can install the 
   1.115 +Kernel and after rebooting, you can compile your own Kernel following the same instructions.
   1.116  </p>
   1.117 -<a name="rootfs"></a>
   1.118 -<h3><font color="#6c0023">Creation of the root system (rootfs)</font></h3>
   1.119 +
   1.120 +<h3 id="rootfs">Creation of the root system (rootfs)</h3>
   1.121  <p>
   1.122 -The next step will create a file named 'rootfs' - Root File System, in the working directory SliTaz/:
   1.123 +The next step will create a file named ‘rootfs’ - Root File System, in the working directory SliTaz/:
   1.124  </p>
   1.125  <pre> # mkdir ../rootfs
   1.126  </pre>
   1.127  <h4>Install BusyBox</h4>
   1.128  <p>
   1.129  BusyBox (<a href="http://www.busybox.net/">www.busybox.net</a>) is a single executable offering 
   1.130 -versions of the main tools necessary to use a Linux kernel. It is (mainly) intended to be used 
   1.131 +versions of the main tools necessary to use a Linux Kernel. It is (mainly) intended to be used 
   1.132  embedded and can do almost anything. As well as proposing (coreutils) shell commands and a daemons 
   1.133  system, it also provides a websever and client/server (DHCP, udhcpc).
   1.134  </p>
   1.135 @@ -179,7 +178,7 @@
   1.136  <p>
   1.137  The ldd command can show any libraries used by a program. Libraries used by Busybox may differ 
   1.138  depending on the host system. On Debian for example, copying the libraries in /lib/tls. The following 
   1.139 -commands are given using 'v' for verbose mode. To eliminate the symbols of executable binaries
   1.140 +commands are given using ‘v’ for verbose mode. To eliminate the symbols of executable binaries
   1.141  and shared libraries we can utilize strip. Note you may also use the mklibs or uClibc libraries.
   1.142  </p>
   1.143  <pre> # mkdir lib
   1.144 @@ -232,7 +231,7 @@
   1.145  </pre>
   1.146  <h4>Create the devices in /dev</h4>
   1.147  <p>
   1.148 -This can be done with the script 'mkdevs.sh' found in BusyBox, or with our script 'mktazdevs.sh' in
   1.149 +This can be done with the script ‘mkdevs.sh’ found in BusyBox, or with our script ‘mktazdevs.sh’ in
   1.150  SliTaz tools. If you want more details, read the scripts. If you used the BusyBox version, we must
   1.151  still create the pts directory:
   1.152  </p>
   1.153 @@ -255,8 +254,8 @@
   1.154   # cp /lib/libresolv.so.2 lib
   1.155   # strip -v lib/*.so*
   1.156  </pre>
   1.157 -<a name="config"></a>
   1.158 -<h3><font color="#6c0023">Configuration of your box</font></h3>
   1.159 +
   1.160 +<h3 id="config">Configuration of your box</h3>
   1.161  <p>
   1.162  Create the necessary files in /etc. For more info, just look at the contents of the files. 
   1.163  We start by creating some files relevant to the core operating system.
   1.164 @@ -511,11 +510,10 @@
   1.165  files from SliTaz tools, such as the licence.
   1.166  </p>
   1.167  
   1.168 -<a name="initramfs"></a>
   1.169 -<h3><font color="#6c0023">Build an initramfs cpio archive</font></h3>
   1.170 +<h3 id="initramfs">Build an initramfs cpio archive</h3>
   1.171  <p>
   1.172  The initramfs is a <code>cpio</code> archive generated from the root of the system, 
   1.173 -it is decompressed in RAM by the Linux kernel at boot to create the filesystem (also in RAM). 
   1.174 +it is decompressed in RAM by the Linux Kernel at boot to create the filesystem (also in RAM). 
   1.175  To generate an initramfs archive, using the root directory of system files (rootfs), we 
   1.176  facilitate a search with <code>find</code> and add some pipes <code>|</code>. 
   1.177  Then we create a cpio archive using <code>gzip</code> which we put in the working directory.
   1.178 @@ -539,11 +537,11 @@
   1.179  use <strong>mktaziso</strong> within SliTaz tools. This script will check if the directories are present, 
   1.180  create a new compressed cpio archive and generate a new bootable ISO image.
   1.181  </p>
   1.182 -<a name="rootcd"></a>
   1.183 -<h3><font color="#6c0023">Make rootcd files</font></h3>
   1.184 +
   1.185 +<h3 id="rootcd">Make rootcd files</h3>
   1.186  <p>
   1.187  The following steps will help you create the root of the bootable CD-ROM. We begin by creating the rootcd, 
   1.188 -boot and isolinux directories for the cd-rom files:
   1.189 +boot and isolinux directories for the CD-ROM files:
   1.190  </p>
   1.191  <pre> # cd ..
   1.192   # mkdir -p rootcd/boot/isolinux
   1.193 @@ -551,10 +549,10 @@
   1.194  <p>
   1.195  Optionally, you can create some other directories in which to place various data, such as HTML documents or packages.
   1.196  </p>
   1.197 -<a name="linux"></a>
   1.198 -<h4>Copy the kernel</h4>
   1.199 +
   1.200 +<h4 id="linux">Copy the Kernel</h4>
   1.201  <p>
   1.202 -Just copy the kernel previously compiled to rootcd/boot:
   1.203 +Just copy the Kernel previously compiled to rootcd/boot:
   1.204  </p>
   1.205  <pre> # cp src/linux-2.6.20/arch/i386/boot/bzImage rootcd/boot
   1.206  </pre>
   1.207 @@ -596,7 +594,7 @@
   1.208  <ul>
   1.209      <li>The timeout value is the number of seconds to wait before booting 
   1.210  	You can make it 0 or delete the line to start instantly, or choose to wait as long as 10s.</li>
   1.211 -    <li>prompt can be set to 0 to disable the 'boot:' prompt.</li>
   1.212 +    <li>prompt can be set to 0 to disable the ‘boot:’ prompt.</li>
   1.213      <li>You can add more lines to view the contents of several text files when the user presses F1, F2, F3, etc.</li>
   1.214  </ul>
   1.215  <h4>display.txt</h4>
   1.216 @@ -605,7 +603,8 @@
   1.217  </p>
   1.218  <pre> # nano rootcd/boot/isolinux/display.txt
   1.219  </pre>
   1.220 -<pre class="script">/*       _\|/_
   1.221 +<pre class="script">
   1.222 +/*       _\|/_
   1.223           (o o)
   1.224   +----oOO-{_}-OOo---------------------------------------------------+
   1.225       ____  _ _ _____
   1.226 @@ -620,8 +619,8 @@
   1.227  
   1.228                                                                     */
   1.229  </pre>
   1.230 -<a name="mkiso"></a>
   1.231 -<h3><font color="#6c0023">Create an ISO image with genisoimage or mkisofs</font></h3>
   1.232 +
   1.233 +<h3 id="mkiso">Create an ISO image with genisoimage or mkisofs</h3>
   1.234  <pre> # genisoimage -R -o slitaz-cooking.iso -b boot/isolinux/isolinux.bin \
   1.235     -c boot/isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
   1.236     -V "SliTaz" -input-charset iso8859-1 -boot-info-table rootcd
   1.237 @@ -633,10 +632,10 @@
   1.238  You can create a small script that will generate a new compressed cpio archive and a new image, 
   1.239  or use mktaziso within SliTaz tools. Note that you can also use GRUB to boot the box.
   1.240  </p>
   1.241 -<a name="testiso"></a>
   1.242 -<h3><font color="#6c0023">Burn or test ISO image with Qemu</font></h3>
   1.243 +
   1.244 +<h3 id="testiso">Burn or test ISO image with Qemu</h3>
   1.245  <p>
   1.246 -You can burn the ISO image with Graveman, k3b or wodim and boot it. Simple burning command using wodim (also valid for cdrecord), with a 2.6.XX. kernel:
   1.247 +You can burn the ISO image with Graveman, k3b or wodim and boot it. Simple burning command using wodim (also valid for cdrecord), with a 2.6.XX. Kernel:
   1.248  </p>
   1.249  <pre># wodim -v -speed=24 -data slitaz-cooking.iso
   1.250  </pre>