@@ -87,9 +87,9 @@ config INSTALLER_TARGET_DEVICE
string "Target device to deploy"
default "/dev/sda"
help
- Device to deploy the image onto.
+ Deploy image to this target device. Accepts comma/colon-separated multiple devices; installs on the first available.
Leave this empty to get prompted during installation
- Examples: /dev/sda, /dev/nvme0n1
+ Examples: /dev/sda, /dev/nvme0n1, /dev/sda:/dev/nvme0n1
choice
prompt "Overwrite handling"
@@ -31,6 +31,14 @@ for x in $(cat /proc/cmdline); do
;;
installer.target.dev=*)
installer_target_dev=${x#installer.target.dev=}
+ installer_target_dev_list=$(echo "$installer_target_dev" | sed 's/[,:]/ /g')
+ boot_device=$(lsblk -no PKNAME,MOUNTPOINT | grep -E '/boot| /$' | awk '{print "/dev/"$1}' | uniq)
+ for dev in ${installer_target_dev_list}; do
+ if [ -b "${dev}" ] && [ "${dev}" != "${boot_device}" ]; then
+ installer_target_dev=${dev}
+ break
+ fi
+ done
installer_unattended=true
;;
installer.target.overwrite*)