Created
June 5, 2026 10:19
-
-
Save moogle19/b33fd291735e8bcb8cc783ff351e5e90 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -euo pipefail | |
| URL="https://github.com/home-assistant/operating-system/releases/download/17.3/haos_generic-x86-64-17.3.img.xz" | |
| TARGET=$(lsblk -dpno NAME,TYPE | awk '$2=="disk" && $1 ~ /nvme/ {print $1}' | sort | head -n1) | |
| [ -n "${TARGET:-}" ] || { echo "No NVMe disk found."; exit 1; } | |
| echo "Detected NVMe target: $TARGET" | |
| lsblk -o NAME,SIZE,MODEL,TRAN "$TARGET" | |
| read -rp "Write HAOS 17.3 to $TARGET? This ERASES the disk. Type yes: " ok </dev/tty | |
| [ "$ok" = "yes" ] || { echo "Aborted."; exit 1; } | |
| curl -L "$URL" | xzcat | dd of="$TARGET" bs=4M status=progress conv=fsync | |
| sync | |
| echo "Done — remove the USB stick and reboot into the SSD." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment