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