-
Notifications
You must be signed in to change notification settings - Fork 1
/
linux_debian_template_preseed.cfg
executable file
·62 lines (55 loc) · 2.43 KB
/
linux_debian_template_preseed.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
d-i debian-installer/locale string en_US
d-i console-keymaps-at/keymap select us
# network config
d-i netcfg/choose_interface select auto
d-i netcfg/get_hostname string localhost
d-i netcfg/get_domain string localdomain
d-i netcfg/disable_dhcp boolean false
# time & clock
d-i clock-setup/ntp boolean false
d-i clock-setup/utc boolean true
d-i time/zone select US/Eastern
# HDD partitioning + format
d-i partman-auto/method string regular
d-i partman-auto/choose_recipe select atomic
d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
# users
d-i passwd/root-login boolean true
d-i passwd/root-password password $password
d-i passwd/root-password-again password $password
d-i passwd/user-fullname string $user
d-i passwd/username string $user
d-i passwd/user-password password $password
d-i passwd/user-password-again password $password
# packages
tasksel tasksel/first multiselect standard, desktop
tasksel tasksel/desktop multiselect kde
d-i pkgsel/include string openssh-server build-essential autoconf dkms synaptic
d-i pkgsel/upgrade select none
popularity-contest popularity-contest/participate boolean false
# silence extra repositories, grub and reboot
d-i apt-setup/security_host string
d-i apt-setup/volatile_host string
d-i apt-setup/services-select multiselect
d-i grub-installer/only_debian boolean true
d-i finish-install/reboot_in_progress note
# custom scripts; Step is done in d-i after installed all packages, but before guest OS reboot:
d-i preseed/late_command string \
mv /target/etc/rc.local /target/etc/rc.local.backup; \
echo false > /target/etc/X11/default-display-manager; \
echo '#!/bin/bash' > /target/etc/rc.local;\
echo 'mkdir /mnt/cdrom' >> /target/etc/rc.local;\
echo 'echo' >> /target/etc/rc.local;\
echo 'echo "Installing VirtualBox Guest Additions..."' >> /target/etc/rc.local;\
echo 'mount -t iso9660 -o ro /dev/cdrom /mnt/cdrom' >> /target/etc/rc.local;\
echo 'bash /mnt/cdrom/VBoxLinuxAdditions.run' >> /target/etc/rc.local;\
echo 'eject /dev/cdrom' >> /target/etc/rc.local;\
echo 'usermod -a -G vboxsf $user' >> /target/etc/rc.local;\
echo 'echo "/usr/bin/kdm" >/etc/X11/default-display-manager' >> /target/etc/rc.local;\
echo 'mv /etc/rc.local.backup /etc/rc.local' >> /target/etc/rc.local;\
echo '/etc/init.d/kdm start &' >> /target/etc/rc.local;\
echo 'exit 0' >> /target/etc/rc.local;\
chmod a+rx /target/etc/rc.local