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