Unverified Commit bff5bdb1 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

fix: Never use virtio-blk for SeaBIOS (#535)

parent 1609d1f1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -51,8 +51,8 @@ case "${BOOT_MODE,,}" in
    BOOT_OPTS=""
    ;;
  *)
    info "Unknown boot mode '${BOOT_MODE}', defaulting to 'legacy'"
    BOOT_MODE="legacy"
    error "Unrecognized BOOT_MODE, value \"${BOOT_MODE}\" is not recognized!"
    exit 33
    ;;
esac

+8 −1
Original line number Diff line number Diff line
@@ -515,7 +515,13 @@ case "${DISK_TYPE,,}" in
esac

if [ -f "$BOOT" ] && [ -s "$BOOT" ]; then
  DISK_OPTS=$(addMedia "$BOOT" "$DISK_TYPE" "0" "$BOOT_INDEX" "0x5")
  MEDIA_TYPE="$DISK_TYPE"
  if [ -z "${BOOT_MODE:-}" ] || [[ "${BOOT_MODE:-}" == *"legacy" ]]; then
    if [[ "${MACHINE,,}" != "virt" ]] && [[ "${MEDIA_TYPE,,}" ==  "blk" ]]; then
      MEDIA_TYPE="ide"
    fi
  fi
  DISK_OPTS=$(addMedia "$BOOT" "$MEDIA_TYPE" "0" "$BOOT_INDEX" "0x5")
fi

DRIVER_TYPE="ide"
@@ -600,4 +606,5 @@ fi
DISK_OPTS="$DISK_OPTS -object iothread,id=io2"

html "Initialized disks successfully..."

return 0