From 6245b654dc371c5150cac1adda3f6326307ca10a Mon Sep 17 00:00:00 2001 From: Charles Hood Date: Tue, 16 Nov 2021 13:13:22 -0500 Subject: [PATCH 01/57] Add OracleLinux Support No checksum checking yet --- quickget | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/quickget b/quickget index 84be965..5c44146 100755 --- a/quickget +++ b/quickget @@ -49,6 +49,7 @@ function pretty_name() { macos) PRETTY_NAME="macOS";; openbsd) PRETTY_NAME="OpenBSD";; opensuse) PRETTY_NAME="openSUSE";; + oraclelinux) PRETTY_NAME="Oracle Linux";; popos) PRETTY_NAME="Pop!_OS";; regolith) PRETTY_NAME="Regolith Linux";; rockylinux) PRETTY_NAME="Rocky Linux";; @@ -168,6 +169,7 @@ function os_support() { macos \ openbsd \ opensuse \ + oraclelinux \ popos \ regolith \ rockylinux \ @@ -262,6 +264,14 @@ function releases_opensuse(){ tumbleweed } +function releases_oraclelinux() { + echo 8.4 \ + 8.3 \ + 8.2 \ + 7.9 \ + 7.8 +} + function releases_macos() { echo high-sierra \ mojave \ @@ -695,6 +705,9 @@ function make_vm_config() { elif [ "${OS}" == "opensuse" ]; then GUEST="linux" IMAGE_TYPE="iso" + elif [ "${OS}" == "oraclelinux" ]; then + GUEST="linux" + IMAGE_TYPE="iso" elif [ "${OS}" == "popos" ]; then GUEST="linux" IMAGE_TYPE="iso" @@ -1024,6 +1037,29 @@ function get_opensuse() { make_vm_config "${ISO}" } +function get_oraclelinux() { + local HASH="" + local ISO="" + local URL="" + + local arch="x86_64" + + local majorver=${RELEASE,1,1} + local minorver=${RELEASE,3,1} + + local baseurl="https://yum.oracle.com/ISOS/OracleLinux/OL${majorver}/u${minorver}/${arch}/" +# local baseurl="https://download.rockylinux.org/pub/rocky/${RELEASE}/isos/${arch}" + + validate_release "releases_oraclelinux" + ISO="OracleLinux-R${majorver}-U${minorver}-${arch}-dvd.iso" + URL="${baseurl}/${ISO}" +# HASH=$(wget -q -O- "${baseurl}/CHECKSUM" | grep "SHA256 (${ISO})" | grep -E -i -w -o '[0-9a-z]{64}') + + web_get "${URL}" "${VM_PATH}" +# check_hash "${ISO}" "${HASH}" + make_vm_config "${ISO}" +} + function get_macos() { local BOARD_ID="" local CWD="" @@ -1361,6 +1397,8 @@ if [ -n "${2}" ]; then get_openbsd elif [ "${OS}" == "opensuse" ]; then get_opensuse + elif [ "${OS}" == "oraclelinux" ]; then + get_oraclelinux elif [ "${OS}" == "popos" ]; then if [ -n "${3}" ]; then DRIVER="${3}" @@ -1442,6 +1480,8 @@ else releases_nixos elif [ "${OS}" == "opensuse" ]; then releases_opensuse + elif [ "${OS}" == "oraclelinux" ]; then + releases_oraclelinux elif [ "${OS}" == "openbsd" ]; then releases_openbsd elif [ "${OS}" == "macos" ]; then From 8449e40a471aa8bd28f83de00d633fd6972f2625 Mon Sep 17 00:00:00 2001 From: Charles Hood Date: Tue, 16 Nov 2021 14:24:50 -0500 Subject: [PATCH 02/57] Debugging OracleLinux support echo variables for debugging --- quickget | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/quickget b/quickget index 5c44146..7ff9558 100755 --- a/quickget +++ b/quickget @@ -1047,11 +1047,17 @@ function get_oraclelinux() { local majorver=${RELEASE,1,1} local minorver=${RELEASE,3,1} + echo $RELEASE + echo $majorver + echo $minorver + local baseurl="https://yum.oracle.com/ISOS/OracleLinux/OL${majorver}/u${minorver}/${arch}/" + echo $baseurl # local baseurl="https://download.rockylinux.org/pub/rocky/${RELEASE}/isos/${arch}" validate_release "releases_oraclelinux" - ISO="OracleLinux-R${majorver}-U${minorver}-${arch}-dvd.iso" + ISO="https://yum.oracle.com/ISOS/OracleLinux/OL8/u4/x86_64/OracleLinux-R8-U4-x86_64-dvd.iso" +# ISO="OracleLinux-R${majorver}-U${minorver}-${arch}-dvd.iso" URL="${baseurl}/${ISO}" # HASH=$(wget -q -O- "${baseurl}/CHECKSUM" | grep "SHA256 (${ISO})" | grep -E -i -w -o '[0-9a-z]{64}') From 3bfd7e1ad9f6d246de0cbea67a04c8448f072242 Mon Sep 17 00:00:00 2001 From: Charles Hood Date: Tue, 16 Nov 2021 14:27:58 -0500 Subject: [PATCH 03/57] OracleLinux debugging more echo statements --- quickget | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/quickget b/quickget index 7ff9558..7db3fe7 100755 --- a/quickget +++ b/quickget @@ -1044,8 +1044,8 @@ function get_oraclelinux() { local arch="x86_64" - local majorver=${RELEASE,1,1} - local minorver=${RELEASE,3,1} + local majorver=${RELEASE,0,1} + local minorver=${RELEASE,2,1} echo $RELEASE echo $majorver @@ -1056,9 +1056,10 @@ function get_oraclelinux() { # local baseurl="https://download.rockylinux.org/pub/rocky/${RELEASE}/isos/${arch}" validate_release "releases_oraclelinux" - ISO="https://yum.oracle.com/ISOS/OracleLinux/OL8/u4/x86_64/OracleLinux-R8-U4-x86_64-dvd.iso" -# ISO="OracleLinux-R${majorver}-U${minorver}-${arch}-dvd.iso" - URL="${baseurl}/${ISO}" + + ISO="OracleLinux-R${majorver}-U${minorver}-${arch}-dvd.iso" + URL="https://yum.oracle.com/ISOS/OracleLinux/OL8/u4/x86_64/OracleLinux-R8-U4-x86_64-dvd.iso" +# URL="${baseurl}/${ISO}" # HASH=$(wget -q -O- "${baseurl}/CHECKSUM" | grep "SHA256 (${ISO})" | grep -E -i -w -o '[0-9a-z]{64}') web_get "${URL}" "${VM_PATH}" From b1f4c08704bba3d8a2aad6781ac910a1d14f0482 Mon Sep 17 00:00:00 2001 From: Charles Hood Date: Tue, 16 Nov 2021 14:46:00 -0500 Subject: [PATCH 04/57] Even more OracleLinux debugging add more disk space by default --- quickget | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/quickget b/quickget index 7db3fe7..60110b4 100755 --- a/quickget +++ b/quickget @@ -757,6 +757,10 @@ EOF echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf" fi + if [ "${OS}" == "oraclelinux" ]; then + echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf" + fi + if [ "${OS}" == "zorin" ]; then case ${RELEASE} in 15education64|15edulite64|15edulite32) @@ -1044,8 +1048,8 @@ function get_oraclelinux() { local arch="x86_64" - local majorver=${RELEASE,0,1} - local minorver=${RELEASE,2,1} + local majorver=${RELEASE::1} + local minorver=${RELEASE:2:1} echo $RELEASE echo $majorver From 95e05c5af46d4dfc6c958dbac4f32da600dc68a9 Mon Sep 17 00:00:00 2001 From: Charles Hood Date: Tue, 16 Nov 2021 14:58:34 -0500 Subject: [PATCH 05/57] Clean up OracleLinux debugging Still no HASH checking yet --- quickget | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/quickget b/quickget index 60110b4..92144ef 100755 --- a/quickget +++ b/quickget @@ -1051,10 +1051,7 @@ function get_oraclelinux() { local majorver=${RELEASE::1} local minorver=${RELEASE:2:1} - echo $RELEASE - echo $majorver - echo $minorver - + local baseurl="https://yum.oracle.com/ISOS/OracleLinux/OL${majorver}/u${minorver}/${arch}/" echo $baseurl # local baseurl="https://download.rockylinux.org/pub/rocky/${RELEASE}/isos/${arch}" @@ -1062,8 +1059,7 @@ function get_oraclelinux() { validate_release "releases_oraclelinux" ISO="OracleLinux-R${majorver}-U${minorver}-${arch}-dvd.iso" - URL="https://yum.oracle.com/ISOS/OracleLinux/OL8/u4/x86_64/OracleLinux-R8-U4-x86_64-dvd.iso" -# URL="${baseurl}/${ISO}" + URL="${baseurl}/${ISO}" # HASH=$(wget -q -O- "${baseurl}/CHECKSUM" | grep "SHA256 (${ISO})" | grep -E -i -w -o '[0-9a-z]{64}') web_get "${URL}" "${VM_PATH}" From b2971e0dd33ecc65643f16057c40c821779ef290 Mon Sep 17 00:00:00 2001 From: Charles Hood Date: Tue, 16 Nov 2021 15:12:03 -0500 Subject: [PATCH 06/57] Adjusting OracleLinux start disk size 20G seems good --- quickget | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickget b/quickget index 92144ef..46f29e1 100755 --- a/quickget +++ b/quickget @@ -758,7 +758,7 @@ EOF fi if [ "${OS}" == "oraclelinux" ]; then - echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf" + echo "disk_size=\"20G\"" >> "${OS}-${RELEASE}.conf" fi if [ "${OS}" == "zorin" ]; then From e5e40ba77c878562869eae39a00f1caa4ba6ef88 Mon Sep 17 00:00:00 2001 From: Charles Hood Date: Tue, 16 Nov 2021 15:55:24 -0500 Subject: [PATCH 07/57] Restrict OracleLinux support 8.x for now 7.x and 6.x use a different naming scheme --- quickget | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/quickget b/quickget index 46f29e1..bb3fa1e 100755 --- a/quickget +++ b/quickget @@ -267,9 +267,7 @@ function releases_opensuse(){ function releases_oraclelinux() { echo 8.4 \ 8.3 \ - 8.2 \ - 7.9 \ - 7.8 + 8.2 } function releases_macos() { @@ -1050,11 +1048,8 @@ function get_oraclelinux() { local majorver=${RELEASE::1} local minorver=${RELEASE:2:1} - local baseurl="https://yum.oracle.com/ISOS/OracleLinux/OL${majorver}/u${minorver}/${arch}/" - echo $baseurl -# local baseurl="https://download.rockylinux.org/pub/rocky/${RELEASE}/isos/${arch}" validate_release "releases_oraclelinux" From f7ead7e8156ead241ec57d5323d085279958367a Mon Sep 17 00:00:00 2001 From: Charles Hood Date: Tue, 16 Nov 2021 17:57:02 -0500 Subject: [PATCH 08/57] Attempt get HASH for OracleLinux and check it --- quickget | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/quickget b/quickget index bb3fa1e..b45bfc5 100755 --- a/quickget +++ b/quickget @@ -1050,15 +1050,16 @@ function get_oraclelinux() { local minorver=${RELEASE:2:1} local baseurl="https://yum.oracle.com/ISOS/OracleLinux/OL${majorver}/u${minorver}/${arch}/" - + local hashurl="https://linux.oracle.com/security/gpg/checksum/OracleLinux-R${majorver}-U${minorver}-Server-x86_64.checksum" + validate_release "releases_oraclelinux" ISO="OracleLinux-R${majorver}-U${minorver}-${arch}-dvd.iso" URL="${baseurl}/${ISO}" -# HASH=$(wget -q -O- "${baseurl}/CHECKSUM" | grep "SHA256 (${ISO})" | grep -E -i -w -o '[0-9a-z]{64}') + HASH=$(wget -q -O- "${hashurl}" | cut -d' ' -f1) web_get "${URL}" "${VM_PATH}" -# check_hash "${ISO}" "${HASH}" + check_hash "${ISO}" "${HASH}" make_vm_config "${ISO}" } From 8df11258f00133eec9c4a56ccd8f959e938eee39 Mon Sep 17 00:00:00 2001 From: Charles Hood Date: Tue, 16 Nov 2021 18:06:09 -0500 Subject: [PATCH 09/57] 2nd attempt at OracleLinux HASH checking --- quickget | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickget b/quickget index b45bfc5..1c6ac31 100755 --- a/quickget +++ b/quickget @@ -1056,7 +1056,7 @@ function get_oraclelinux() { ISO="OracleLinux-R${majorver}-U${minorver}-${arch}-dvd.iso" URL="${baseurl}/${ISO}" - HASH=$(wget -q -O- "${hashurl}" | cut -d' ' -f1) + HASH=$(wget -q -O- "${hashurl}" | grep "${ISO}" | cut -d' ' -f1) web_get "${URL}" "${VM_PATH}" check_hash "${ISO}" "${HASH}" From 3d2924d91365df3244eead65d7a64b60f4625c21 Mon Sep 17 00:00:00 2001 From: Charles Hood Date: Tue, 16 Nov 2021 20:51:03 -0500 Subject: [PATCH 10/57] Add Oracle Linux and Rocky Linux to README Add Oracle Linux as supported Linux Add Rocky Linux as supported Linux --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 976b516..0d2a82d 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ comprehensive support for macOS and Windows**. * [Fedora](https://getfedora.org/) & openSUSE ([Leap](https://get.opensuse.org/leap/), [Tumbleweed](https://get.opensuse.org/tumbleweed/), [MicroOS](https://microos.opensuse.org/)) * [Linux Mint](https://linuxmint.com/) (Cinnamon, MATE, and XFCE), [elementary OS](https://elementary.io/), [Pop!_OS](https://pop.system76.com/) * [Arch Linux](https://www.archlinux.org/), [Kali](https://www.kali.org/),[Garuda](https://garudalinux.org/), [ZorinOS](https://zorin.com/os/) & [NixOS](https://nixos.org/) + * [Oracle Linux](https://www.oracle.com/linux/), and [Rocky Linux](https://rockylinux.org/) * [Regolith Linux](https://regolith-linux.org/) (Release 1.6 and latest 2.0.0 pre-release ) * [FreeBSD](https://www.freebsd.org/) & [OpenBSD](https://www.openbsd.org/) * Full SPICE support including host/guest clipboard sharing @@ -182,8 +183,10 @@ preferred flavour. * `linuxmint-mate` * `linuxmint-xfce` * `opensuse` + * `oraclelinux` * `popos` * `regolith` + * `rockylinux` * `nixos-gnome` * `nixos-plasma5` * `nixos-minimal` From 93cafe7bf781119daf7107c0cde610606e948a23 Mon Sep 17 00:00:00 2001 From: Charles Hood Date: Tue, 16 Nov 2021 20:52:08 -0500 Subject: [PATCH 11/57] Remove extra comma Between Oracle Linux and Rocky Linux --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0d2a82d..5ebc9ef 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ comprehensive support for macOS and Windows**. * [Fedora](https://getfedora.org/) & openSUSE ([Leap](https://get.opensuse.org/leap/), [Tumbleweed](https://get.opensuse.org/tumbleweed/), [MicroOS](https://microos.opensuse.org/)) * [Linux Mint](https://linuxmint.com/) (Cinnamon, MATE, and XFCE), [elementary OS](https://elementary.io/), [Pop!_OS](https://pop.system76.com/) * [Arch Linux](https://www.archlinux.org/), [Kali](https://www.kali.org/),[Garuda](https://garudalinux.org/), [ZorinOS](https://zorin.com/os/) & [NixOS](https://nixos.org/) - * [Oracle Linux](https://www.oracle.com/linux/), and [Rocky Linux](https://rockylinux.org/) + * [Oracle Linux](https://www.oracle.com/linux/) and [Rocky Linux](https://rockylinux.org/) * [Regolith Linux](https://regolith-linux.org/) (Release 1.6 and latest 2.0.0 pre-release ) * [FreeBSD](https://www.freebsd.org/) & [OpenBSD](https://www.openbsd.org/) * Full SPICE support including host/guest clipboard sharing From bccabad4fddf1383467ef56b77f5a77cb33ac552 Mon Sep 17 00:00:00 2001 From: Charles Hood Date: Tue, 16 Nov 2021 22:42:53 -0500 Subject: [PATCH 12/57] Add Oracle Linux version 7.9, 7.8, 7.7 support Add Oracle Linux version 7.9, 7.8, 7.7 support Note different ISO naming pattern from 8.x --- quickget | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/quickget b/quickget index 1c6ac31..1500ca3 100755 --- a/quickget +++ b/quickget @@ -267,7 +267,10 @@ function releases_opensuse(){ function releases_oraclelinux() { echo 8.4 \ 8.3 \ - 8.2 + 8.2 \ + 7.9 \ + 7.8 \ + 7.7 } function releases_macos() { @@ -1043,18 +1046,23 @@ function get_oraclelinux() { local HASH="" local ISO="" local URL="" - + local arch="x86_64" + validate_release "releases_oraclelinux" + local majorver=${RELEASE::1} local minorver=${RELEASE:2:1} local baseurl="https://yum.oracle.com/ISOS/OracleLinux/OL${majorver}/u${minorver}/${arch}/" local hashurl="https://linux.oracle.com/security/gpg/checksum/OracleLinux-R${majorver}-U${minorver}-Server-x86_64.checksum" - - validate_release "releases_oraclelinux" - ISO="OracleLinux-R${majorver}-U${minorver}-${arch}-dvd.iso" + if [ "${majorver}" == "8" ]; then + ISO="OracleLinux-R${majorver}-U${minorver}-${arch}-dvd.iso" + else + ISO="OracleLinux-R${majorver}-U${minorver}-Server-${arch}-dvd.iso" + fi + URL="${baseurl}/${ISO}" HASH=$(wget -q -O- "${hashurl}" | grep "${ISO}" | cut -d' ' -f1) From 0fe5717447adc01e4532fb8f8270aef4ec2285a0 Mon Sep 17 00:00:00 2001 From: Charles Hood Date: Wed, 17 Nov 2021 08:52:29 -0500 Subject: [PATCH 13/57] Add version 8.5 support Oracle Linux Just released 11/16/2021 --- quickget | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quickget b/quickget index 1500ca3..d291146 100755 --- a/quickget +++ b/quickget @@ -265,7 +265,8 @@ function releases_opensuse(){ } function releases_oraclelinux() { - echo 8.4 \ + echo 8.5 \ + 8.4 \ 8.3 \ 8.2 \ 7.9 \ From 7afc9bf71089333afc4db20af1907604d5fd89cc Mon Sep 17 00:00:00 2001 From: Phil Clifford Date: Fri, 19 Nov 2021 22:01:27 +0000 Subject: [PATCH 14/57] Add debian current support --- quickget | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/quickget b/quickget index d291146..b3a8430 100755 --- a/quickget +++ b/quickget @@ -152,6 +152,7 @@ function list_csv() { function os_support() { echo android \ archlinux \ + debian \ elementary \ freebsd \ fedora \ @@ -199,6 +200,18 @@ function releases_archlinux() { echo latest } +# later refactor these DE variants like languages and avoid the arch ? +function releases_debian() { + echo 11.1.0-amd64-cinnamon \ + 11.1.0-amd64-gnome \ + 11.1.0-amd64-kde \ + 11.1.0-amd64-lxde \ + 11.1.0-amd64-lxqt \ + 11.1.0-amd64-mate \ + 11.1.0-amd64-standard \ + 11.1.0-amd64-xfce +} + function releases_elementary() { echo 6.0 } @@ -677,6 +690,9 @@ function make_vm_config() { elif [ "${OS}" == "archlinux" ]; then GUEST="linux" IMAGE_TYPE="iso" + elif [ "${OS}" == "debian" ]; then + GUEST="linux" + IMAGE_TYPE="iso" elif [ "${OS}" == "elementary" ]; then GUEST="linux" IMAGE_TYPE="iso" @@ -829,6 +845,24 @@ function get_archlinux() { make_vm_config "${ISO}" } + +function get_debian() { + local HASH="" + local ISO="" + local URL="" + local HASHLINE="" + + validate_release "releases_debian" + URL="https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid" + HASHLINE=$(wget -q -O- ${URL}/SHA512SUMS |grep ${RELEASE}.iso) + ISO="$(echo ${HASHLINE} | awk '{print $NF}' )" + HASH=$(echo ${HASHLINE} | cut -d\ -f1) + + web_get "${URL}/${ISO}" "${VM_PATH}" + check_hash "${ISO}" "${HASH}" + make_vm_config "${ISO}" +} + function get_elementary() { local ISO="" local URL="" @@ -1387,6 +1421,8 @@ if [ -n "${2}" ]; then get_android elif [ "${OS}" == "archlinux" ]; then get_archlinux + elif [ "${OS}" == "debian" ]; then + get_debian elif [ "${OS}" == "elementary" ]; then get_elementary elif [ "${OS}" == "macos" ]; then @@ -1476,6 +1512,8 @@ else releases_android elif [ "${OS}" == "archlinux" ]; then releases_archlinux + elif [ "${OS}" == "debian" ]; then + releases_debian elif [ "${OS}" == "elementary" ]; then releases_elementary elif [ "${OS}" == "freebsd" ]; then From 8369e170dfed88b5d38b4240c4e039fb6050951d Mon Sep 17 00:00:00 2001 From: Phil Clifford Date: Fri, 19 Nov 2021 23:38:47 +0000 Subject: [PATCH 15/57] Added debian to readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 5ebc9ef..0a0de8f 100644 --- a/README.md +++ b/README.md @@ -175,6 +175,7 @@ preferred flavour. `quickget` also supports: * `archlinux` + * `debian` * `elementary` * `fedora` * `garuda` From 765355c4d30d8a3a962a501fb702699cd1ba5e27 Mon Sep 17 00:00:00 2001 From: Phil Clifford Date: Fri, 19 Nov 2021 23:39:25 +0000 Subject: [PATCH 16/57] Added option support for debian nonfree --- quickget | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/quickget b/quickget index b3a8430..b5a5582 100755 --- a/quickget +++ b/quickget @@ -141,6 +141,10 @@ function list_csv() { for OPTION in intel nvidia; do echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" done + elif [ "${OS}" == "debian" ]; then + for OPTION in standard nonfree; do + echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" + done else echo "${DISPLAY_NAME},${OS},${RELEASE},,${DOWNLOADER},${PNG},${SVG}" fi @@ -201,6 +205,7 @@ function releases_archlinux() { } # later refactor these DE variants like languages and avoid the arch ? +# all these are available with a "nonfree" option too function releases_debian() { echo 11.1.0-amd64-cinnamon \ 11.1.0-amd64-gnome \ @@ -851,9 +856,20 @@ function get_debian() { local ISO="" local URL="" local HASHLINE="" + local FREEDOM="" + validate_release "releases_debian" - URL="https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid" + + if [ "${1}" == "nonfree" ]; then + RELEASE="${RELEASE}+nonfree" + fi + case $RELEASE in + *+nonfree) URL="http://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/current-live/amd64/iso-hybrid" ;; + *) URL="https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid";; + esac + + HASHLINE=$(wget -q -O- ${URL}/SHA512SUMS |grep ${RELEASE}.iso) ISO="$(echo ${HASHLINE} | awk '{print $NF}' )" HASH=$(echo ${HASHLINE} | cut -d\ -f1) @@ -1422,7 +1438,21 @@ if [ -n "${2}" ]; then elif [ "${OS}" == "archlinux" ]; then get_archlinux elif [ "${OS}" == "debian" ]; then - get_debian + if [ -n "${3}" ]; then + FREEDOM="${3}" + FREEDOMS=(standard nonfree) + if [[ ! ${FREEDOMS[*]} =~ ${FREEDOM} ]]; then + echo "ERROR! ${FREEDOM} is not a supported freedom:" + for DRIVER in "${FREEDOMS[@]}"; do + echo "${FREEDOM}" + done + exit 1 + fi + else + FREEDOM="standard" + fi + VM_PATH="${OS}-${RELEASE}-${FREEDOM}" + get_debian "${FREEDOM}" elif [ "${OS}" == "elementary" ]; then get_elementary elif [ "${OS}" == "macos" ]; then From b9a1405917e89b790d79765ad4bbb9a19f593126 Mon Sep 17 00:00:00 2001 From: Phil Clifford Date: Fri, 19 Nov 2021 23:57:04 +0000 Subject: [PATCH 17/57] missed Debian from the features section --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0a0de8f..2b0aa22 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ comprehensive support for macOS and Windows**. * **macOS** Monterey, Big Sur, Catalina, Mojave & High Sierra * **Windows** 8.1, 10 and 11 including TPM 2.0 * [Ubuntu](https://ubuntu.com/desktop) and all the **[official Ubuntu flavours](https://ubuntu.com/download/flavours)** + * [Debian](https://www.debian.org/) (bullseye with all the official and non-free DE variants) * [Fedora](https://getfedora.org/) & openSUSE ([Leap](https://get.opensuse.org/leap/), [Tumbleweed](https://get.opensuse.org/tumbleweed/), [MicroOS](https://microos.opensuse.org/)) * [Linux Mint](https://linuxmint.com/) (Cinnamon, MATE, and XFCE), [elementary OS](https://elementary.io/), [Pop!_OS](https://pop.system76.com/) * [Arch Linux](https://www.archlinux.org/), [Kali](https://www.kali.org/),[Garuda](https://garudalinux.org/), [ZorinOS](https://zorin.com/os/) & [NixOS](https://nixos.org/) From 9ba10f91df2309bfa5ac0b511f2ad0d12e209a97 Mon Sep 17 00:00:00 2001 From: Cowboy General <94553456+cowboygeneral@users.noreply.github.com> Date: Sat, 20 Nov 2021 08:42:31 -0500 Subject: [PATCH 18/57] Turn off Hibernation in Windows autounattend.xml Turn off Hibernation in Windows to correct issue #162 --- quickget | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/quickget b/quickget index b5a5582..6e86355 100755 --- a/quickget +++ b/quickget @@ -581,6 +581,11 @@ function unattended_windows() { Install spice-vdagent SPICE agent 4 + + Cmd /c POWERCFG -H OFF + Disable Hibernation + 5 + From 92878c27df0121af1cc2edde4d885cd71493293a Mon Sep 17 00:00:00 2001 From: Phil Date: Wed, 17 Nov 2021 16:59:47 +0000 Subject: [PATCH 19/57] some shellcheck fixes --- quickget | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/quickget b/quickget index 6e86355..3553d22 100755 --- a/quickget +++ b/quickget @@ -25,7 +25,7 @@ function cleanup() { if [ -n "$(jobs -p)" ]; then - kill $(jobs -p) + kill "$(jobs -p)" fi } @@ -819,16 +819,16 @@ function get_android() { validate_release "releases_android" fosshubVersionInfo=$(wget -O - -q "https://www.fosshub.com/Android-x86-old.html" | grep "var settings =") version="android-x86-${RELEASE}" - releaseJson=$(echo ${fosshubVersionInfo:16} | jq --arg ver "${version}" 'first(.pool.f[] | select((.n | startswith($ver)) and (.n | endswith(".iso"))))') + releaseJson=$(echo "${fosshubVersionInfo:16}" | jq --arg ver "${version}" 'first(.pool.f[] | select((.n | startswith($ver)) and (.n | endswith(".iso"))))') HASH=$(echo "${releaseJson}" | jq -r .hash.sha256) ISO=$(echo "${releaseJson}" | jq -r .n) baseurl="https://mirrors.gigenet.com/OSDN/android-x86/" - releaseFolders=$(wget -q -O - ${baseurl} | grep -o -E [0-9]{5} | uniq) + releaseFolders=$(wget -q -O - ${baseurl} | grep -o -E '[0-9]{5}' | uniq) for item in $releaseFolders; do - file=$(wget -O - -q ${baseurl}${item} | grep "${ISO}") + file=$(wget -O - -q "${baseurl}${item}" | grep "${ISO}") if [[ $file != "" ]]; then URL="${baseurl}${item}/${ISO}" break @@ -1025,8 +1025,8 @@ function get_zorin() { validate_release "releases_zorin" # their redirector returns an href so we need to get that and parse out the iso - URL=$(curl -s https://zrn.co/${RELEASE} |cut -d\" -f2) - ISO=$(echo ${URL}| awk -F\/ ' {print $NF}') + URL=$(curl -s "https://zrn.co/${RELEASE}" |cut -d\" -f2) + ISO=$(echo "${URL}"| awk -F\/ ' {print $NF}') web_get "${URL}" "${VM_PATH}" make_vm_config "${ISO}" } @@ -1239,9 +1239,9 @@ function get_regolith() { 2.0.0_hirsute) URL="${URL}regolith-linux-2.0-hirsute-latest";; esac - ISO="Regolith_"${RELEASE}".iso" + ISO="Regolith_${RELEASE}.iso" web_get "${URL}/${ISO}" "${VM_PATH}" - if [ -n $HASH ]; then + if [ -n "${HASH}" ]; then check_hash "${ISO}" "${HASH}" fi make_vm_config "${ISO}" @@ -1320,7 +1320,7 @@ function get_garuda() { LATEST_URL="${GLDL}/latest/${REL_TYPE}/${RELEASE}/latest.iso.sha256" HASH_URL="$(wget -q -O- ${LATEST_URL})" ISO="$(echo ${HASH_URL} | awk '{print $NF}' )" - HASH=$(echo ${HASH_URL} | cut -d\ -f1) + HASH=$(echo "${HASH_URL}" | cut -d\ -f1) LDATE=$(echo "${ISO}" | awk -F'-' '{print $NF}' |cut -d'.' -f1) # URL="${GLDL}/${REL_TYPE}/${RELEASE}/${LDATE}" @@ -1351,7 +1351,7 @@ function get_windows() { validate_release "releases_windows" # Ignore the most recent Windows 10 release for now. - if [ ${RELEASE} -eq 10 ]; then + if [ "${RELEASE}" -eq 10 ]; then INDEX=1 fi @@ -1424,7 +1424,7 @@ if [ -n "${1}" ]; then list_json elif [ "${OS}" == "--version" ] || [ "${OS}" == "-version" ] || [ "${OS}" == "version" ]; then whereIam=$(dirname "${BASH_SOURCE[0]}") - quickemu_version=$( ${whereIam}/quickemu --version) + quickemu_version=$( "${whereIam}"/quickemu --version) echo "Quickemu Version: ${quickemu_version}" exit 0 fi From 2af2b9c34d5e85b8101bdb33ef326284752453b9 Mon Sep 17 00:00:00 2001 From: Phil Date: Thu, 2 Dec 2021 19:07:51 +0000 Subject: [PATCH 20/57] Missing rocky appearance in final catalog --- quickget | 2 ++ 1 file changed, 2 insertions(+) diff --git a/quickget b/quickget index 3553d22..51f82bd 100755 --- a/quickget +++ b/quickget @@ -1575,6 +1575,8 @@ else releases_popos elif [ "${OS}" == "regolith" ]; then releases_regolith + elif [ "${OS}" == "rockylinux" ]; then + releases_rockylinux elif [ "${OS}" == "solus" ]; then releases_solus elif [[ "${OS}" == *"ubuntu"* ]]; then From 4f0bbfc66739406eda05eb8428a2b475c10a009d Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Fri, 3 Dec 2021 11:33:17 +0000 Subject: [PATCH 21/57] Add --delete-disk and --delete-vm options. Close #227 --- quickemu | 46 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 11 deletions(-) diff --git a/quickemu b/quickemu index 276c045..7d38cb5 100755 --- a/quickemu +++ b/quickemu @@ -37,7 +37,15 @@ function ignore_msrs_alert() { fi } -function disk_delete() { +function delete_shortcut() { + local SHORTCUT_DIR="${HOME}/.local/share/applications/" + if [ -e "${SHORTCUT_DIR}/${VMNAME}.desktop" ]; then + rm "${SHORTCUT_DIR}/${VMNAME}.desktop" + echo "Deleted ${VM} desktop shortcut" + fi +} + +function delete_disk() { if [ -e "${disk_img}" ]; then rm "${disk_img}" # Remove any EFI vars, but not for macOS @@ -46,14 +54,20 @@ function disk_delete() { rm "${VMDIR}/${VMNAME}-vars.fd" >/dev/null 2>&1 rm "${VMPATH}/${VMDIR}/${VMNAME}-vars.fd" > /dev/null 2>&1 echo "SUCCESS! Deleted ${disk_img}" + delete_shortcut else echo "NOTE! ${disk_img} not found. Doing nothing." fi +} - local SHORTCUT_DIR="${HOME}/.local/share/applications/" - if [ -e "${SHORTCUT_DIR}/${VMNAME}.desktop" ]; then - rm "${SHORTCUT_DIR}/${VMNAME}.desktop" - echo "Deleted ${VM} desktop shortcut" +function delete_vm() { + if [ -d "${VMDIR}" ]; then + rm -rf "${VMDIR}" + rm "${VM}" + echo "SUCCESS! Deleted ${VM} and ${VMDIR}" + delete_shortcut + else + echo "NOTE! ${VMDIR} not found. Doing nothing." fi } @@ -1002,7 +1016,8 @@ function usage() { echo " ${LAUNCHER} --vm ubuntu.conf" echo echo "You can also pass optional parameters" - echo " --delete : Delete the disk image." + echo " --delete-disk : Delete the disk image and EFI variables" + echo " --delete-vm : Delete the entire VM and it's configuration" echo " --display : Select display backend. 'sdl' (default), 'gtk', 'none', or 'spice'" echo " --fullscreen : Starts VM in full screen mode (Ctl+Alt+f to exit)" echo " --ignore-msrs-always : Configure KVM to always ignore unhandled machine-specific registers" @@ -1036,7 +1051,8 @@ secureboot="off" tpm="off" usb_devices=() -DELETE=0 +DELETE_DISK=0 +DELETE_VM=0 FULLSCREEN="" FULLSPICY="" OUTPUT="sdl" @@ -1096,8 +1112,11 @@ if [ $# -lt 1 ]; then else while [ $# -gt 0 ]; do case "${1}" in - -delete|--delete) - DELETE=1 + -delete|--delete|-delete-disk|--delete-disk) + DELETE_DISK=1 + shift;; + -delete-vm|--delete-vm) + DELETE_VM=1 shift;; -display|--display) OUTPUT="${2}" @@ -1191,8 +1210,13 @@ else usage fi -if [ ${DELETE} -eq 1 ]; then - disk_delete +if [ ${DELETE_DISK} -eq 1 ]; then + delete_disk + exit +fi + +if [ ${DELETE_VM} -eq 1 ]; then + delete_vm exit fi From e6823edde7c4a5c341bd5b26db24eac615989bbd Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Fri, 3 Dec 2021 11:33:41 +0000 Subject: [PATCH 22/57] Make port scans non-blocking --- quickemu | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/quickemu b/quickemu index 7d38cb5..54b1e5e 100755 --- a/quickemu +++ b/quickemu @@ -136,8 +136,9 @@ function get_port() { local PORT_RANGE=$((PORT_START+$2)) local PORT for ((PORT = PORT_START; PORT <= PORT_RANGE; PORT++)); do - (echo -n "" >/dev/tcp/127.0.0.1/"${PORT}") >/dev/null 2>&1 - if [ ${?} -ne 0 ]; then + # Make sure port scans do not block too long. + timeout 0.1s bash -c "echo >/dev/tcp/127.0.0.1/${PORT}" >/dev/null 2>&1 + if [ ${?} -eq 1 ]; then echo "${PORT}" break fi From ca0f14435147652a50c94c43cb8ffa8d305fd818 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Fri, 3 Dec 2021 11:33:56 +0000 Subject: [PATCH 23/57] Bump version to 2.3.3 --- quickemu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickemu b/quickemu index 54b1e5e..5907511 100755 --- a/quickemu +++ b/quickemu @@ -1073,7 +1073,7 @@ VMPATH="" readonly LAUNCHER=$(basename "${0}") readonly DISK_MIN_SIZE=$((197632 * 8)) -readonly VERSION="2.3.2" +readonly VERSION="2.3.3" # PUBLICSHARE is the only directory exposed to guest VMs for file # sharing via 9P, spice-webdavd and Samba. This path is not configurable. From 0af524e3e5c8f5507f6053c1165c682a4e81a09e Mon Sep 17 00:00:00 2001 From: Phil Clifford Date: Fri, 3 Dec 2021 13:42:04 +0000 Subject: [PATCH 24/57] Add Alma Linux (#259) * temp working files to build function * remove working dross * inital Alma Linux support * Added option for dvd or minimal iso to Alma * corrections * temp working files to build function * remove working dross * inital Alma Linux support * Added option for dvd or minimal iso to Alma * corrections --- README.md | 2 ++ quickget | 86 +++++++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 79 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 2b0aa22..2273c92 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ comprehensive support for macOS and Windows**. * [Ubuntu](https://ubuntu.com/desktop) and all the **[official Ubuntu flavours](https://ubuntu.com/download/flavours)** * [Debian](https://www.debian.org/) (bullseye with all the official and non-free DE variants) * [Fedora](https://getfedora.org/) & openSUSE ([Leap](https://get.opensuse.org/leap/), [Tumbleweed](https://get.opensuse.org/tumbleweed/), [MicroOS](https://microos.opensuse.org/)) + * [Alma Linux](https://almalinux.org/) * [Linux Mint](https://linuxmint.com/) (Cinnamon, MATE, and XFCE), [elementary OS](https://elementary.io/), [Pop!_OS](https://pop.system76.com/) * [Arch Linux](https://www.archlinux.org/), [Kali](https://www.kali.org/),[Garuda](https://garudalinux.org/), [ZorinOS](https://zorin.com/os/) & [NixOS](https://nixos.org/) * [Oracle Linux](https://www.oracle.com/linux/) and [Rocky Linux](https://rockylinux.org/) @@ -175,6 +176,7 @@ preferred flavour. `quickget` also supports: + * `alma` * `archlinux` * `debian` * `elementary` diff --git a/quickget b/quickget index 51f82bd..a866524 100755 --- a/quickget +++ b/quickget @@ -1,5 +1,6 @@ #!/usr/bin/env bash + # Here the quick 'n dirty guide to adding a new OS to quickget # # 1. Add the new OS, all lowercase, to os_support() @@ -34,6 +35,7 @@ function pretty_name() { local PRETTY_NAME="" SIMPLE_NAME="${1}" case ${SIMPLE_NAME} in + alma) PRETTY_NAME="Alma Linux";; android) PRETTY_NAME="Android x86";; archlinux) PRETTY_NAME="Arch Linux";; elementary) PRETTY_NAME="elementary OS";; @@ -141,8 +143,12 @@ function list_csv() { for OPTION in intel nvidia; do echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" done - elif [ "${OS}" == "debian" ]; then + elif [ "${OS}" == "debian" ]; then for OPTION in standard nonfree; do + echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" + done + elif [ "${OS}" == "alma" ]; then + for OPTION in minimal dvd; do echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" done else @@ -154,7 +160,8 @@ function list_csv() { } function os_support() { - echo android \ + echo alma \ + android \ archlinux \ debian \ elementary \ @@ -189,6 +196,12 @@ function os_support() { zorin } +function releases_alma() { + # consider flavours for boot and dvd as well as + echo 8.4 \ + 8.5 +} + function releases_android() { echo 9.0 \ 8.1 \ @@ -694,7 +707,10 @@ function make_vm_config() { IMAGE_FILE="${1}" ISO_FILE="${2}" - if [ "${OS}" == "android" ]; then + if [ "${OS}" == "alma" ]; then + GUEST="linux" + IMAGE_TYPE="iso" + elif [ "${OS}" == "android" ]; then GUEST="linux" IMAGE_TYPE="iso" elif [ "${OS}" == "archlinux" ]; then @@ -762,6 +778,11 @@ function make_vm_config() { IMAGE_TYPE="iso" fi + + if [ -n "${ISOTYPE}" ]; then + RELEASE=${RELEASE}-${ISOTYPE} + fi + if [ ! -e "${OS}-${RELEASE}.conf" ]; then echo "Making VM configuration for ${OS}-${RELEASE}..." cat << EOF > "${OS}-${RELEASE}.conf" @@ -772,7 +793,9 @@ EOF if [ -n "${ISO_FILE}" ]; then echo "fixed_iso=\"${VM_PATH}/${ISO_FILE}\"" >> "${OS}-${RELEASE}.conf" fi - + if [ "${OS}" == "alma" ] && [ ${ISOTYPE} == "dvd" ]; then + echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf" + fi if [ "${OS}" == "openbsd" ]; then echo "boot=\"legacy\"" >> "${OS}-${RELEASE}.conf" fi @@ -839,6 +862,33 @@ function get_android() { make_vm_config "${ISO}" } +function get_alma() { + local HASH="" + local ISO="" + local URL="" + local VERSION="" + #local isotype="" + + validate_release "releases_alma" + + ISOTYPE="minimal" # boot is a step too far for now - needs setting install source to mirror tree ... nope + if [ -n "${1}" ]; then + ISOTYPE="${1}" + fi + + + # The mirror url returns 10 or so local mirrors with some kind or RR rotation/load balancing + # We'll just grab the first + + URL=$(wget -qq -O- https://mirrors.almalinux.org/isos/x86_64/${RELEASE}.html | awk -F"
  • |
  • " '{for(i=2;i<=NF;i+=2) {print $i}}' RS="" |grep href|cut -d\" -f2|head -1) + + #VM_PATH="${VM_PATH}"-${ISOTYPE} + ISO=AlmaLinux-${RELEASE}-x86_64-${ISOTYPE}.iso + HASH="$(wget -q -O- ${URL}/CHECKSUM|grep \(${ISO}|cut -d\ -f4)" + web_get "${URL}/${ISO}" "${VM_PATH}" + check_hash "${ISO}" "${HASH}" + make_vm_config "${ISO}" +} function get_archlinux() { local HASH="" local ISO="" @@ -1102,14 +1152,14 @@ function get_oraclelinux() { local HASH="" local ISO="" local URL="" - + local arch="x86_64" - + validate_release "releases_oraclelinux" local majorver=${RELEASE::1} local minorver=${RELEASE:2:1} - + local baseurl="https://yum.oracle.com/ISOS/OracleLinux/OL${majorver}/u${minorver}/${arch}/" local hashurl="https://linux.oracle.com/security/gpg/checksum/OracleLinux-R${majorver}-U${minorver}-Server-x86_64.checksum" @@ -1438,7 +1488,23 @@ if [ -n "${2}" ]; then RELEASE="${2,,}" VM_PATH="${OS}-${RELEASE}" - if [ "${OS}" == "android" ]; then + if [ "${OS}" == "alma" ]; then + if [ -n "${3}" ]; then + ISOTYPE="${3,,}" + ISOTYPES=(minimal dvd ) # boot) # a step too far + if [[ ! ${ISOTYPES[*]} =~ ${ISOTYPE} ]]; then + echo "iso ${ISOTYPE} is not supported:" + for ISOTYPE in "${ISOTYPES[@]}"; do + echo "${ISOTYPE}" + done + exit 1 + fi + else + ISOTYPE="minimal" + fi + VM_PATH="${OS}-${RELEASE}-${ISOTYPE}" + get_alma "${ISOTYPE}" + elif [ "${OS}" == "android" ]; then get_android elif [ "${OS}" == "archlinux" ]; then get_archlinux @@ -1543,7 +1609,9 @@ if [ -n "${2}" ]; then fi else echo -n "ERROR! You must specify a release: " - if [ "${OS}" == "android" ]; then + if [ "${OS}" == "alma" ]; then + releases_alma + elif [ "${OS}" == "android" ]; then releases_android elif [ "${OS}" == "archlinux" ]; then releases_archlinux From 194b303a547bdbda562102e1149e6d49e8e2fdca Mon Sep 17 00:00:00 2001 From: "Jinming Wu, Patrick" Date: Tue, 9 Nov 2021 00:03:58 +0800 Subject: [PATCH 25/57] add a display setting in the conf file --- quickemu | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/quickemu b/quickemu index 5907511..725d51c 100755 --- a/quickemu +++ b/quickemu @@ -1033,6 +1033,16 @@ function usage() { exit 1 } +function display_param_check() { + if [ "${OUTPUT}" != "gtk" ] && [ "${OUTPUT}" != "none" ] && [ "${OUTPUT}" != "sdl" ] && [ "${OUTPUT}" != "spice" ]; then + echo "ERROR! Requested output '${OUTPUT}' is not recognised." + exit 1 + elif [ "${OUTPUT}" == "spice" ] && ! command -v spicy &>/dev/null; then + echo "ERROR! Requested SPICE display, but 'spicy' is not installed." + exit 1 + fi +} + # Lowercase variables are used in the VM config file only boot="efi" bridge="" @@ -1056,7 +1066,7 @@ DELETE_DISK=0 DELETE_VM=0 FULLSCREEN="" FULLSPICY="" -OUTPUT="sdl" +OUTPUT="" PUBLIC="" PUBLIC_PERMS="" PUBLIC_TAG="" @@ -1121,13 +1131,7 @@ else shift;; -display|--display) OUTPUT="${2}" - if [ "${OUTPUT}" != "gtk" ] && [ "${OUTPUT}" != "none" ] && [ "${OUTPUT}" != "sdl" ] && [ "${OUTPUT}" != "spice" ]; then - echo "ERROR! Requested output '${OUTPUT}' is not recognised." - exit 1 - elif [ "${OUTPUT}" == "spice" ] && ! command -v spicy &>/dev/null; then - echo "ERROR! Requested SPICE display, but 'spicy' is not installed." - exit 1 - fi + display_param_check shift shift;; -fullscreen|--fullscreen|-full-screen|--full-screen) @@ -1199,6 +1203,15 @@ if [ -n "${VM}" ] && [ -e "${VM}" ]; then disk_size="${disk}" fi + if [ -z "${OUTPUT}" ]; then + if [ -z "${display}" ]; then + OUTPUT="sdl" + else + OUTPUT="${display}" + display_param_check + fi + fi + if [ "${tpm}" == "on" ]; then SWTPM=$(command -v swtpm) if [ ! -e "${SWTPM}" ]; then From 6167f30c9301f6180002be8f7a85681521a9051b Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Fri, 3 Dec 2021 16:53:50 +0000 Subject: [PATCH 26/57] Update OS support in README --- README.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2273c92..d3e1e4e 100644 --- a/README.md +++ b/README.md @@ -183,17 +183,14 @@ preferred flavour. * `fedora` * `garuda` * `kali` - * `linuxmint-cinnamon` - * `linuxmint-mate` - * `linuxmint-xfce` + * `kdeneon` + * `linuxmint` + * `nixos` * `opensuse` * `oraclelinux` * `popos` * `regolith` * `rockylinux` - * `nixos-gnome` - * `nixos-plasma5` - * `nixos-minimal` * `zorin` Or you can download a Linux image and manually create a VM configuration. @@ -218,6 +215,13 @@ quickemu --vm debian-bullseye.conf * Install the SPICE agent (`spice-vdagent`) to enable copy/paste and USB redirection. * Install the SPICE WebDAV agent (`spice-webdavd`) to enable file sharing. +## BSD Guests + +`quickget` also supports: + + * `freebsd` + * `openbsd` + ## macOS Guest `quickget` automatically downloads a macOS recovery image and creates a virtual From 59e9a73e4c3e582c3e876d54599f1cfbe6aca6f0 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Fri, 3 Dec 2021 16:54:20 +0000 Subject: [PATCH 27/57] Clairfy QEMU not found messages --- quickemu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickemu b/quickemu index 725d51c..b7ca0ca 100755 --- a/quickemu +++ b/quickemu @@ -1105,7 +1105,7 @@ fi QEMU=$(command -v qemu-system-x86_64) QEMU_IMG=$(command -v qemu-img) if [ ! -e "${QEMU}" ] && [ ! -e "${QEMU_IMG}" ]; then - echo "ERROR! qemu not found. Please install qemu." + echo "ERROR! QEMU not found. Please make install qemu-system-x86_64 and qemu-img" exit 1 fi From edd9216775bd2fe2f75aad694a09bddb24bbf6ed Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 6 Dec 2021 10:22:58 +0000 Subject: [PATCH 28/57] Make shellcheck happy --- quickget | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quickget b/quickget index a866524..f47e1ef 100755 --- a/quickget +++ b/quickget @@ -880,11 +880,11 @@ function get_alma() { # The mirror url returns 10 or so local mirrors with some kind or RR rotation/load balancing # We'll just grab the first - URL=$(wget -qq -O- https://mirrors.almalinux.org/isos/x86_64/${RELEASE}.html | awk -F"
  • |
  • " '{for(i=2;i<=NF;i+=2) {print $i}}' RS="" |grep href|cut -d\" -f2|head -1) + URL=$(wget -qq -O- "https://mirrors.almalinux.org/isos/x86_64/${RELEASE}.html" | awk -F"
  • |
  • " '{for(i=2;i<=NF;i+=2) {print $i}}' RS="" |grep href|cut -d\" -f2|head -1) #VM_PATH="${VM_PATH}"-${ISOTYPE} ISO=AlmaLinux-${RELEASE}-x86_64-${ISOTYPE}.iso - HASH="$(wget -q -O- ${URL}/CHECKSUM|grep \(${ISO}|cut -d\ -f4)" + HASH="$(wget -q -O- "${URL}/CHECKSUM" | grep \(${ISO} | cut -d\ -f4)" web_get "${URL}/${ISO}" "${VM_PATH}" check_hash "${ISO}" "${HASH}" make_vm_config "${ISO}" From 5408979da5f366a8177de7242d2ed40a72a83745 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 6 Dec 2021 10:54:46 +0000 Subject: [PATCH 29/57] New WIndows 10 & 11 ISO are available --- quickget | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quickget b/quickget index f47e1ef..6483523 100755 --- a/quickget +++ b/quickget @@ -1402,11 +1402,11 @@ function get_windows() { # Ignore the most recent Windows 10 release for now. if [ "${RELEASE}" -eq 10 ]; then - INDEX=1 + INDEX=0 fi if [ "${RELEASE}" -eq 11 ]; then - INDEX=1 + INDEX=0 fi echo "Getting Windows ${RELEASE} URL..." From 126e2d3aa0e0c1bb082c8623726ad9c39f933d28 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 6 Dec 2021 10:55:54 +0000 Subject: [PATCH 30/57] Add debug for get_windows() --- quickget | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/quickget b/quickget index 6483523..8a02906 100755 --- a/quickget +++ b/quickget @@ -1382,6 +1382,13 @@ function get_garuda() { make_vm_config "${OS}-${RELEASE}.iso" } +function dbg_windows() { + local DEBUG=0 + if [ ${DEBUG} -eq 1 ]; then + echo "${1}" + fi +} + # Adapted from https://gist.github.com/hongkongkiwi/15a5bf16437315df256c118c163607cb function get_windows() { local ARCH="x64" @@ -1411,24 +1418,37 @@ function get_windows() { echo "Getting Windows ${RELEASE} URL..." WINDOWS_VERSIONS=$(wget -q -O- "https://tb.rg-adguard.net/php/get_version.php?type_id=1" | jq '.versions | sort_by(-(.version_id | tonumber))') + dbg_windows "${WINDOWS_VERSIONS}" LATEST_WINDOWS_VERSION=$(echo "${WINDOWS_VERSIONS}" | jq -c 'map(select(.name | contains("Windows '${RELEASE}'")))['${INDEX}']') + dbg_windows "${LATEST_WINDOWS_VERSION}" WINDOWS_NAME=$(echo "${LATEST_WINDOWS_VERSION}" | jq -r .name) + dbg_windows "${WINDOWS_NAME}" VERSION_ID=$(echo "${LATEST_WINDOWS_VERSION}" | jq -r .version_id) + dbg_windows "${VERSION_ID}" case ${RELEASE} in 8) EDITION_ID=$(wget -q -O- "https://tb.rg-adguard.net/php/get_edition.php?version_id=${VERSION_ID}&lang=name_${LANG_CODE}" | jq -r '.editions[] | select(.name_'${LANG_CODE}'=="Windows 8.1 Pro + Core").edition_id');; 10|11) EDITION_ID=$(wget -q -O- "https://tb.rg-adguard.net/php/get_edition.php?version_id=${VERSION_ID}&lang=name_${LANG_CODE}" | jq -r '.editions[] | select(.name_'${LANG_CODE}'=="Windows '${RELEASE}'").edition_id');; esac + dbg_windows "${EDITION_ID}" LANGUAGE_ID=$(wget -q -O- "https://tb.rg-adguard.net/php/get_language.php?edition_id=${EDITION_ID}&lang=name_${LANG_CODE}" | jq -r '.languages[] | select(.name_'${LANG_CODE}'=="'"${LANG_NAME}"'").language_id') + dbg_windows "${LANGUAGE_ID}" ARCH_INFO=$(wget -q -O- "https://tb.rg-adguard.net/php/get_arch.php?language_id=${LANGUAGE_ID}") + dbg_windows "${ARCH_INFO}" FILE_NAME=$(echo "${ARCH_INFO}" | jq -r '.archs[] | select(.name | contains("'${ARCH}'")).name') + dbg_windows "${FILE_NAME}" ARCH_ID=$(echo "${ARCH_INFO}" | jq -r '.archs[] | select(.name | contains("'${ARCH}'")).arch_id') + dbg_windows "${ARCH_ID}" DOWNLOAD_INFO=$(wget -q -O- "https://tb.rg-adguard.net/dl.php?fileName=${ARCH_ID}&lang=en") + dbg_windows "${DOWNLOAD_INFO}" DOWNLOAD_SHA1=$(echo "${DOWNLOAD_INFO}" | sed -e 's/<[^>]*>//g' | grep -o -P '(?<=SHA1: ).*(?= expire)' | sed 's/Link//') + dbg_windows "${DOWNLOAD_SHA1}" DOWNLOAD_ID=$(echo "${DOWNLOAD_INFO}" | grep -oP '(?<=https:\/\/tb\.rg-adguard\.net/dl\.php\?go=)[0-9a-z]+') + dbg_windows "${DOWNLOAD_ID}" DOWNLOAD_URL="https://tb.rg-adguard.net/dl.php?go=${DOWNLOAD_ID}" + dbg_windows "${DOWNLOAD_URL}" echo "Downloading ${WINDOWS_NAME}..." web_get "${DOWNLOAD_URL}" "${VM_PATH}" "${FILE_NAME}" From acd9cfde81b3797dc0100a149453cc22a3f8632b Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 6 Dec 2021 10:56:58 +0000 Subject: [PATCH 31/57] Formatting unattaned.xml --- quickget | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/quickget b/quickget index 8a02906..f5bfe10 100755 --- a/quickget +++ b/quickget @@ -436,8 +436,11 @@ function unattended_windows() { - + 0 From 98ee949a6bdd85358afecaf690cd16929164dda9 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 6 Dec 2021 10:58:24 +0000 Subject: [PATCH 32/57] Disable CEIP https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-sqmapi-ceipenabled --- quickget | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/quickget b/quickget index f5bfe10..47c68df 100755 --- a/quickget +++ b/quickget @@ -435,6 +435,28 @@ function unattended_windows() { + + + false + + + + 0 + + + Date: Sun, 5 Dec 2021 13:07:01 +0000 Subject: [PATCH 33/57] Re-disabled network for re-appearance of #115 --- README.md | 7 +++++++ quickemu | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d3e1e4e..326dae5 100644 --- a/README.md +++ b/README.md @@ -298,6 +298,13 @@ and [Windows 11](https://www.microsoft.com/en-gb/software-download/windows11) along with the [VirtIO drivers for Windows](https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/) and creates a virtual machine configuration. + +**During the Windows install network interfaces are completely disabled!** This +is to allow those users who want to create local accounts to do so. A side affect +is that the first time **Windows boots with the QEMU network enabled it will blue +screen, automatically restart and then start normally with fully functioning +networking**. + ```bash quickget windows 11 quickemu --vm windows-11.conf diff --git a/quickemu b/quickemu index b7ca0ca..144c4cf 100755 --- a/quickemu +++ b/quickemu @@ -866,7 +866,11 @@ function vm_boot() { -monitor none -serial mon:stdio) - if [ -n "${bridge}" ]; then + # re-instate old fix for #115 + if [ "${guest_os}" == "windows" ] && [ -n "${iso}" ]; then + args+=(-nic none) + elif [ -n "${bridge}" ]; then + # Enable bridge mode networking # shellcheck disable=SC2054,SC2206 args+=(-nic bridge,br=${bridge},model=virtio-net-pci) From ace30551fcf8f7607e1dba6a57142940391504ea Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 6 Dec 2021 11:38:26 +0000 Subject: [PATCH 34/57] Always disable S3 on WIndows This should prevent fresh installs from failing during the multiple reboots --- quickemu | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/quickemu b/quickemu index 144c4cf..00e2a94 100755 --- a/quickemu +++ b/quickemu @@ -523,9 +523,7 @@ function vm_boot() { # Disable S3 support in the VM to ensure Windows can boot with SecureBoot enabled # - https://wiki.archlinux.org/title/QEMU#VM_does_not_boot_when_using_a_Secure_Boot_enabled_OVMF - if [ "${secureboot}" == "on" ]; then - GUEST_TWEAKS="${GUEST_TWEAKS} -global ICH9-LPC.disable_s3=1" - fi + GUEST_TWEAKS="${GUEST_TWEAKS} -global ICH9-LPC.disable_s3=1" if [ -z "${disk_size}" ]; then disk_size="64G" From 20ca3aff8d6b651fed953805869670c1f382adcf Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 6 Dec 2021 11:44:22 +0000 Subject: [PATCH 35/57] Bump version to 2.3.4 --- quickemu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickemu b/quickemu index 00e2a94..a9a60a5 100755 --- a/quickemu +++ b/quickemu @@ -1085,7 +1085,7 @@ VMPATH="" readonly LAUNCHER=$(basename "${0}") readonly DISK_MIN_SIZE=$((197632 * 8)) -readonly VERSION="2.3.3" +readonly VERSION="2.3.4" # PUBLICSHARE is the only directory exposed to guest VMs for file # sharing via 9P, spice-webdavd and Samba. This path is not configurable. From 8c2f2d0adcc31f4310c59a3b4bf9230ca82cf3b2 Mon Sep 17 00:00:00 2001 From: Phil Date: Sun, 5 Dec 2021 02:36:04 +0000 Subject: [PATCH 36/57] Some new features needed adding to the README --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 326dae5..3508560 100644 --- a/README.md +++ b/README.md @@ -515,8 +515,9 @@ Usage quickemu --vm ubuntu.conf You can also pass optional parameters - --delete : Delete the disk image. - --display : Select display backend. 'sdl' (default), 'gtk', 'none' or 'spice' + --delete-disk : Delete the disk image and EFI variables + --delete-vm : Delete the entire VM and it's configuration + --display : Select display backend. 'sdl' (default), 'gtk', 'none', or 'spice' --fullscreen : Starts VM in full screen mode (Ctl+Alt+f to exit) --ignore-msrs-always : Configure KVM to always ignore unhandled machine-specific registers --screen : Use specified screen to determine the window size. From 9210054c05b57c7cfab6544f42e0799b111eea34 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 6 Dec 2021 15:02:22 +0000 Subject: [PATCH 37/57] Enable VirtIO for Windows disks --- quickemu | 32 +++++--------------------------- 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/quickemu b/quickemu index a9a60a5..b92bb05 100755 --- a/quickemu +++ b/quickemu @@ -891,38 +891,20 @@ function vm_boot() { args+=(-drive if=floppy,format=raw,file="${floppy}") fi - if [ "${guest_os}" == "windows" ]; then - # shellcheck disable=SC2054 - args+=(-device ahci,id=ahci) - fi - if [ -n "${iso}" ]; then - if [ "${guest_os}" == "windows" ]; then - # shellcheck disable=SC2054 - args+=(-drive id=iso,if=none,media=cdrom,file="${iso}" - -device ide-cd,drive=iso,bus=ahci.1,bootindex=1) - else - # shellcheck disable=SC2054 - args+=(-drive media=cdrom,index=0,file="${iso}") - fi + # shellcheck disable=SC2054 + args+=(-drive media=cdrom,index=0,file="${iso}") fi if [ -n "${fixed_iso}" ]; then - if [ "${guest_os}" == "windows" ]; then - # shellcheck disable=SC2054 - args+=(-drive id=fixed_iso,if=none,media=cdrom,file="${fixed_iso}" - -device ide-cd,drive=fixed_iso,bus=ahci.2) - else - # shellcheck disable=SC2054 - args+=(-drive media=cdrom,index=1,file="${fixed_iso}") - fi + # shellcheck disable=SC2054 + args+=(-drive media=cdrom,index=1,file="${fixed_iso}") fi # Attach the unattended configuration to Windows guests when booting from ISO if [ -n "${iso}" ] && [ "${guest_os}" == "windows" ] && [ -e "${VMDIR}/unattended.iso" ]; then # shellcheck disable=SC2054 - args+=(-drive id=unattended,if=none,media=cdrom,file="${VMDIR}/unattended.iso" - -device ide-cd,drive=unattended,bus=ahci.3) + args+=(-drive media=cdrom,index=2,file="${VMDIR}/unattended.iso") fi if [ "${guest_os}" == "macos" ]; then @@ -940,10 +922,6 @@ function vm_boot() { # shellcheck disable=SC2054,SC2206 args+=(-device ${MAC_DISK_DEV},drive=SystemDisk -drive id=SystemDisk,if=none,format=qcow2,file="${disk_img}" ${STATUS_QUO}) - elif [ "${guest_os}" == "windows" ]; then - # shellcheck disable=SC2054,SC2206 - args+=(-device ide-hd,drive=SystemDisk,bus=ahci.0,bootindex=0 - -drive id=SystemDisk,if=none,format=qcow2,file="${disk_img}" ${STATUS_QUO}) else # shellcheck disable=SC2054,SC2206 args+=(-device virtio-blk-pci,drive=SystemDisk From 2a0ba4d10a33048ddbd21da896552e269e9beade Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 6 Dec 2021 15:02:54 +0000 Subject: [PATCH 38/57] Enable network during Windows installs --- README.md | 7 ------- quickemu | 6 +----- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/README.md b/README.md index 3508560..78ac412 100644 --- a/README.md +++ b/README.md @@ -298,13 +298,6 @@ and [Windows 11](https://www.microsoft.com/en-gb/software-download/windows11) along with the [VirtIO drivers for Windows](https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/) and creates a virtual machine configuration. - -**During the Windows install network interfaces are completely disabled!** This -is to allow those users who want to create local accounts to do so. A side affect -is that the first time **Windows boots with the QEMU network enabled it will blue -screen, automatically restart and then start normally with fully functioning -networking**. - ```bash quickget windows 11 quickemu --vm windows-11.conf diff --git a/quickemu b/quickemu index b92bb05..f4c9c55 100755 --- a/quickemu +++ b/quickemu @@ -864,11 +864,7 @@ function vm_boot() { -monitor none -serial mon:stdio) - # re-instate old fix for #115 - if [ "${guest_os}" == "windows" ] && [ -n "${iso}" ]; then - args+=(-nic none) - elif [ -n "${bridge}" ]; then - + if [ -n "${bridge}" ]; then # Enable bridge mode networking # shellcheck disable=SC2054,SC2206 args+=(-nic bridge,br=${bridge},model=virtio-net-pci) From 2a5e4537eb64606a1c8975ddadf852e109a42a1a Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 6 Dec 2021 15:04:49 +0000 Subject: [PATCH 39/57] Update Windows disk partitions to include WinRE, EFI, MSR and OS --- quickget | 45 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/quickget b/quickget index 47c68df..cd562b9 100755 --- a/quickget +++ b/quickget @@ -462,54 +462,79 @@ function unattended_windows() { processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" - versionScope="nonSxS"> + versionScope="nonSxS" + xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 0 true + 1 - EFI - 100 + Primary + 256 + 2 - MSR - 512 + EFI + 128 + 3 + MSR + 128 + + + + 4 Primary true + 1 1 + + NTFS + DE94BBA4-06D1-4D40-A16A-BFD50179D6AC + + + + 2 + 2 FAT32 + - 2 + 3 3 + + + + 4 + 4 C NTFS - OnError - OnError 0 - 3 + 4 - + false + true From fac46863c3d6348444342b6001447f7cfde2f0f6 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 6 Dec 2021 15:06:58 +0000 Subject: [PATCH 40/57] Consistent formatting in unattend.xml --- quickget | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/quickget b/quickget index cd562b9..e80c65b 100755 --- a/quickget +++ b/quickget @@ -550,8 +550,10 @@ function unattended_windows() { + publicKeyToken="31bf3856ad364e35" + language="neutral" + versionScope="nonSxS" + processorArchitecture="amd64"> +function check_hash() { + local iso="" + local hash="" + local hash_algo="" + iso="${VM_PATH}/${1}" + hash="${2}" - - - - true - - + # Guess the hash algorithm by the hash length + case ${#hash} in + 32) hash_algo=md5sum;; + 40) hash_algo=sha1sum;; + 64) hash_algo=sha256sum;; + 128) hash_algo=sha512sum;; + *) echo "WARNING! Can't guess hash algorithm, not checking ${iso} hash." + return;; + esac - - - false - + echo -n "Checking ${iso} with ${hash_algo}... " + if ! echo "${hash} ${iso}" | ${hash_algo} --check --status; then + echo "ERROR!" + echo "${iso} doesn't match ${hash}. Try running 'quickget' again." + exit 1 + else + echo "Good!" + fi +} - - 0 - - +function web_get() { + local DIR="${2}" + local FILE="" + local URL="${1}" - - - - - 0 - true - - - - 1 - Primary - 256 - - - - 2 - EFI - 128 - - - - 3 - MSR - 128 - - - - 4 - Primary - true - - - - - - 1 - 1 - - NTFS - DE94BBA4-06D1-4D40-A16A-BFD50179D6AC - - - - 2 - 2 - - FAT32 - - - - 3 - 3 - - - - 4 - 4 - - C - NTFS - - - - - - - - 0 - 4 - - false - - - - true - - VK7JG-NPHTM-C97JM-9MPGT-3V66T - Never - - - - true - Never - - + if [ -n "${3}" ]; then + FILE="${3}" + else + FILE="${URL##*/}" + fi - + if ! mkdir -p "${DIR}" 2>/dev/null; then + echo "ERROR! Unable to create directory ${DIR}" + exit 1 + fi - - - - E:\qemufwcfg\w10\amd64 - - - E:\vioinput\w10\amd64 - - - E:\vioscsi\w10\amd64 - - - E:\viostor\w10\amd64 - - - E:\vioserial\w10\amd64 - - - E:\qxldod\w10\amd64 - - - E:\amd64\w10 - - - E:\viogpudo\w10\amd64 - - - E:\viorng\w10\amd64 - - - E:\NetKVM\w10\amd64 - - - E:\viofs\w10\amd64 - - - E:\Balloon\w10\amd64 - - - - + if ! wget --quiet --continue --show-progress --progress=bar:force:noscroll "${URL}" -O "${DIR}/${FILE}"; then + echo "ERROR! Failed to download ${URL}. Try running 'quickget' again." + exit 1 + fi +} - - - * - - Wimpys World - Quickemu - 24/7 - - Wimpys World - https://github.com/wimpysworld/quickemu/issues - - Wimpys World - - - - - - - true - false - true - false - true - Home - 3 - false - false - - true - - - - - msiexec /i E:\guest-agent\qemu-ga-x86_64.msi /quiet /passive /qn - Install Virtio Guest Agent - 1 - - - msiexec /i F:\spice-webdavd-x64-latest.msi /quiet /passive /qn - Install spice-webdavd file sharing agent - 2 - - - msiexec /i F:\UsbDk_1.0.22_x64.msi /quiet /passive /qn - Install usbdk USB sharing agent - 3 - - - msiexec /i F:\spice-vdagent-x64-0.10.0.msi /quiet /passive /qn - Install spice-vdagent SPICE agent - 4 - - - Cmd /c POWERCFG -H OFF - Disable Hibernation - 5 - - - - - -EOF -} - -function check_hash() { - local iso="" - local hash="" - local hash_algo="" - iso="${VM_PATH}/${1}" - hash="${2}" - - # Guess the hash algorithm by the hash length - case ${#hash} in - 32) hash_algo=md5sum;; - 40) hash_algo=sha1sum;; - 64) hash_algo=sha256sum;; - 128) hash_algo=sha512sum;; - *) echo "WARNING! Can't guess hash algorithm, not checking ${iso} hash." - return;; - esac - - echo -n "Checking ${iso} with ${hash_algo}... " - if ! echo "${hash} ${iso}" | ${hash_algo} --check --status; then - echo "ERROR!" - echo "${iso} doesn't match ${hash}. Try running 'quickget' again." - exit 1 - else - echo "Good!" - fi -} - -function web_get() { - local DIR="${2}" - local FILE="" - local URL="${1}" - - if [ -n "${3}" ]; then - FILE="${3}" - else - FILE="${URL##*/}" - fi - - if ! mkdir -p "${DIR}" 2>/dev/null; then - echo "ERROR! Unable to create directory ${DIR}" - exit 1 - fi - - if ! wget --quiet --continue --show-progress --progress=bar:force:noscroll "${URL}" -O "${DIR}/${FILE}"; then - echo "ERROR! Failed to download ${URL}. Try running 'quickget' again." - exit 1 - fi -} - -function zsync_get() { - local DIR="${2}" - local FILE="" - local OUT="" - local URL="${1}" - FILE="${URL##*/}" - local ZS="" +function zsync_get() { + local DIR="${2}" + local FILE="" + local OUT="" + local URL="${1}" + FILE="${URL##*/}" + local ZS="" # check if we have a zsync installed somewhere ZS="$(which zsync)" @@ -1454,6 +1184,277 @@ function get_garuda() { make_vm_config "${OS}-${RELEASE}.iso" } +function unattended_windows() { + cat << 'EOF' > "${1}" + + + + + + + + + true + + + + + + false + + + + 0 + + + + + + + + 0 + true + + + + 1 + Primary + 256 + + + + 2 + EFI + 128 + + + + 3 + MSR + 128 + + + + 4 + Primary + true + + + + + + 1 + 1 + + NTFS + DE94BBA4-06D1-4D40-A16A-BFD50179D6AC + + + + 2 + 2 + + FAT32 + + + + 3 + 3 + + + + 4 + 4 + + C + NTFS + + + + + + + + 0 + 4 + + false + + + + true + + VK7JG-NPHTM-C97JM-9MPGT-3V66T + Never + + + + true + Never + + + + + + + + + E:\qemufwcfg\w10\amd64 + + + E:\vioinput\w10\amd64 + + + E:\vioscsi\w10\amd64 + + + E:\viostor\w10\amd64 + + + E:\vioserial\w10\amd64 + + + E:\qxldod\w10\amd64 + + + E:\amd64\w10 + + + E:\viogpudo\w10\amd64 + + + E:\viorng\w10\amd64 + + + E:\NetKVM\w10\amd64 + + + E:\viofs\w10\amd64 + + + E:\Balloon\w10\amd64 + + + + + + + + * + + Wimpys World + Quickemu + 24/7 + + Wimpys World + https://github.com/wimpysworld/quickemu/issues + + Wimpys World + + + + + + + true + false + true + false + true + Home + 3 + false + false + + true + + + + + msiexec /i E:\guest-agent\qemu-ga-x86_64.msi /quiet /passive /qn + Install Virtio Guest Agent + 1 + + + msiexec /i F:\spice-webdavd-x64-latest.msi /quiet /passive /qn + Install spice-webdavd file sharing agent + 2 + + + msiexec /i F:\UsbDk_1.0.22_x64.msi /quiet /passive /qn + Install usbdk USB sharing agent + 3 + + + msiexec /i F:\spice-vdagent-x64-0.10.0.msi /quiet /passive /qn + Install spice-vdagent SPICE agent + 4 + + + Cmd /c POWERCFG -H OFF + Disable Hibernation + 5 + + + + + +EOF +} + + function dbg_windows() { local DEBUG=0 if [ ${DEBUG} -eq 1 ]; then From c72b0fa41770e21711ac6310fd251538784c72a2 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 6 Dec 2021 17:23:12 +0000 Subject: [PATCH 43/57] Update link to unattended documentation --- quickget | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/quickget b/quickget index 876456a..dbf4af0 100755 --- a/quickget +++ b/quickget @@ -1190,10 +1190,9 @@ function unattended_windows() { - From 810000d7859256f047f8ec078a96592d35b1b394 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 6 Dec 2021 17:23:40 +0000 Subject: [PATCH 44/57] Clean up --- quickget | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/quickget b/quickget index dbf4af0..37eb153 100755 --- a/quickget +++ b/quickget @@ -1196,11 +1196,6 @@ function unattended_windows() { --> - false - + Date: Mon, 6 Dec 2021 17:24:50 +0000 Subject: [PATCH 45/57] Drop NetworkLocation; not required --- quickget | 1 - 1 file changed, 1 deletion(-) diff --git a/quickget b/quickget index 37eb153..7ca9b3a 100755 --- a/quickget +++ b/quickget @@ -1407,7 +1407,6 @@ function unattended_windows() { true false true - Home 3 false false From c15872bfb45e2549ef51d2e41e13533796b70288 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 6 Dec 2021 17:25:54 +0000 Subject: [PATCH 46/57] Consolidate specialize --- quickget | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/quickget b/quickget index 7ca9b3a..889ec0a 100755 --- a/quickget +++ b/quickget @@ -1216,6 +1216,23 @@ function unattended_windows() { false + * + + Quickemu Project + Quickemu + 24/7 + + Quickemu Project + https://github.com/quickemu-project/quickemu/issues + + Quickemu Project + - - - * - - Wimpys World - Quickemu - 24/7 - - Wimpys World - https://github.com/wimpysworld/quickemu/issues - - Wimpys World - - - Date: Mon, 6 Dec 2021 17:26:54 +0000 Subject: [PATCH 47/57] Autogenerate ComputerName in offlineServicing Prevents Windows 11 prompting for a computer name during install --- quickget | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/quickget b/quickget index 889ec0a..e7d75ed 100755 --- a/quickget +++ b/quickget @@ -1194,6 +1194,17 @@ function unattended_windows() { For documentation on components: https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/ --> + + + * + + Date: Mon, 6 Dec 2021 17:27:28 +0000 Subject: [PATCH 48/57] Do not OptIn to sharing diagnostics data --- quickget | 3 +++ 1 file changed, 3 insertions(+) diff --git a/quickget b/quickget index e7d75ed..da8f69c 100755 --- a/quickget +++ b/quickget @@ -1341,6 +1341,9 @@ function unattended_windows() { Never + + false + true Never From 957f453acdd11d64a8a2d86c72c7bd8730487693 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 6 Dec 2021 17:27:50 +0000 Subject: [PATCH 49/57] Do not attempt an upgrade --- quickget | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/quickget b/quickget index da8f69c..2d43df2 100755 --- a/quickget +++ b/quickget @@ -1334,6 +1334,10 @@ function unattended_windows() { false + + false + Never + true From b40f1d8925f113282ed3b7daaba23da6ce52e7e4 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 6 Dec 2021 17:28:50 +0000 Subject: [PATCH 50/57] Update OEM fields in quickemu to match unattended Change references to Quickemu Project, instead of Wimpys World --- quickemu | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/quickemu b/quickemu index f4c9c55..8090b0f 100755 --- a/quickemu +++ b/quickemu @@ -832,7 +832,7 @@ function vm_boot() { -enable-kvm -machine q35,smm=${SMM},vmport=off ${GUEST_TWEAKS} ${CPU} ${SMP} -m ${RAM_VM} ${BALLOON} - -smbios type=2,manufacturer="Wimpys World",product="Quickemu",version="${VERSION}",serial="jvzclfjbeyq.pbz",location="wimpysworld.com",asset="${VMNAME}" + -smbios type=2,manufacturer="Quickemu Project",product="Quickemu",version="${VERSION}",serial="0xDEADBEEF",location="quickemu.com",asset="${VMNAME}" ${VIDEO} -display ${DISPLAY_RENDER} -device usb-ehci,id=input -device usb-kbd,bus=input.0 @@ -945,12 +945,13 @@ function vm_boot() { -device tpm-tis,tpmdev=tpm0) fi - # The OSK parameter contains parenthesis, they need to be escaped in the shell scripts - # The vendor name, Wimpys World, contains a space. It needs to be double-quoted. + # The OSK parameter contains parenthesis, they need to be escaped in the shell + # scripts. The vendor name, Quickemu Project, contains a space. It needs to be + # double-quoted. SHELL_ARGS="${args[*]}" SHELL_ARGS="${SHELL_ARGS//(/\\(}" SHELL_ARGS="${SHELL_ARGS//)/\\)}" - SHELL_ARGS="${SHELL_ARGS//Wimpys World/\"Wimpys World\"}" + SHELL_ARGS="${SHELL_ARGS//Quickemu Project/\"Quickemu Project\"}" echo "${QEMU}" "${SHELL_ARGS}" >> "${VMDIR}/${VMNAME}.sh" ${QEMU} "${args[@]}" > "${VMDIR}/${VMNAME}.log" & From 9750a9291a013f0ac3b64bdf55cb5874a5f70ecc Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 6 Dec 2021 17:33:08 +0000 Subject: [PATCH 51/57] Reorder windowsPE --- quickget | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/quickget b/quickget index 2d43df2..33636c8 100755 --- a/quickget +++ b/quickget @@ -1263,6 +1263,9 @@ function unattended_windows() { versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + + false + 0 @@ -1325,6 +1328,10 @@ function unattended_windows() { + + true + Never + @@ -1345,13 +1352,6 @@ function unattended_windows() { Never - - false - - - true - Never - Date: Tue, 7 Dec 2021 10:11:03 +0000 Subject: [PATCH 52/57] Bypass some system checks, such as TPM and SecureBoot. Close #233 This should help users of Quickemu on distros where OVMF/EDK2/QEMU don't provide a complete SecureBoot with SMM capability, such as Arch Linux, to successfully install Windows 11. --- quickget | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/quickget b/quickget index 33636c8..8280120 100755 --- a/quickget +++ b/quickget @@ -1341,6 +1341,24 @@ function unattended_windows() { false + + + 1 + reg add HKLM\System\Setup\LabConfig /v BypassCPUCheck /t REG_DWORD /d 0x00000001 /f + + + 2 + reg add HKLM\System\Setup\LabConfig /v BypassRAMCheck /t REG_DWORD /d 0x00000001 /f + + + 3 + reg add HKLM\System\Setup\LabConfig /v BypassSecureBootCheck /t REG_DWORD /d 0x00000001 /f + + + 4 + reg add HKLM\System\Setup\LabConfig /v BypassTPMCheck /t REG_DWORD /d 0x00000001 /f + + false Never From eff4463efc7e6633d90680ba4b5b1d0423a91845 Mon Sep 17 00:00:00 2001 From: 0x4A6F <0x4A6F@users.noreply.github.com> Date: Tue, 7 Dec 2021 20:00:22 +0100 Subject: [PATCH 53/57] NixOS: add 21.11 --- quickget | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quickget b/quickget index 8280120..235fd9a 100755 --- a/quickget +++ b/quickget @@ -279,7 +279,8 @@ function releases_linuxmint(){ } function releases_nixos(){ - echo 21.05 + echo 21.05 \ + 21.11 } function releases_openbsd(){ From 4325a1e79a237fb27d0775fd7edb6891808f58a2 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Tue, 7 Dec 2021 10:17:53 +0000 Subject: [PATCH 54/57] Disable S3 for macOS to try and prevent installs suspending --- quickemu | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/quickemu b/quickemu index 8090b0f..555cba4 100755 --- a/quickemu +++ b/quickemu @@ -480,6 +480,9 @@ function vm_boot() { exit 1 fi + # Disable S3 support in the VM to prevent macOS suspending during install + GUEST_TWEAKS="-no-hpet -global kvm-pit.lost_tick_policy=discard -global ICH9-LPC.disable_s3=1 -device isa-applesmc,osk=${OSK}" + # Tune Qemu optimisations based on the macOS release, or fallback to lowest # common supported options if none is specified. # * VirtIO Block Media doesn't work in High Sierra (at all) or the Mojave (Recovery Image) @@ -509,7 +512,7 @@ function vm_boot() { ;; esac OSK=$(echo "bheuneqjbexolgurfrjbeqfthneqrqcyrnfrqbagfgrny(p)NccyrPbzchgreVap" | tr 'A-Za-z' 'N-ZA-Mn-za-m') - GUEST_TWEAKS="-no-hpet -global kvm-pit.lost_tick_policy=discard -device isa-applesmc,osk=${OSK}" + if [ -z "${disk_size}" ]; then disk_size="96G" fi From 5eb6a20402634b93f52551a255b76a883090daf2 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Tue, 7 Dec 2021 10:18:45 +0000 Subject: [PATCH 55/57] Change USB controller for Big Sur and Monterey to nec-usb-xhci --- quickemu | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quickemu b/quickemu index 555cba4..582e800 100755 --- a/quickemu +++ b/quickemu @@ -500,7 +500,8 @@ function vm_boot() { BALLOON="-device virtio-balloon" MAC_DISK_DEV="virtio-blk-pci" NET_DEVICE="virtio-net" - USB_HOST_PASSTHROUGH_CONTROLLER="qemu-xhci" + USB_HOST_PASSTHROUGH_CONTROLLER="nec-usb-xhci" + GUEST_TWEAKS="${GUEST_TWEAKS} -global nec-usb-xhci.msi=off" ;; *) # Backwards compatibility if no macos_release is specified. From 9cf2d9ac3cc474a9b03adfd8278a8a2ff63985a7 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Tue, 7 Dec 2021 11:51:01 +0000 Subject: [PATCH 56/57] Correct OSK location --- quickemu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickemu b/quickemu index 582e800..9516f47 100755 --- a/quickemu +++ b/quickemu @@ -480,6 +480,7 @@ function vm_boot() { exit 1 fi + OSK=$(echo "bheuneqjbexolgurfrjbeqfthneqrqcyrnfrqbagfgrny(p)NccyrPbzchgreVap" | tr 'A-Za-z' 'N-ZA-Mn-za-m') # Disable S3 support in the VM to prevent macOS suspending during install GUEST_TWEAKS="-no-hpet -global kvm-pit.lost_tick_policy=discard -global ICH9-LPC.disable_s3=1 -device isa-applesmc,osk=${OSK}" @@ -512,7 +513,6 @@ function vm_boot() { USB_HOST_PASSTHROUGH_CONTROLLER="usb-ehci" ;; esac - OSK=$(echo "bheuneqjbexolgurfrjbeqfthneqrqcyrnfrqbagfgrny(p)NccyrPbzchgreVap" | tr 'A-Za-z' 'N-ZA-Mn-za-m') if [ -z "${disk_size}" ]; then disk_size="96G" From 12fbf6b02f43dfa42be33f8da72bbdab50ac7667 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 8 Dec 2021 10:54:41 +0000 Subject: [PATCH 57/57] Bump version to 3.11 --- quickemu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickemu b/quickemu index 9516f47..5507580 100755 --- a/quickemu +++ b/quickemu @@ -1064,7 +1064,7 @@ VMPATH="" readonly LAUNCHER=$(basename "${0}") readonly DISK_MIN_SIZE=$((197632 * 8)) -readonly VERSION="2.3.4" +readonly VERSION="3.11" # PUBLICSHARE is the only directory exposed to guest VMs for file # sharing via 9P, spice-webdavd and Samba. This path is not configurable.