diff --git a/native_bootstrap.sh b/native_bootstrap.sh index 7e136396..b827d99b 100755 --- a/native_bootstrap.sh +++ b/native_bootstrap.sh @@ -456,9 +456,12 @@ ubuntu() if [ "$1" == "qemu" ]; then if [ -z "$(which qemu-system-x86_64)" ]; then echo "Installing QEMU..." + if apt-cache show qemu-system-riscv > /dev/null 2>&1 + then riscv="qemu-system-riscv" # ubuntu 26 / debian 13 + else riscv="qemu-system-riscv64" # ubuntu 24 / debian 12 + fi sudo $install_command qemu-system-x86 qemu-kvm \ - qemu-system-arm qemu-efi-aarch64 \ - qemu-system-riscv + qemu-system-arm qemu-efi-aarch64 $riscv else echo "QEMU already installed!" fi @@ -1144,12 +1147,12 @@ else # SUSE and derivatives elif hash 2>/dev/null zypper; then suse "$emulator" - # Debian or any derivative of it - elif hash 2>/dev/null apt-get; then - ubuntu "$emulator" "$noninteractive" "$defpackman" # Fedora elif hash 2>/dev/null dnf; then fedora "$emulator" "$noninteractive" + # Debian or any derivative of it + elif hash 2>/dev/null apt-get; then + ubuntu "$emulator" "$noninteractive" "$defpackman" # Gentoo elif hash 2>/dev/null emerge; then gentoo "$emulator" diff --git a/podman_bootstrap.sh b/podman_bootstrap.sh index fa6d99b6..03132404 100755 --- a/podman_bootstrap.sh +++ b/podman_bootstrap.sh @@ -215,9 +215,12 @@ ubuntu() if [ "$1" == "qemu" ]; then if [ -z "$(which qemu-system-x86_64)" ]; then echo "Installing QEMU..." - sudo "$2" install qemu-system-x86 qemu-kvm - sudo "$2" install qemu-system-arm qemu-efi-aarch64 - sudo "$2" install qemu-system-riscv + if apt-cache show qemu-system-riscv > /dev/null 2>&1 + then riscv="qemu-system-riscv" # ubuntu 26 / debian 13 + else riscv="qemu-system-riscv64" # ubuntu 24 / debian 12 + fi + sudo $install_command qemu-system-x86 qemu-kvm \ + qemu-system-arm qemu-efi-aarch64 $riscv else echo "QEMU already installed!" fi @@ -632,12 +635,12 @@ else # SUSE and derivatives if hash 2>/dev/null zypper; then suse "$emulator" - # Debian or any derivative of it - elif hash 2>/dev/null apt-get; then - ubuntu "$emulator" "$defpackman" # Fedora elif hash 2>/dev/null dnf; then fedora "$emulator" + # Debian or any derivative of it + elif hash 2>/dev/null apt-get; then + ubuntu "$emulator" "$defpackman" # Gentoo elif hash 2>/dev/null emerge; then gentoo "$emulator"