mirror of
https://github.com/bohanyang/debi.git
synced 2026-09-27 06:26:15 +00:00
Auto detect boot partition
This commit is contained in:
@@ -77,7 +77,7 @@ To **revert** all changes, run
|
|||||||
* `--hold` Don't reboot or power off after installation
|
* `--hold` Don't reboot or power off after installation
|
||||||
* `--power-off` Power off after installation rather than reboot
|
* `--power-off` Power off after installation rather than reboot
|
||||||
* `--architecture <string>` e.g. `amd64`, `i386`, `arm64`, `armhf`, etc.
|
* `--architecture <string>` e.g. `amd64`, `i386`, `arm64`, `armhf`, etc.
|
||||||
* `--boot-partition` Should be used if `/boot` directory is mounted from a dedicated partition like a LVM setup
|
* `--boot-directory <string>`
|
||||||
* `--firmware` Load additional [non-free firmwares](https://wiki.debian.org/Firmware#Firmware_during_the_installation)
|
* `--firmware` Load additional [non-free firmwares](https://wiki.debian.org/Firmware#Firmware_during_the_installation)
|
||||||
* `--force-efi-extra-removable` [See](https://wiki.debian.org/UEFI#Force_grub-efi_installation_to_the_removable_media_path). **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**
|
||||||
* `--grub-timeout 5` How many seconds the GRUB menu shows before entering the installer
|
* `--grub-timeout 5` How many seconds the GRUB menu shows before entering the installer
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ bbr=false
|
|||||||
hold=false
|
hold=false
|
||||||
power_off=false
|
power_off=false
|
||||||
architecture=
|
architecture=
|
||||||
boot_directory=/boot/
|
boot_directory=
|
||||||
firmware=false
|
firmware=false
|
||||||
force_efi_extra_removable=false
|
force_efi_extra_removable=false
|
||||||
grub_timeout=5
|
grub_timeout=5
|
||||||
@@ -235,8 +235,9 @@ while [ $# -gt 0 ]; do
|
|||||||
architecture=$2
|
architecture=$2
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
--boot-partition)
|
--boot-directory)
|
||||||
boot_directory=/
|
boot_directory=$2
|
||||||
|
shift
|
||||||
;;
|
;;
|
||||||
--firmware)
|
--firmware)
|
||||||
firmware=true
|
firmware=true
|
||||||
@@ -598,6 +599,14 @@ EOF
|
|||||||
save_grub_cfg="tee -a $grub_cfg"
|
save_grub_cfg="tee -a $grub_cfg"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "$boot_directory" ]; then
|
||||||
|
if grep -q '\s/boot\s' /proc/mounts; then
|
||||||
|
boot_directory=/
|
||||||
|
else
|
||||||
|
boot_directory=/boot/
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
installer_directory="$boot_directory$installer"
|
installer_directory="$boot_directory$installer"
|
||||||
|
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
|
|||||||
Reference in New Issue
Block a user