|
@@ -37,8 +37,8 @@ timezone=
|
|
|
ntp=
|
|
ntp=
|
|
|
skip_partitioning=
|
|
skip_partitioning=
|
|
|
disk=
|
|
disk=
|
|
|
-partitioning_method=
|
|
|
|
|
-filesystem=
|
|
|
|
|
|
|
+partitioning_method=regular
|
|
|
|
|
+filesystem=ext4
|
|
|
kernel=
|
|
kernel=
|
|
|
security_repository=
|
|
security_repository=
|
|
|
install=
|
|
install=
|
|
@@ -52,6 +52,7 @@ cleartext_password=
|
|
|
gpt=
|
|
gpt=
|
|
|
initramfs=generic
|
|
initramfs=generic
|
|
|
install_recommends=true
|
|
install_recommends=true
|
|
|
|
|
+efi=false
|
|
|
|
|
|
|
|
while [ $# -gt 0 ]; do
|
|
while [ $# -gt 0 ]; do
|
|
|
case $1 in
|
|
case $1 in
|
|
@@ -183,6 +184,9 @@ while [ $# -gt 0 ]; do
|
|
|
--no-install-recommends)
|
|
--no-install-recommends)
|
|
|
install_recommends=false
|
|
install_recommends=false
|
|
|
;;
|
|
;;
|
|
|
|
|
+ --efi)
|
|
|
|
|
+ efi=true
|
|
|
|
|
+ ;;
|
|
|
*)
|
|
*)
|
|
|
_err "Illegal option $1"
|
|
_err "Illegal option $1"
|
|
|
exit 1
|
|
exit 1
|
|
@@ -389,17 +393,14 @@ $save_preseed << EOF
|
|
|
|
|
|
|
|
# Clock and time zone setup
|
|
# Clock and time zone setup
|
|
|
|
|
|
|
|
-d-i clock-setup/utc boolean true
|
|
|
|
|
d-i time/zone string $timezone
|
|
d-i time/zone string $timezone
|
|
|
|
|
+d-i clock-setup/utc boolean true
|
|
|
d-i clock-setup/ntp boolean true
|
|
d-i clock-setup/ntp boolean true
|
|
|
d-i clock-setup/ntp-server string $ntp
|
|
d-i clock-setup/ntp-server string $ntp
|
|
|
EOF
|
|
EOF
|
|
|
|
|
|
|
|
if [ "$skip_partitioning" != true ]; then
|
|
if [ "$skip_partitioning" != true ]; then
|
|
|
- filesystem=${filesystem:-ext4}
|
|
|
|
|
- partitioning_method=${partitioning_method:-regular}
|
|
|
|
|
-
|
|
|
|
|
- $save_preseed << EOF
|
|
|
|
|
|
|
+ $save_preseed << 'EOF'
|
|
|
|
|
|
|
|
# Partitioning
|
|
# Partitioning
|
|
|
|
|
|
|
@@ -410,29 +411,57 @@ EOF
|
|
|
|
|
|
|
|
echo "d-i partman-auto/method string $partitioning_method" | $save_preseed
|
|
echo "d-i partman-auto/method string $partitioning_method" | $save_preseed
|
|
|
|
|
|
|
|
- if [ "$partitioning_method" = "regular" ]; then
|
|
|
|
|
|
|
+ if [ "$partitioning_method" = regular ]; then
|
|
|
if [ "$gpt" = true ]; then
|
|
if [ "$gpt" = true ]; then
|
|
|
$save_preseed << 'EOF'
|
|
$save_preseed << 'EOF'
|
|
|
d-i partman-partitioning/default_label string gpt
|
|
d-i partman-partitioning/default_label string gpt
|
|
|
d-i partman-partitioning/choose_label select gpt
|
|
d-i partman-partitioning/choose_label select gpt
|
|
|
EOF
|
|
EOF
|
|
|
- else
|
|
|
|
|
- echo "d-i partman/default_filesystem string $filesystem" | $save_preseed
|
|
|
|
|
- $save_preseed << 'EOF'
|
|
|
|
|
-d-i partman-auto/expert_recipe string naive :: 0 1 -1 $default_filesystem $primary{ } $bootable{ } method{ format } format{ } use_filesystem{ } $default_filesystem{ } mountpoint{ / } .
|
|
|
|
|
-d-i partman-auto/choose_recipe select naive
|
|
|
|
|
-d-i partman-basicfilesystems/no_swap boolean false
|
|
|
|
|
|
|
+ fi
|
|
|
|
|
+ echo "d-i partman/default_filesystem string $filesystem" | $save_preseed
|
|
|
|
|
+ $save_preseed << 'EOF'
|
|
|
|
|
+d-i partman-auto/expert_recipe string \
|
|
|
|
|
+ naive :: \
|
|
|
|
|
+ 1 1 1 free \
|
|
|
|
|
+ $iflabel{ gpt } \
|
|
|
|
|
+ $reusemethod{ } \
|
|
|
|
|
+ method{ biosgrub } \
|
|
|
|
|
+ . \
|
|
|
|
|
+ 1536 1536 -1 $default_filesystem \
|
|
|
|
|
+ method{ format } \
|
|
|
|
|
+ format{ } \
|
|
|
|
|
+ use_filesystem{ } \
|
|
|
|
|
+ $default_filesystem{ } \
|
|
|
|
|
+ mountpoint{ / } \
|
|
|
|
|
+ . \
|
|
|
|
|
+ naivefi :: \
|
|
|
|
|
+ 512 512 512 free \
|
|
|
|
|
+ $iflabel{ gpt } \
|
|
|
|
|
+ $reusemethod{ } \
|
|
|
|
|
+ method{ efi } \
|
|
|
|
|
+ format{ } \
|
|
|
|
|
+ . \
|
|
|
|
|
+ 1536 1536 -1 $default_filesystem \
|
|
|
|
|
+ method{ format } \
|
|
|
|
|
+ format{ } \
|
|
|
|
|
+ use_filesystem{ } \
|
|
|
|
|
+ $default_filesystem{ } \
|
|
|
|
|
+ mountpoint{ / } \
|
|
|
|
|
+ .
|
|
|
EOF
|
|
EOF
|
|
|
|
|
+ if [ "$efi" = true ]; then
|
|
|
|
|
+ echo "d-i partman-auto/choose_recipe select naivefi" | $save_preseed
|
|
|
|
|
+ else
|
|
|
|
|
+ echo "d-i partman-auto/choose_recipe select naive" | $save_preseed
|
|
|
fi
|
|
fi
|
|
|
fi
|
|
fi
|
|
|
-
|
|
|
|
|
$save_preseed << 'EOF'
|
|
$save_preseed << 'EOF'
|
|
|
|
|
+d-i partman-basicfilesystems/no_swap boolean false
|
|
|
d-i partman-partitioning/confirm_new_label boolean true
|
|
d-i partman-partitioning/confirm_new_label boolean true
|
|
|
d-i partman-partitioning/confirm_write_new_label boolean true
|
|
d-i partman-partitioning/confirm_write_new_label boolean true
|
|
|
d-i partman/choose_partition select finish
|
|
d-i partman/choose_partition select finish
|
|
|
d-i partman/confirm boolean true
|
|
d-i partman/confirm boolean true
|
|
|
d-i partman/confirm_nooverwrite boolean true
|
|
d-i partman/confirm_nooverwrite boolean true
|
|
|
-d-i partman/mount_style select traditional
|
|
|
|
|
EOF
|
|
EOF
|
|
|
fi
|
|
fi
|
|
|
|
|
|