3
1~overview-of-tools Overview of tools
5
This chapter contains an overview of the three main tools used in building
6
Debian Live systems: live-build, live-boot and live-config.
1
:B~ Descripción general de las herramientas
3
1~overview-of-tools Descripción general de las herramientas
5
Este capítulo contiene una descripción general de las tres herramientas
6
principales utilizadas en la creación de sistemas Debian Live: live-build,
7
live-boot y live-config.
8
9
2~live-build live-build
10
live-build is a collection of scripts to build Debian Live systems. These
11
scripts are also referred to as "commands".
13
The idea behind live-build is to be a framework that uses a configuration
14
directory to completely automate and customize all aspects of building a
17
Many concepts are similar to those in the debhelper Debian package tools
20
_* The scripts have a central location for configuring their operation. In
21
debhelper, this is the #{debian/}# subdirectory of a package tree. For
22
example, dh_install will look, amongst others, for a file called
23
#{debian/install}# to determine which files should exist in a particular
24
binary package. In much the same way, live-build stores its configuration
25
entirely under a #{config/}# subdirectory.
27
_* The scripts are independent - that is to say, it is always safe to run
30
Unlike debhelper, live-build contains a tool to generate a skeleton
31
configuration directory, #{lb config}#. This could be considered to be
32
similar to tools such as #{dh-make}#. For more information about #{lb
33
config}#, please see {The lb config command}#lb-config.
35
The remainder of this section discusses the three most important commands:
37
_* *{lb config}*: Responsible for initializing a Live system configuration
38
directory. See {The lb config command}#lb-config for more information.
40
_* *{lb build}*: Responsible for starting a Live system build. See {The lb
41
build command}#lb-build for more information.
43
_* *{lb clean}*: Responsible for removing parts of a Live system build. See
44
{The lb clean command}#lb-clean for more information.
46
3~lb-config The #{lb config}# command
48
As discussed in {live-build}#live-build, the scripts that make up live-build
49
source their configuration from a single directory named #{config/}#. As
50
constructing this directory by hand would be time-consuming and error-prone,
51
the #{lb config}# command can be used to create skeleton configuration
54
Issuing #{lb config}# without any arguments creates a #{config/}#
55
subdirectory which it populates with some default settings:
11
live-build es una colección de scripts para generar los sistemas Debian
12
Live. A estos scripts también se les conoce como "comandos".
14
La idea detrás de live-build es ser un marco (framework) que utiliza un
15
directorio de configuración para automatizar completamente y personalizar
16
todos los aspectos de la creación de una imagen de un sistema en vivo.
18
Muchos conceptos son similares a las del paquete de herramientas de Debian
19
debhelper escrito por Joey Hess:
21
_* Los scripts tiene una ubicación central para la configuración de su
22
funcionamiento. En debhelper, este es el subdirectorio #{debian/}# de un
23
árbol de paquetes. Por ejemplo, dh_install buscará, entre otros, un fichero
24
llamado #{debian/install}# para determinar qué ficheros deben existir en un
25
paquete binario en particular. De la misma manera, live-build almacena toda
26
su configuración bajo un subdirectorio #{config/}#.
28
_* Los scripts son independientes - es decir, siempre es seguro ejecutar
31
A diferencia de debhelper, live-build contiene una herramienta para generar
32
un directorio de configuración de esqueleto, #{lb config}#. Esto podría ser
33
considerado como similar a herramientas tales como #{dh-make}#. Para obtener
34
más información sobre #{lb config}# , por favor consulte {El comando lb
37
El resto de esta sección describe los tres comandos más importantes:
39
_* *{lb config}*: Responsable de la creación de un directorio de
40
configuración del sistema en vivo. Ver {El comando lb config}#lb-config para
43
_* *{lb build}*: Responsable de iniciar la generación de un sistema
44
vivo. Ver {El comando lb build}#lb-build para más información.
46
_* *{lb clean}*: Responsable de la eliminación de partes de la creación de
47
un sistema vivo. Ver {El comando lb clean}#lb-clean para más información.
49
3~lb-config El comando #{lb config}#
51
Como se comentó en {live-build}#live-build, los scripts que componen
52
live-build obtienen su configuración desde un único directorio llamado
53
#{config/}#. Como la creación de este directorio a mano sería largo y
54
propenso a errores, se puede utilizar el comando #{lb config}# para crear el
55
esqueleto de carpetas de configuración.
57
Ejecutar #{lb config}# sin argumentos crea un subdirectorio #{config/}# que
58
se completa con algunas opciones por defecto:
97
Using #{lb config}# without any arguments would be suitable for users who
98
need a very basic image, or who intend to later provide a more complete
99
configuration via auto/config (see {Managing a
100
configuration}#managing-a-configuration for details).
100
Usar #{lb config}# sin ningún argumento sería conveniente para los usuarios
101
que necesitan una imagen muy básica, o que tienen intención de proporcionar
102
más tarde una configuración más completa a través de auto/config (ver
103
{Gestionar una configuración}#managing-a-configuration para más detalles).
102
Normally, you will want to specify some options. For example, to include the
103
'gnome' package list in your configuration:
105
Normalmente, tendrá que especificar algunas opciones. Por ejemplo, para
106
incluir la lista del paquete 'gnome' en su configuración:
119
A full list of options is available in the #{lb_config}# man page.
121
3~lb-build The #{lb build}# command
123
The #{lb build}# command reads in your configuration from the config/
124
directory. It then runs the lower lower level commands needed to build your
127
3~lb-clean The #{lb clean}# command
129
It is the job of the #{lb clean}# command to remove various parts of a build
130
so subsequent builds can start from a clean state.
132
2~live-boot The live-boot package
134
live-boot is a collection of scripts providing hooks for the
135
initramfs-tools, used to generate an initramfs capable of booting live
136
systems, such as those created by live-build. This includes the Debian Live
137
ISOs, netboot tarballs, and USB stick images.
139
At boot time it will look for read-only media containing a "/live" directory
140
where a root filesystem (often a compressed filesystem image like squashfs)
141
is stored. If found, it will create a writable environment, using aufs, for
142
Debian like systems to boot from.
144
More information on initial ramfs in Debian can be found in the Debian Linux
145
Kernel Handbook at http://kernel-handbook.alioth.debian.org/ in the chapter
148
2~live-config The live-config package
150
live-config consists of the scripts that run at boot time after live-boot to
151
configure the live system automatically. It handles such tasks as setting
152
the hostname, locales and timezone, creating the live user, inhibiting cron
153
jobs and performing autologin of the live user.
122
Una lista completa de opciones está disponible en la página del manual
125
3~lb-build El comando #{lb build}#
127
El comando #{lb build}# lee la configuración del directorio config/. A
128
continuación, ejecuta los comandos del nivel inferior más bajo necesarios
129
para crear el sistema en vivo.
131
3~lb-clean El comando #{lb clean}#
133
La función del comando #{lb clean}# es eliminar diversas partes de una
134
generación de forma que generaciones posteriores puedan comenzar a partir de
137
2~live-boot El paquete live-boot
139
live-boot es una colección de scripts que proporcionan ganchos para
140
initramfs-tools, que sirve para generar un initramfs capaz de arrancar los
141
sistemas vivos, tales como los creados por live-build. Esto incluye las ISOs
142
de Debian Live, archivos comprimidos en tar de netboot, e imágenes para
145
En el momento del arranque, buscará en los medios de almacenamiento de sólo
146
lectura un directorio "/ live" donde se encuentra un sistema de archivos
147
raíz (a menudo una imagen del sistema de archivos comprimidos como
148
squashfs). Si lo encuentra, creará un entorno de escritura, utilizando aufs,
149
para que arranquen los sistemas tipo Debian.
151
Se puede encontrar más información sobre ramfs inicial en Debian en el
152
Manual del kernel Debian Linux en http://kernel-handbook.alioth.debian.org/
153
concretamente en el capítulo sobre initramfs.
155
2~live-config El paquete live-config
157
live-config consiste en una serie de scripts que se ejecutan en el arranque
158
después de live-boot para configurar el sistema en vivo de forma
159
automática. Se ocupa de tareas como la creación del nombre del equipo
160
(hostname), las variantes locales y la zona horaria, crear el usuario en
161
vivo, la inhibición de trabajos de cron y el inicio de sesión automático del