-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpreseed.cfg
124 lines (105 loc) · 5.03 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
117
118
119
120
121
122
123
124
# localization
d-i debian-installer/locale string en_US
d-i keyboard-configuration/xkb-keymap select us
# automatically select network interface
d-i netcfg/choose_interface select auto
#scan for another cd/dvd off
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
# mirror settings
d-i apt-setup/use_mirror boolean false
# set host and domain
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
# set root password and create user (hash)
d-i passwd/root-password-crypted password $6$Xw/BOGUqz9bdkJNu$wIo2tr9qhORd89zzo0hozQI.uz59HZ4zWC8RzkNZRd8vBl5o0NJMV/KYtv3SiBzkJuw6JdSq2fieE3TW7Xqfn0
d-i passwd/make-user boolean false
# d-i passwd/user-fullname string newuser
# d-i passwd/username string newuser
# d-i passwd/user-password-crypted password $6$Xw/BOGUqz9bdkJNu$wIo2tr9qhORd89zzo0hozQI.uz59HZ4zWC8RzkNZRd8vBl5o0NJMV/KYtv3SiBzkJuw6JdSq2fieE3TW7Xqfn0
# set clock, timezone and use ntp to set clock
d-i clock-setup/utc boolean true
d-i time/zone string Asia/Tehran
d-i clock-setup/ntp boolean true
# use lvm partition
d-i partman-auto/method string lvm
d-i partman-md/device_remove_md boolean true
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
# use the following partition scheme on /dev/sda
d-i partman-auto/disk string /dev/sda
d-i partman-auto/choose_recipe select root
# make lvm the max size
d-i partman-auto-lvm/guided_size string max
d-i partman-auto-lvm/new_vg_name string debian-lv
d-i partman-auto-lvm/no_boot boolean true
d-i partman-auto/expert_recipe string \
root :: \
1 1 1 free \
$bios_boot{ } \
method{ biosgrub } \
. \
256 256 256 free \
$iflabel{ gpt } $reusemethod{ } \
method{ efi } format{ } \
mountpoint{ /efi } \
. \
500 500 500 ext4 \
$primary{ } $bootable{ } \
method{ format } format{ } \
$lvmignore{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /boot } \
. \
2048 2048 4096 linux-swap \
$lvmok{ } \
lv_name{ swap } in_vg { debian-lv } \
$primary{ } \
method{ swap } format{ } \
. \
4000 4096 4096 ext4 \
$lvmok{ } \
lv_name{ var } in_vg { debian-lv } \
$primary{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /var } \
. \
1000 1001 22000 ext4 \
$lvmok{ } \
lv_name{ root } in_vg { debian-lv } \
$primary{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ / } \
. \
# remove any RAID partitioning
d-i partman-md/device_remove_md boolean true
# don't confirm anything
d-i partman-basicfilesystems/no_mount_point boolean false
d-i partman-partitioning/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
d-i partman-efi/non_efi_system boolean true
d-i partman-basicfilesystems/choose_label string gpt
d-i partman-basicfilesystems/default_label string gpt
d-i partman-partitioning/choose_label string gpt
d-i partman-partitioning/default_label string gpt
d-i partman/choose_label string gpt
d-i partman/default_label string gpt
d-i grub-installer/force-efi-extra-removable boolean false
grub-pc grub-pc/install_devices_empty boolean true
# disable popularity contest
popularity-contest popularity-contest/participate boolean false
# force grub install to /dev/sda
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
d-i grub-installer/bootdev string /dev/sda
# don't wait for confirm, just reboot when finished
d-i finish-install/reboot_in_progress note
# To allow root login with password, which isn't the best but needed for my use case
d-i preseed/late_command string \
in-target sed -i 's/#PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config