-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpreseed-raid10.cfg
186 lines (181 loc) · 9.51 KB
/
preseed-raid10.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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
d-i debian-installer/language string C
d-i debian-installer/country string US
d-i debian-installer/locale string en_US.UTF-8
d-i localechooser/supported-locales multiselect C
d-i keyboard-configuration/xkb-keymap select us
d-i keyboard-configuration/toggle select Control+Shift
d-i keyboard-configuration/optionscode string grp:ctrl_shift_toggle,grp_led:scroll
d-i netcfg/choose_interface select auto
d-i passwd/user-fullname string Debian User
d-i passwd/username string den
d-i passwd/user-password password -
d-i passwd/user-password-again password -
d-i passwd/root-password password -
d-i passwd/root-password-again password -
d-i mirror/country string ru
d-i mirror/http/hostname string httpredir.debian.org
d-i mirror/http/directory string /debian
d-i clock-setup/utc boolean false
d-i time/zone string Europe/Moscow
d-i clock-setup/ntp boolean true
partman-basicfilesystems partman-basicfilesystems/no_swap boolean false
d-i partman/confirm boolean true
d-i partman-md/confirm boolean true
d-i partman-lvm/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman-md/confirm_nooverwrite boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-partitioning/default_label string gpt
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-lvm/device_remove_lvm boolean true
d-i partman/choose_partition select finish
d-i partman-efi/non_efi_system boolean true
d-i partman-efi/no_efi boolean false
d-i partman-auto-lvm/no_boot boolean true
d-i partman-auto-lvm/new_vg_name string sys
d-i partman-auto/disk string /dev/sda /dev/sdb /dev/sdc /dev/sdd
d-i partman-auto/method string raid
d-i partman-auto-raid/recipe string \
1 4 0 ext3 /boot \
/dev/sda3#/dev/sdb3#/dev/sdc3#/dev/sdd3 \
. \
10 4 0 lvm - \
/dev/sda4#/dev/sdb4#/dev/sdc4#/dev/sdd4 \
.
d-i partman-auto/expert_recipe \
string partman-auto/text/multi_scheme :: \
\
1 1 1 free \
$primary{ } \
$bios_boot{ } \
method{ biosgrub } \
. \
16 32 64 free \
$primary{ } \
method{ efi } \
format{ } \
. \
64 128 256 raid \
$lvmignore{ } \
$primary{ } \
method{ raid } \
. \
1 1 -1 raid \
$primary{ } \
method{ raid } \
. \
16 32 64 $default_filesystem \
$lvmok{ } \
$defaultignore{ } \
method{ format } \
format{ } \
use_filesystem{ } \
$default_filesystem{ } \
lv_name{ top } \
mountpoint{ / } \
. \
512 1024 2048 $default_filesystem \
$lvmok{ } \
$defaultignore{ } \
method{ format } \
format{ } \
use_filesystem{ } \
$default_filesystem{ } \
mountpoint{ /usr } \
. \
256 512 1024 $default_filesystem \
$lvmok{ } \
$defaultignore{ } \
method{ format } \
format{ } \
use_filesystem{ } \
$default_filesystem{ } \
mountpoint{ /var } \
. \
128 256 512 $default_filesystem \
$lvmok{ } \
$defaultignore{ } \
method{ format } \
format{ } \
use_filesystem{ } \
$default_filesystem{ } \
mountpoint{ /tmp } \
. \
128 256 512 $default_filesystem \
$lvmok{ } \
$defaultignore{ } \
method{ format } \
format{ } \
use_filesystem{ } \
$default_filesystem{ } \
mountpoint{ /home } \
.
d-i partman/mount_style select traditional
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
d-i apt-setup/services-select multiselect security, updates
d-i apt-setup/security_host string security.debian.org
tasksel tasksel/first multiselect standard
d-i pkgsel/include string grub-efi-amd64 grub-pc-bin gawk
popularity-contest popularity-contest/participate boolean false
d-i lilo-installer/skip boolean true
d-i grub-installer/skip boolean true
d-i grub-installer/only_debian boolean true
d-i grub-installer/bootdev string /dev/sda
grub-pc grub-pc/install_devices multiselect \
/dev/sda, /dev/sdb, /dev/sdc, /dev/sdd
d-i cdrom-detect/eject boolean false
d-i finish-install/reboot_in_progress note
d-i preseed/late_command string in-target bash -lc '{ \
echo "blacklist floppy" > /etc/modprobe.d/blacklist-floppy.conf; \
update-initramfs -u; \
echo "(hd0) /dev/sda" >> /boot/grub/device.map; \
echo "(hd1) /dev/sdb" >> /boot/grub/device.map; \
echo "(hd2) /dev/sdc" >> /boot/grub/device.map; \
echo "(hd3) /dev/sdd" >> /boot/grub/device.map; \
export LVM_SUPPRESS_FD_WARNINGS=1; \
[ -d /sys/firmware/efi/efivars ] && \
mount --types=efivarfs efivarfs /sys/firmware/efi/efivars; \
echo -e "#!/bin/bash\n\n \
mdadm -D /dev/md0 |\n \
awk \"/active sync/ {\n\t \
gsub(\\\"[0-9]+\\\$\\\", \\\"\\\", \\\$NF)\n\t \
print \\\$NF}\" |\n \
while read DISK; do\n\t \
umount --verbose /boot/efi\n\t \
mount --verbose \${DISK}2 /boot/efi\n\t \
grub-install.bin --target=i386-pc \$DISK\n\t \
grub-install.bin --target=x86_64-efi \$DISK\n\t \
if [ -e /sys/firmware/efi ]; then\n\t\t \
efibootmgr --verbose | awk \"/\$(\n\t\t\t \
blkid --match-tag PARTUUID \
--output value \${DISK}2)/ {\n\t\t\t \
print(gensub(\\\"Boot([[:xdigit:]]{4})\\\\\\\\\*\\\", \
\n\t\t\t\t\t \\\"\\\\\\\\\1\\\", \\\"g\\\", \\\$1))}\" | \
\n\t\t while read BOOTNUM; do\n\t\t\t \
efibootmgr --bootnum \${BOOTNUM} --delete-bootnum\n\t\t \
done\n\t\t \
efibootmgr --disk \$DISK \
--create --loader EFI/debian/grubx64.efi \\\\\n\t\t\t \
--part 2 --label \"Debian(\$DISK)\"\n\t \
fi\n\t \
[ -d /boot/efi/EFI/boot ] || \n\t \
mkdir --verbose /boot/efi/EFI/boot\n\t \
cp --archive --verbose /boot/efi/EFI/*/grubx64.efi \\\\\n\t\t \
/boot/efi/EFI/boot/bootx64.efi\n\t \
CONF=\"configfile (lvm/sys-boot)/grub/grub.cfg\"\n\t \
echo \$CONF > /boot/efi/EFI/boot/grub.cfg\n\t \
sfdisk \${DISK} --part-type 2 \"EFI System\"\n \
done\n \
update-grub\n \
" > /usr/sbin/grub-install.sh; \
sed -i -e "s/\t/ /g" -e "s/^ //" /usr/sbin/grub-install.sh; \
chmod -v +x /usr/sbin/grub-install.sh; \
dpkg-divert --local --divert /usr/sbin/grub-install.bin \
--add /usr/sbin/grub-install; \
cd /usr/sbin; \
mv --verbose grub-install grub-install.bin; \
ln --verbose --symbolic grub-install.sh grub-install; \
grub-install; \
}'