Bohan Yang 5 年之前
父節點
當前提交
bb0c39601e
共有 2 個文件被更改,包括 7 次插入0 次删除
  1. 2 0
      README.md
  2. 5 0
      debi.sh

+ 2 - 0
README.md

@@ -53,6 +53,8 @@ This script is used to reinstall the Linux OS of a KVM-based VPS or a Hyper-V vi
  - `--power-off`
  - `--architecture`
  - `--boot-partition`
+ - `--firmware` Load additional [non-free firmwares](https://wiki.debian.org/Firmware#Firmware_during_the_installation). Seems to be useful on Oracle Cloud
+ - `--force-efi-extra-removable` [See](https://wiki.debian.org/UEFI#Force_grub-efi_installation_to_the_removable_media_path). Useful on Oracle Cloud
  - `--dry-run`
 
 ## Presets

+ 5 - 0
debi.sh

@@ -62,6 +62,7 @@ power_off=false
 architecture=
 boot_directory=/boot/
 firmware=false
+force_efi_extra_removable=false
 dry_run=false
 
 while [ $# -gt 0 ]; do
@@ -221,6 +222,9 @@ while [ $# -gt 0 ]; do
         --firmware)
             firmware=true
             ;;
+        --force-efi-extra-removable)
+            force_efi_extra_removable=true
+            ;;
         --dry-run)
             dry_run=true
             ;;
@@ -506,6 +510,7 @@ popularity-contest popularity-contest/participate boolean false
 d-i grub-installer/bootdev string default
 EOF
 
+[ "$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
 
 $save_preseed << 'EOF'