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