Skip to content

Commit 7e8e894

Browse files
committed
Updated preseed script
1 parent eed21d5 commit 7e8e894

File tree

2 files changed

+51
-12
lines changed

2 files changed

+51
-12
lines changed

preseed.cfg

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,24 @@ d-i debian-installer/locale string en_US
1313
# Keyboard selection.
1414
# Disable automatic (interactive) keymap detection.
1515
d-i console-setup/ask_detect boolean false
16-
#d-i keyboard-configuration/modelcode string pc105
16+
d-i keyboard-configuration/modelcode string pc105
1717
d-i keyboard-configuration/layoutcode string us
1818
# To select a variant of the selected layout (if you leave this out, the
1919
# basic form of the layout will be used):
2020
#d-i keyboard-configuration/variantcode string dvorak
2121

22+
d-i debconf/language string en_US:en
23+
d-i debian-installer/country string US
24+
d-i debian-installer/fallbacklocale string en_US
25+
d-i debian-installer/language string en_US:en
26+
d-i debian-installer/locale string en_US
27+
d-i languagechooser/locale string en
28+
29+
#console-setup console-setup/layoutcode select us
30+
#console-setup console-setup/modelcode select pc105
31+
#console-setup console-setup/layout select us
32+
#console-setup console-setup/variant select Germany
33+
2234
### Network configuration
2335
# Disable network configuration entirely. This is useful for cdrom
2436
# installations on non-networked devices where the network questions,
@@ -141,7 +153,7 @@ d-i partman-lvm/confirm boolean true
141153

142154
# For LVM partitioning, you can select how much of the volume group to use
143155
# for logical volumes.
144-
#d-i partman-auto-lvm/guided_size string max
156+
d-i partman-auto-lvm/guided_size string max
145157
#d-i partman-auto-lvm/guided_size string 10GB
146158
#d-i partman-auto-lvm/guided_size string 50%
147159

@@ -274,18 +286,18 @@ d-i partman/confirm_nooverwrite boolean true
274286
#d-i passwd/root-password-crypted password [MD5 hash]
275287

276288
# To create a normal user account.
277-
#d-i passwd/user-fullname string Ubuntu User
278-
#d-i passwd/username string ubuntu
289+
d-i passwd/user-fullname string Ubuntu User
290+
d-i passwd/username string ubuntu
279291
# Normal user's password, either in clear text
280-
#d-i passwd/user-password password insecure
281-
#d-i passwd/user-password-again password insecure
292+
d-i passwd/user-password password Passw0rd
293+
d-i passwd/user-password-again password Passw0rd
282294
# or encrypted using an MD5 hash.
283295
#d-i passwd/user-password-crypted password [MD5 hash]
284296
# Create the first user with the specified UID instead of the default.
285297
#d-i passwd/user-uid string 1010
286298
# The installer will warn about weak passwords. If you are sure you know
287299
# what you're doing and want to override it, uncomment this.
288-
#d-i user-setup/allow-password-weak boolean true
300+
d-i user-setup/allow-password-weak boolean true
289301

290302
# The user account will be added to some standard initial groups. To
291303
# override that, use this.
@@ -325,29 +337,31 @@ d-i user-setup/encrypt-home boolean false
325337
#d-i debian-installer/allow_unauthenticated boolean true
326338

327339
### Package selection
328-
tasksel tasksel/first multiselect ubuntu-desktop
340+
tasksel tasksel/first multiselect ubuntu-server
329341
#tasksel tasksel/first multiselect lamp-server, print-server
330342
#tasksel tasksel/first multiselect kubuntu-desktop
331343

344+
d-i pkgsel/install-language-support boolean false
345+
332346
# Individual additional packages to install
333-
#d-i pkgsel/include string openssh-server build-essential
347+
d-i pkgsel/include string openssh-server build-essential
334348
# Whether to upgrade packages after debootstrap.
335349
# Allowed values: none, safe-upgrade, full-upgrade
336350
#d-i pkgsel/upgrade select none
337351

338352
# Language pack selection
339-
#d-i pkgsel/language-packs multiselect de, en, zh
353+
#d-i pkgsel/language-packs multiselect en
340354

341355
# Policy for applying updates. May be "none" (no automatic updates),
342356
# "unattended-upgrades" (install security updates automatically), or
343357
# "landscape" (manage system with Landscape).
344-
#d-i pkgsel/update-policy select none
358+
d-i pkgsel/update-policy select none
345359

346360
# Some versions of the installer can report back on what software you have
347361
# installed, and what software you use. The default is not to report back,
348362
# but sending reports helps the project determine what software is most
349363
# popular and include it on CDs.
350-
#popularity-contest popularity-contest/participate boolean false
364+
popularity-contest popularity-contest/participate boolean false
351365

352366
# By default, the system's locate database will be updated after the
353367
# installer has finished installing most packages. This may take a while, so
@@ -468,3 +482,5 @@ xserver-xorg xserver-xorg/config/monitor/mode-list \
468482
# packages and run commands in the target system.
469483
#d-i preseed/late_command string apt-install zsh; in-target chsh -s /bin/zsh
470484

485+
d-i preseed/late_command string in-target /usr/bin/wget https://raw.github.com/cloudbase/unattended-setup-scripts/master/preseed_post.sh -O /tmp/preseed_post.sh; /bin/bash /tmp/preseed_post.sh
486+

preseed_post.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
set -e
3+
4+
/usr/bin/apt-get update -y
5+
/usr/bin/apt-get upgrade -y
6+
7+
CDROM_DEV=/dev/cdrom
8+
CDROM_LABEL=`blkid -o value $CDROM_DEV | awk 'NR == 1'`
9+
if [ "$CDROM_LABEL" != "VMware Tools" ]; then
10+
CDROM_DEV=/dev/cdrom1
11+
fi
12+
13+
TMP1=`mktemp -d`
14+
mount -o ro $CDROM_DEV $TMP1
15+
TMP2=`mktemp -d`
16+
cd $TMP2
17+
tar zxf $TMP1/VMwareTools-*
18+
umount $TMP1
19+
rmdir $TMP1
20+
cd vmware-tools-distrib/
21+
./vmware-install.pl --default
22+
rm -rf $TMP2
23+

0 commit comments

Comments
 (0)