Fix boot loader when "$disk" is defined

机器有两个盘:/dev/sda 和 /dev/vda ,添加参数--disk /dev/vda将系统安装至该盘,grub也需要安装至该盘,否则grub-install会出错。
pull/58/head
qwinwin 3 years ago committed by GitHub
parent 47c7b051cf
commit e2bb6e48fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      debi.sh

@ -745,9 +745,14 @@ popularity-contest popularity-contest/participate boolean false
# Boot loader installation
d-i grub-installer/bootdev string default
EOF
if [ -n "$disk" ]; then
echo "d-i grub-installer/bootdev string $disk" | $save_preseed
else
echo 'd-i grub-installer/bootdev string default' | $save_preseed
fi
[ "$force_efi_extra_removable" = true ] && echo 'd-i grub-installer/force-efi-extra-removable boolean true' | $save_preseed
[ -n "$kernel_params" ] && echo "d-i debian-installer/add-kernel-opts string$kernel_params" | $save_preseed

Loading…
Cancel
Save