forked from istepaniuk/debian11-preseed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
preseed.cfg
116 lines (93 loc) · 3.83 KB
/
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#_preseed_V1
#
# Preseed configuration for debian 11/bullseye
#
# ATTENTION: This preseed configuration ERASES the target disks
# without any confirmation whatsoever.
#
# Locale
d-i debian-installer/locale string en_US
d-i debian-installer/locale string en_US.UTF-8
d-i keyboard-configuration/xkb-keymap select us
# Network
d-i hw-detect/load_firmware boolean false
d-i netcfg/enable boolean true
d-i netcfg/choose_interface select auto
d-i netcfg/hostname string unassigned-preseed
d-i netcfg/get_hostname string unassigned-preseed
d-i netcfg/get_domain string local
# Apt
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
d-i mirror/country string manual
d-i mirror/http/hostname string ftp.nl.debian.org
d-i mirror/http/directory string /debian
d-i mirror/http/proxy string
# Users/passwords
d-i passwd/root-login boolean true
d-i passwd/make-user boolean true
d-i passwd/root-password password insecure1
d-i passwd/root-password-again password insecure1
d-i passwd/user-fullname string Ivan Stepaniuk
d-i passwd/username string istepaniuk
d-i passwd/user-password password insecure1
d-i passwd/user-password-again password insecure1
# Clock
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Amsterdam
d-i clock-setup/ntp boolean true
# Disk partition
d-i partman/early_command string \
BOOT_DEV=$(list-devices disk | head -1) ; \
debconf-set partman-auto/disk $BOOT_DEV
d-i partman-auto/method string regular
d-i partman-auto/choose_recipe select atomic
d-i partman-auto/expert_recipe string \
50 100 50 fat32 \
$primary{ } \
method{ efi } \
format{ } \
. \
1000 8000 -1 ext4 \
$primary{ } \
method{ format } \
format{ } \
use_filesystem{ } \
filesystem{ ext4 } \
mountpoint{ / } \
. \
2048 2048 2048 linux-swap \
$primary{ } \
method{ swap } \
format{ } \
.
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman-efi/non_efi_system boolean true
d-i partman/confirm_write_new_label boolean true
d-i partman/confirm boolean true
d-i partman/choose_partition select Finish partitioning and write changes to disk
# Packages
d-i base-installer/install-recommends boolean false
d-i base-installer/kernel/image string linux-image-amd64
d-i apt-setup/use_mirror boolean true
tasksel tasksel/first multiselect standard, ssh-server
d-i pkgsel/include string vim sudo
d-i pkgsel/upgrade select safe-upgrade
popularity-contest popularity-contest/participate boolean true
# Boot
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
d-i grub-installer/force-efi-extra-removable boolean true
d-i grub-installer/progress/step_force_efi_removable boolean true
d-i grub-installer/bootdev string default
# Custom late commands
d-i preseed/late_command string \
HOST_SERIAL="unassigned-$(head /dev/urandom | tr -dc a-z | head -c10)" ; \
echo "istepaniuk ALL=(ALL) NOPASSWD: ALL" > /target/etc/sudoers.d/istepaniuk ; \
sed -i "s/unassigned-preseed/$HOST_SERIAL/g" /target/etc/hostname ; \
sed -i "s/unassigned-preseed/$HOST_SERIAL/g" /target/etc/hosts
# Finish
d-i finish-install/reboot_in_progress note