Skip to content

Commit

Permalink
fix: Always use IDE for driver image (#518)
Browse files Browse the repository at this point in the history
  • Loading branch information
kroese authored May 21, 2024
1 parent 88d61a0 commit f8a38af
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/disk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -514,14 +514,11 @@ case "${DISK_TYPE,,}" in
* ) error "Invalid DISK_TYPE, value \"$DISK_TYPE\" is unrecognized!" && exit 80 ;;
esac

MEDIA_TYPE="$DISK_TYPE"

if [[ "${MACHINE,,}" == "pc-q35-2"* ]]; then
DISK_TYPE="blk"
MEDIA_TYPE="ide"
DRIVER_TYPE="ide"
else
DRIVER_TYPE="usb"
MEDIA_TYPE="$DISK_TYPE"
[[ "${BOOT_MODE,,}" == *"legacy" ]] && DRIVER_TYPE="ide"
fi

if [ -f "$BOOT" ] && [ -s "$BOOT" ]; then
Expand All @@ -533,7 +530,7 @@ DRIVERS="/drivers.iso"
[ ! -f "$DRIVERS" ] || [ ! -s "$DRIVERS" ] && DRIVERS="/run/drivers.iso"

if [ -f "$DRIVERS" ] && [ -s "$DRIVERS" ]; then
DRIVER_OPTS=$(addMedia "$DRIVERS" "$DRIVER_TYPE" "1" "" "0x6")
DRIVER_OPTS=$(addMedia "$DRIVERS" "ide" "1" "" "0x6")
DISK_OPTS="$DISK_OPTS $DRIVER_OPTS"
fi

Expand Down

0 comments on commit f8a38af

Please sign in to comment.