pull/8/head
Bohan Yang 5 years ago committed by GitHub
parent 04f80a1ab0
commit 6b93f6207f
  1. 27
      netboot.sh

@ -171,6 +171,9 @@ while [ $# -gt 0 ]; do
--bbr) --bbr)
bbr=true bbr=true
;; ;;
--gpt)
gpt=true
;;
*) *)
_err "Illegal option $1" _err "Illegal option $1"
exit 1 exit 1
@ -392,35 +395,35 @@ if [ "$skip_partitioning" != true ]; then
# Partitioning # Partitioning
EOF EOF
if [ -n "$disk" ]; then if [ -n "$disk" ]; then
echo "d-i partman-auto/disk string $disk" | $save_preseed echo "d-i partman-auto/disk string $disk" | $save_preseed
fi fi
$save_preseed << EOF echo "d-i partman-auto/method string $partitioning_method" | $save_preseed
d-i partman-auto/method string $partitioning_method
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-lvm/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
EOF
if [ "$partitioning_method" = "regular" ]; then if [ "$partitioning_method" = "regular" ]; then
echo "d-i partman/default_filesystem string $filesystem" | $save_preseed if [ "$gpt" = true ]; then
$save_preseed << 'EOF' $save_preseed << 'EOF'
d-i partman-partitioning/default_label string gpt
d-i partman-partitioning/choose_label select gpt
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/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-auto/choose_recipe select naive
d-i partman-basicfilesystems/no_swap boolean false d-i partman-basicfilesystems/no_swap boolean false
EOF EOF
fi
fi fi
$save_preseed << EOF $save_preseed << 'EOF'
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 uuid d-i partman/mount_style select traditional
EOF EOF
fi fi

Loading…
Cancel
Save