2c694126a8a790a548418e85a077294a085c4a9e
[grml-debootstrap.git] / grml-debootstrap.8.txt
1 grml-debootstrap(8)
2 ===================
3
4 Name
5 ----
6 grml-debootstrap - wrapper around debootstrap for installing plain Debian via grml
7
8 Synopsis
9 --------
10 grml-debootstrap [ _options_ ]
11
12 image:images/screenshot.png[Screenshot]
13
14 Introduction
15 ------------
16
17 grml-debootstrap is a wrapper suite around debootstrap (and cdebootstrap if you
18 want) for installing a plain Debian system via grml very fast and easy.
19
20 All you have to do is adjust a few variables in configuration file
21 /etc/debootstrap/config (or specify some variables via commandline) and invoke
22 grml-debootstrap without any further options then.
23
24 A plain and base Debian system will be installed on the given device (or
25 directory) then. Customization of this process is possible as well.
26
27 CAUTION: The grml team does not take responsibility for loss of any data!
28
29 Options and environment variables
30 ---------------------------------
31
32 *--bootappend* <_appendline for the kernel_>::
33
34     Specify appendline for the kernel.
35     E.g. "_pci=nomsi_"
36
37 *-c*, *--config* <_file_>::
38
39     Use specified configuration file, defaults to /etc/debootstrap/config.
40
41 *--chroot-scripts* <_directory_>::
42
43     Execute chroot scripts from specified directory. This allows customisation
44     of the chroot setup, the executable script(s) present in the given directory
45     are executed at the end of the chroot procedure.
46     Default directory: /etc/debootstrap/chroot-scripts/
47
48 *-d*, *--confdir* <_path_>::
49
50     Place of configuration files for debootstrap, defaults to /etc/debootstrap.
51
52 *--debconf* <_file_>::
53
54     Use specified file for preseeding Debian packages instead of using
55     the default <confdir>/debconf-selections.
56
57 *--debopt* <_params_>::
58
59     Extra parameters passed to the debootstrap.
60
61 *--groot* <_device_>::
62
63     Specify root device for usage in grub (corresponds with $TARGET).
64     Again, use grub syntax for specifying.
65     Corresponding with configuration variable GROOT.
66
67 *--grub* <_device_>::
68
69     Where do you want to install grub to? Use grub syntax for specifying.
70     Do not forget to set groot as well. Leave empty to avoid installation of grub.
71
72 *--help*, *-h*::
73
74     Show summary of options and exit.
75
76 *--hostname* <_hostname_>::
77
78     Use specified hostname instead of the default (being 'grml').
79
80 *-i*, *--iso* <_/mntpoint_>::
81
82     Specify mountpoint where you have a Debian ISO mounted loopback.
83     Using this option instead of the mirror option gives you the possibility
84     to install the base-system without network access. Make sure you
85     mounted the according Debian-ISO to the given <_/mntpoint_>. See section
86     'Usage examples' for a demonstration.
87
88 *--keep_src_list*::
89
90      Do not overwrite user provided /etc/apt/sources.list.
91
92 *-m*, *--mirror* <_URL_>::
93
94     Specify mirror which should be used for apt-get/aptitude.
95     Corresponding with configuration variable MIRROR.
96
97 *--nodebootstrap*::
98
99     Skip debootstrap, only do configuration to the target.
100
101 *-p*, *--mntpoint* <_/mntpoint_>::
102
103     Specify mountpoint that should be used for mounting the target system.
104     Corresponding with configuration variable MNTPOINT.
105
106 *--packages* <_file_>::
107
108     Use specified file as list for packages that should be installed instead of
109     the default package list file <confdir>/packages.
110
111 *--password* <_password_>::
112
113     Use specified password as password for user root. Use with caution, as your
114     commandline might be visible in the process list and the shell history.
115     It's meant for automatic installation only.
116
117 *-r*, *--release* <_releasename_>::
118
119     Specify release of new Debian system. Supported releases: etch, lenny,
120     squeeze (note: requires current version of debootstrap) and sid.
121     Corresponding with configuration variable RELEASE.
122
123 *--scripts* <_directory_>::
124
125     Execute scripts from specified directory. This allows customisation of
126     the system after the chroot has been set up.
127     Default directory: /etc/debootstrap/scripts/
128
129 *-t*, *--target* <_target_>::
130     Target partition (/dev/...) or directory (anything else without /dev at the
131     beginning). To install grub using *--grub* and *--groot*, make sure to
132     use a _device_ instead of a directory as _target_ (installation of
133     grub as bootloader when using directories isn't supported yet).
134
135 *-v*, *--verbose*::
136     Increase verbosity.
137
138 *-V*, *--version*::
139     Show version of program and exit.
140
141 WARNING: the commandline parsing of grml-debootstrap does not validate the provided
142 arguments for the commandline options. Please be careful and check docs and
143 /etc/debootstrap/config for further information.
144
145 Usage examples
146 ---------------
147
148   grml-debootstrap --target /dev/sda1 --grub hd0 --groot hd0,0
149
150 Install default Debian release (stable/lenny) on /dev/sda1 and install bootmanager
151 Grub in MBR (master boot record) of /dev/sda and use /dev/sda1 as system partition.
152
153   grml-debootstrap --target /dev/sda6 --grub hd0 --groot hd0,5 --release sid
154
155 Install Debian unstable/sid on /dev/sda6, install bootmanager
156 Grub in MBR (master boot record) of /dev/sda and use /dev/sda6 as system partition.
157
158   grml-debootstrap --target /data/chroot
159
160 Install default Debian release (stable/lenny) in directory /data/chroot (without
161 any bootloader).
162
163   grml-debootstrap --target /dev/sda3 --grub hd0 --groot hd0,2 --mirror ftp://ftp.tugraz.at/mirror/debian
164
165 Install default Debian release (stable/lenny) on /dev/sda3 and install bootmanager
166 Grub in MBR (master boot record) of /dev/sda and use /dev/sda3 as system partition.
167 Use specified mirror instead of the default (ftp://ftp.debian.de/debian) one.
168
169   mount -o loop /mnt/sda6/debian-40r0-i386-CD-1.iso /mnt/iso
170   grml-debootstrap --target /dev/sda1 --grub hd0 --groot hd0,0 --iso file:/mnt/iso/debian/
171
172 Install Debian stable/lenny on /dev/sda1 using the loopback mounted Debian-ISO
173 for the base-system and install bootmanager Grub in MBR (master boot record) of
174 /dev/sda and use /dev/sda1 as system partition. Please notice, that the chroot
175 system requires network access for all packages which are not part of the
176 ISO.
177
178 Files
179 -----
180
181   /etc/debootstrap/config
182
183 Main configuration file. You have to adjust it according to your needs
184 before you are able to run grml-debootstrap.
185
186   /etc/debootstrap/chroot-script
187
188 The script executed within the new Debian system as soon as the main system
189 has been installed via [c]debootstrap.
190
191   /etc/debootstrap/locale.gen
192
193 Defines the default locales used for generating locales via locale-gen.
194
195   /etc/debootstrap/packages
196
197 Defines the software packages which should be installed in the new
198 Debian system by default.
199
200   /etc/debootstrap/extrapackages
201
202 Debian Packages dropped here will be installed into the new Debian system by
203 default (Controlvariable: EXTRAPACKAGES)
204
205   /etc/debootstrap/stages/
206
207 The default directory for storing information about executed stages. Every
208 single function of grml-debootstrap will write 'done' to the stages directory
209 into a file named as the function itself if it has been executed successfully.
210 You can adjust the location of the directory via configuration variable STAGES
211 via /etc/debootstrap/config.  Please notice that you have to remove the stages
212 directory on your own if you want to re-execute grml-debootstrap after running it
213 successfully once. This should avoid recurrent execution by error of
214 grml-debootstrap (which might delete present data).
215
216 Customization
217 -------------
218
219 You can control execution of grml-debootstrap via adjusting
220 /etc/debootstrap/config for some main stuff or via setting some selected
221 variables via commandline.  The packages which should be installed in the new
222 Debian system can be defined via the file /etc/debootstrap/packages.  If you
223 want to put existing files to the new Debian system you can place them into the
224 (by default non-existing) directories boot, etc, share, usr and var in
225 /etc/debootstrap/. Every existing directory will be copied to the new Debian
226 system then. If you want to install additional packages that are not available
227 via the grml or debian mirror drop them into /etc/debootstrap/extrapackages and
228 make sure that EXTRAPACKAGES is set to "yes".
229
230 Automatic installation
231 ----------------------
232
233 If environment variable AUTOINSTALL is set grml-debootstrap can be executed in a
234 full automatic mode. While this mode isn't really useful for interactive
235 execution (just configure /etc/debootstrap/configure or specify the relevant
236 variables on the commandline instead) it is meant for use via bootoption
237 debian2hd. The bootoption debian2hd (more precise: the kernelname on bootprompt)
238 supports the following bootoptions (they correspond with the commandline options
239 mentioned above):
240
241   target=...
242
243 The target partition/directory of the new Debian system. Usage example:
244 target=/dev/sda1
245
246   grub=...
247
248 Where do you want to install grub to? Use grub syntax for specifying.
249 Usage example: grub=hd0
250
251   groot=...
252
253 Specify root device for usage in grub (corresponds with $TARGET).
254 Again, use grub syntax for specifying. Usage example: groot=hd0,0
255
256   release=...
257
258 Specify release of new Debian system. Defaults to Debian stable.  Supported
259 relases: etch, lenny, squeeze and sid. Usage example: release=sid
260
261   mirror=...
262
263 Specify mirror which should be used for apt-get/aptitude instead
264 of the default one (ftp://ftp.debian.de/debian).
265 Usage example: mirror=ftp://ftp.tugraz.at/mirror/debian
266
267   password=...
268
269 Set password of user root without prompting for it but set it to the given
270 argument. Usage example: password=AiTh5ahn
271
272 Usage example for automatic installation:
273 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
274
275   debian2hd target=/dev/sda1 grub=hd0 groot=hd0,0 mirror=ftp://ftp.tugraz.at/mirror/debian password=foobar
276
277 You have to enter this commandline at the bootprompt of grml. Please make sure
278 that /dev/sda1 is the partition where you really want to install your new Debian
279 system.
280
281 [NOTE]
282 Automatic installation within booting process is done in grml-autoconfig via
283 setting environment variable AUTOINSTALL and creation of
284 /usr/bin/grml-debootstrap_noninteractive with the available and relevant
285 bootoptions for grml-debootstrap.
286
287 Supported Releases
288 ------------------
289
290 include::releasetable.txt[]
291
292 [NOTE]
293 .Etch-Release
294 ================================================================================
295 [1] Please notice that Etch is the current old-stable within Debian.
296 grml-debootstrap can handle the release but you really should not use Etch
297 anymore unless you really know what you are doing. Choose Lenny instead.
298 ================================================================================
299
300 Bugs
301 ----
302
303 Probably. Please send bugreports to Michael Prokop <mika@grml.org>.
304
305 See also
306 --------
307
308 debootstrap (8), cdebootstrap (1).
309
310 Author
311 ------
312 Michael Prokop <mika@grml.org>