~psusi/ubuntu/precise/installation-guide/partitions

« back to all changes in this revision

Viewing changes to da/appendix/example-preseed.xml

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2010-06-25 10:28:30 UTC
  • mfrom: (2.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20100625102830-nvfcrroep8mvhkeo
Tags: 20100518ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Build only English (for now, until we figure out how to avoid trashing
    translations quite so badly with Ubuntu branding etc.).
  - Build only Ubuntu architectures (amd64, armel, i386, ia64, powerpc,
    sparc).
  - Extensive (although possibly incomplete) Ubuntu branding, adjustments
    for our mirror layout, etc.
  - Add "Ubuntu and Debian" and "What is Ubuntu?" section, text borrowed
    from the Ubuntu web site. Disable the "What is Debian GNU/Linux?"
    section.
  - Direct installation reports to ubuntu-users for now.
  - Adjust various memory and disk space requirements. Talk about the
    default Ubuntu desktop and Ubuntu tasks rather than Debian tasks.
  - Document mounting /sys in various places.
  - Unset supports-floppy-boot for all our architectures.
  - Add a few more supports-floppy-boot and bootable-usb conditionals.
  - Document our root password and sudo arrangements.
  - Document netboot-style USB images. Still mention the hd-media images,
    but they're downplayed since many USB sticks are too small for a full
    Ubuntu ISO image.
  - Document Kickstart installations (currently only the basics, a
    reference to Red Hat's documentation, and the differences from
    Anaconda).
  - Update keyboard preseeding documentation for console-setup.
  - Update chroot-install guide for console-setup and language packs; add
    a bit more advice about installing grub.
  - Disable documentation of win32-loader.
  - Document new simplified partman preseeding.
  - Document mirror/udeb/components.
  - Document apt-setup/security_path.
  - Don't recommend passing http://archive.ubuntu.com/ubuntu to
    debootstrap.
  - Document pkgsel/update-policy.
  - Document preseeding user-setup's home directory encryption facility.
  - Improve examples of tasksel/first preseeding to avoid mentioning
    standard, which is installed by default.
  - Document partman-auto-lvm/guided_size.
  - Document scheme for preseeding the use of CC.archive.ubuntu.com
    mirrors.
  - Document pkgsel/updatedb.
  - Document partman/default_filesystem.
  - Document how to override the weak password check.
  - Remove comments about automatic installation methods that have been
    removed from Ubuntu.
  - Remove documentation of
    base-installer/kernel/linux/initramfs-generators; setting this to
    anything other than the default will cause the installer to fail.
* Adjust list of armel architectures for Ubuntu.
* Bump kernelversion to 2.6.35.
* Bump release version and names for Maverick.
* Update Canonical's copyright years.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!-- retain these comments for translator revision tracking -->
2
 
<!-- original version: 22842 untranslated -->
3
 
 
4
 
<sect1 id="example-preseed">
5
 
<title>Preconfiguration File Example</title>
6
 
 
7
 
<para>
8
 
 
9
 
This is a complete working example of a preconfiguration file for an automated
10
 
install. Its use is explained in <xref linkend="automatic-install"/>. You
11
 
may want to uncomment some of the lines before using the file.
12
 
 
13
 
</para>
14
 
 
15
 
<informalexample><screen>
16
 
#### Modifying syslinux.cfg.
17
 
 
18
 
# Edit the syslinux.cfg (or similar) file, and add parameters to the end
19
 
# of the append line(s) for the kernel.
20
 
#
21
 
# You'll at least want to add a parameter telling the installer where to
22
 
# get its preseed file from.
23
 
# If you're installing from USB media, use this, and put the preseed file
24
 
# in the toplevel directory of the USB stick.
25
 
#   preseed/file=/hd-media/preseed
26
 
# If you're netbooting, use this instead:
27
 
#   preseed/url=http://host/path/to/preseed
28
 
# If you're remastering a CD, you could use this:
29
 
#   preseed/file=/cdrom/preseed
30
 
# Be sure to copy this file to the location you specify.
31
 
32
 
# While you're at it, you may want to throw a debconf/priority=critical in
33
 
# there, to avoid most questions even if the preseeding below misses some.
34
 
# And you might set the timeout to 1 in syslinux.cfg to avoid needing to hit
35
 
# enter to boot the installer.
36
 
#
37
 
# Language, country, and keyboard selection cannot be preseeded from a file,
38
 
# because the questions are asked before the preseed file can be loaded.
39
 
# Instead, to avoid these questions, pass some more parameters to the kernel:
40
 
#
41
 
#    languagechooser/language-name=English
42
 
#    countrychooser/shortlist=US
43
 
#    console-keymaps-at/keymap=us
44
 
 
45
 
#### Shell commands.
46
 
 
47
 
# d-i preseeding is inherently not secure. Nothing in the installer checks
48
 
# for attempts at buffer overflows or other exploits of the values of a
49
 
# preseed file like this one. Only use preseed files from trusted
50
 
# locations! To drive that home, and because it's generally useful, here's
51
 
# a way to run any shell command you'd like inside the installer,
52
 
# automatically.
53
 
 
54
 
# This first command is run as early as possible, just after
55
 
# preseeding is read.
56
 
#d-i    preseed/early_command           string wget http://url/to/my.udeb -O /tmp/my.udeb ; udpkg -i /tmp/my.udeb
57
 
# This command is run just before the install finishes, but when there is
58
 
# still a usable /target directory.
59
 
#d-i    preseed/late_command            string for deb in /hd-media/*.deb; do cp $deb /target/tmp; chroot /target dpkg -i /tmp/$(basename $deb); done
60
 
# This command is run just as base-config is starting up.
61
 
#base-config    base-config/early_command       string echo hi mom
62
 
# This command is run after base-config is done, just before the login:
63
 
# prompt. This is a good way to install a set of packages you want, or to
64
 
# tweak the configuration of the system.
65
 
#base-config    base-config/late_command        string apt-get install zsh; chsh -s /bin/zsh
66
 
 
67
 
#### Network configuration.
68
 
 
69
 
# Of course, this won't work if you're loading your preseed file from the
70
 
# network! But it's great if you're booting from CD or USB stick. You can
71
 
# also pass network config parameters in on the kernel params if you are
72
 
# loading preseed files from the network.
73
 
 
74
 
# netcfg will choose an interface that has link if possible. This makes it
75
 
# skip displaying a list if there is more than one interface.
76
 
d-i     netcfg/choose_interface select auto
77
 
 
78
 
# If you prefer to configure the network manually, here's how:
79
 
#d-i    netcfg/disable_dhcp     boolean true
80
 
#d-i    netcfg/get_nameservers  string 192.168.1.1
81
 
#d-i    netcfg/get_ipaddress    string 192.168.1.42
82
 
#d-i    netcfg/get_netmask      string 255.255.255.0
83
 
#d-i    netcfg/get_gateway      string 192.168.1.1
84
 
#d-i    netcfg/confirm_static   boolean true
85
 
 
86
 
# Note that any hostname and domain names assigned from dhcp take
87
 
# precidence over values set here. However, setting the values still
88
 
# prevents the questions from being shown even if values come from dhcp.
89
 
d-i     netcfg/get_hostname     string unassigned-hostname
90
 
d-i     netcfg/get_domain       string unassigned-domain
91
 
 
92
 
# Disable that annoying WEP key dialog.
93
 
d-i     netcfg/wireless_wep     string 
94
 
# The wacky dhcp hostname that some ISPs use as a password of sorts.
95
 
#d-i    netcfg/dhcp_hostname    string radish
96
 
 
97
 
#### Mirror settings.
98
 
 
99
 
d-i     mirror/country          string enter information manually
100
 
d-i     mirror/http/hostname    string http.us.debian.org
101
 
d-i     mirror/http/directory   string /debian
102
 
d-i     mirror/suite            string testing
103
 
d-i     mirror/http/proxy       string 
104
 
 
105
 
### Partitioning.
106
 
 
107
 
# If the system has free space you can choose to only partition that space.
108
 
#d-i    partman-auto/init_automatically_partition       select Use the largest continuous free space
109
 
# Alternatively, you can specify a disk to partition. The device name can
110
 
# be given in either devfs or traditional non-devfs format.
111
 
# For example, to use the first disk devfs knows of:
112
 
d-i     partman-auto/disk       string /dev/discs/disc0/disc
113
 
 
114
 
# You can choose from any of the predefined partitioning recipes:
115
 
d-i     partman-auto/choose_recipe      select All files in one partition (recommended for new users)
116
 
#d-i    partman-auto/choose_recipe      select Desktop machine
117
 
#d-i    partman-auto/choose_recipe      select Multi-user workstation
118
 
# Or provide a recipe of your own...
119
 
# The recipe format is documented in the file devel/partman-auto-recipe.txt.
120
 
# If you have a way to get a recipe file into the d-i environment, you can
121
 
# just point at it.
122
 
#d-i    partman-auto/expert_recipe_file string /hd-media/recipe
123
 
# If not, you can put an entire recipe in one line. This example creates
124
 
# a small /boot partition, suitable swap, and uses the rest of the space
125
 
# for the root partition:
126
 
#d-i    partman-auto/expert_recipe      string boot-root :: 20 50 100 ext3 $primary{ } $bootable{ } method{ format } format{ } use_filesystem{ } filesystem{ ext3 } mountpoint{ /boot } .  500 10000 1000000000 ext3 method{ format } format{ } use_filesystem{ } filesystem{ ext3 } mountpoint{ / } .  64 512 300% linux-swap method{ swap } format{ } . 
127
 
# For reference, here is that same recipe in a more readable form:
128
 
#       boot-root ::
129
 
#       40 50 100 ext3
130
 
#               $primary{ } $bootable{ }
131
 
#               method{ format } format{ }
132
 
#               use_filesystem{ } filesystem{ ext3 }
133
 
#               mountpoint{ /boot }
134
 
#       .
135
 
#       500 10000 1000000000 ext3
136
 
#               method{ format } format{ }
137
 
#               use_filesystem{ } filesystem{ ext3 }
138
 
#               mountpoint{ / }
139
 
#       .
140
 
#       64 512 300% linux-swap
141
 
#               method{ swap } format{ }
142
 
#       .
143
 
 
144
 
# This makes partman automatically partition without confirmation.
145
 
d-i     partman/choose_partition        select Finish partitioning and write changes to disk
146
 
d-i     partman/confirm                 boolean true
147
 
 
148
 
#### Boot loader installation.
149
 
 
150
 
# Grub is the default boot loader (for x86). If you want lilo installed
151
 
# instead, uncomment this:
152
 
#d-i    grub-installer/skip             boolean true
153
 
 
154
 
# This is fairly safe to set, it makes grub install automatically to the MBR
155
 
# if no other operating system is detected on the machine.
156
 
d-i     grub-installer/only_debian      boolean true
157
 
# This one makes grub-installer install to the MBR if if finds some other OS
158
 
# too, which is less safe as it might not be able to boot that other OS.
159
 
d-i     grub-installer/with_other_os    boolean true
160
 
# Alternatively, if you want to install to a location other than the mbr,
161
 
# uncomment and edit these lines:
162
 
#d-i    grub-installer/bootdev          string (hd0,0)
163
 
#d-i    grub-installer/only-debian      boolean false
164
 
#d-i    grub-installer/with_other_os    boolean false
165
 
 
166
 
##### Finishing up the first stage install.
167
 
 
168
 
# Avoid that last message about the install being complete.
169
 
d-i     finish-install/reboot_in_progress       note 
170
 
 
171
 
 
172
 
##### Preseeding base-config.
173
 
# XXX: Note that most of this will not work right until base-config 2.40.4
174
 
# is available.
175
 
 
176
 
# Avoid the intorductory message.
177
 
base-config     base-config/intro       note 
178
 
 
179
 
# Avoid the final message.
180
 
base-config     base-config/login       note 
181
 
 
182
 
# If you installed a display manager, but don't want to start it immediately
183
 
# after base-config finishes.
184
 
#base-config    base-config/start-display-manager       boolean false
185
 
 
186
 
###### Time zone setup.
187
 
 
188
 
# Controls whether or not the hardware clock is set to GMT.
189
 
base-config     tzconfig/gmt            boolean true
190
 
 
191
 
# If you told the installer that you're in the United States, then you
192
 
# can set the time zone using this variable.
193
 
# (Choices are: Eastern, Central, Mountain, Pacific, Alaska, Hawaii,
194
 
# Aleutian, Arizona East-Indiana, Indiana-Starke, Michigan, Samoa, other)
195
 
base-config     tzconfig/choose_country_zone/US select Eastern
196
 
# If you told it you're in Canada.
197
 
# (Choices are: Newfoundland, Atlantic, Eastern, Central,
198
 
# East-Saskatchewan, Saskatchewan, Mountain, Pacific, Yukon, other)
199
 
base-config     tzconfig/choose_country_zone/CA select Eastern
200
 
# If you told it you're in Brazil. (Choices are: East, West, Acre,
201
 
# DeNoronha, other)
202
 
base-config     tzconfig/choose_country_zone/BR select East
203
 
# Many countries have only one time zone. If you told the installer you're
204
 
# in one of those countries, you can choose its standard time zone via this
205
 
# question.
206
 
base-config     tzconfig/choose_country_zone_single boolean true
207
 
# This question is asked as a fallback for countries other than those
208
 
# listed above, which have more than one time zone. You can preseed one of
209
 
# the time zones, or "other".
210
 
#base-config    tzconfig/choose_country_zone_multiple select 
211
 
 
212
 
###### Account setup.
213
 
 
214
 
# To preseed the root password, you have to put it in the clear in this
215
 
# file. That is not a very good idea, use caution!
216
 
#passwd         passwd/root-password            password r00tme
217
 
#passwd         passwd/root-password-again      password r00tme
218
 
 
219
 
# If you want to skip creation of a normal user account.
220
 
#passwd         passwd/make-user                boolean false
221
 
# Alternatively, you can preseed the user's name. Note that the username
222
 
# will be derived from this; it cannot be overridden currently. The
223
 
# username will be the (lowercase) first name of the full name.
224
 
#passwd         passwd/user-fullname            string Debian User
225
 
#passwd         passwd/username                 string 
226
 
# And their password, but use caution!
227
 
#passwd         passwd/user-password            password insecure
228
 
#passwd         passwd/user-password-again      password insecure
229
 
 
230
 
###### Apt setup.
231
 
 
232
 
# This question controls what source the second stage installation uses
233
 
# for packages. Choices are cdrom, http, ftp, filesystem, edit sources list
234
 
# by hand
235
 
base-config     apt-setup/uri_type      select http
236
 
 
237
 
# If you choose ftp or http, you'll be asked for a country and a mirror.
238
 
base-config     apt-setup/country       select enter information manually
239
 
base-config     apt-setup/hostname      string http.us.debian.org
240
 
base-config     apt-setup/directory     string /debian
241
 
# Stop after choosing one mirror.
242
 
base-config     apt-setup/another       boolean false
243
 
 
244
 
# You can choose to install non-free and contrib software.
245
 
#base-config    apt-setup/non-free      boolean true
246
 
#base-config    apt-setup/contrib       boolean true
247
 
 
248
 
# Do enable security updates.
249
 
base-config     apt-setup/security-updates      boolean true
250
 
 
251
 
###### Package selection.
252
 
 
253
 
# You can choose to install any combination of tasks that are available.
254
 
# Available tasks as of this writing include: Desktop environment,
255
 
# Web server, Print server, DNS server, File server, Mail server, 
256
 
# SQL database, manual package selection. The last of those will run
257
 
# aptitude. You can also choose to install no tasks, and force the
258
 
# installation of a set of packages in some other way.
259
 
# XXX: this will not work until tasksel 2.12 is available
260
 
tasksel         tasksel/first   multiselect Desktop environment
261
 
#tasksel        tasksel/first   multiselect Web server, Mail server, DNS server
262
 
 
263
 
###### Mailer configuration.
264
 
 
265
 
# During a normal install, exim asks only two questions. Here's how to
266
 
# avoid even those. More complicated preseeding is possible.
267
 
exim4-config    exim4/dc_eximconfig_configtype  select no configuration at this time
268
 
# It's a good idea to set this to whatever user account you choose to
269
 
# create. Leaving the value blank results in postmaster mail going to
270
 
# /var/mail/mail.
271
 
exim4-config    exim4/dc_postmaster             string 
272
 
 
273
 
###### X Configuration.
274
 
 
275
 
# Preseeding Debian's X config is possible, but you probably need to know
276
 
# some details about the video hardware of the machine, since Debian's X
277
 
# configurator does not do fully automatic configuration of everything.
278
 
 
279
 
# X can detect the right driver for some cards, but if you're preseeding,
280
 
# you override whatever it chooses. Still, vesa will work most places.
281
 
#xserver-xfree86        xserver-xfree86/config/device/driver    select vesa
282
 
 
283
 
# A caveat with mouse autodetection is that if it fails, X will retry it
284
 
# over and over. So if it's preseeded to be done, there is a possibility of
285
 
# an infinite loop if the mouse is not autodetected.
286
 
#xserver-xfree86        xserver-xfree86/autodetect_mouse        boolean true
287
 
 
288
 
# Monitor autodetection is recommended.
289
 
xserver-xfree86         xserver-xfree86/autodetect_monitor      boolean true
290
 
# Uncomment if you have a LCD display.
291
 
#xserver-xfree86        xserver-xfree86/config/monitor/lcd      boolean true
292
 
# X has three configuration paths for the monitor. Here's how to preseed
293
 
# the "medium" path, which is always available. The "simple" path may not
294
 
# be available, and the "advanced" path asks too many questions.
295
 
xserver-xfree86 xserver-xfree86/config/monitor/selection-method select medium
296
 
xserver-xfree86 xserver-xfree86/config/monitor/mode-list        select 1024x768 @ 60 Hz
297
 
 
298
 
###### Everything else.
299
 
 
300
 
# Depending on what software you choose to install, or if things go wrong
301
 
# during the installation process, it's possible that other questions may
302
 
# be asked. You can preseed those too, of course. To get a list of every
303
 
# possible question that could be asked during an install, do an
304
 
# installation, and then run these commands:
305
 
#   debconf-get-selections --installer > file
306
 
#   debconf-get-selections >> file
307
 
 
308
 
# If you like, you can include other preseed files into this one.
309
 
# Any settings in those files will override pre-existing settings from this
310
 
# file. More that one file can be listed, separated by spaces; all will be
311
 
# loaded. The included files can have preseed/include directives of their
312
 
# own as well. Note that if the filenames are relative, they are taken from
313
 
# the same directory as the preseed file that includes them.
314
 
#d-i    preseed/include string x.cfg
315
 
# More flexably, this runs a shell command and if it outputs the names of
316
 
# preseed files, includes those files. For example, to switch configs based
317
 
# on a particular usb storage device (in this case, a built-in card reader):
318
 
#d-i    preseed/include_command string if $(grep -q "GUID: 0aec3050aec305000001a003"  /proc/scsi/usb-storage-*/*); then echo kraken.cfg; else echo otherusb.cfg; fi
319
 
</screen></informalexample>
320
 
 
321
 
</sect1>