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