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