File: README

package info (click to toggle)
simple-cdd 0.5.0
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 264 kB
  • ctags: 27
  • sloc: sh: 549; python: 66; makefile: 2
file content (271 lines) | stat: -rw-r--r-- 7,134 bytes parent folder | download
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
here's a quick guide to using simple-cdd... 

if you have further questions, ask on the simple-cdd-devel mailing list:
http://lists.alioth.debian.org/mailman/listinfo/simple-cdd-devel, or in the
debian-custom channel on irc.debian.org.


Quick Start (from http://wiki.debian.org/Simple-CDD/Howto)

To try Simple-CDD, on a Debian system:

Install simple-cdd (as root):

 # apt-get install simple-cdd

Create a working directory (as a user):

 $ mkdir ~/my-simple-cdd
 $ cd ~/my-simple-cdd

Build a basic CD:

 $ build-simple-cdd

This will create a partial package mirror in the directory tmp/mirror, and if
all goes well, an .iso CD image in the "images" directory when it is finished.
By default, target CDD release version is the same as the host version. You can
specify the optional argument --dist to change the targets version. For example,
it can be etch, lenny, sid, etc.
If this step doesn't work, you need to figure out why before trying more
complicated things.

Create a profile named NAME:

 $ mkdir profiles
 $ for p in list-of-packages-you-want-installed ; do echo $p >> profiles/NAME.packages ; done

Note that you should not include package dependencies, but only the packages
you actually want.

Build the CD with selected profile NAME:

 $ build-simple-cdd --profiles NAME

This should create an .iso CD image in the "images" directory when it is
finished with your custom profile.

Use qemu to test:

 # apt-get install qemu
 $ build-simple-cdd --qemu --profiles NAME

Optional features:

If you want debconf preseeding, put a debconf-set-selections compatible file
into profiles/NAME.preseed.

If you want a custom post-install script, place it in profiles/NAME.postinst.

For more options:

 $ build-simple-cdd --help


The Less Quick Start

Preparing a Simple-CDD Working Directory

 mkdir my-cdd
 cd my-cdd


Profiles

create the profiles directory:

 mkdir profiles

to make a custom profile, think of a name for it, such as "x-basic".

edit or create files in the "profiles" directory, beginning with the profile
name, and ending in .preseed, .packages, .downloads, etc. for example:

profiles/x-basic.preseed 
profiles/x-basic.packages
profiles/x-basic.downloads

 *.description

 short, one-line description of what the profile does

 *.packages
 
 packages installed when the profile is selected.  do not include packages such
 as linux-image or grub, as debian-installer will handle these specially.

 *.downloads
 
 additional packages included on a CD providing the profile, but not installed
 by simple-cdd (though debian-installer may install them)

 *.preseed
 
 debconf questions loaded if the profile is selected

 *.postinst
 
 profile-specific post-install script. runs in the "finish-install" phase of
 debian-installer.

 *.conf
 
 profile-specific configuration settings. sourced during CD build.


to build a CD image with the x-basic profile:

 build-simple-cdd --profiles x-basic

when installing from the CD, a menu should pop up asking you which profiles you
want to install. select all the profiles you want, and the debconf preseed
files will populate the debconf database, and the packages will be installed. 


Default Profile

the profile named "default" is special, because it always gets installed.

modify the profile/default.* files with care, as simple-cdd relies upon the
default profile working in certain ways (such as installing the
simple-cdd-profiles .udeb).


Debconf Preseeding

debconf preseeding is a way to pre-answer the questions asked during package
installation and debian-installer.

it uses the debconf-set-selections format. for more information on the format:

 man debconf-set-selections

profiles/default.preseed is loaded after the debian-installer CD is mounted.
other profiles preseed files are loaded when the simple-cdd-profile .udeb is
installed. some questions may have to be passed at the boot prompt(see below),
as they are asked before any of the preseed files are loaded.

the following question is used by simple-cdd, modify at your own risk:

 d-i preseed/early_command


Automatically Selecting Profiles

to automatically select profiles, in profiles/default.preseed, uncomment the
line:

 simple-cdd simple-cdd/profiles multiselect 

and add all profiles you want, separated by commas, i.e.:

 simple-cdd simple-cdd/profiles multiselect x-basic, ltsp

alternately, use the --auto-profiles commandline option:

 build-simple-cdd --profiles x-basic,ltsp --auto-profiles x-basic,ltsp


Language and Country Selection

to pre-select the language and country, it is recommended to use the --locale
commandline option:

 build-simple-cdd --locale en_US


Configuration Files

to specify a configuration file:

 build-simple-cdd --conf my-cdd.conf

in my-cdd.conf, include values like

 locale=en_US
 profiles="x-basic,ltsp"
 auto_profiles="x-basic,ltsp"
 debian_mirror="http://my.local.mirror/debian"

you can also specify configuration files on a per-profile basis, in
profiles/<profile>.conf.


Passing Boot Prompt Parameters

to pass boot parameters, set KERNEL_PARAMS in a configuration file. the
following example adds the default.preseed file (needed for simple-cdd to
function) and disables power management (acpi):

 export KERNEL_PARAMS="preseed/file=/cdrom/simple-cdd/default.preseed acpi=off"


Build the CD

 build-simple-cdd

now the mirroring tools will download lots and lots of files.

then CD image will be built, and appear as a file in the "images" directory,
such as "debian-40-i386-CD-1.iso"


Testing With Qemu

you can test that your image works using qemu...

 apt-get install qemu

 build-simple-cdd --qemu --profiles x-basic

this will build the CD image using the profile x-basic, run qemu to install it,
and then run qemu for the initial boot into the system.


Testing With Qemu in Non-Graphical Mode

i tested this code out entirely with qemu over a slow ssh connection,
so i needed to figure out how to get serial console working...

 build-simple-cdd --qemu --profiles x-basic --serial-console


More Fun and Adventures

Post and Pre Installation Hooks

if you need to do some customization that cannot be handled by debconf
preseeding, write a script doing what you need to do... and copy that script to
either:

 default.postinst (for all installs)

or

 <profile>.postinst (for profile-specific post-install)


Totally Automatic Partitioning

since automatically over-writing the data on the hard-drive could be
destructive, it is disabled by default.

to enable it, edit profiles/default.preseed and uncomment the following three
lines:

 d-i partman/confirm_write_new_label boolean true
 d-i partman/choose_partition select Finish partitioning and write changes to disk
 d-i partman/confirm   boolean true

Using contrib and non-free

if you want to add packages from contrib or non-free, add them to the
mirror_components in a configuration file:

 mirror_components="main contrib non-free"

if you're using a mirror that uses different components, add them to
mirror_components_extra in a configuration file:

 debian_mirror_extra="http://some.mirror.org/debian/"
 mirror_components_extra="contrib non-free"