~mfisch/ubuntu/precise/live-manual/live-manual-fix-ftbfs-831392

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
:B~ Overview of tools

1~ Overview of tools

This chapter contains an overview of the three main tools used in building
Debian Live systems: live-build, live-boot and live-config.

2~live-build live-build

live-build is a collection of scripts to build Debian Live systems. These
scripts are also referred to as "commands".

The idea behind live-build is to be a framework that uses a configuration
directory to completely automate and customize all aspects of building a
Live image.

Many concepts are similar to those in the debhelper Debian package tools
written by Joey Hess:

_* The scripts have a central location for configuring their operation. In
debhelper, this is the debian subdirectory of a package tree. For example,
dh_install will look, amongst others, for a file called #{debian/install}#
to determine which files should exist in a particular binary package. In
much the same way, live-build stores its configuration entirely under a
config subdirectory.

_* The scripts are independent - that is to say, it is always safe to run
each command.

Unlike debhelper, live-build contains a tool to generate a skeleton
configuration directory, #{lb config}#. This could be considered to be
similar to tools such as #{dh-make}#. For more information about #{lb
config}#, please see {The lb config command}#lb-config.

The remainder of this section discusses the three most important commands:

_* *{lb config}*: Responsible for initializing a Live system configuration
directory. See {The lb config command}#lb-config for more information.

_* *{lb build}*: Responsible for starting a Live system build. See {The lb
build command}#lb-build for more information.

_* *{lb clean}*: Responsible for removing parts of a Live system build. See
{The lb clean command}#lb-clean for more information.

3~lb-config The #{lb config}# command

As discussed in {live-build}#live-build, the scripts that make up live-build
source their configuration from a single directory named config/. As
constructing this directory by hand would be time-consuming and error-prone,
the #{lb config}# command can be used to create skeleton configuration
folders.

Issuing #{lb config}# without any arguments creates a config subdirectory
which it populates with some default settings:

code{

$ lb config P: Creating config tree

$ ls -l total 8 drwxr-xr-x 3 user user 4096 Sep 7 13:02 auto drwxr-xr-x 22
user user 4096 Sep 7 13:02 config

$ ls -l config/ total 104 -rw-r--r-- 1 user user 4197 Sep 7 13:02 binary
drwxr-xr-x 2 user user 4096 Sep 7 13:02 binary_debian-installer drwxr-xr-x 2
user user 4096 Sep 7 13:02 binary_debian-installer-includes drwxr-xr-x 2
user user 4096 Sep 7 13:02 binary_grub drwxr-xr-x 2 user user 4096 Sep 7
13:02 binary_local-debs drwxr-xr-x 2 user user 4096 Sep 7 13:02
binary_local-hooks drwxr-xr-x 2 user user 4096 Sep 7 13:02
binary_local-includes drwxr-xr-x 2 user user 4096 Sep 7 13:02
binary_local-packageslists drwxr-xr-x 2 user user 4096 Sep 7 13:02
binary_local-udebs drwxr-xr-x 2 user user 4096 Sep 7 13:02 binary_rootfs
drwxr-xr-x 2 user user 4096 Sep 7 13:02 binary_syslinux -rw-r--r-- 1 user
user 2051 Sep 7 13:02 bootstrap -rw-r--r-- 1 user user 1647 Sep 7 13:02
chroot drwxr-xr-x 2 user user 4096 Sep 7 13:02 chroot_apt drwxr-xr-x 2 user
user 4096 Sep 7 13:02 chroot_local-hooks drwxr-xr-x 2 user user 4096 Sep 7
13:02 chroot_local-includes drwxr-xr-x 2 user user 4096 Sep 7 13:02
chroot_local-packages drwxr-xr-x 2 user user 4096 Sep 7 13:02
chroot_local-packageslists drwxr-xr-x 2 user user 4096 Sep 7 13:02
chroot_local-patches drwxr-xr-x 2 user user 4096 Sep 7 13:02
chroot_local-preseed drwxr-xr-x 2 user user 4096 Sep 7 13:02 chroot_sources
-rw-r--r-- 1 user user 2954 Sep 7 13:02 common drwxr-xr-x 2 user user 4096
Sep 7 13:02 includes -rw-r--r-- 1 user user 205 Sep 7 13:02 source
drwxr-xr-x 2 user user 4096 Sep 7 13:02 templates

}code

Using #{lb config}# without any arguments would be suitable for users who
need a very basic image, or who intend to later provide a more complete
configuration via auto/config (see {Managing a
configuration}#managing-a-configuration for details).

Normally, you will want to specify some options. For example, to include the
'gnome' package list in your configuration:

code{

$ lb config -p gnome

}code

It is possible to specify many options, such as:

code{

$ lb config --binary-images net --hostname live-machine --username live-user
...

}code

A full list of options is available in the #{lb_config}# man page.

3~lb-build The #{lb build}# command

The #{lb build}# command reads in your configuration from the config/
directory. It then runs the lower lower level commands needed to build your
Live system.

3~lb-clean The #{lb clean}# command

It is the job of the #{lb clean}# command to remove various parts of a build
so subsequent builds can start from a clean state.

2~live-boot The live-boot package

live-boot is a collection of scripts providing hooks for the
initramfs-tools, used to generate an initramfs capable of booting live
systems, such as those created by live-build. This includes the Debian Live
ISOs, netboot tarballs, and USB stick images.

At boot time it will look for read-only media containing a "/live" directory
where a root filesystem (often a compressed filesystem image like squashfs)
is stored. If found, it will create a writable environment, using aufs, for
Debian like systems to boot from.

More information on initial ramfs in Debian can be found in the Debian Linux
Kernel Handbook at http://kernel-handbook.alioth.debian.org/ in the chapter
on initramfs.

2~live-config The live-config package

live-config consists of the scripts that run at boot time after live-boot to
configure the live system automatically. It handles such tasks as setting
the hostname, locales and timezone, creating the live user, inhibiting cron
jobs and performing autologin of the live user.