diff --git a/.envrc b/.envrc new file mode 100644 index 0000000000..8392d159f2 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake \ No newline at end of file diff --git a/.github/workflows/mega-linter.yml b/.github/workflows/mega-linter.yml new file mode 100644 index 0000000000..3fe5c887e7 --- /dev/null +++ b/.github/workflows/mega-linter.yml @@ -0,0 +1,184 @@ +--- # Megalinter + +name: Lint + +# Trigger mega-linter at every push. Action will also be visible from +# Pull Requests to main +on: + # Comment this line to trigger action only on pull-requests + # (not recommended if you don't pay for GH Actions) + push: + + pull_request: + branches: + - main + - master + - dev + - new-master + +# Comment env block if you do not want to apply fixes +env: + # Apply linter fixes configuration + # + # When active, APPLY_FIXES must also be defined as environment variable + # (in github/workflows/mega-linter.yml or other CI tool) + APPLY_FIXES: true + + # Decide which event triggers application of fixes in a commit or a PR + # (pull_request, push, all) + APPLY_FIXES_EVENT: all + + # If APPLY_FIXES is used, defines if the fixes are directly committed (commit) + # or posted in a PR (pull_request) + APPLY_FIXES_MODE: pull-request + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }} + cancel-in-progress: true + +jobs: + megalinter: + name: Linting + runs-on: ubuntu-latest + + # Give the default GITHUB_TOKEN write permission to commit and push, comment + # issues, and post new Pull Requests; remove the ones you do not need + permissions: + contents: write + issues: write + pull-requests: write + + steps: + # Git Checkout + - name: Checkout Code + uses: actions/checkout@v4.1.1 + with: + token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} + + # If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to + # improve performance + fetch-depth: 0 + + # MegaLinter + - name: Linter + + # You can override MegaLinter flavor used to have faster performances + # More info at https://megalinter.io/latest/flavors/ + uses: oxsecurity/megalinter/flavors/ci_light@v7.8.0 + + id: ml + + # All available variables are described in documentation + # https://megalinter.io/latest/config-file/ + env: + # Validates all source when push on main, else just the git diff with + # main. Override with true if you always want to lint all sources + # + # To validate the entire codebase, set to: + # VALIDATE_ALL_CODEBASE: true + # + # To validate only diff with main, set to: + VALIDATE_ALL_CODEBASE: >- + ${{ + github.event_name == 'push' && + github.ref == 'refs/heads/main' + }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # ADD YOUR CUSTOM ENV VARIABLES HERE TO OVERRIDE VALUES OF + # .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY + + # Upload MegaLinter artifacts + - name: Archive production artifacts + uses: actions/upload-artifact@v4.2.0 + if: success() || failure() + with: + name: MegaLinter reports + path: | + megalinter-reports + mega-linter.log + # Create pull request if applicable + # (for now works only on PR from same repository, not from forks) + - name: Create Pull Request with applied fixes + uses: peter-evans/create-pull-request@v5.0.2 + id: cpr + if: >- + steps.ml.outputs.has_updated_sources == 1 && + ( + env.APPLY_FIXES_EVENT == 'all' || + env.APPLY_FIXES_EVENT == github.event_name + ) && + env.APPLY_FIXES_MODE == 'pull_request' && + ( + github.event_name == 'push' || + github.event.pull_request.head.repo.full_name == github.repository + ) && + !contains(github.event.head_commit.message, 'skip fix') + with: + token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + commit-message: "[MegaLinter] Apply linters automatic fixes" + title: "[MegaLinter] Apply linters automatic fixes" + labels: bot + + - name: Create PR output + if: >- + steps.ml.outputs.has_updated_sources == 1 && + ( + env.APPLY_FIXES_EVENT == 'all' || + env.APPLY_FIXES_EVENT == github.event_name + ) && + env.APPLY_FIXES_MODE == 'pull_request' && + ( + github.event_name == 'push' || + github.event.pull_request.head.repo.full_name == github.repository + ) && + !contains(github.event.head_commit.message, 'skip fix') + run: | + echo "PR Number - ${{ steps.cpr.outputs.pull-request-number }}" + echo "PR URL - ${{ steps.cpr.outputs.pull-request-url }}" + # Push new commit if applicable + # (for now works only on PR from same repository, not from forks) + - name: Prepare commit + if: >- + steps.ml.outputs.has_updated_sources == 1 && + ( + env.APPLY_FIXES_EVENT == 'all' || + env.APPLY_FIXES_EVENT == github.event_name + ) && + env.APPLY_FIXES_MODE == 'commit' && + github.ref != 'refs/heads/main' && + ( + github.event_name == 'push' || + github.event.pull_request.head.repo.full_name == github.repository + ) && + !contains(github.event.head_commit.message, 'skip fix') + run: sudo chown -Rc $UID .git/ + + - name: Commit and push applied linter fixes + uses: stefanzweifel/git-auto-commit-action@v5 + if: >- + steps.ml.outputs.has_updated_sources == 1 && + ( + env.APPLY_FIXES_EVENT == 'all' || + env.APPLY_FIXES_EVENT == github.event_name + ) && + env.APPLY_FIXES_MODE == 'commit' && + github.ref != 'refs/heads/main' && + ( + github.event_name == 'push' || + github.event.pull_request.head.repo.full_name == github.repository + ) && + !contains(github.event.head_commit.message, 'skip fix') + with: + branch: >- + ${{ + github.event.pull_request.head.ref || + github.head_ref || + github.ref + }} + commit_message: "[MegaLinter] Apply linters fixes" + commit_user_name: megalinter-bot + commit_user_email: mega@linter.bot + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml new file mode 100644 index 0000000000..4dc6fb64f4 --- /dev/null +++ b/.github/workflows/reviewdog.yml @@ -0,0 +1,50 @@ +name: reviewdog +on: + pull_request: + push: + workflow_dispatch: + +jobs: + quickemu-check: + name: runner / quickemu + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: shellcheck + uses: reviewdog/action-shellcheck@v1 + with: + github_token: ${{ secrets.github_token }} + reporter: github-pr-review # Change reporter. + path: "." # Optional. + pattern: "quickemu" # Optional. + exclude: "./.git/*" # Optional. + check_all_files_with_shebangs: "false" # Optional. + quickget-check: + name: runner / quickget + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: shellcheck + uses: reviewdog/action-shellcheck@v1 + with: + github_token: ${{ secrets.github_token }} + reporter: github-pr-review # Change reporter. + path: "." # Optional. + pattern: "quickget" # Optional. + exclude: "./.git/*" # Optional. + check_all_files_with_shebangs: "false" # Optional. + + shellcheck: + name: runner / shellcheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: shellcheck + uses: reviewdog/action-shellcheck@v1 + with: + github_token: ${{ secrets.github_token }} + reporter: github-pr-review # Change reporter. + # path: "." # Optional. + # pattern: "*.sh" # Optional. + # exclude: "./.git/*" # Optional. + check_all_files_with_shebangs: "true" # Optional. diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml new file mode 100644 index 0000000000..0e0d42dfad --- /dev/null +++ b/.github/workflows/shellcheck.yml @@ -0,0 +1,7 @@ + - name: MegaLinter + uses: efrecon/mega-linter-runner@main + env: + VALIDATE_ALL_CODEBASE: true + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + flavor: documentation \ No newline at end of file diff --git a/.github/workflows/stylelint.yml b/.github/workflows/stylelint.yml new file mode 100644 index 0000000000..d1dece36b9 --- /dev/null +++ b/.github/workflows/stylelint.yml @@ -0,0 +1,14 @@ +--- # reviewdog +name: reviewdog +on: [pull_request] +jobs: + stylelint: + name: runner / stylelint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: stylelint + uses: reviewdog/action-stylelint@v1 + with: + reporter: github-pr-review # Change reporter. + stylelint_input: '**/*.css' \ No newline at end of file diff --git a/.gitignore b/.gitignore index ce23a7f791..b839c1de4b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,10 +2,14 @@ *.conf *.dmg *.fd +*.fixed *.img *.iso *.lock +!flake.lock *.log +*.markdownlint.jsonc +*.markdownlint.yaml *.msi *.part *.permall @@ -16,3 +20,7 @@ *.sock *.xml *.zs-old +.direnv/ +megalinter-reports/ +.gitsecret/keys/random_seed +!*.secret diff --git a/.gitsecret/paths/mapping.cfg b/.gitsecret/paths/mapping.cfg new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.mega-linter.yml b/.mega-linter.yml new file mode 100644 index 0000000000..3c36f9013b --- /dev/null +++ b/.mega-linter.yml @@ -0,0 +1,122 @@ +# Configuration file for MegaLinter +# See all available variables at https://megalinter.io/configuration/ and in linters documentation + +--- +APPLY_FIXES: all +# ENABLE: # If you use ENABLE variable, all other languages/formats/tooling formats will be disabled by default +ENABLE_LINTERS: # If you use ENABLE_LINTERS variable, all other linters will be disabled by default + - ACTION_ACTIONLINT + - BASH_EXEC + - BASH_SHELLCHECK + - BASH_SHFMT + - EDITORCONFIG_EDITORCONFIG_CHECKER + - GROOVY_NPM_GROOVY_LINT + - MAKEFILE_CHECKMAKE + - ENV_DOTENV_LINTER + - JSON_JSONLINT + - JSON_ESLINT_PLUGIN_JSONC + - JSON_V8R + - JSON_PRETTIER + - XML_XMLLINT + - YAML_PRETTIER + - YAML_YAMLLINT + - YAML_V8R + - COPYPASTE_JSCPD + - REPOSITORY_CHECKOV + - REPOSITORY_DEVSKIM + - REPOSITORY_DUSTILOCK + - REPOSITORY_KICS + - REPOSITORY_SEMGREP + - REPOSITORY_SYFT + - REPOSITORY_GIT_DIFF + - REPOSITORY_GITLEAKS + - REPOSITORY_GRYPE + - REPOSITORY_SECRETLINT + - REPOSITORY_TRIVY + - REPOSITORY_TRIVY_SBOM + - REPOSITORY_TRUFFLEHOG + # MARKDOWN_REMARK_LINT has been temporary disabled in MegaLinter, please use a previous + # MegaLinter version or wait for the next one ! + + # Skipped linters: ANSIBLE_ANSIBLE_LINT, ARM_ARM_TTK, BICEP_BICEP_LINTER, + # CLOJURE_CLJSTYLE, CLOJURE_CLJ_KONDO, CLOUDFORMATION_CFN_LINT, COFFEE_COFFEELINT, + # CPP_CLANG_FORMAT, CPP_CPPLINT, CSHARP_CSHARPIER, CSHARP_DOTNET_FORMAT, + # CSHARP_ROSLYNATOR, CSS_SCSS_LINT, CSS_STYLELINT, C_CLANG_FORMAT, C_CPPLINT, + # DART_DARTANALYZER, DOCKERFILE_HADOLINT, GHERKIN_GHERKIN_LINT, GO_GOLANGCI_LINT, + # GO_REVIVE, GRAPHQL_GRAPHQL_SCHEMA_LINTER, HTML_DJLINT, HTML_HTMLHINT, + # JAVASCRIPT_ES, JAVASCRIPT_PRETTIER, JAVASCRIPT_STANDARD, JAVA_CHECKSTYLE, + # JAVA_PMD, JSON_NPM_PACKAGE_JSON_LINT, JSX_ESLINT, KOTLIN_KTLINT, KUBERNETES_HELM, + # KUBERNETES_KUBECONFORM, KUBERNETES_KUBESCAPE, LATEX_CHKTEX, LUA_LUACHECK, + # MARKDOWN_MARKDOWNLINT, MARKDOWN_MARKDOWN_LINK_CHECK, MARKDOWN_MARKDOWN_TABLE_FORMATTER, + # MARKDOWN_REMARK_LINT, OPENAPI_SPECTRAL, PERL_PERLCRITIC, PHP_PHPCS, PHP_PHPLINT, + # PHP_PHPSTAN, PHP_PSALM, POWERSHELL_POWERSHELL, POWERSHELL_POWERSHELL_FORMATTER, + # PROTOBUF_PROTOLINT, PUPPET_PUPPET_LINT, PYTHON_BANDIT, PYTHON_BLACK, PYTHON_FLAKE8, + # PYTHON_ISORT, PYTHON_MYPY, PYTHON_PYLINT, PYTHON_PYRIGHT, PYTHON_RUFF, RAKU_RAKU, + # RST_RSTCHECK, RST_RSTFMT, RST_RST_LINT, RUBY_RUBOCOP, RUST_CLIPPY, R_LINTR, + # SALESFORCE_LIGHTNING_FLOW_SCANNER, SALESFORCE_SFDX_SCANNER_APEX, SALESFORCE_SFDX_SCANNER_AURA, + # SALESFORCE_SFDX_SCANNER_LWC, SCALA_SCALAFIX, SNAKEMAKE_LINT, SNAKEMAKE_SNAKEFMT, + # SPELL_CSPELL, SPELL_LYCHEE, SPELL_PROSELINT,SPELL_VALE, SQL_SQLFLUFF, SQL_SQL_LINT, + # SQL_TSQLLINT, SWIFT_SWIFTLINT, TEKTON_TEKTON_LINT, TERRAFORM_TERRAFORM_FMT, + # TERRAFORM_TERRAGRUNT, TERRAFORM_TERRASCAN, TERRAFORM_TFLINT, TEST_JSONLINT, TSX_ESLINT, + # TYPESCRIPT_ES, TYPESCRIPT_PRETTIER, TYPESCRIPT_STANDARD, VBDOTNET_DOTNET_FORMAT +# DISABLE: +# - CLOUDFORMATION +# - COPYPASTE # Uncomment to disable checks of excessive copy-pastes +# - CSS +# - EDITORCONFIG +# - SPELL # Uncomment to disable checks of spelling mistakes +# - JAVASCRIPT +# - TEKTON +# DISABLE_LINTERS: +# - JSON_PRETTIER +# - REPOSITORY_GITLEAKS +# - REPOSITORY_KICS +# - SPELL_PROSELINT +# - SPELL_MISSPELL +# - SPELL_VALE +# DISABLE_ERRORS_LINTERS: +# - PYTHON_BANDIT +# - PYTHON_PYRIGHT +# - REPOSITORY_DEVSKIM +# - REPOSITORY_GRYPE +# - REPOSITORY_SEMGREP +# - REPOSITORY_TRUFFLEHOG +PRINT_ALL_FILES: true +FILTER_REGEX_EXCLUDE: '(\.automation/test|\.automation/generated|\.venv|\.github/workflows|docs/javascripts|docs/overrides|docs/json-schemas|flavors|clj-kondo|TEMPLATES)' +JSON_JSONLINT_FILTER_REGEX_EXCLUDE: '(\.vscode/)' +YAML_YAMLLINT_FILTER_REGEX_EXCLUDE: '(templates/\.mega-linter\.yml)' +YAML_PRETTIER_FILTER_REGEX_EXCLUDE: '(templates/\.mega-linter\.yml|mkdocs\.yml)' +YAML_V8R_FILTER_REGEX_EXCLUDE: '(descriptors|templates/\.mega-linter\.yml|\.codecov\.yml)' +BASH_FILTER_REGEX_INCLUDE: "quickget|quickemu" +BASH_FILTER_REGEX_EXCLUDE: "(lib)" +BASH_SHELLCHECK_FILE_EXTENSIONS: [""] +BASH_SHFMT_FILE_EXTENSIONS: [""] +MARKDOWN_FILTER_REGEX_EXCLUDE: '(license\.md|docs/licenses)' +MARKDOWN_MARKDOWN_LINK_CHECK_DISABLE_ERRORS: true +SPELL_VALE_FILE_EXTENSIONS: + - .md +SPELL_FILTER_REGEX_EXCLUDE: (valestyles|\.github|docs/licenses) +DOCKERFILE_HADOLINT_ARGUMENTS: "--ignore DL3003 --ignore DL3007 --ignore DL3013 --ignore DL3016 --ignore DL3018 --ignore DL3028 --ignore DL3059 --ignore DL4001 --ignore DL4006 --ignore SC2015 --ignore SC2016 --ignore SC2039 --ignore SC2086 --ignore SC1091 --ignore SC3046" +REPOSITORY_TRIVY_ARGUMENTS: + - "--skip-dirs" + - ".automation/test" + - "--skip-dirs" + - ".venv" +CONSOLE_REPORTER: true +OUTPUT_DETAIL: detailed +SHOW_ELAPSED_TIME: true +FLAVOR_SUGGESTIONS: true +EMAIL_REPORTER: false +FILEIO_REPORTER: true +JSON_REPORTER: true +GITHUB_STATUS_REPORTER: true +GITHUB_COMMENT_REPORTER: true +REPORT_OUTPUT_FOLDER: /megalinter-reports +PLUGINS: + - https://raw.githubusercontent.com/oxsecurity/megalinter/main/.automation/test/mega-linter-plugin-test/test.megalinter-descriptor.yml +PRE_COMMANDS: + - command: echo "This is MegaLinter PRE_COMMAND on own MegaLinter ! :)" + cwd: "root" +POST_COMMANDS: + - command: echo "This is MegaLinter POST_COMMAND on own MegaLinter ! :)" + cwd: "workspace" diff --git a/.reviewdog.yml b/.reviewdog.yml new file mode 100644 index 0000000000..a1857cb4a9 --- /dev/null +++ b/.reviewdog.yml @@ -0,0 +1,2 @@ +--- # only API token +REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 7c5bd7bd7b..37af19beb3 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,74 @@ -
Quickly create and run optimised Windows, macOS and Linux desktop virtual machines.
- -Made with 💝 for
+ -## Introduction +# Quickemu + +**Quickly create and run optimised Windows, macOS and Linux desktop virtual machines:** -Quickly create and run highly optimised desktop virtual machines for -Linux, macOS and Windows; with just two commands. You decide what -operating system you want to run and Quickemu will figure out the best -way to do it for you. For example: ++ +[![Packaging +status of quickemu](https://repology.org/badge/vertical-allrepos/quickemu.svg?header=quickemu)](https://repology.org/project/quickemu/versions) + + | ++ +[![Packaging +status](https://repology.org/badge/vertical-allrepos/quickgui.svg?header=quickgui)](https://repology.org/project/quickgui/versions) + + | +
Build-Depends:
debhelper-compat (= 12),
Standards-Version: 4.5.1
-Homepage: https://github.com/wimpysworld/quickemu
-Vcs-Browser: https://github.com/wimpysworld/quickemu
-Vcs-Git: https://github.com/wimpysworld/quickemu.git
+Homepage: https://github.com/quickemu-project/quickemu
+Vcs-Browser: https://github.com/quickemu-project/quickemu
+Vcs-Git: https://github.com/quickemu-project/quickemu.git
Rules-Requires-Root: no
Package: quickemu
Architecture: all
Depends:
coreutils,
+ curl,
genisoimage,
jq,
procps,
diff --git a/debian/copyright b/debian/copyright
index affd387ca4..e6d9edeaad 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,7 +1,7 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: quickemu
Upstream-Contact: Martin Wimpress
-Source: https://github.com/wimpysworld/quickemu
+Source: https://github.com/quickemu-project/quickemu
Files: *
Copyright: 2020-2021 Martin Wimpress
diff --git a/debian/install b/debian/install
index ef9f2d696a..7d34230c0c 100644
--- a/debian/install
+++ b/debian/install
@@ -1,4 +1,4 @@
-macrecovery usr/bin
+chunkcheck usr/bin
quickemu usr/bin
quickget usr/bin
windowskey usr/bin
diff --git a/docs/Makefile b/docs/Makefile
index 71ea07eab7..62795b9563 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -26,7 +26,7 @@ install_bins:
install -d $(DESTDIR)$(bindir)
install -m 755 ../quickget $(DESTDIR)$(bindir)
install -m 755 ../quickemu $(DESTDIR)$(bindir)
- install -m 755 ../macrecovery $(DESTDIR)$(bindir)
+ install -m 755 ../chunkcheck $(DESTDIR)$(bindir)
install: install_bins install_docs
@@ -37,6 +37,7 @@ uninstall::
rm -f $(DESTDIR)$(bindir)/quickget
rm -f $(DESTDIR)$(bindir)/quickemu
rm -f $(DESTDIR)$(bindir)/macrecovery
+ rm -f $(DESTDIR)$(bindir)/chunkcheck
.PHONY: all
diff --git a/docs/quickemu.1 b/docs/quickemu.1
index cd00da4cde..2b117149c0 100644
--- a/docs/quickemu.1
+++ b/docs/quickemu.1
@@ -1,8 +1,8 @@
-.\" Automatically generated by Pandoc 3.1.9
+.\" Automatically generated by Pandoc 3.1.13
.\"
-.TH "QUICKEMU" "1" "November 26, 2023" "quickemu" "Quickemu User Manual"
+.TH "QUICKEMU" "1" "April 21, 2024" "quickemu" "Quickemu User Manual"
.SH NAME
-quickemu - A quick VM builder and manager
+quickemu \- A quick VM builder and manager
.SH SYNOPSIS
\f[B]quickemu\f[R] [\f[I]OPTION\f[R]]\&...
.SH DESCRIPTION
@@ -15,31 +15,36 @@ vm configuration file
.PP
You can also pass optional parameters
.TP
+\f[B]\[en]access\f[R]
+Enable remote spice access support.
+`local' (default), `remote', `clientipaddress'
+.TP
\f[B]\[en]braille\f[R]
Enable braille support.
Requires SDL.
.TP
-\f[B]\[en]delete-disk\f[R]
-Delete the disk image.
+\f[B]\[en]delete\-disk\f[R]
+Delete the disk image and EFI variables
+.TP
+\f[B]\[en]delete\-vm\f[R]
+Delete the entire VM and it\[cq]s configuration
.TP
\f[B]\[en]display\f[R]
Select display backend.
-`sdl' (default), `gtk', `none', `spice' or `spice-app'
-.TP
-\f[B]\[en]sound-card\f[R]
-Select virtual audio emulation.
-`intel-hda' (default), `ac97' (solaris default), `es1370', `sb16'
-(freedos default) or `none'
+`sdl' (default), `gtk', `none', `spice' or `spice\-app'
.TP
\f[B]\[en]fullscreen\f[R]
Starts VM in full screen mode (Ctl+Alt+f to exit)
.TP
-\f[B]\[en]ignore-msrs-always\f[R]
-Configure KVM to always ignore unhandled machine-specific registers
+\f[B]\[en]ignore\-msrs\-always\f[R]
+Configure KVM to always ignore unhandled machine\-specific registers
.TP
\f[B]\[en]screen \f[R]
Use specified screen to determine the window size.
.TP
+\f[B]\[en]screenpct \f[R]
+Percent of fullscreen for VM if \[en]fullscreen is not specified.
+.TP
\f[B]\[en]shortcut\f[R]
Create a desktop shortcut
.TP
@@ -55,36 +60,109 @@ Delete a snapshot.
\f[B]\[en]snapshot info\f[R]
Show disk/snapshot info.
.TP
-\f[B]\[en]status-quo\f[R]
+\f[B]\[en]status\-quo\f[R]
Do not commit any changes to disk/snapshot.
.TP
+\f[B]\[en]viewer \f[R]
+Choose an alternative viewer.
+\[at]Options: `spicy' (default), `remote\-viewer', `none'
+.TP
+\f[B]\[en]width \f[R]
+Set VM screen width.
+Does nothing without \[en]height
+.TP
+\f[B]\[en]height \f[R]
+Set VM screen height.
+Does nothing without \[en]width
+.TP
+\f[B]\[en]ssh\-port \f[R]
+Set ssh\-port manually
+.TP
+\f[B]\[en]spice\-port \f[R]
+Set spice\-port manually
+.TP
+\f[B]\[en]public\-dir \f[R]
+Expose share directory.
+\[at]Options: \[cq]\[cq] (default: xdg\-user\-dir PUBLICSHARE), `',
+`none'
+.TP
+\f[B]\[en]monitor \f[R]
+Set monitor connection type.
+\[at]Options: `socket' (default), `telnet', `none'
+.TP
+\f[B]\[en]monitor\-telnet\-host \f[R]
+Set telnet host for monitor.
+(default: `localhost')
+.TP
+\f[B]\[en]monitor\-telnet\-port \f[R]
+Set telnet port for monitor.
+(default: `4440')
+.TP
+\f[B]\[en]monitor\-cmd \f[R]
+Send command to monitor if available.
+(Example: system_powerdown)
+.TP
+\f[B]\[en]serial \f[R]
+Set serial connection type.
+\[at]Options: `socket' (default), `telnet', `none'
+.TP
+\f[B]\[en]serial\-telnet\-host \f[R]
+Set telnet host for serial.
+(default: `localhost')
+.TP
+\f[B]\[en]serial\-telnet\-port \f[R]
+Set telnet port for serial.
+(default: `6660')
+.TP
+\f[B]\[en]keyboard \f[R]
+Set keyboard.
+\[at]Options: `usb' (default), `ps2', `virtio'
+.TP
+\f[B]\[en]keyboard_layout \f[R]
+Set keyboard layout.
+.TP
+\f[B]\[en]mouse \f[R]
+Set mouse.
+\[at]Options: `tablet' (default), `ps2', `usb', `virtio'
+.TP
+\f[B]\[en]usb\-controller \f[R]
+Set usb\-controller.
+\[at]Options: `ehci' (default), `xhci', `none'
+.TP
+\f[B]\[en]sound\-card \f[R]
+Set sound card.
+\[at]Options: `intel\-hda' (default), `ac97', `es1370', `sb16', `none'
+.TP
+\f[B]\[en]extra_args \f[R]
+Pass additional arguments to qemu
+.TP
\f[B]\[en]version\f[R]
Print version
.SH EXAMPLES
.TP
-\f[B]quickemu \[en]vm ubuntu-mate-22.04.conf\f[R]
-Launches the VM specified in the file \f[I]ubuntu-mate-22.04.conf\f[R]
+\f[B]quickemu \[en]vm ubuntu\-mate\-22.04.conf\f[R]
+Launches the VM specified in the file \f[I]ubuntu\-mate\-22.04.conf\f[R]
.SS Introduction
-Quickly create and run highly optimised desktop virtual machines for
-Linux, macOS and Windows; with just two commands.
-You decide what operating system you want to run and Quickemu will
+\f[B]Quickemu\f[R] is a wrapper for the excellent \c
+.UR https://www.qemu.org/
+QEMU
+.UE \c
+\ that attempts to automatically \f[I]\[lq]do the right thing\[rq]\f[R],
+rather than expose exhaustive configuration options.
+You decide what operating system you want to run, and Quickemu will
figure out the best way to do it for you.
-For example:
-.IP
-.EX
-quickget ubuntu-mate 22.04
-quickemu --vm ubuntu-mate-22.04.conf
-.EE
.PP
The original objective of the project was to enable quick testing of
Linux distributions where the virtual machine configurations can be
-stored anywhere, such as external USB storage or your home directory,
+stored anywhere (such as external USB storage or your home directory)
and no elevated permissions are required to run the virtual machines.
+.PP
\f[B]Quickemu now also includes comprehensive support for macOS and
Windows\f[R].
.SS Features
.IP \[bu] 2
-\f[B]macOS\f[R] Monterey, Big Sur, Catalina, Mojave & High Sierra
+\f[B]macOS\f[R] Sonoma, Ventura, Monterey, Big Sur, Catalina, Mojave &
+High Sierra
.IP \[bu] 2
\f[B]Windows\f[R] 10 and 11 including TPM 2.0
.IP \[bu] 2
@@ -102,24 +180,24 @@ official Ubuntu flavours
.IP \[bu] 2
Full SPICE support including host/guest clipboard sharing
.IP \[bu] 2
-VirtIO-webdavd file sharing for Linux and Windows guests
+VirtIO\-webdavd file sharing for Linux and Windows guests
.IP \[bu] 2
-VirtIO-9p file sharing for Linux and macOS guests
+VirtIO\-9p file sharing for Linux and macOS guests
.IP \[bu] 2
\c
.UR https://wiki.qemu.org/Features/GuestAgent
QEMU Guest Agent support
.UE \c
-; provides access to a system-level agent via standard QMP commands
+; provides access to a system\-level agent via standard QMP commands
.IP \[bu] 2
Samba file sharing for Linux, macOS and Windows guests (\f[I]if
\f[CI]smbd\f[I] is installed on the host\f[R])
.IP \[bu] 2
VirGL acceleration
.IP \[bu] 2
-USB device pass-through
+USB device pass\-through
.IP \[bu] 2
-Smartcard pass-through
+Smartcard pass\-through
.IP \[bu] 2
Automatic SSH port forwarding to guests
.IP \[bu] 2
@@ -133,35 +211,8 @@ EFI (with or without SecureBoot) and Legacy BIOS boot
.IP \[bu] 2
Graphical user interfaces available
.PP
-Quickemu is a wrapper for the excellent \c
-.UR https://www.qemu.org/
-QEMU
-.UE \c
-\ that attempts to automatically \f[I]\[lq]do the right thing\[rq]\f[R],
-rather than expose exhaustive configuration options.
-.PP
-We have a Discord for this project: \c
-.UR https://discord.gg/sNmz3uw
-[IMAGE: \c
-.UR
-https://img.shields.io/discord/712850672223125565?color=0C306A&label=WimpysWorld%20Discord&logo=Discord&logoColor=ffffff&style=flat-square
-Discord
-.UE \c
-]
-.UE \c
-.PP
-See this (old) video where I explain some of my motivations for creating
-Quickemu.
-.PP
-\c
-.UR https://www.youtube.com/watch?v=AOTYWEgw0hI
-[IMAGE: \c
-.UR https://img.youtube.com/vi/AOTYWEgw0hI/0.jpg
-Replace VirtualBox with Bash & QEMU
-.UE \c
-]
-.UE \c
-.SS Requirements
+When installing from source, you will need to install the following
+requirements manually:
.IP \[bu] 2
\c
.UR https://www.qemu.org/
@@ -182,6 +233,11 @@ Coreutils
.UE \c
.IP \[bu] 2
\c
+.UR https://curl.se/
+curl
+.UE \c
+.IP \[bu] 2
+\c
.UR https://github.com/tianocore/edk2
EDK II
.UE \c
@@ -212,9 +268,8 @@ python3
.UE \c
.IP \[bu] 2
\c
-.UR
-https://github.com/acidanthera/OpenCorePkg/tree/master/Utilities/macrecovery
-macrecovery
+.UR https://gist.github.com/MCJack123/943eaca762730ca4b7ae460b731b68e7
+chunkcheck
.UE \c
.IP \[bu] 2
\c
@@ -229,7 +284,7 @@ usbutils
.IP \[bu] 2
\c
.UR https://github.com/karelzak/util-linux
-util-linux
+util\-linux
.UE \c
.IP \[bu] 2
\c
@@ -259,7 +314,7 @@ Wget
.IP \[bu] 2
\c
.UR https://www.freedesktop.org/wiki/Software/xdg-user-dirs/
-xdg-user-dirs
+xdg\-user\-dirs
.UE \c
.IP \[bu] 2
\c
@@ -276,8 +331,8 @@ zsync
.UR http://www.info-zip.org/UnZip.html
unzip
.UE \c
-.SS Installing Requirements
-For Ubuntu, Arch and nixos systems the \c
+.PP
+For Ubuntu, Arch and NixOS hosts, the \c
.UR https://launchpad.net/~flexiondotorg/+archive/ubuntu/quickemu
ppa
.UE \c
@@ -286,41 +341,36 @@ ppa
AUR
.UE \c
\ or \c
-.UR
-https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/quickemu
+.UR https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/quickemu
nix
.UE \c
\ packaging will take care of the dependencies.
For other host distributions or operating systems it will be necessary
to install the above requirements or their equivalents.
.PP
-These examples may save a little typing
-.PP
-Debian (and direct derivatives such as MX Linux):
+These examples may save a little typing:
+.SS Install requirements on Debian hosts
+This also applies to derivatives:
.IP
.EX
-sudo apt install qemu bash coreutils ovmf grep jq lsb-base procps python3 genisoimage usbutils util-linux sed spice-client-gtk libtss2-tcti-swtpm0 wget xdg-user-dirs zsync unzip
+sudo apt install qemu bash coreutils ovmf grep jq lsb\-base procps python3 genisoimage usbutils util\-linux sed socat spice\-client\-gtk libtss2\-tcti\-swtpm0 wget xdg\-user\-dirs zsync unzip
.EE
-.PP
-Fedora:
+.SS Install requirements on Fedora hosts
.IP
.EX
-sudo dnf install qemu bash coreutils edk2-tools grep jq lsb procps python3 genisoimage usbutils util-linux sed spice-gtk-tools swtpm wget xdg-user-dirs xrandr unzip
+sudo dnf install qemu bash coreutils edk2\-tools grep jq lsb procps python3 genisoimage usbutils util\-linux sed socat spice\-gtk\-tools swtpm wget xdg\-user\-dirs xrandr unzip
.EE
-.PP
-MacOS:
-.PP
-This is a work in progress (see \c
+.SS Install requirements on macOS hosts
+This is a \f[B]work in progress\f[R] (see \c
.UR https://github.com/quickemu-project/quickemu/issues/248
issue 248
.UE \c
\ for other steps and changes that may enable running on MacOS)
.IP
.EX
-brew install qemu bash coreutils grep jq python\[at]3.10 cdrtools gnu-sed spice-gtk wget zsync
+brew install qemu bash coreutils grep jq python\[at]3.10 cdrtools gnu\-sed spice\-gtk wget zsync
.EE
-.SH Usage
-.SS Graphical User Interfaces
+.SS GUI (quickgui)
While \f[CR]quickemu\f[R] and \f[CR]quickget\f[R] are designed for the
terminal, a graphical user interface is also available:
.IP \[bu] 2
@@ -338,9 +388,17 @@ Yannick Mauray
.UE \c
\&.
.PP
+To install Quickgui on Ubuntu:
+.IP
+.EX
+sudo add\-apt\-repository ppa:yannick\-mauray/quickgui
+sudo apt update
+sudo apt install quickgui
+.EE
+.PP
Many thanks to \c
.UR https://github.com/Lukewh
-Luke Wesley-Holley
+Luke Wesley\-Holley
.UE \c
\ and \c
.UR https://github.com/daPhipz
@@ -351,16 +409,10 @@ Philipp Kiemle
Quickemu icons
.UE \c
\f[R] 🎨
-.SS Quickgui for Ubuntu
-.IP
-.EX
-sudo add-apt-repository ppa:yannick-mauray/quickgui
-sudo apt update
-sudo apt install quickgui
-.EE
-.SS quickemu quickget X terminal project
+.SS TUI (qqx)
From Nov 2023, there is also a multi option desktop integrated text
-interface, with lots of unique tools and utilities to help you make
+interface, the \f[B]quickemu quickget X terminal project\f[R], a.k.a.
+\f[B]qqX\f[R], with lots of unique tools and utilities to help you make
light work of installations, snapshots and disk management
.IP \[bu] 2
\f[B]\c
@@ -373,50 +425,50 @@ Alex Genovese
.UE \c
\ (see the github pages)
[IMAGE: \c
-.UR
-https://github.com/TuxVinyards/qqX/assets/3956806/18e5c495-8072-49a5-8b9c-e1302549efcf
-qqX-vmm
+.UR https://github.com/TuxVinyards/qqX/assets/3956806/18e5c495-8072-49a5-8b9c-e1302549efcf
+qqX\-vmm
.UE \c
]
-qqX-vmm
-.SS Ubuntu Guest
+qqX\-vmm
+.SS Creating Linux guests 🐧
+.SS Ubuntu
\f[CR]quickget\f[R] will automatically download an Ubuntu release and
create the virtual machine configuration.
.IP
.EX
quickget ubuntu 22.04
-quickemu --vm ubuntu-22.04.conf
+quickemu \-\-vm ubuntu\-22.04.conf
.EE
.IP \[bu] 2
Complete the installation as normal.
.IP \[bu] 2
-Post-install:
+Post\-install:
.RS 2
.IP \[bu] 2
-Install the SPICE agent (\f[CR]spice-vdagent\f[R]) in the guest to
+Install the SPICE agent (\f[CR]spice\-vdagent\f[R]) in the guest to
enable copy/paste and USB redirection
.RS 2
.IP \[bu] 2
-\f[CR]sudo apt install spice-vdagent\f[R]
+\f[CR]sudo apt install spice\-vdagent\f[R]
.RE
.IP \[bu] 2
-Install the SPICE WebDAV agent (\f[CR]spice-webdavd\f[R]) in the guest
+Install the SPICE WebDAV agent (\f[CR]spice\-webdavd\f[R]) in the guest
to enable file sharing.
.RS 2
.IP \[bu] 2
-\f[CR]sudo apt install spice-webdavd\f[R]
+\f[CR]sudo apt install spice\-webdavd\f[R]
.RE
.RE
-.SS Ubuntu devel (daily-live) images
-\f[CR]quickget\f[R] can also download/refresh devel images via
+.SS Ubuntu daily\-live images
+\f[CR]quickget\f[R] can also download/refresh daily\-live images via
\f[CR]zsync\f[R] for Ubuntu developers and testers.
.IP
.EX
-quickget ubuntu devel
-quickemu --vm ubuntu-devel.conf
+quickget ubuntu daily\-live
+quickemu \-\-vm ubuntu\-daily\-live.conf
.EE
.PP
-You can run \f[CR]quickget ubuntu devel\f[R] to refresh your daily
+You can run \f[CR]quickget ubuntu daily\-live\f[R] to refresh your daily
development image as often as you like, it will even automatically
switch to a new series.
.SS Ubuntu Flavours
@@ -429,38 +481,40 @@ All the official Ubuntu flavours are supported, just replace
.IP \[bu] 2
\f[CR]lubuntu\f[R] (Lubuntu)
.IP \[bu] 2
-\f[CR]ubuntu-budgie\f[R] (Ubuntu Budgie)
+\f[CR]ubuntu\-budgie\f[R] (Ubuntu Budgie)
.IP \[bu] 2
\f[CR]ubuntucinnamon\f[R] (Ubuntu Cinnamon)
.IP \[bu] 2
\f[CR]ubuntukylin\f[R] (Ubuntu Kylin)
.IP \[bu] 2
-\f[CR]ubuntu-mate\f[R] (Ubuntu MATE)
+\f[CR]ubuntu\-mate\f[R] (Ubuntu MATE)
.IP \[bu] 2
-\f[CR]ubuntu-server\f[R] (Ubuntu Server)
+\f[CR]ubuntu\-server\f[R] (Ubuntu Server)
.IP \[bu] 2
\f[CR]ubuntustudio\f[R] (Ubuntu Studio)
.IP \[bu] 2
\f[CR]ubuntu\f[R] (Ubuntu)
.IP \[bu] 2
-\f[CR]ubuntu-unity\f[R] (Ubuntu Unity)
+\f[CR]ubuntu\-unity\f[R] (Ubuntu Unity)
.IP \[bu] 2
\f[CR]xubuntu\f[R] (Xubuntu)
.PP
You can also use \f[CR]quickget\f[R] with options to:
.IP
.EX
- # show an OS ISO download URL for {os} {release} [edition]
- quickget --show-iso-url fedora 38 Silverblue
- # test if and OS ISO is available for {os} {release} [edition]
- quickget --test-iso-url nixos 23.05 plasma5
+ # show an OS ISO download URL for {os} {release} [edition]
+ quickget \-\-show\-iso\-url fedora 38 Silverblue
+ # test if an OS ISO is available for {os} {release} [edition]
+ quickget \-\-test\-iso\-url nixos 23.05 plasma5
# open an OS distribution homepage in a browser
- quickget --open-distro-homepage ubuntu-mate
+ quickget \-\-open\-distro\-homepage ubuntu\-mate
+ # Only download image file into current directory, without creating VM
+ quickget \-\-download\-iso elementary 7.1
.EE
.PP
-The \f[CR]--show-iso-url\f[R] and \f[CR]--test-iso-url\f[R] options
-\f[B]do not\f[R] work for \f[CR]Windows\f[R] (\f[CR]quickget\f[R] will
-begin downloading the requested release and edition of windows)
+The \f[CR]\-\-show\-iso\-url\f[R], \f[CR]\-\-test\-iso\-url\f[R], and
+\f[CR]\-\-download\-iso\f[R] options are fully functional for all
+operating systems, including Windows and macOS.
.SS Other Operating Systems
\f[CR]quickget\f[R] also supports:
.IP \[bu] 2
@@ -478,8 +532,16 @@ begin downloading the requested release and edition of windows)
.IP \[bu] 2
\f[CR]arcolinux\f[R] (Arco Linux)
.IP \[bu] 2
+\f[CR]artixlinux\f[R] (Artix Linux)
+.IP \[bu] 2
+\f[CR]athenaos\f[R] (Athenaos)
+.IP \[bu] 2
\f[CR]batocera\f[R] (Batocera)
.IP \[bu] 2
+\f[CR]bazzite\f[R] (Bazzite)
+.IP \[bu] 2
+\f[CR]biglinux\f[R] (BigLinux)
+.IP \[bu] 2
\f[CR]blendos\f[R] (BlendOS)
.IP \[bu] 2
\f[CR]bodhi\f[R] (Bodhi)
@@ -488,7 +550,11 @@ begin downloading the requested release and edition of windows)
.IP \[bu] 2
\f[CR]cachyos\f[R] (CachyOS)
.IP \[bu] 2
-\f[CR]centos-stream\f[R] (CentOS Stream)
+\f[CR]centos\-stream\f[R] (CentOS Stream)
+.IP \[bu] 2
+\f[CR]chimeralinux\f[R] (Chimera Linux)
+.IP \[bu] 2
+\f[CR]crunchbang++\f[R] (Crunchbang++)
.IP \[bu] 2
\f[CR]debian\f[R] (Debian)
.IP \[bu] 2
@@ -498,6 +564,8 @@ begin downloading the requested release and edition of windows)
.IP \[bu] 2
\f[CR]dragonflybsd\f[R] (DragonFlyBSD)
.IP \[bu] 2
+\f[CR]easyos\f[R] (EasyOS)
+.IP \[bu] 2
\f[CR]elementary\f[R] (elementary OS)
.IP \[bu] 2
\f[CR]endeavouros\f[R] (EndeavourOS)
@@ -516,6 +584,10 @@ begin downloading the requested release and edition of windows)
.IP \[bu] 2
\f[CR]ghostbsd\f[R] (GhostBSD)
.IP \[bu] 2
+\f[CR]gnomeos\f[R] (GNOME OS)
+.IP \[bu] 2
+\f[CR]guix\f[R] (Guix)
+.IP \[bu] 2
\f[CR]haiku\f[R] (Haiku)
.IP \[bu] 2
\f[CR]holoiso\f[R] (SteamOS HoloISO)
@@ -542,6 +614,8 @@ begin downloading the requested release and edition of windows)
.IP \[bu] 2
\f[CR]netbsd\f[R] (NetBSD)
.IP \[bu] 2
+\f[CR]nitrux\f[R] (Nitrux)
+.IP \[bu] 2
\f[CR]nixos\f[R] (NixOS)
.IP \[bu] 2
\f[CR]openbsd\f[R] (OpenBSD)
@@ -552,12 +626,18 @@ begin downloading the requested release and edition of windows)
.IP \[bu] 2
\f[CR]oraclelinux\f[R] (Oracle Linux)
.IP \[bu] 2
+\f[CR]parrotsec\f[R] (Parrot Security)
+.IP \[bu] 2
\f[CR]peppermint\f[R] (PeppermintOS)
.IP \[bu] 2
\f[CR]popos\f[R] (Pop!_OS)
.IP \[bu] 2
\f[CR]porteus\f[R] (Porteus)
.IP \[bu] 2
+\f[CR]primtux\f[R] (Primtux)
+.IP \[bu] 2
+\f[CR]pureos\f[R] (PureOS)
+.IP \[bu] 2
\f[CR]reactos\f[R] (ReactOS)
.IP \[bu] 2
\f[CR]rebornos\f[R] (RebornOS)
@@ -568,9 +648,17 @@ begin downloading the requested release and edition of windows)
.IP \[bu] 2
\f[CR]slackware\f[R] (Slackware)
.IP \[bu] 2
+\f[CR]slax\f[R] (Slax)
+.IP \[bu] 2
+\f[CR]slint\f[R] (Slint)
+.IP \[bu] 2
+\f[CR]slitaz\f[R] (SliTaz GNU/Linux)
+.IP \[bu] 2
\f[CR]solus\f[R] (Solus)
.IP \[bu] 2
-\f[CR]spiral\f[R] (Spiral)
+\f[CR]sparkylinux\f[R] (SparkyLinux)
+.IP \[bu] 2
+\f[CR]spirallinux\f[R] (Spirallinux)
.IP \[bu] 2
\f[CR]tails\f[R] (Tails)
.IP \[bu] 2
@@ -578,9 +666,11 @@ begin downloading the requested release and edition of windows)
.IP \[bu] 2
\f[CR]trisquel\f[R] (Trisquel)
.IP \[bu] 2
-\f[CR]truenas-core\f[R] (TrueNAS Core)
+\f[CR]truenas\-core\f[R] (TrueNAS Core)
+.IP \[bu] 2
+\f[CR]truenas\-scale\f[R] (TrueNAS Scale)
.IP \[bu] 2
-\f[CR]truenas-scale\f[R] (TrueNAS Scale)
+\f[CR]tuxedo\-os\f[R] (Tuxedo OS)
.IP \[bu] 2
\f[CR]vanillaos\f[R] (Vanilla OS)
.IP \[bu] 2
@@ -588,53 +678,51 @@ begin downloading the requested release and edition of windows)
.IP \[bu] 2
\f[CR]vxlinux\f[R] (VX Linux)
.IP \[bu] 2
-\f[CR]xerolinux\f[R] (XeroLinux)
-.IP \[bu] 2
\f[CR]zorin\f[R] (Zorin OS)
-.PP
+.SS Custom Linux guests
Or you can download a Linux image and manually create a VM
configuration.
.IP \[bu] 2
Download a .iso image of a Linux distribution
.IP \[bu] 2
Create a VM configuration file; for example
-\f[CR]debian-bullseye.conf\f[R]
+\f[CR]debian\-bullseye.conf\f[R]
.IP
.EX
guest_os=\[dq]linux\[dq]
-disk_img=\[dq]debian-bullseye/disk.qcow2\[dq]
-iso=\[dq]debian-bullseye/firmware-11.0.0-amd64-DVD-1.iso\[dq]
+disk_img=\[dq]debian\-bullseye/disk.qcow2\[dq]
+iso=\[dq]debian\-bullseye/firmware\-11.0.0\-amd64\-DVD\-1.iso\[dq]
.EE
.IP \[bu] 2
Use \f[CR]quickemu\f[R] to start the virtual machine:
.IP
.EX
-quickemu --vm debian-bullseye.conf
+quickemu \-\-vm debian\-bullseye.conf
.EE
.IP \[bu] 2
Complete the installation as normal.
.IP \[bu] 2
-Post-install:
+Post\-install:
.RS 2
.IP \[bu] 2
-Install the SPICE agent (\f[CR]spice-vdagent\f[R]) in the guest to
+Install the SPICE agent (\f[CR]spice\-vdagent\f[R]) in the guest to
enable copy/paste and USB redirection.
.IP \[bu] 2
-Install the SPICE WebDAV agent (\f[CR]spice-webdavd\f[R]) in the guest
+Install the SPICE WebDAV agent (\f[CR]spice\-webdavd\f[R]) in the guest
to enable file sharing.
.RE
-.SS macOS Guest
+.SS Creating macOS Guests 🍏
\f[CR]quickget\f[R] automatically downloads a macOS recovery image and
creates a virtual machine configuration.
.IP
.EX
quickget macos catalina
-quickemu --vm macos-catalina.conf
+quickemu \-\-vm macos\-catalina.conf
.EE
.PP
-macOS \f[CR]high-sierra\f[R], \f[CR]mojave\f[R], \f[CR]catalina\f[R],
-\f[CR]big-sur\f[R], \f[CR]monterey\f[R] and \f[CR]ventura\f[R] are
-supported.
+macOS \f[CR]high\-sierra\f[R], \f[CR]mojave\f[R], \f[CR]catalina\f[R],
+\f[CR]big\-sur\f[R], \f[CR]monterey\f[R], \f[CR]ventura\f[R] and
+\f[CR]sonoma\f[R] are supported.
.IP \[bu] 2
Use cursor keys and enter key to select the \f[B]macOS Base System\f[R]
.IP \[bu] 2
@@ -650,8 +738,9 @@ click \f[B]Erase\f[R].
.IP \[bu] 2
Enter a \f[CR]Name:\f[R] for the disk
.IP \[bu] 2
-If you are installing macOS Mojave or later (Catalina, Big Sur, Monterey
-and Ventura), choose any of the APFS options as the filesystem.
+If you are installing macOS Mojave or later (Catalina, Big Sur,
+Monterey, Ventura and Sonoma), choose any of the APFS options as the
+filesystem.
MacOS Extended may not work.
.RE
.IP \[bu] 2
@@ -679,10 +768,10 @@ disk you named
.RE
.IP \[bu] 2
Once you have finished installing macOS you will be presented with an
-the out-of-the-box first-start wizard to configure various options and
-set up your username and password
+the out\-of\-the\-box first\-start wizard to configure various options
+and set up your username and password
.IP \[bu] 2
-OPTIONAL: After you have concluded the out-of-the-box wizard, you may
+OPTIONAL: After you have concluded the out\-of\-the\-box wizard, you may
want to enable the TRIM feature that the computer industry created for
SSD disks.
This feature in our macOS installation will allow QuickEmu to compact
@@ -706,11 +795,12 @@ privilege needed.
Once you\[cq]ve entered your password and pressed enter the command will
request confirmation in the form of two questions that require you to
type y (for a \[lq]yes\[rq] response) followed by enter to confirm.
+.PP
If you press enter without first typing y the system will consider that
a negative response as though you said \[lq]no\[rq]:
.IP
.EX
-IMPORTANT NOTICE: This tool force-enables TRIM for all relevant attached devices, even though such devices may not have been validated for data integrity while using TRIM. Use of this tool to enable TRIM may result in unintended data loss or data corruption. It should not be used in a commercial operating environment or with important data. Before using this tool, you should back up all of your data and regularly back up data while TRIM is enabled. This tool is provided on an \[dq]as is\[dq] basis. APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THIS TOOL OR ITS USE ALONE OR IN COMBINATION WITH YOUR DEVICES, SYSTEMS, OR SERVICES. BY USING THIS TOOL TO ENABLE TRIM, YOU AGREE THAT, TO THE EXTENT PERMITTED BY APPLICABLE LAW, USE OF THE TOOL IS AT YOUR SOLE RISK AND THAT THE ENTIRE RISK AS TO SATISFACTORY QUALITY, PERFORMANCE, ACCURACY AND EFFORT IS WITH YOU.
+IMPORTANT NOTICE: This tool force\-enables TRIM for all relevant attached devices, even though such devices may not have been validated for data integrity while using TRIM. Use of this tool to enable TRIM may result in unintended data loss or data corruption. It should not be used in a commercial operating environment or with important data. Before using this tool, you should back up all of your data and regularly back up data while TRIM is enabled. This tool is provided on an \[dq]as is\[dq] basis. APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON\-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THIS TOOL OR ITS USE ALONE OR IN COMBINATION WITH YOUR DEVICES, SYSTEMS, OR SERVICES. BY USING THIS TOOL TO ENABLE TRIM, YOU AGREE THAT, TO THE EXTENT PERMITTED BY APPLICABLE LAW, USE OF THE TOOL IS AT YOUR SOLE RISK AND THAT THE ENTIRE RISK AS TO SATISFACTORY QUALITY, PERFORMANCE, ACCURACY AND EFFORT IS WITH YOU.
Are you sure you with to proceed (y/N)?
.EE
.PP
@@ -728,8 +818,8 @@ The default macOS configuration looks like this:
.IP
.EX
guest_os=\[dq]macos\[dq]
-img=\[dq]macos-catalina/RecoveryImage.img\[dq]
-disk_img=\[dq]macos-catalina/disk.qcow2\[dq]
+img=\[dq]macos\-catalina/RecoveryImage.img\[dq]
+disk_img=\[dq]macos\-catalina/disk.qcow2\[dq]
macos_release=\[dq]catalina\[dq]
.EE
.IP \[bu] 2
@@ -763,6 +853,8 @@ Big Sur
Monterey
.IP \[bu] 2
Ventura
+.IP \[bu] 2
+Sonoma
.RE
.IP \[bu] 2
\f[CR]quickemu\f[R] will automatically download the required \c
@@ -771,7 +863,7 @@ OpenCore
.UE \c
\ bootloader and OVMF firmware from \c
.UR https://github.com/kholia/OSX-KVM
-OSX-KVM
+OSX\-KVM
.UE \c
\&.
.IP \[bu] 2
@@ -788,18 +880,18 @@ VirtIO Block Media
.IP \[bu] 2
\c
.UR http://philjordan.eu/osx-virt/
-VirtIO \f[CR]usb-tablet\f[R]
+VirtIO \f[CR]usb\-tablet\f[R]
.UE \c
\ is used for the mouse.
.IP \[bu] 2
-VirtIO Network (\f[CR]virtio-net\f[R]) is supported and enabled on macOS
-Big Sur and newer but previous releases use \f[CR]vmxnet3\f[R].
+VirtIO Network (\f[CR]virtio\-net\f[R]) is supported and enabled on
+macOS Big Sur and newer but previous releases use \f[CR]vmxnet3\f[R].
.IP \[bu] 2
VirtIO Memory Ballooning is supported and enabled on macOS Big Sur and
newer but disabled for other support macOS releases.
.RE
.IP \[bu] 2
-USB host and SPICE pass-through is:
+USB host and SPICE pass\-through is:
.RS 2
.IP \[bu] 2
UHCI (USB 2.0) on macOS Catalina and earlier.
@@ -813,7 +905,7 @@ Display resolution can only be changed via macOS System Preferences.
.UR https://github.com/chris1111/VoodooHDA-OC
VoodooHDA OC
.UE \c
-\ or pass-through a USB audio-device to the macOS guest VM\f[R].
+\ or pass\-through a USB audio\-device to the macOS guest VM\f[R].
.IP \[bu] 2
NOTE!
\c
@@ -821,15 +913,14 @@ NOTE!
Gatekeeper
.UE \c
\ and \c
-.UR
-https://developer.apple.com/documentation/security/disabling_and_enabling_system_integrity_protection
+.UR https://developer.apple.com/documentation/security/disabling_and_enabling_system_integrity_protection
System Integrity Protection (SIP)
.UE \c
\ need to be disabled to install VoodooHDA OC
.IP \[bu] 2
File sharing between guest and host is available via \c
.UR https://wiki.qemu.org/Documentation/9psetup
-virtio-9p
+virtio\-9p
.UE \c
\ and \c
.UR https://gitlab.gnome.org/GNOME/phodav/-/merge_requests/24
@@ -845,7 +936,7 @@ that your wired ethernet device is \f[CR]en0\f[R].
Use \f[CR]ifconfig\f[R] in a terminal to verify this.
.PP
If the wired ethernet device is not \f[CR]en0\f[R], then then go to
-\f[I]System Preferences\f[R] -> \f[I]Network\f[R], delete all the
+\f[I]System Preferences\f[R] \-> \f[I]Network\f[R], delete all the
network devices and apply the changes.
Next, open a terminal and run the following:
.IP
@@ -854,14 +945,14 @@ sudo rm /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist
.EE
.PP
Now reboot, and the App Store should work.
-.SS Windows 8, 10 & 11 Guests
+.SS Creating Windows guests 🪟
\f[CR]quickget\f[R] can download \c
.UR https://www.microsoft.com/software-download/windows10
-Windows10
+\f[B]Windows 10\f[R]
.UE \c
\ and \c
.UR https://www.microsoft.com/software-download/windows11
-Windows 11
+\f[B]Windows 11\f[R]
.UE \c
\ automatically and create an optimised virtual machine configuration.
This configuration also includes the \c
@@ -870,12 +961,35 @@ VirtIO drivers for Windows
.UE \c
\&.
.PP
-Windows 8.1 is also supported but doesn\[cq]t feature any automated
-installation or driver optimisation.
+\f[B]Windows 8.1\f[R] is also supported but doesn\[cq]t feature any
+automated installation or driver optimisation.
+.PP
+\f[CR]quickget\f[R] can also download \c
+.UR https://www.microsoft.com/en-us/evalcenter/download-windows-10-enterprise
+Windows 10 LTSC
+.UE \c
+\ and Windows Server \c
+.UR https://www.microsoft.com/en-us/evalcenter/download-windows-server-2012-r2
+2012\-r2
+.UE \c
+, \c
+.UR https://www.microsoft.com/en-us/evalcenter/download-windows-server-2016
+2016
+.UE \c
+, \c
+.UR https://www.microsoft.com/en-us/evalcenter/download-windows-server-2019
+2019
+.UE \c
+, and \c
+.UR https://www.microsoft.com/en-us/evalcenter/download-windows-server-2022
+2022
+.UE \c
+\&.
+No automated installation is supported for these releases.
.IP
.EX
quickget windows 11
-quickemu --vm windows-11.conf
+quickemu \-\-vm windows\-11.conf
.EE
.IP \[bu] 2
Complete the installation as you normally would.
@@ -890,14 +1004,23 @@ Username: \f[CR]Quickemu\f[R]
.IP \[bu] 2
Password: \f[CR]quickemu\f[R]
.RE
+.SS Regional versions
+By default \f[CR]quickget\f[R] will download the \f[I]\[lq]English
+International\[rq]\f[R] release (\f[I]\[lq]English (United
+States)\[rq]\f[R] for server releases), but you can optionally specify
+one of the supported languages: For example:
+.IP
+.EX
+quickget windows 11 \[dq]Chinese (Traditional)\[dq]
+.EE
.PP
The default Windows 11 configuration looks like this:
.IP
.EX
guest_os=\[dq]windows\[dq]
-disk_img=\[dq]windows-11/disk.qcow2\[dq]
-iso=\[dq]windows-11/windows-11.iso\[dq]
-fixed_iso=\[dq]windows-11/virtio-win.iso\[dq]
+disk_img=\[dq]windows\-11/disk.qcow2\[dq]
+iso=\[dq]windows\-11/windows\-11.iso\[dq]
+fixed_iso=\[dq]windows\-11/virtio\-win.iso\[dq]
tpm=\[dq]on\[dq]
secureboot=\[dq]off\[dq]
.EE
@@ -910,47 +1033,50 @@ drivers.
.IP \[bu] 2
\f[CR]tpm=\[dq]on\[dq]\f[R] instructs \f[CR]quickemu\f[R] to create a
software emulated TPM device using \f[CR]swtpm\f[R].
-.SH All the options
+.SS Configuration
Here are the usage instructions:
.IP
.EX
+
Usage
- quickemu --vm ubuntu.conf
+ quickemu \-\-vm ubuntu.conf [optional params]
-You can also pass optional parameters
- --access : Enable remote spice access support. \[aq]local\[aq] (default), \[aq]remote\[aq], \[aq]clientipaddress\[aq]
- --braille : Enable braille support. Requires SDL.
- --delete-disk : Delete the disk image and EFI variables
- --delete-vm : Delete the entire VM and it\[aq]s configuration
- --display : Select display backend. \[aq]sdl\[aq] (default), \[aq]gtk\[aq], \[aq]none\[aq], \[aq]spice\[aq] or \[aq]spice-app\[aq]
- --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.
- --screenpct : Percent of fullscreen for VM if --fullscreen is not specified.
- --shortcut : Create a desktop shortcut
- --snapshot apply : Apply/restore a snapshot.
- --snapshot create : Create a snapshot.
- --snapshot delete : Delete a snapshot.
- --snapshot info : Show disk/snapshot info.
- --status-quo : Do not commit any changes to disk/snapshot.
- --viewer : Choose an alternative viewer. \[at]Options: \[aq]spicy\[aq] (default), \[aq]remote-viewer\[aq], \[aq]none\[aq]
- --ssh-port : Set ssh-port manually
- --spice-port : Set spice-port manually
- --public-dir : Expose share directory. \[at]Options: \[aq]\[aq] (default: xdg-user-dir PUBLICSHARE), \[aq]\[aq], \[aq]none\[aq]
- --monitor : Set monitor connection type. \[at]Options: \[aq]socket\[aq] (default), \[aq]telnet\[aq], \[aq]none\[aq]
- --monitor-telnet-host : Set telnet host for monitor. (default: \[aq]localhost\[aq])
- --monitor-telnet-port : Set telnet port for monitor. (default: \[aq]4440\[aq])
- --monitor-cmd : Send command to monitor if available. (Example: system_powerdown)
- --serial : Set serial connection type. \[at]Options: \[aq]socket\[aq] (default), \[aq]telnet\[aq], \[aq]none\[aq]
- --serial-telnet-host : Set telnet host for serial. (default: \[aq]localhost\[aq])
- --serial-telnet-port : Set telnet port for serial. (default: \[aq]6660\[aq])
- --keyboard : Set keyboard. \[at]Options: \[aq]usb\[aq] (default), \[aq]ps2\[aq], \[aq]virtio\[aq]
- --keyboard_layout : Set keyboard layout.
- --mouse : Set mouse. \[at]Options: \[aq]tablet\[aq] (default), \[aq]ps2\[aq], \[aq]usb\[aq], \[aq]virtio\[aq]
- --usb-controller : Set usb-controller. \[at]Options: \[aq]ehci\[aq] (default), \[aq]xhci\[aq], \[aq]none\[aq]
- --sound-card : Set sound card. \[at]Options: \[aq]intel-hda\[aq] (default), \[aq]ac97\[aq], \[aq]es1370\[aq], \[aq]sb16\[aq], \[aq]none\[aq]
- --extra_args : Pass additional arguments to qemu
- --version : Print version
+List of optional parameters:
+ \-\-access : Enable remote spice access support. \[aq]local\[aq] (default), \[aq]remote\[aq], \[aq]clientipaddress\[aq]
+ \-\-braille : Enable braille support. Requires SDL.
+ \-\-delete\-disk : Delete the disk image and EFI variables
+ \-\-delete\-vm : Delete the entire VM and it\[aq]s configuration
+ \-\-display : Select display backend. \[aq]sdl\[aq] (default), \[aq]gtk\[aq], \[aq]none\[aq], \[aq]spice\[aq] or \[aq]spice\-app\[aq]
+ \-\-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.
+ \-\-screenpct : Percent of fullscreen for VM if \-\-fullscreen is not specified.
+ \-\-shortcut : Create a desktop shortcut
+ \-\-snapshot apply : Apply/restore a snapshot.
+ \-\-snapshot create : Create a snapshot.
+ \-\-snapshot delete : Delete a snapshot.
+ \-\-snapshot info : Show disk/snapshot info.
+ \-\-status\-quo : Do not commit any changes to disk/snapshot.
+ \-\-viewer : Choose an alternative viewer. \[at]Options: \[aq]spicy\[aq] (default), \[aq]remote\-viewer\[aq], \[aq]none\[aq]
+ \-\-width : Set VM screen width. Does nothing without \-\-height
+ \-\-height : Set VM screen height. Does nothing without \-\-width
+ \-\-ssh\-port : Set ssh\-port manually
+ \-\-spice\-port : Set spice\-port manually
+ \-\-public\-dir : Expose share directory. \[at]Options: \[aq]\[aq] (default: xdg\-user\-dir PUBLICSHARE), \[aq]\[aq], \[aq]none\[aq]
+ \-\-monitor : Set monitor connection type. \[at]Options: \[aq]socket\[aq] (default), \[aq]telnet\[aq], \[aq]none\[aq]
+ \-\-monitor\-telnet\-host : Set telnet host for monitor. (default: \[aq]localhost\[aq])
+ \-\-monitor\-telnet\-port : Set telnet port for monitor. (default: \[aq]4440\[aq])
+ \-\-monitor\-cmd : Send command to monitor if available. (Example: system_powerdown)
+ \-\-serial : Set serial connection type. \[at]Options: \[aq]socket\[aq] (default), \[aq]telnet\[aq], \[aq]none\[aq]
+ \-\-serial\-telnet\-host : Set telnet host for serial. (default: \[aq]localhost\[aq])
+ \-\-serial\-telnet\-port : Set telnet port for serial. (default: \[aq]6660\[aq])
+ \-\-keyboard : Set keyboard. \[at]Options: \[aq]usb\[aq] (default), \[aq]ps2\[aq], \[aq]virtio\[aq]
+ \-\-keyboard_layout : Set keyboard layout.
+ \-\-mouse : Set mouse. \[at]Options: \[aq]tablet\[aq] (default), \[aq]ps2\[aq], \[aq]usb\[aq], \[aq]virtio\[aq]
+ \-\-usb\-controller : Set usb\-controller. \[at]Options: \[aq]ehci\[aq] (default), \[aq]xhci\[aq], \[aq]none\[aq]
+ \-\-sound\-card : Set sound card. \[at]Options: \[aq]intel\-hda\[aq] (default), \[aq]ac97\[aq], \[aq]es1370\[aq], \[aq]sb16\[aq], \[aq]none\[aq]
+ \-\-extra_args : Pass additional arguments to qemu
+ \-\-version : Print version
.EE
.SS Desktop shortcuts
Desktop shortcuts can be created for a VM, the shortcuts are saved in
@@ -958,25 +1084,25 @@ Desktop shortcuts can be created for a VM, the shortcuts are saved in
Here is an example of how to create a shortcut.
.IP
.EX
-quickemu --vm ubuntu-22.04-desktop.conf --shortcut
+quickemu \-\-vm ubuntu\-22.04\-desktop.conf \-\-shortcut
.EE
.SS Screen and window size (Linux guests only)
\f[CR]qemu\f[R] will always default to the primary monitor to display
the VM\[cq]s window.
.PP
-Without the \f[CR]--screen\f[R] option, \f[CR]quickemu\f[R] will look
+Without the \f[CR]\-\-screen\f[R] option, \f[CR]quickemu\f[R] will look
for the size of the smallest monitor, and use a size that fits on said
monitor.
.PP
-The \f[CR]--screen\f[R] option forces \f[CR]quickemu\f[R] to use the
+The \f[CR]\-\-screen\f[R] option forces \f[CR]quickemu\f[R] to use the
size of the given monitor to compute the size of the window.
\f[B]It won\[cq]t use that monitor to display the VM\[cq]s window if
it\[cq]s not the primary monitor\f[R].
This is useful if the primary monitor if not the smallest one, and if
the VM\[cq]s window doesn\[cq]t need to be moved around.
.PP
-The \f[CR]--screen\f[R] option is also useful with the
-\f[CR]--fullscreen\f[R] option, again because \f[CR]qemu\f[R] will
+The \f[CR]\-\-screen\f[R] option is also useful with the
+\f[CR]\-\-fullscreen\f[R] option, again because \f[CR]qemu\f[R] will
always use the primary monitor.
In order for the fullscreen mode to work properly, the resolution of the
VM\[cq]s window must match the resolution of the screen.
@@ -984,28 +1110,28 @@ VM\[cq]s window must match the resolution of the screen.
To know which screen to use, type:
.IP
.EX
-xrandr --listmonitors | grep -v Monitors
+xrandr \-\-listmonitors | grep \-v Monitors
.EE
.PP
The command will output something like this:
.IP
.EX
- 0: +*HDMI-0 2560/597x1440/336+1920+0 HDMI-0
- 1: +DVI-D-0 1920/527x1080/296+0+0 DVI-D-0
+ 0: +*HDMI\-0 2560/597x1440/336+1920+0 HDMI\-0
+ 1: +DVI\-D\-0 1920/527x1080/296+0+0 DVI\-D\-0
.EE
.PP
-The first number is what needs to be passed to the \f[CR]--screen\f[R]
+The first number is what needs to be passed to the \f[CR]\-\-screen\f[R]
option.
.PP
For example:
.IP
.EX
-quickemu --vm vm.conf --screen 0
+quickemu \-\-vm vm.conf \-\-screen 0
.EE
.PP
The above uses the 2560x1440 screen to compute the size of the window,
which Quickemu sizes to 2048x1152.
-Without the \f[CR]--screen\f[R] option, Quickemu would have used the
+Without the \f[CR]\-\-screen\f[R] option, Quickemu would have used the
1920x1080 monitor which results in a window size of 1664x936.
.PP
The `\[en]screenpct' is an optional integer value between 25 <= pct <
@@ -1013,7 +1139,7 @@ The `\[en]screenpct' is an optional integer value between 25 <= pct <
The VM size will be `pct' of the chosen screen.
\f[B]If \[en]fullscreen is chosen screen will be fullsize instead of
being scaled down by \[en]screenpct value.\f[R]
-.SH References
+.SS References
Useful reference that assisted the development of Quickemu.
.IP \[bu] 2
General
@@ -1037,8 +1163,7 @@ macOS
.RS 2
.IP \[bu] 2
\c
-.UR
-https://www.nicksherlock.com/2020/06/installing-macos-big-sur-on-proxmox/
+.UR https://www.nicksherlock.com/2020/06/installing-macos-big-sur-on-proxmox/
.UE \c
.IP \[bu] 2
\c
@@ -1054,8 +1179,11 @@ https://www.nicksherlock.com/2020/06/installing-macos-big-sur-on-proxmox/
.UE \c
.IP \[bu] 2
\c
-.UR
-https://github.com/acidanthera/OpenCorePkg/tree/master/Utilities/macrecovery
+.UR https://gist.github.com/MCJack123/943eaca762730ca4b7ae460b731b68e7
+.UE \c
+.IP \[bu] 2
+\c
+.UR https://github.com/acidanthera/OpenCorePkg/tree/master/Utilities/macrecovery
.UE \c
.IP \[bu] 2
\c
@@ -1063,8 +1191,7 @@ https://github.com/acidanthera/OpenCorePkg/tree/master/Utilities/macrecovery
.UE \c
.IP \[bu] 2
\c
-.UR
-https://www.nicksherlock.com/2017/10/passthrough-of-advanced-cpu-features-for-macos-high-sierra-guests/
+.UR https://www.nicksherlock.com/2017/10/passthrough-of-advanced-cpu-features-for-macos-high-sierra-guests/
.UE \c
.IP \[bu] 2
\c
@@ -1085,18 +1212,15 @@ Windows
.RS 2
.IP \[bu] 2
\c
-.UR
-https://www.heiko-sieger.info/running-windows-10-on-linux-using-kvm-with-vga-passthrough/
+.UR https://www.heiko-sieger.info/running-windows-10-on-linux-using-kvm-with-vga-passthrough/
.UE \c
.IP \[bu] 2
\c
-.UR
-https://leduccc.medium.com/improving-the-performance-of-a-windows-10-guest-on-qemu-a5b3f54d9cf5
+.UR https://leduccc.medium.com/improving-the-performance-of-a-windows-10-guest-on-qemu-a5b3f54d9cf5
.UE \c
.IP \[bu] 2
\c
-.UR
-https://frontpagelinux.com/tutorials/how-to-use-linux-kvm-to-optimize-your-windows-10-virtual-machine/
+.UR https://frontpagelinux.com/tutorials/how-to-use-linux-kvm-to-optimize-your-windows-10-virtual-machine/
.UE \c
.IP \[bu] 2
\c
@@ -1108,8 +1232,7 @@ https://frontpagelinux.com/tutorials/how-to-use-linux-kvm-to-optimize-your-windo
.UE \c
.IP \[bu] 2
\c
-.UR
-https://www.catapultsystems.com/blogs/create-zero-touch-windows-10-iso/
+.UR https://www.catapultsystems.com/blogs/create-zero-touch-windows-10-iso/
.UE \c
.RE
.IP \[bu] 2
@@ -1121,8 +1244,7 @@ TPM
.UE \c
.IP \[bu] 2
\c
-.UR
-https://www.tecklyfe.com/how-to-create-a-windows-11-virtual-machine-in-qemu/
+.UR https://www.tecklyfe.com/how-to-create-a-windows-11-virtual-machine-in-qemu/
.UE \c
.RE
.IP \[bu] 2
@@ -1142,8 +1264,7 @@ https://www.tecklyfe.com/how-to-create-a-windows-11-virtual-machine-in-qemu/
.UE \c
.IP \[bu] 2
\c
-.UR
-https://superuser.com/questions/628169/how-to-share-a-directory-with-the-host-without-networking-in-qemu
+.UR https://superuser.com/questions/628169/how-to-share-a-directory-with-the-host-without-networking-in-qemu
.UE \c
.IP \[bu] 2
\c
diff --git a/docs/quickemu.1.md b/docs/quickemu.1.md
index 33654c3451..5d36db1664 100644
--- a/docs/quickemu.1.md
+++ b/docs/quickemu.1.md
@@ -1,6 +1,6 @@
---
author: Martin Wimpress
-date: November 26, 2023
+date: April 21, 2024
footer: quickemu
header: Quickemu User Manual
section: 1
@@ -27,20 +27,23 @@ machines for Linux, macOS and Windows
You can also pass optional parameters
+**--access**
+: Enable remote spice access support. 'local' (default), 'remote',
+ 'clientipaddress'
+
**--braille**
: Enable braille support. Requires SDL.
**--delete-disk**
-: Delete the disk image.
+: 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', 'spice' or
'spice-app'
-**--sound-card**
-: Select virtual audio emulation. 'intel-hda' (default), 'ac97'
- (solaris default), 'es1370', 'sb16' (freedos default) or 'none'
-
**--fullscreen**
: Starts VM in full screen mode (Ctl+Alt+f to exit)
@@ -50,6 +53,9 @@ You can also pass optional parameters
**--screen \**
: Use specified screen to determine the window size.
+**--screenpct \**
+: Percent of fullscreen for VM if --fullscreen is not specified.
+
**--shortcut**
: Create a desktop shortcut
@@ -68,6 +74,68 @@ You can also pass optional parameters
**--status-quo**
: Do not commit any changes to disk/snapshot.
+**--viewer \**
+: Choose an alternative viewer. @Options: 'spicy' (default),
+ 'remote-viewer', 'none'
+
+**--width \**
+: Set VM screen width. Does nothing without --height
+
+**--height \**
+: Set VM screen height. Does nothing without --width
+
+**--ssh-port \**
+: Set ssh-port manually
+
+**--spice-port \**
+: Set spice-port manually
+
+**--public-dir \**
+: Expose share directory. @Options: '' (default: xdg-user-dir
+ PUBLICSHARE), '``{=html}', 'none'
+
+**--monitor \**
+: Set monitor connection type. @Options: 'socket' (default), 'telnet',
+ 'none'
+
+**--monitor-telnet-host \**
+: Set telnet host for monitor. (default: 'localhost')
+
+**--monitor-telnet-port \**
+: Set telnet port for monitor. (default: '4440')
+
+**--monitor-cmd \**
+: Send command to monitor if available. (Example: system_powerdown)
+
+**--serial \**
+: Set serial connection type. @Options: 'socket' (default), 'telnet',
+ 'none'
+
+**--serial-telnet-host \**
+: Set telnet host for serial. (default: 'localhost')
+
+**--serial-telnet-port \**
+: Set telnet port for serial. (default: '6660')
+
+**--keyboard \**
+: Set keyboard. @Options: 'usb' (default), 'ps2', 'virtio'
+
+**--keyboard_layout \**
+: Set keyboard layout.
+
+**--mouse \**
+: Set mouse. @Options: 'tablet' (default), 'ps2', 'usb', 'virtio'
+
+**--usb-controller \**
+: Set usb-controller. @Options: 'ehci' (default), 'xhci', 'none'
+
+**--sound-card \**
+: Set sound card. @Options: 'intel-hda' (default), 'ac97', 'es1370',
+ 'sb16', 'none'
+
+**--extra_args \**
+: Pass additional arguments to qemu
+
**--version**
: Print version
@@ -78,26 +146,26 @@ You can also pass optional parameters
## Introduction
-Quickly create and run highly optimised desktop virtual machines for
-Linux, macOS and Windows; with just two commands. You decide what
-operating system you want to run and Quickemu will figure out the best
-way to do it for you. For example:
+**Quickemu** is a wrapper for the excellent
+[QEMU](https://www.qemu.org/) that attempts to automatically *"do the
+right thing"*, rather than expose exhaustive configuration options. You
+decide what operating system you want to run, and Quickemu will figure
+out the best way to do it for you.
-``` bash
-quickget ubuntu-mate 22.04
-quickemu --vm ubuntu-mate-22.04.conf
-```
+The original objective of the project was to enable [quick testing of
+Linux distributions](#creating-linux-guests-) where the virtual machine
+configurations can be stored anywhere (such as external USB storage or
+your home directory) and no elevated permissions are required to run the
+virtual machines.
-The original objective of the project was to enable quick testing of
-Linux distributions where the virtual machine configurations can be
-stored anywhere, such as external USB storage or your home directory,
-and no elevated permissions are required to run the virtual machines.
-**Quickemu now also includes comprehensive support for macOS and
-Windows**.
+**Quickemu now also includes comprehensive support for
+[macOS](#creating-macos-guests-) and
+[Windows](#creating-windows-guests-)**.
## Features
-- **macOS** Monterey, Big Sur, Catalina, Mojave & High Sierra
+- **macOS** Sonoma, Ventura, Monterey, Big Sur, Catalina, Mojave &
+ High Sierra
- **Windows** 10 and 11 including TPM 2.0
- [Ubuntu](https://ubuntu.com/desktop) and all the **[official Ubuntu
flavours](https://ubuntu.com/download/flavours)**
@@ -120,32 +188,21 @@ Windows**.
- EFI (with or without SecureBoot) and Legacy BIOS boot
- Graphical user interfaces available
-Quickemu is a wrapper for the excellent [QEMU](https://www.qemu.org/)
-that attempts to automatically *"do the right thing"*, rather than
-expose exhaustive configuration options.
-
-We have a Discord for this project:
-[![Discord](https://img.shields.io/discord/712850672223125565?color=0C306A&label=WimpysWorld%20Discord&logo=Discord&logoColor=ffffff&style=flat-square)](https://discord.gg/sNmz3uw)
-
-See this (old) video where I explain some of my motivations for creating
-Quickemu.
-
-[![Replace VirtualBox with Bash &
-QEMU](https://img.youtube.com/vi/AOTYWEgw0hI/0.jpg)](https://www.youtube.com/watch?v=AOTYWEgw0hI)
-
-## Requirements
+When installing from source, you will need to install the following
+requirements manually:
- [QEMU](https://www.qemu.org/) (*6.0.0 or newer*) **with GTK, SDL,
SPICE & VirtFS support**
- [bash](https://www.gnu.org/software/bash/) (*4.0 or newer*)
- [Coreutils](https://www.gnu.org/software/coreutils/)
+- [curl](https://curl.se/)
- [EDK II](https://github.com/tianocore/edk2)
- [grep](https://www.gnu.org/software/grep/)
- [jq](https://stedolan.github.io/jq/)
- [LSB](https://wiki.linuxfoundation.org/lsb/start)
- [procps](https://gitlab.com/procps-ng/procps)
- [python3](https://www.python.org/)
-- [macrecovery](https://github.com/acidanthera/OpenCorePkg/tree/master/Utilities/macrecovery)
+- [chunkcheck](https://gist.github.com/MCJack123/943eaca762730ca4b7ae460b731b68e7)
- [mkisofs](http://cdrtools.sourceforge.net/private/cdrecord.html)
- [usbutils](https://github.com/gregkh/usbutils)
- [util-linux](https://github.com/karelzak/util-linux)
@@ -159,9 +216,7 @@ QEMU](https://img.youtube.com/vi/AOTYWEgw0hI/0.jpg)](https://www.youtube.com/wat
- [zsync](http://zsync.moria.org.uk/)
- [unzip](http://www.info-zip.org/UnZip.html)
-### Installing Requirements
-
-For Ubuntu, Arch and nixos systems the
+For Ubuntu, Arch and NixOS hosts, the
[ppa](https://launchpad.net/~flexiondotorg/+archive/ubuntu/quickemu),
[AUR](https://aur.archlinux.org/packages/quickemu) or
[nix](https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/quickemu)
@@ -169,27 +224,33 @@ packaging will take care of the dependencies. For other host
distributions or operating systems it will be necessary to install the
above requirements or their equivalents.
-These examples may save a little typing
+These examples may save a little typing:
-Debian (and direct derivatives such as MX Linux):
+#### Install requirements on Debian hosts
- sudo apt install qemu bash coreutils ovmf grep jq lsb-base procps python3 genisoimage usbutils util-linux sed spice-client-gtk libtss2-tcti-swtpm0 wget xdg-user-dirs zsync unzip
+This also applies to derivatives:
-Fedora:
+``` shell
+sudo apt install qemu bash coreutils ovmf grep jq lsb-base procps python3 genisoimage usbutils util-linux sed socat spice-client-gtk libtss2-tcti-swtpm0 wget xdg-user-dirs zsync unzip
+```
- sudo dnf install qemu bash coreutils edk2-tools grep jq lsb procps python3 genisoimage usbutils util-linux sed spice-gtk-tools swtpm wget xdg-user-dirs xrandr unzip
+#### Install requirements on Fedora hosts
-MacOS:
+``` shell
+sudo dnf install qemu bash coreutils edk2-tools grep jq lsb procps python3 genisoimage usbutils util-linux sed socat spice-gtk-tools swtpm wget xdg-user-dirs xrandr unzip
+```
+
+#### Install requirements on macOS hosts
-This is a work in progress (see [issue
+This is a **work in progress** (see [issue
248](https://github.com/quickemu-project/quickemu/issues/248) for other
steps and changes that may enable running on MacOS)
- brew install qemu bash coreutils grep jq python@3.10 cdrtools gnu-sed spice-gtk wget zsync
-
-# Usage
+``` shell
+brew install qemu bash coreutils grep jq python@3.10 cdrtools gnu-sed spice-gtk wget zsync
+```
-## Graphical User Interfaces
+## GUI (quickgui)
While `quickemu` and `quickget` are designed for the terminal, a
graphical user interface is also available:
@@ -198,23 +259,24 @@ graphical user interface is also available:
Johnson](https://github.com/marxjohnson) and [Yannick
Mauray](https://github.com/ymauray).
-Many thanks to [Luke Wesley-Holley](https://github.com/Lukewh) and
-[Philipp Kiemle](https://github.com/daPhipz) for creating the
-**[Quickemu icons](https://github.com/Lukewh/quickemu-icons)** 🎨
-
-### Quickgui for Ubuntu
+To install Quickgui on Ubuntu:
-``` bash
+``` shell
sudo add-apt-repository ppa:yannick-mauray/quickgui
sudo apt update
sudo apt install quickgui
```
-### quickemu quickget X terminal project
+Many thanks to [Luke Wesley-Holley](https://github.com/Lukewh) and
+[Philipp Kiemle](https://github.com/daPhipz) for creating the
+**[Quickemu icons](https://github.com/Lukewh/quickemu-icons)** 🎨
+
+## TUI (qqx)
From Nov 2023, there is also a multi option desktop integrated text
-interface, with lots of unique tools and utilities to help you make
-light work of installations, snapshots and disk management
+interface, the **quickemu quickget X terminal project**, a.k.a. **qqX**,
+with lots of unique tools and utilities to help you make light work of
+installations, snapshots and disk management
- **[qqX](https://github.com/TuxVinyards/qqX)** is independently
curated by [Alex Genovese](https://github.com/TuxVinyards) (see the
@@ -222,12 +284,14 @@ light work of installations, snapshots and disk management
![qqX-vmm](https://github.com/TuxVinyards/qqX/assets/3956806/18e5c495-8072-49a5-8b9c-e1302549efcf)
-## Ubuntu Guest
+## Creating Linux guests 🐧
+
+### Ubuntu
`quickget` will automatically download an Ubuntu release and create the
virtual machine configuration.
-``` bash
+``` shell
quickget ubuntu 22.04
quickemu --vm ubuntu-22.04.conf
```
@@ -241,19 +305,19 @@ quickemu --vm ubuntu-22.04.conf
enable file sharing.
- `sudo apt install spice-webdavd`
-### Ubuntu devel (daily-live) images
+### Ubuntu daily-live images
-`quickget` can also download/refresh devel images via `zsync` for Ubuntu
-developers and testers.
+`quickget` can also download/refresh daily-live images via `zsync` for
+Ubuntu developers and testers.
-``` bash
-quickget ubuntu devel
-quickemu --vm ubuntu-devel.conf
+``` shell
+quickget ubuntu daily-live
+quickemu --vm ubuntu-daily-live.conf
```
-You can run `quickget ubuntu devel` to refresh your daily development
-image as often as you like, it will even automatically switch to a new
-series.
+You can run `quickget ubuntu daily-live` to refresh your daily
+development image as often as you like, it will even automatically
+switch to a new series.
### Ubuntu Flavours
@@ -276,19 +340,20 @@ with your preferred flavour.
You can also use `quickget` with options to:
``` shell
- # show an OS ISO download URL for {os} {release} [edition]
- quickget --show-iso-url fedora 38 Silverblue
- # test if and OS ISO is available for {os} {release} [edition]
+ # show an OS ISO download URL for {os} {release} [edition]
+ quickget --show-iso-url fedora 38 Silverblue
+ # test if an OS ISO is available for {os} {release} [edition]
quickget --test-iso-url nixos 23.05 plasma5
# open an OS distribution homepage in a browser
quickget --open-distro-homepage ubuntu-mate
+ # Only download image file into current directory, without creating VM
+ quickget --download-iso elementary 7.1
```
-The `--show-iso-url` and `--test-iso-url` options **do not** work for
-`Windows` (`quickget` will begin downloading the requested release and
-edition of windows)
+The `--show-iso-url`, `--test-iso-url`, and `--download-iso` options are
+fully functional for all operating systems, including Windows and macOS.
-## Other Operating Systems
+### Other Operating Systems
`quickget` also supports:
@@ -299,16 +364,23 @@ edition of windows)
- `archcraft` (Archcraft)
- `archlinux` (Arch Linux)
- `arcolinux` (Arco Linux)
+- `artixlinux` (Artix Linux)
+- `athenaos` (Athenaos)
- `batocera` (Batocera)
+- `bazzite` (Bazzite)
+- `biglinux` (BigLinux)
- `blendos` (BlendOS)
- `bodhi` (Bodhi)
- `bunsenlabs` (Bunsenlabs)
- `cachyos` (CachyOS)
- `centos-stream` (CentOS Stream)
+- `chimeralinux` (Chimera Linux)
+- `crunchbang++` (Crunchbang++)
- `debian` (Debian)
- `deepin` (Deepin)
- `devuan` (Devuan)
- `dragonflybsd` (DragonFlyBSD)
+- `easyos` (EasyOS)
- `elementary` (elementary OS)
- `endeavouros` (EndeavourOS)
- `endless` (Endless OS)
@@ -318,6 +390,8 @@ edition of windows)
- `garuda` (Garuda Linux)
- `gentoo` (Gentoo)
- `ghostbsd` (GhostBSD)
+- `gnomeos` (GNOME OS)
+- `guix` (Guix)
- `haiku` (Haiku)
- `holoiso` (SteamOS HoloISO)
- `kali` (Kali)
@@ -331,39 +405,49 @@ edition of windows)
- `mxlinux` (MX Linux)
- `netboot` (netboot.xyz)
- `netbsd` (NetBSD)
+- `nitrux` (Nitrux)
- `nixos` (NixOS)
- `openbsd` (OpenBSD)
- `openindiana` (OpenIndiana)
- `opensuse` (openSUSE)
- `oraclelinux` (Oracle Linux)
+- `parrotsec` (Parrot Security)
- `peppermint` (PeppermintOS)
- `popos` (Pop!\_OS)
- `porteus` (Porteus)
+- `primtux` (Primtux)
+- `pureos` (PureOS)
- `reactos` (ReactOS)
- `rebornos` (RebornOS)
- `rockylinux` (Rocky Linux)
- `siduction` (Siduction)
- `slackware` (Slackware)
+- `slax` (Slax)
+- `slint` (Slint)
+- `slitaz` (SliTaz GNU/Linux)
- `solus` (Solus)
-- `spiral` (Spiral)
+- `sparkylinux` (SparkyLinux)
+- `spirallinux` (Spirallinux)
- `tails` (Tails)
- `tinycore` (Tiny Core Linux)
- `trisquel` (Trisquel)
- `truenas-core` (TrueNAS Core)
- `truenas-scale` (TrueNAS Scale)
+- `tuxedo-os` (Tuxedo OS)
- `vanillaos` (Vanilla OS)
- `void` (Void Linux)
- `vxlinux` (VX Linux)
-- `xerolinux` (XeroLinux)
- `zorin` (Zorin OS)
+### Custom Linux guests
+
Or you can download a Linux image and manually create a VM
configuration.
- Download a .iso image of a Linux distribution
- Create a VM configuration file; for example `debian-bullseye.conf`
-``` bash
+``` shell
guest_os="linux"
disk_img="debian-bullseye/disk.qcow2"
iso="debian-bullseye/firmware-11.0.0-amd64-DVD-1.iso"
@@ -371,7 +455,7 @@ iso="debian-bullseye/firmware-11.0.0-amd64-DVD-1.iso"
- Use `quickemu` to start the virtual machine:
-``` bash
+``` shell
quickemu --vm debian-bullseye.conf
```
@@ -382,18 +466,18 @@ quickemu --vm debian-bullseye.conf
- Install the SPICE WebDAV agent (`spice-webdavd`) in the guest to
enable file sharing.
-## macOS Guest
+## Creating macOS Guests 🍏
`quickget` automatically downloads a macOS recovery image and creates a
virtual machine configuration.
-``` bash
+``` shell
quickget macos catalina
quickemu --vm macos-catalina.conf
```
-macOS `high-sierra`, `mojave`, `catalina`, `big-sur`, `monterey` and
-`ventura` are supported.
+macOS `high-sierra`, `mojave`, `catalina`, `big-sur`, `monterey`,
+`ventura` and `sonoma` are supported.
- Use cursor keys and enter key to select the **macOS Base System**
- From **macOS Utilities**
@@ -403,8 +487,8 @@ macOS `high-sierra`, `mojave`, `catalina`, `big-sur`, `monterey` and
click **Erase**.
- Enter a `Name:` for the disk
- If you are installing macOS Mojave or later (Catalina, Big
- Sur, Monterey and Ventura), choose any of the APFS options
- as the filesystem. MacOS Extended may not work.
+ Sur, Monterey, Ventura and Sonoma), choose any of the APFS
+ options as the filesystem. MacOS Extended may not work.
- Click **Erase**.
- Click **Done**.
- Close Disk Utility
@@ -427,21 +511,22 @@ macOS `high-sierra`, `mojave`, `catalina`, `big-sur`, `monterey` and
when you delete lots of data inside macOS.
- To enable TRIM, open the Terminal application and type the
following command followed by pressing
- ``{=html}enter``{=html} to tell macos to use the TRIM
+ enter to tell macos to use the TRIM
command on the hard disk when files are deleted:
-``` bash
+``` shell
sudo trimforce enable
```
You will be prompted to enter your account's password to gain the
privilege needed. Once you've entered your password and pressed
-``{=html}enter``{=html} the command will request confirmation
+enter the command will request confirmation
in the form of two questions that require you to type
-``{=html}y``{=html} (for a "yes" response) followed by
-``{=html}enter``{=html} to confirm. If you press
-``{=html}enter``{=html} without first typing
-``{=html}y``{=html} the system will consider that a negative
+y (for a "yes" response) followed by
+enter to confirm.
+
+If you press enter without first typing
+y the system will consider that a negative
response as though you said "no":
``` plain
@@ -461,7 +546,7 @@ soon as the command completes.
The default macOS configuration looks like this:
-``` bash
+``` shell
guest_os="macos"
img="macos-catalina/RecoveryImage.img"
disk_img="macos-catalina/disk.qcow2"
@@ -487,6 +572,7 @@ There are some considerations when running macOS via Quickemu.
- Big Sur
- Monterey
- Ventura
+ - Sonoma
- `quickemu` will automatically download the required
[OpenCore](https://github.com/acidanthera/OpenCorePkg) bootloader
and OVMF firmware from [OSX-KVM](https://github.com/kholia/OSX-KVM).
@@ -528,25 +614,35 @@ If the wired ethernet device is not `en0`, then then go to *System
Preferences* -\> *Network*, delete all the network devices and apply the
changes. Next, open a terminal and run the following:
-``` bash
+``` shell
sudo rm /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist
```
Now reboot, and the App Store should work.
-## Windows 8, 10 & 11 Guests
+## Creating Windows guests 🪟
-`quickget` can download
-[Windows10](https://www.microsoft.com/software-download/windows10) and
-[Windows 11](https://www.microsoft.com/software-download/windows11)
+`quickget` can download [**Windows
+10**](https://www.microsoft.com/software-download/windows10) and
+[**Windows 11**](https://www.microsoft.com/software-download/windows11)
automatically and create an optimised virtual machine configuration.
This configuration also includes the [VirtIO drivers for
Windows](https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/).
-Windows 8.1 is also supported but doesn't feature any automated
+**Windows 8.1** is also supported but doesn't feature any automated
installation or driver optimisation.
-``` bash
+`quickget` can also download [Windows 10
+LTSC](https://www.microsoft.com/en-us/evalcenter/download-windows-10-enterprise)
+and Windows Server
+[2012-r2](https://www.microsoft.com/en-us/evalcenter/download-windows-server-2012-r2),
+[2016](https://www.microsoft.com/en-us/evalcenter/download-windows-server-2016),
+[2019](https://www.microsoft.com/en-us/evalcenter/download-windows-server-2019),
+and
+[2022](https://www.microsoft.com/en-us/evalcenter/download-windows-server-2022).
+No automated installation is supported for these releases.
+
+``` shell
quickget windows 11
quickemu --vm windows-11.conf
```
@@ -558,9 +654,19 @@ quickemu --vm windows-11.conf
- Username: `Quickemu`
- Password: `quickemu`
+### Regional versions
+
+By default `quickget` will download the *"English International"*
+release (*"English (United States)"* for server releases), but you can
+optionally specify one of the supported languages: For example:
+
+``` shell
+quickget windows 11 "Chinese (Traditional)"
+```
+
The default Windows 11 configuration looks like this:
-``` bash
+``` shell
guest_os="windows"
disk_img="windows-11/disk.qcow2"
iso="windows-11/windows-11.iso"
@@ -574,48 +680,52 @@ secureboot="off"
- `tpm="on"` instructs `quickemu` to create a software emulated TPM
device using `swtpm`.
-# All the options
+## Configuration
Here are the usage instructions:
-
- Usage
- quickemu --vm ubuntu.conf
-
- You can also pass optional parameters
- --access : Enable remote spice access support. 'local' (default), 'remote', 'clientipaddress'
- --braille : Enable braille support. Requires SDL.
- --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', 'spice' or 'spice-app'
- --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.
- --screenpct : Percent of fullscreen for VM if --fullscreen is not specified.
- --shortcut : Create a desktop shortcut
- --snapshot apply : Apply/restore a snapshot.
- --snapshot create : Create a snapshot.
- --snapshot delete : Delete a snapshot.
- --snapshot info : Show disk/snapshot info.
- --status-quo : Do not commit any changes to disk/snapshot.
- --viewer : Choose an alternative viewer. @Options: 'spicy' (default), 'remote-viewer', 'none'
- --ssh-port : Set ssh-port manually
- --spice-port : Set spice-port manually
- --public-dir : Expose share directory. @Options: '' (default: xdg-user-dir PUBLICSHARE), '', 'none'
- --monitor : Set monitor connection type. @Options: 'socket' (default), 'telnet', 'none'
- --monitor-telnet-host : Set telnet host for monitor. (default: 'localhost')
- --monitor-telnet-port : Set telnet port for monitor. (default: '4440')
- --monitor-cmd : Send command to monitor if available. (Example: system_powerdown)
- --serial : Set serial connection type. @Options: 'socket' (default), 'telnet', 'none'
- --serial-telnet-host : Set telnet host for serial. (default: 'localhost')
- --serial-telnet-port : Set telnet port for serial. (default: '6660')
- --keyboard : Set keyboard. @Options: 'usb' (default), 'ps2', 'virtio'
- --keyboard_layout : Set keyboard layout.
- --mouse : Set mouse. @Options: 'tablet' (default), 'ps2', 'usb', 'virtio'
- --usb-controller : Set usb-controller. @Options: 'ehci' (default), 'xhci', 'none'
- --sound-card : Set sound card. @Options: 'intel-hda' (default), 'ac97', 'es1370', 'sb16', 'none'
- --extra_args : Pass additional arguments to qemu
- --version : Print version
+``` text
+
+Usage
+ quickemu --vm ubuntu.conf [optional params]
+
+List of optional parameters:
+ --access : Enable remote spice access support. 'local' (default), 'remote', 'clientipaddress'
+ --braille : Enable braille support. Requires SDL.
+ --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', 'spice' or 'spice-app'
+ --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.
+ --screenpct : Percent of fullscreen for VM if --fullscreen is not specified.
+ --shortcut : Create a desktop shortcut
+ --snapshot apply : Apply/restore a snapshot.
+ --snapshot create : Create a snapshot.
+ --snapshot delete : Delete a snapshot.
+ --snapshot info : Show disk/snapshot info.
+ --status-quo : Do not commit any changes to disk/snapshot.
+ --viewer : Choose an alternative viewer. @Options: 'spicy' (default), 'remote-viewer', 'none'
+ --width : Set VM screen width. Does nothing without --height
+ --height : Set VM screen height. Does nothing without --width
+ --ssh-port : Set ssh-port manually
+ --spice-port : Set spice-port manually
+ --public-dir : Expose share directory. @Options: '' (default: xdg-user-dir PUBLICSHARE), '', 'none'
+ --monitor : Set monitor connection type. @Options: 'socket' (default), 'telnet', 'none'
+ --monitor-telnet-host : Set telnet host for monitor. (default: 'localhost')
+ --monitor-telnet-port : Set telnet port for monitor. (default: '4440')
+ --monitor-cmd : Send command to monitor if available. (Example: system_powerdown)
+ --serial : Set serial connection type. @Options: 'socket' (default), 'telnet', 'none'
+ --serial-telnet-host : Set telnet host for serial. (default: 'localhost')
+ --serial-telnet-port : Set telnet port for serial. (default: '6660')
+ --keyboard : Set keyboard. @Options: 'usb' (default), 'ps2', 'virtio'
+ --keyboard_layout : Set keyboard layout.
+ --mouse : Set mouse. @Options: 'tablet' (default), 'ps2', 'usb', 'virtio'
+ --usb-controller : Set usb-controller. @Options: 'ehci' (default), 'xhci', 'none'
+ --sound-card : Set sound card. @Options: 'intel-hda' (default), 'ac97', 'es1370', 'sb16', 'none'
+ --extra_args : Pass additional arguments to qemu
+ --version : Print version
+```
## Desktop shortcuts
@@ -623,7 +733,7 @@ Desktop shortcuts can be created for a VM, the shortcuts are saved in
`~/.local/share/applications`. Here is an example of how to create a
shortcut.
-``` bash
+``` shell
quickemu --vm ubuntu-22.04-desktop.conf --shortcut
```
@@ -648,13 +758,13 @@ must match the resolution of the screen.
To know which screen to use, type:
-``` bash
+``` shell
xrandr --listmonitors | grep -v Monitors
```
The command will output something like this:
-``` bash
+``` shell
0: +*HDMI-0 2560/597x1440/336+1920+0 HDMI-0
1: +DVI-D-0 1920/527x1080/296+0+0 DVI-D-0
```
@@ -663,7 +773,7 @@ The first number is what needs to be passed to the `--screen` option.
For example:
-``` bash
+``` shell
quickemu --vm vm.conf --screen 0
```
@@ -677,7 +787,7 @@ which will override system default screen sizes. The VM size will be
'pct' of the chosen screen. **If --fullscreen is chosen screen will be
fullsize instead of being scaled down by --screenpct value.**
-# References
+## References
Useful reference that assisted the development of Quickemu.
@@ -690,6 +800,7 @@ Useful reference that assisted the development of Quickemu.
-
-
-
+ -
-
-
-
diff --git a/docs/quickemu_conf.1 b/docs/quickemu_conf.1
index c1a4db0632..db799f37c3 100644
--- a/docs/quickemu_conf.1
+++ b/docs/quickemu_conf.1
@@ -1,8 +1,8 @@
-.\" Automatically generated by Pandoc 3.1.9
+.\" Automatically generated by Pandoc 3.1.13
.\"
-.TH "QUICKEMU_CONF" "1" "November 26, 2023" "quickemu_conf" "Quickemu Configuration Manual"
+.TH "QUICKEMU_CONF" "1" "April 21, 2024" "quickemu_conf" "Quickemu Configuration Manual"
.SH NAME
-quickemu_conf - Options and parameters in the quickemu .conf
+quickemu_conf \- Options and parameters in the quickemu .conf
.SH DESCRIPTION
\f[B]quickemu\f[R] will create and run highly optimised desktop virtual
machines for Linux, macOS and Windows.
@@ -50,7 +50,7 @@ serial_telnet_host=\[dq]localhost\[dq]
usb_controller=\[dq]ehci\[dq]
# options: ps2, usb, virtio
keyboard=\[dq]usb\[dq]
-keyboard_layout=\[dq]en-us\[dq]
+keyboard_layout=\[dq]en\-us\[dq]
# options: ps2, usb, tablet, virtio
mouse=\[dq]tablet\[dq]
.EE
@@ -58,16 +58,16 @@ mouse=\[dq]tablet\[dq]
.IP
.EX
guest_os=\[dq]linux\[dq]
-disk_img=\[dq]debian-bullseye/disk.qcow2\[dq]
-iso=\[dq]debian-bullseye/firmware-11.0.0-amd64-DVD-1.iso\[dq]
+disk_img=\[dq]debian\-bullseye/disk.qcow2\[dq]
+iso=\[dq]debian\-bullseye/firmware\-11.0.0\-amd64\-DVD\-1.iso\[dq]
.EE
.PP
The default macOS configuration looks like this:
.IP
.EX
guest_os=\[dq]macos\[dq]
-img=\[dq]macos-catalina/RecoveryImage.img\[dq]
-disk_img=\[dq]macos-catalina/disk.qcow2\[dq]
+img=\[dq]macos\-catalina/RecoveryImage.img\[dq]
+disk_img=\[dq]macos\-catalina/disk.qcow2\[dq]
macos_release=\[dq]catalina\[dq]
.EE
.IP \[bu] 2
@@ -89,9 +89,9 @@ The default Windows 11 configuration looks like this:
.IP
.EX
guest_os=\[dq]windows\[dq]
-disk_img=\[dq]windows-11/disk.qcow2\[dq]
-iso=\[dq]windows-11/Win11_EnglishInternational_x64.iso\[dq]
-fixed_iso=\[dq]windows-11/virtio-win.iso\[dq]
+disk_img=\[dq]windows\-11/disk.qcow2\[dq]
+iso=\[dq]windows\-11/Win11_EnglishInternational_x64.iso\[dq]
+fixed_iso=\[dq]windows\-11/virtio\-win.iso\[dq]
tpm=\[dq]on\[dq]
secureboot=\[dq]on\[dq]
.EE
@@ -104,13 +104,13 @@ drivers.
.IP \[bu] 2
\f[CR]tpm=\[dq]on\[dq]\f[R] instructs \f[CR]quickemu\f[R] to create a
software emulated TPM device using \f[CR]swtpm\f[R].
-.SH BIOS and EFI
+.SS BIOS and EFI
Since Quickemu 2.1.0 \f[CR]efi\f[R] is the default boot option.
If you want to override this behaviour then add the following line to
you VM configuration to enable legacy BIOS.
.IP \[bu] 2
-\f[CR]boot=\[dq]legacy\[dq]\f[R] - Enable Legacy BIOS boot
-.SH Tuning CPU cores, RAM & disks
+\f[CR]boot=\[dq]legacy\[dq]\f[R] \- Enable Legacy BIOS boot
+.SS Tuning CPU cores, RAM & disks
By default, Quickemu will calculate the number of CPUs cores and RAM to
allocate to a VM based on the specifications of your host computer.
You can override this default behaviour and tune the VM configuration to
@@ -118,13 +118,13 @@ your liking.
.PP
Add additional lines to your virtual machine configuration:
.IP \[bu] 2
-\f[CR]cpu_cores=\[dq]4\[dq]\f[R] - Specify the number of CPU cores
+\f[CR]cpu_cores=\[dq]4\[dq]\f[R] \- Specify the number of CPU cores
allocated to the VM
.IP \[bu] 2
-\f[CR]ram=\[dq]4G\[dq]\f[R] - Specify the amount of RAM to allocate to
+\f[CR]ram=\[dq]4G\[dq]\f[R] \- Specify the amount of RAM to allocate to
the VM
.IP \[bu] 2
-\f[CR]disk_size=\[dq]16G\[dq]\f[R] - Specify the size of the virtual
+\f[CR]disk_size=\[dq]16G\[dq]\f[R] \- Specify the size of the virtual
disk allocated to the VM
.SS Disk preallocation
Preallocation mode (allowed values: \f[CR]off\f[R] (default),
@@ -137,7 +137,7 @@ the system disk image by adding a line like this to your VM
configuration.
.IP \[bu] 2
\f[CR]preallocation=\[dq]metadata\[dq]\f[R]
-.SS CD-ROM disks
+.SS CD\-ROM disks
If you want to expose an ISO image from the host to guest add the
following line to the VM configuration:
.IP \[bu] 2
@@ -151,18 +151,18 @@ Alan Pope
To do so add the following line to the VM configuration:
.IP \[bu] 2
\f[CR]floppy=\[dq]/path/to/floppy.img\[dq]\f[R]
-.SH File Sharing
+.SS File Sharing
All File Sharing options will only expose \f[CR]\[ti]/Public\f[R] (or
localised variations) for the current user to the guest VMs.
.SS Samba 🐧 🍏 🪟
If \f[CR]smbd\f[R] is available on the host, Quickemu will automatically
-enable the built-in QEMU support for exposing a Samba share from the
+enable the built\-in QEMU support for exposing a Samba share from the
host to the guest.
.PP
You can install the minimal Samba components on Ubuntu using:
.IP
.EX
-sudo apt install --no-install-recommends samba
+sudo apt install \-\-no\-install\-recommends samba
.EE
.PP
If everything is set up correctly, the \f[CR]smbd\f[R] address will be
@@ -170,20 +170,21 @@ printed when the virtual machine is started.
For example:
.IP
.EX
- - smbd: On guest: smb://10.0.2.4/qemu
+ \- smbd: On guest: smb://10.0.2.4/qemu
.EE
.PP
-If using a Windows guest, right-click on \[lq]This PC\[rq], click
+If using a Windows guest, right\-click on \[lq]This PC\[rq], click
\[lq]Add a network location\[rq], and paste this address, removing
\f[CR]smb:\f[R] and replacing forward slashes with backslashes (in this
example \f[CR]\[rs]\[rs]10.0.2.4\[rs]qemu\f[R]).
.SS SPICE WebDAV 🐧 🪟
.IP \[bu] 2
TBD
-.SS VirtIO-9P 🐧 🍏
+.SS VirtIO\-9P 🐧 🍏
.IP \[bu] 2
TBD
-.SH Network port forwarding
+.SS Networking
+.SS Port forwarding
Add an additional line to your virtual machine configuration.
For example:
.IP \[bu] 2
@@ -194,12 +195,12 @@ In the example above:
Port 8123 on the host is forwarded to port 8123 on the guest.
.IP \[bu] 2
Port 8888 on the host is forwarded to port 80 on the guest.
-.SH Disable networking
+.SS Disable networking
To completely disable all network interfaces in a guest VM add this
additional line to your virtual machine configuration:
.IP \[bu] 2
\f[CR]network=\[dq]none\[dq]\f[R]
-.SH Restricted networking
+.SS Restricted networking
You can isolate the guest from the host (and broader network) using the
restrict option, which will restrict networking to just the guest and
any virtual devices.
@@ -209,7 +210,7 @@ phoning home while still providing a network inside the guest.
Add this additional line to your virtual machine configuration:
.IP \[bu] 2
\f[CR]network=\[dq]restrict\[dq]\f[R]
-.SH Bridged networking
+.SS Bridged networking
Connect your virtual machine to a preconfigured network bridge.
Add an additional line to your virtual machine configuration:
.IP \[bu] 2
@@ -219,21 +220,39 @@ If you want to have a persistent MAC address for your bridged network
interface in the guest VM you can add \f[CR]macaddr\f[R] to the virtual
machine configuration.
QEMU requires that the MAC address is in the range:
-\f[B]52:54:00:AB:00:00 - 52:54:00:AB:FF:FF\f[R]
+\f[B]52:54:00:AB:00:00 \- 52:54:00:AB:FF:FF\f[R]
.PP
So you can generate your own MAC addresses with:
.IP \[bu] 2
\f[CR]macaddr=\[dq]52:54:00:AB:51:AE\[dq]\f[R]
-.SH USB redirection
-Quickemu supports USB redirection via SPICE pass-through and host
-pass-through.
+.SS USB redirection
+Quickemu supports USB redirection via SPICE pass\-through and host
+pass\-through.
.SS SPICE redirection (recommended)
-Using SPICE for USB pass-through is easiest as it doesn\[cq]t require
-any elevated permission, start Quickemu with \f[CR]--display spice\f[R]
-and then select \f[CR]Input\f[R] ->
-\f[CR]Select USB Device for redirection\f[R] from the menu to choose
-which device(s) you want to attach to the guest.
-.SS Host redirection \f[B]NOT Recommended\f[R]
+Using SPICE for USB pass\-through is easiest as it doesn\[cq]t require
+any elevated permission:
+.IP \[bu] 2
+Start Quickemu with \f[CR]\-\-display spice\f[R] and then
+.IP \[bu] 2
+select \f[CR]Input\f[R] \-> \f[CR]Select USB Device for redirection\f[R]
+from the menu to choose which device(s) you want to attach to the guest.
+.SS Enabling SPICE redirection on NixOS
+On NixOS, if you encounter this error:
+.IP
+.EX
+Error setting facl: Operation not permitted
+.EE
+.PP
+Try setting \c
+.UR https://search.nixos.org/options?channel=23.11&show=virtualisation.spiceUSBRedirection.enable&from=0&size=50&sort=relevance&type=packages&query=spiceusbredirec
+the following option
+.UE \c
+:
+.IP
+.EX
+virtualisation.spiceUSBRedirection.enable = true;
+.EE
+.SS Host redirection (\f[B]NOT Recommended\f[R])
\f[B]USB host redirection is not recommended\f[R], it is provided purely
for backwards compatibility to older versions of Quickemu.
Using SPICE is preferred, see above.
@@ -256,12 +275,12 @@ the appropriate commands to modify the USB device(s) access permissions,
like this:
.IP
.EX
- - USB: Host pass-through requested:
- - Sennheiser Communications EPOS GTW 270 on bus 001 device 005 needs permission changes:
- sudo chown -v root:user /dev/bus/usb/001/005
+ \- USB: Host pass\-through requested:
+ \- Sennheiser Communications EPOS GTW 270 on bus 001 device 005 needs permission changes:
+ sudo chown \-v root:user /dev/bus/usb/001/005
ERROR! USB permission changes are required 👆
.EE
-.SH TPM
+.SS TPM
Since Quickemu 2.2.0 a software emulated TPM device can be added to
guest virtual machines.
Just add \f[CR]tpm=\[dq]on\[dq]\f[R] to your VM configuration.
diff --git a/docs/quickemu_conf.1.md b/docs/quickemu_conf.1.md
index 61fd201287..3334f9c131 100644
--- a/docs/quickemu_conf.1.md
+++ b/docs/quickemu_conf.1.md
@@ -1,6 +1,6 @@
---
author: Martin Wimpress
-date: November 26, 2023
+date: April 21, 2024
footer: quickemu_conf
header: Quickemu Configuration Manual
section: 1
@@ -23,7 +23,7 @@ installation ISO and QEMU disk for the installed VM
These are the options and defaults for the \.conf file
-``` bash
+``` shell
# Lowercase variables are used in the VM config file only
boot="efi"
cpu_cores=""
@@ -67,7 +67,7 @@ mouse="tablet"
# EXAMPLES
-``` bash
+``` shell
guest_os="linux"
disk_img="debian-bullseye/disk.qcow2"
iso="debian-bullseye/firmware-11.0.0-amd64-DVD-1.iso"
@@ -75,7 +75,7 @@ iso="debian-bullseye/firmware-11.0.0-amd64-DVD-1.iso"
The default macOS configuration looks like this:
-``` bash
+``` shell
guest_os="macos"
img="macos-catalina/RecoveryImage.img"
disk_img="macos-catalina/disk.qcow2"
@@ -92,7 +92,7 @@ macos_release="catalina"
The default Windows 11 configuration looks like this:
-``` bash
+``` shell
guest_os="windows"
disk_img="windows-11/disk.qcow2"
iso="windows-11/Win11_EnglishInternational_x64.iso"
@@ -106,7 +106,7 @@ secureboot="on"
- `tpm="on"` instructs `quickemu` to create a software emulated TPM
device using `swtpm`.
-# BIOS and EFI
+### BIOS and EFI
Since Quickemu 2.1.0 `efi` is the default boot option. If you want to
override this behaviour then add the following line to you VM
@@ -114,7 +114,7 @@ configuration to enable legacy BIOS.
- `boot="legacy"` - Enable Legacy BIOS boot
-# Tuning CPU cores, RAM & disks
+### Tuning CPU cores, RAM & disks
By default, Quickemu will calculate the number of CPUs cores and RAM to
allocate to a VM based on the specifications of your host computer. You
@@ -129,7 +129,7 @@ Add additional lines to your virtual machine configuration:
- `disk_size="16G"` - Specify the size of the virtual disk allocated
to the VM
-## Disk preallocation
+### Disk preallocation
Preallocation mode (allowed values: `off` (default), `metadata`,
`falloc`, `full`). An image with preallocated metadata is initially
@@ -141,14 +141,14 @@ configuration.
- `preallocation="metadata"`
-## CD-ROM disks
+### CD-ROM disks
If you want to expose an ISO image from the host to guest add the
following line to the VM configuration:
- `fixed_iso="/path/to/image.iso"`
-## Floppy disks
+### Floppy disks
If you're like [Alan Pope](https://popey.com) you'll probably want to
mount a floppy disk image in the guest. To do so add the following line
@@ -156,12 +156,12 @@ to the VM configuration:
- `floppy="/path/to/floppy.img"`
-# File Sharing
+### File Sharing
All File Sharing options will only expose `~/Public` (or localised
variations) for the current user to the guest VMs.
-## Samba 🐧 🍏 🪟
+#### Samba 🐧 🍏 🪟
If `smbd` is available on the host, Quickemu will automatically enable
the built-in QEMU support for exposing a Samba share from the host to
@@ -169,7 +169,7 @@ the guest.
You can install the minimal Samba components on Ubuntu using:
-``` bash
+``` shell
sudo apt install --no-install-recommends samba
```
@@ -182,15 +182,17 @@ If using a Windows guest, right-click on "This PC", click "Add a network
location", and paste this address, removing `smb:` and replacing forward
slashes with backslashes (in this example `\\10.0.2.4\qemu`).
-## SPICE WebDAV 🐧 🪟
+#### SPICE WebDAV 🐧 🪟
- TBD
-## VirtIO-9P 🐧 🍏
+#### VirtIO-9P 🐧 🍏
- TBD
-# Network port forwarding
+### Networking
+
+#### Port forwarding
Add an additional line to your virtual machine configuration. For
example:
@@ -202,14 +204,14 @@ In the example above:
- Port 8123 on the host is forwarded to port 8123 on the guest.
- Port 8888 on the host is forwarded to port 80 on the guest.
-# Disable networking
+#### Disable networking
To completely disable all network interfaces in a guest VM add this
additional line to your virtual machine configuration:
- `network="none"`
-# Restricted networking
+#### Restricted networking
You can isolate the guest from the host (and broader network) using the
restrict option, which will restrict networking to just the guest and
@@ -221,7 +223,7 @@ additional line to your virtual machine configuration:
- `network="restrict"`
-# Bridged networking
+#### Bridged networking
Connect your virtual machine to a preconfigured network bridge. Add an
additional line to your virtual machine configuration:
@@ -237,19 +239,34 @@ So you can generate your own MAC addresses with:
- `macaddr="52:54:00:AB:51:AE"`
-# USB redirection
+### USB redirection
Quickemu supports USB redirection via SPICE pass-through and host
pass-through.
-## SPICE redirection (recommended)
+#### SPICE redirection (recommended)
Using SPICE for USB pass-through is easiest as it doesn't require any
-elevated permission, start Quickemu with `--display spice` and then
-select `Input` -\> `Select USB Device for redirection` from the menu to
-choose which device(s) you want to attach to the guest.
+elevated permission:
+
+- Start Quickemu with `--display spice` and then
+- select `Input` -\> `Select USB Device for redirection` from the menu
+ to choose which device(s) you want to attach to the guest.
+
+##### Enabling SPICE redirection on NixOS
+
+On NixOS, if you encounter this error:
+
+ Error setting facl: Operation not permitted
+
+Try setting [the following
+option](https://search.nixos.org/options?channel=23.11&show=virtualisation.spiceUSBRedirection.enable&from=0&size=50&sort=relevance&type=packages&query=spiceusbredirec):
+
+``` nix
+virtualisation.spiceUSBRedirection.enable = true;
+```
-## Host redirection **NOT Recommended**
+#### Host redirection (**NOT Recommended**)
**USB host redirection is not recommended**, it is provided purely for
backwards compatibility to older versions of Quickemu. Using SPICE is
@@ -276,7 +293,7 @@ like this:
sudo chown -v root:user /dev/bus/usb/001/005
ERROR! USB permission changes are required 👆
-# TPM
+### TPM
Since Quickemu 2.2.0 a software emulated TPM device can be added to
guest virtual machines. Just add `tpm="on"` to your VM configuration.
diff --git a/docs/quickget.1 b/docs/quickget.1
index 460dd2a1a1..a0dc705742 100644
--- a/docs/quickget.1
+++ b/docs/quickget.1
@@ -1,8 +1,8 @@
-.\" Automatically generated by Pandoc 3.1.9
+.\" Automatically generated by Pandoc 3.1.13
.\"
-.TH "QUICKGET" "1" "November 26, 2023" "quickget" "Quickget User Manual"
+.TH "QUICKGET" "1" "April 21, 2024" "quickget" "Quickget User Manual"
.SH NAME
-quickget - download and prepare materials for building a quickemu VM
+quickget \- download and prepare materials for building a quickemu VM
.SH SYNOPSIS
\f[B]quickget\f[R] [\f[I]os\f[R]] [\f[I]release\f[R]]
[\f[I]edition\f[R]] | [\f[I]OPTION\f[R]]*
@@ -11,19 +11,19 @@ quickget - download and prepare materials for building a quickemu VM
configuration for \f[CR]quickemu\f[R] to use to build and run
.SH OPTIONS
.TP
-\f[B]version | -version | \[en]version\f[R]
+\f[B]version | \-version | \[en]version\f[R]
show version (from Quickemu)
.TP
\f[B]list | list_csv | list_json\f[R]
provide a csv list of all supported guest OSes, versions and variants.
.TP
-\f[B]\f[CB]--show-iso-url\f[B] | -s\f[R] {\f[B]os\f[R]} {\f[B]release\f[R]} [\f[B]edition\f[R]]
+\f[B]\f[CB]\-\-show\-iso\-url\f[B] | \-s\f[R] {\f[B]os\f[R]} {\f[B]release\f[R]} [\f[B]edition\f[R]]
show ISO download URL
.TP
-\f[B]\f[CB]--test-iso-url\f[B] | -t\f[R] {\f[B]os\f[R]} {\f[B]release\f[R]} [\f[B]edition\f[R]]
+\f[B]\f[CB]\-\-test\-iso\-url\f[B] | \-t\f[R] {\f[B]os\f[R]} {\f[B]release\f[R]} [\f[B]edition\f[R]]
test if ISO is available
.TP
-\f[B]\f[CB]--open-distro-homepage\f[B] | -o\f[R] {\f[B]os\f[R]}
+\f[B]\f[CB]\-\-open\-distro\-homepage\f[B] | \-o\f[R] {\f[B]os\f[R]}
open OS homepage in browser
.TP
\f[B][OS] [Release] [Edition]\f[R]
@@ -32,44 +32,45 @@ is provided a list of missing options will be reported and the script
will exit.
Editions may not apply and will be defaulted if not provided.
.SH NOTES
-.SS Ubuntu Guest
+.SS Creating Linux guests 🐧
+.SS Ubuntu
\f[CR]quickget\f[R] will automatically download an Ubuntu release and
create the virtual machine configuration.
.IP
.EX
quickget ubuntu 22.04
-quickemu --vm ubuntu-22.04.conf
+quickemu \-\-vm ubuntu\-22.04.conf
.EE
.IP \[bu] 2
Complete the installation as normal.
.IP \[bu] 2
-Post-install:
+Post\-install:
.RS 2
.IP \[bu] 2
-Install the SPICE agent (\f[CR]spice-vdagent\f[R]) in the guest to
+Install the SPICE agent (\f[CR]spice\-vdagent\f[R]) in the guest to
enable copy/paste and USB redirection
.RS 2
.IP \[bu] 2
-\f[CR]sudo apt install spice-vdagent\f[R]
+\f[CR]sudo apt install spice\-vdagent\f[R]
.RE
.IP \[bu] 2
-Install the SPICE WebDAV agent (\f[CR]spice-webdavd\f[R]) in the guest
+Install the SPICE WebDAV agent (\f[CR]spice\-webdavd\f[R]) in the guest
to enable file sharing.
.RS 2
.IP \[bu] 2
-\f[CR]sudo apt install spice-webdavd\f[R]
+\f[CR]sudo apt install spice\-webdavd\f[R]
.RE
.RE
-.SS Ubuntu devel (daily-live) images
-\f[CR]quickget\f[R] can also download/refresh devel images via
+.SS Ubuntu daily\-live images
+\f[CR]quickget\f[R] can also download/refresh daily\-live images via
\f[CR]zsync\f[R] for Ubuntu developers and testers.
.IP
.EX
-quickget ubuntu devel
-quickemu --vm ubuntu-devel.conf
+quickget ubuntu daily\-live
+quickemu \-\-vm ubuntu\-daily\-live.conf
.EE
.PP
-You can run \f[CR]quickget ubuntu devel\f[R] to refresh your daily
+You can run \f[CR]quickget ubuntu daily\-live\f[R] to refresh your daily
development image as often as you like, it will even automatically
switch to a new series.
.SS Ubuntu Flavours
@@ -82,38 +83,40 @@ All the official Ubuntu flavours are supported, just replace
.IP \[bu] 2
\f[CR]lubuntu\f[R] (Lubuntu)
.IP \[bu] 2
-\f[CR]ubuntu-budgie\f[R] (Ubuntu Budgie)
+\f[CR]ubuntu\-budgie\f[R] (Ubuntu Budgie)
.IP \[bu] 2
\f[CR]ubuntucinnamon\f[R] (Ubuntu Cinnamon)
.IP \[bu] 2
\f[CR]ubuntukylin\f[R] (Ubuntu Kylin)
.IP \[bu] 2
-\f[CR]ubuntu-mate\f[R] (Ubuntu MATE)
+\f[CR]ubuntu\-mate\f[R] (Ubuntu MATE)
.IP \[bu] 2
-\f[CR]ubuntu-server\f[R] (Ubuntu Server)
+\f[CR]ubuntu\-server\f[R] (Ubuntu Server)
.IP \[bu] 2
\f[CR]ubuntustudio\f[R] (Ubuntu Studio)
.IP \[bu] 2
\f[CR]ubuntu\f[R] (Ubuntu)
.IP \[bu] 2
-\f[CR]ubuntu-unity\f[R] (Ubuntu Unity)
+\f[CR]ubuntu\-unity\f[R] (Ubuntu Unity)
.IP \[bu] 2
\f[CR]xubuntu\f[R] (Xubuntu)
.PP
You can also use \f[CR]quickget\f[R] with options to:
.IP
.EX
- # show an OS ISO download URL for {os} {release} [edition]
- quickget --show-iso-url fedora 38 Silverblue
- # test if and OS ISO is available for {os} {release} [edition]
- quickget --test-iso-url nixos 23.05 plasma5
+ # show an OS ISO download URL for {os} {release} [edition]
+ quickget \-\-show\-iso\-url fedora 38 Silverblue
+ # test if an OS ISO is available for {os} {release} [edition]
+ quickget \-\-test\-iso\-url nixos 23.05 plasma5
# open an OS distribution homepage in a browser
- quickget --open-distro-homepage ubuntu-mate
+ quickget \-\-open\-distro\-homepage ubuntu\-mate
+ # Only download image file into current directory, without creating VM
+ quickget \-\-download\-iso elementary 7.1
.EE
.PP
-The \f[CR]--show-iso-url\f[R] and \f[CR]--test-iso-url\f[R] options
-\f[B]do not\f[R] work for \f[CR]Windows\f[R] (\f[CR]quickget\f[R] will
-begin downloading the requested release and edition of windows)
+The \f[CR]\-\-show\-iso\-url\f[R], \f[CR]\-\-test\-iso\-url\f[R], and
+\f[CR]\-\-download\-iso\f[R] options are fully functional for all
+operating systems, including Windows and macOS.
.SS Other Operating Systems
\f[CR]quickget\f[R] also supports:
.IP \[bu] 2
@@ -131,8 +134,16 @@ begin downloading the requested release and edition of windows)
.IP \[bu] 2
\f[CR]arcolinux\f[R] (Arco Linux)
.IP \[bu] 2
+\f[CR]artixlinux\f[R] (Artix Linux)
+.IP \[bu] 2
+\f[CR]athenaos\f[R] (Athenaos)
+.IP \[bu] 2
\f[CR]batocera\f[R] (Batocera)
.IP \[bu] 2
+\f[CR]bazzite\f[R] (Bazzite)
+.IP \[bu] 2
+\f[CR]biglinux\f[R] (BigLinux)
+.IP \[bu] 2
\f[CR]blendos\f[R] (BlendOS)
.IP \[bu] 2
\f[CR]bodhi\f[R] (Bodhi)
@@ -141,7 +152,11 @@ begin downloading the requested release and edition of windows)
.IP \[bu] 2
\f[CR]cachyos\f[R] (CachyOS)
.IP \[bu] 2
-\f[CR]centos-stream\f[R] (CentOS Stream)
+\f[CR]centos\-stream\f[R] (CentOS Stream)
+.IP \[bu] 2
+\f[CR]chimeralinux\f[R] (Chimera Linux)
+.IP \[bu] 2
+\f[CR]crunchbang++\f[R] (Crunchbang++)
.IP \[bu] 2
\f[CR]debian\f[R] (Debian)
.IP \[bu] 2
@@ -151,6 +166,8 @@ begin downloading the requested release and edition of windows)
.IP \[bu] 2
\f[CR]dragonflybsd\f[R] (DragonFlyBSD)
.IP \[bu] 2
+\f[CR]easyos\f[R] (EasyOS)
+.IP \[bu] 2
\f[CR]elementary\f[R] (elementary OS)
.IP \[bu] 2
\f[CR]endeavouros\f[R] (EndeavourOS)
@@ -169,6 +186,10 @@ begin downloading the requested release and edition of windows)
.IP \[bu] 2
\f[CR]ghostbsd\f[R] (GhostBSD)
.IP \[bu] 2
+\f[CR]gnomeos\f[R] (GNOME OS)
+.IP \[bu] 2
+\f[CR]guix\f[R] (Guix)
+.IP \[bu] 2
\f[CR]haiku\f[R] (Haiku)
.IP \[bu] 2
\f[CR]holoiso\f[R] (SteamOS HoloISO)
@@ -195,6 +216,8 @@ begin downloading the requested release and edition of windows)
.IP \[bu] 2
\f[CR]netbsd\f[R] (NetBSD)
.IP \[bu] 2
+\f[CR]nitrux\f[R] (Nitrux)
+.IP \[bu] 2
\f[CR]nixos\f[R] (NixOS)
.IP \[bu] 2
\f[CR]openbsd\f[R] (OpenBSD)
@@ -205,12 +228,18 @@ begin downloading the requested release and edition of windows)
.IP \[bu] 2
\f[CR]oraclelinux\f[R] (Oracle Linux)
.IP \[bu] 2
+\f[CR]parrotsec\f[R] (Parrot Security)
+.IP \[bu] 2
\f[CR]peppermint\f[R] (PeppermintOS)
.IP \[bu] 2
\f[CR]popos\f[R] (Pop!_OS)
.IP \[bu] 2
\f[CR]porteus\f[R] (Porteus)
.IP \[bu] 2
+\f[CR]primtux\f[R] (Primtux)
+.IP \[bu] 2
+\f[CR]pureos\f[R] (PureOS)
+.IP \[bu] 2
\f[CR]reactos\f[R] (ReactOS)
.IP \[bu] 2
\f[CR]rebornos\f[R] (RebornOS)
@@ -221,9 +250,17 @@ begin downloading the requested release and edition of windows)
.IP \[bu] 2
\f[CR]slackware\f[R] (Slackware)
.IP \[bu] 2
+\f[CR]slax\f[R] (Slax)
+.IP \[bu] 2
+\f[CR]slint\f[R] (Slint)
+.IP \[bu] 2
+\f[CR]slitaz\f[R] (SliTaz GNU/Linux)
+.IP \[bu] 2
\f[CR]solus\f[R] (Solus)
.IP \[bu] 2
-\f[CR]spiral\f[R] (Spiral)
+\f[CR]sparkylinux\f[R] (SparkyLinux)
+.IP \[bu] 2
+\f[CR]spirallinux\f[R] (Spirallinux)
.IP \[bu] 2
\f[CR]tails\f[R] (Tails)
.IP \[bu] 2
@@ -231,9 +268,11 @@ begin downloading the requested release and edition of windows)
.IP \[bu] 2
\f[CR]trisquel\f[R] (Trisquel)
.IP \[bu] 2
-\f[CR]truenas-core\f[R] (TrueNAS Core)
+\f[CR]truenas\-core\f[R] (TrueNAS Core)
+.IP \[bu] 2
+\f[CR]truenas\-scale\f[R] (TrueNAS Scale)
.IP \[bu] 2
-\f[CR]truenas-scale\f[R] (TrueNAS Scale)
+\f[CR]tuxedo\-os\f[R] (Tuxedo OS)
.IP \[bu] 2
\f[CR]vanillaos\f[R] (Vanilla OS)
.IP \[bu] 2
@@ -241,53 +280,51 @@ begin downloading the requested release and edition of windows)
.IP \[bu] 2
\f[CR]vxlinux\f[R] (VX Linux)
.IP \[bu] 2
-\f[CR]xerolinux\f[R] (XeroLinux)
-.IP \[bu] 2
\f[CR]zorin\f[R] (Zorin OS)
-.PP
+.SS Custom Linux guests
Or you can download a Linux image and manually create a VM
configuration.
.IP \[bu] 2
Download a .iso image of a Linux distribution
.IP \[bu] 2
Create a VM configuration file; for example
-\f[CR]debian-bullseye.conf\f[R]
+\f[CR]debian\-bullseye.conf\f[R]
.IP
.EX
guest_os=\[dq]linux\[dq]
-disk_img=\[dq]debian-bullseye/disk.qcow2\[dq]
-iso=\[dq]debian-bullseye/firmware-11.0.0-amd64-DVD-1.iso\[dq]
+disk_img=\[dq]debian\-bullseye/disk.qcow2\[dq]
+iso=\[dq]debian\-bullseye/firmware\-11.0.0\-amd64\-DVD\-1.iso\[dq]
.EE
.IP \[bu] 2
Use \f[CR]quickemu\f[R] to start the virtual machine:
.IP
.EX
-quickemu --vm debian-bullseye.conf
+quickemu \-\-vm debian\-bullseye.conf
.EE
.IP \[bu] 2
Complete the installation as normal.
.IP \[bu] 2
-Post-install:
+Post\-install:
.RS 2
.IP \[bu] 2
-Install the SPICE agent (\f[CR]spice-vdagent\f[R]) in the guest to
+Install the SPICE agent (\f[CR]spice\-vdagent\f[R]) in the guest to
enable copy/paste and USB redirection.
.IP \[bu] 2
-Install the SPICE WebDAV agent (\f[CR]spice-webdavd\f[R]) in the guest
+Install the SPICE WebDAV agent (\f[CR]spice\-webdavd\f[R]) in the guest
to enable file sharing.
.RE
-.SS macOS Guest
+.SS Creating macOS Guests 🍏
\f[CR]quickget\f[R] automatically downloads a macOS recovery image and
creates a virtual machine configuration.
.IP
.EX
quickget macos catalina
-quickemu --vm macos-catalina.conf
+quickemu \-\-vm macos\-catalina.conf
.EE
.PP
-macOS \f[CR]high-sierra\f[R], \f[CR]mojave\f[R], \f[CR]catalina\f[R],
-\f[CR]big-sur\f[R], \f[CR]monterey\f[R] and \f[CR]ventura\f[R] are
-supported.
+macOS \f[CR]high\-sierra\f[R], \f[CR]mojave\f[R], \f[CR]catalina\f[R],
+\f[CR]big\-sur\f[R], \f[CR]monterey\f[R], \f[CR]ventura\f[R] and
+\f[CR]sonoma\f[R] are supported.
.IP \[bu] 2
Use cursor keys and enter key to select the \f[B]macOS Base System\f[R]
.IP \[bu] 2
@@ -303,8 +340,9 @@ click \f[B]Erase\f[R].
.IP \[bu] 2
Enter a \f[CR]Name:\f[R] for the disk
.IP \[bu] 2
-If you are installing macOS Mojave or later (Catalina, Big Sur, Monterey
-and Ventura), choose any of the APFS options as the filesystem.
+If you are installing macOS Mojave or later (Catalina, Big Sur,
+Monterey, Ventura and Sonoma), choose any of the APFS options as the
+filesystem.
MacOS Extended may not work.
.RE
.IP \[bu] 2
@@ -332,10 +370,10 @@ disk you named
.RE
.IP \[bu] 2
Once you have finished installing macOS you will be presented with an
-the out-of-the-box first-start wizard to configure various options and
-set up your username and password
+the out\-of\-the\-box first\-start wizard to configure various options
+and set up your username and password
.IP \[bu] 2
-OPTIONAL: After you have concluded the out-of-the-box wizard, you may
+OPTIONAL: After you have concluded the out\-of\-the\-box wizard, you may
want to enable the TRIM feature that the computer industry created for
SSD disks.
This feature in our macOS installation will allow QuickEmu to compact
@@ -359,11 +397,12 @@ privilege needed.
Once you\[cq]ve entered your password and pressed enter the command will
request confirmation in the form of two questions that require you to
type y (for a \[lq]yes\[rq] response) followed by enter to confirm.
+.PP
If you press enter without first typing y the system will consider that
a negative response as though you said \[lq]no\[rq]:
.IP
.EX
-IMPORTANT NOTICE: This tool force-enables TRIM for all relevant attached devices, even though such devices may not have been validated for data integrity while using TRIM. Use of this tool to enable TRIM may result in unintended data loss or data corruption. It should not be used in a commercial operating environment or with important data. Before using this tool, you should back up all of your data and regularly back up data while TRIM is enabled. This tool is provided on an \[dq]as is\[dq] basis. APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THIS TOOL OR ITS USE ALONE OR IN COMBINATION WITH YOUR DEVICES, SYSTEMS, OR SERVICES. BY USING THIS TOOL TO ENABLE TRIM, YOU AGREE THAT, TO THE EXTENT PERMITTED BY APPLICABLE LAW, USE OF THE TOOL IS AT YOUR SOLE RISK AND THAT THE ENTIRE RISK AS TO SATISFACTORY QUALITY, PERFORMANCE, ACCURACY AND EFFORT IS WITH YOU.
+IMPORTANT NOTICE: This tool force\-enables TRIM for all relevant attached devices, even though such devices may not have been validated for data integrity while using TRIM. Use of this tool to enable TRIM may result in unintended data loss or data corruption. It should not be used in a commercial operating environment or with important data. Before using this tool, you should back up all of your data and regularly back up data while TRIM is enabled. This tool is provided on an \[dq]as is\[dq] basis. APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON\-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THIS TOOL OR ITS USE ALONE OR IN COMBINATION WITH YOUR DEVICES, SYSTEMS, OR SERVICES. BY USING THIS TOOL TO ENABLE TRIM, YOU AGREE THAT, TO THE EXTENT PERMITTED BY APPLICABLE LAW, USE OF THE TOOL IS AT YOUR SOLE RISK AND THAT THE ENTIRE RISK AS TO SATISFACTORY QUALITY, PERFORMANCE, ACCURACY AND EFFORT IS WITH YOU.
Are you sure you with to proceed (y/N)?
.EE
.PP
@@ -381,8 +420,8 @@ The default macOS configuration looks like this:
.IP
.EX
guest_os=\[dq]macos\[dq]
-img=\[dq]macos-catalina/RecoveryImage.img\[dq]
-disk_img=\[dq]macos-catalina/disk.qcow2\[dq]
+img=\[dq]macos\-catalina/RecoveryImage.img\[dq]
+disk_img=\[dq]macos\-catalina/disk.qcow2\[dq]
macos_release=\[dq]catalina\[dq]
.EE
.IP \[bu] 2
@@ -416,6 +455,8 @@ Big Sur
Monterey
.IP \[bu] 2
Ventura
+.IP \[bu] 2
+Sonoma
.RE
.IP \[bu] 2
\f[CR]quickemu\f[R] will automatically download the required \c
@@ -424,7 +465,7 @@ OpenCore
.UE \c
\ bootloader and OVMF firmware from \c
.UR https://github.com/kholia/OSX-KVM
-OSX-KVM
+OSX\-KVM
.UE \c
\&.
.IP \[bu] 2
@@ -441,18 +482,18 @@ VirtIO Block Media
.IP \[bu] 2
\c
.UR http://philjordan.eu/osx-virt/
-VirtIO \f[CR]usb-tablet\f[R]
+VirtIO \f[CR]usb\-tablet\f[R]
.UE \c
\ is used for the mouse.
.IP \[bu] 2
-VirtIO Network (\f[CR]virtio-net\f[R]) is supported and enabled on macOS
-Big Sur and newer but previous releases use \f[CR]vmxnet3\f[R].
+VirtIO Network (\f[CR]virtio\-net\f[R]) is supported and enabled on
+macOS Big Sur and newer but previous releases use \f[CR]vmxnet3\f[R].
.IP \[bu] 2
VirtIO Memory Ballooning is supported and enabled on macOS Big Sur and
newer but disabled for other support macOS releases.
.RE
.IP \[bu] 2
-USB host and SPICE pass-through is:
+USB host and SPICE pass\-through is:
.RS 2
.IP \[bu] 2
UHCI (USB 2.0) on macOS Catalina and earlier.
@@ -466,7 +507,7 @@ Display resolution can only be changed via macOS System Preferences.
.UR https://github.com/chris1111/VoodooHDA-OC
VoodooHDA OC
.UE \c
-\ or pass-through a USB audio-device to the macOS guest VM\f[R].
+\ or pass\-through a USB audio\-device to the macOS guest VM\f[R].
.IP \[bu] 2
NOTE!
\c
@@ -474,15 +515,14 @@ NOTE!
Gatekeeper
.UE \c
\ and \c
-.UR
-https://developer.apple.com/documentation/security/disabling_and_enabling_system_integrity_protection
+.UR https://developer.apple.com/documentation/security/disabling_and_enabling_system_integrity_protection
System Integrity Protection (SIP)
.UE \c
\ need to be disabled to install VoodooHDA OC
.IP \[bu] 2
File sharing between guest and host is available via \c
.UR https://wiki.qemu.org/Documentation/9psetup
-virtio-9p
+virtio\-9p
.UE \c
\ and \c
.UR https://gitlab.gnome.org/GNOME/phodav/-/merge_requests/24
@@ -498,7 +538,7 @@ that your wired ethernet device is \f[CR]en0\f[R].
Use \f[CR]ifconfig\f[R] in a terminal to verify this.
.PP
If the wired ethernet device is not \f[CR]en0\f[R], then then go to
-\f[I]System Preferences\f[R] -> \f[I]Network\f[R], delete all the
+\f[I]System Preferences\f[R] \-> \f[I]Network\f[R], delete all the
network devices and apply the changes.
Next, open a terminal and run the following:
.IP
@@ -507,14 +547,14 @@ sudo rm /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist
.EE
.PP
Now reboot, and the App Store should work.
-.SS Windows 8, 10 & 11 Guests
+.SS Creating Windows guests 🪟
\f[CR]quickget\f[R] can download \c
.UR https://www.microsoft.com/software-download/windows10
-Windows10
+\f[B]Windows 10\f[R]
.UE \c
\ and \c
.UR https://www.microsoft.com/software-download/windows11
-Windows 11
+\f[B]Windows 11\f[R]
.UE \c
\ automatically and create an optimised virtual machine configuration.
This configuration also includes the \c
@@ -523,12 +563,35 @@ VirtIO drivers for Windows
.UE \c
\&.
.PP
-Windows 8.1 is also supported but doesn\[cq]t feature any automated
-installation or driver optimisation.
+\f[B]Windows 8.1\f[R] is also supported but doesn\[cq]t feature any
+automated installation or driver optimisation.
+.PP
+\f[CR]quickget\f[R] can also download \c
+.UR https://www.microsoft.com/en-us/evalcenter/download-windows-10-enterprise
+Windows 10 LTSC
+.UE \c
+\ and Windows Server \c
+.UR https://www.microsoft.com/en-us/evalcenter/download-windows-server-2012-r2
+2012\-r2
+.UE \c
+, \c
+.UR https://www.microsoft.com/en-us/evalcenter/download-windows-server-2016
+2016
+.UE \c
+, \c
+.UR https://www.microsoft.com/en-us/evalcenter/download-windows-server-2019
+2019
+.UE \c
+, and \c
+.UR https://www.microsoft.com/en-us/evalcenter/download-windows-server-2022
+2022
+.UE \c
+\&.
+No automated installation is supported for these releases.
.IP
.EX
quickget windows 11
-quickemu --vm windows-11.conf
+quickemu \-\-vm windows\-11.conf
.EE
.IP \[bu] 2
Complete the installation as you normally would.
@@ -543,14 +606,23 @@ Username: \f[CR]Quickemu\f[R]
.IP \[bu] 2
Password: \f[CR]quickemu\f[R]
.RE
+.SS Regional versions
+By default \f[CR]quickget\f[R] will download the \f[I]\[lq]English
+International\[rq]\f[R] release (\f[I]\[lq]English (United
+States)\[rq]\f[R] for server releases), but you can optionally specify
+one of the supported languages: For example:
+.IP
+.EX
+quickget windows 11 \[dq]Chinese (Traditional)\[dq]
+.EE
.PP
The default Windows 11 configuration looks like this:
.IP
.EX
guest_os=\[dq]windows\[dq]
-disk_img=\[dq]windows-11/disk.qcow2\[dq]
-iso=\[dq]windows-11/windows-11.iso\[dq]
-fixed_iso=\[dq]windows-11/virtio-win.iso\[dq]
+disk_img=\[dq]windows\-11/disk.qcow2\[dq]
+iso=\[dq]windows\-11/windows\-11.iso\[dq]
+fixed_iso=\[dq]windows\-11/virtio\-win.iso\[dq]
tpm=\[dq]on\[dq]
secureboot=\[dq]off\[dq]
.EE
diff --git a/docs/quickget.1.md b/docs/quickget.1.md
index 319224a3af..4848c10035 100644
--- a/docs/quickget.1.md
+++ b/docs/quickget.1.md
@@ -1,6 +1,6 @@
---
author: Martin Wimpress
-date: November 26, 2023
+date: April 21, 2024
footer: quickget
header: Quickget User Manual
section: 1
@@ -46,12 +46,14 @@ configuration for `quickemu` to use to build and run
# NOTES
-## Ubuntu Guest
+## Creating Linux guests 🐧
+
+### Ubuntu
`quickget` will automatically download an Ubuntu release and create the
virtual machine configuration.
-``` bash
+``` shell
quickget ubuntu 22.04
quickemu --vm ubuntu-22.04.conf
```
@@ -65,19 +67,19 @@ quickemu --vm ubuntu-22.04.conf
enable file sharing.
- `sudo apt install spice-webdavd`
-### Ubuntu devel (daily-live) images
+### Ubuntu daily-live images
-`quickget` can also download/refresh devel images via `zsync` for Ubuntu
-developers and testers.
+`quickget` can also download/refresh daily-live images via `zsync` for
+Ubuntu developers and testers.
-``` bash
-quickget ubuntu devel
-quickemu --vm ubuntu-devel.conf
+``` shell
+quickget ubuntu daily-live
+quickemu --vm ubuntu-daily-live.conf
```
-You can run `quickget ubuntu devel` to refresh your daily development
-image as often as you like, it will even automatically switch to a new
-series.
+You can run `quickget ubuntu daily-live` to refresh your daily
+development image as often as you like, it will even automatically
+switch to a new series.
### Ubuntu Flavours
@@ -100,19 +102,20 @@ with your preferred flavour.
You can also use `quickget` with options to:
``` shell
- # show an OS ISO download URL for {os} {release} [edition]
- quickget --show-iso-url fedora 38 Silverblue
- # test if and OS ISO is available for {os} {release} [edition]
+ # show an OS ISO download URL for {os} {release} [edition]
+ quickget --show-iso-url fedora 38 Silverblue
+ # test if an OS ISO is available for {os} {release} [edition]
quickget --test-iso-url nixos 23.05 plasma5
# open an OS distribution homepage in a browser
quickget --open-distro-homepage ubuntu-mate
+ # Only download image file into current directory, without creating VM
+ quickget --download-iso elementary 7.1
```
-The `--show-iso-url` and `--test-iso-url` options **do not** work for
-`Windows` (`quickget` will begin downloading the requested release and
-edition of windows)
+The `--show-iso-url`, `--test-iso-url`, and `--download-iso` options are
+fully functional for all operating systems, including Windows and macOS.
-## Other Operating Systems
+### Other Operating Systems
`quickget` also supports:
@@ -123,16 +126,23 @@ edition of windows)
- `archcraft` (Archcraft)
- `archlinux` (Arch Linux)
- `arcolinux` (Arco Linux)
+- `artixlinux` (Artix Linux)
+- `athenaos` (Athenaos)
- `batocera` (Batocera)
+- `bazzite` (Bazzite)
+- `biglinux` (BigLinux)
- `blendos` (BlendOS)
- `bodhi` (Bodhi)
- `bunsenlabs` (Bunsenlabs)
- `cachyos` (CachyOS)
- `centos-stream` (CentOS Stream)
+- `chimeralinux` (Chimera Linux)
+- `crunchbang++` (Crunchbang++)
- `debian` (Debian)
- `deepin` (Deepin)
- `devuan` (Devuan)
- `dragonflybsd` (DragonFlyBSD)
+- `easyos` (EasyOS)
- `elementary` (elementary OS)
- `endeavouros` (EndeavourOS)
- `endless` (Endless OS)
@@ -142,6 +152,8 @@ edition of windows)
- `garuda` (Garuda Linux)
- `gentoo` (Gentoo)
- `ghostbsd` (GhostBSD)
+- `gnomeos` (GNOME OS)
+- `guix` (Guix)
- `haiku` (Haiku)
- `holoiso` (SteamOS HoloISO)
- `kali` (Kali)
@@ -155,39 +167,49 @@ edition of windows)
- `mxlinux` (MX Linux)
- `netboot` (netboot.xyz)
- `netbsd` (NetBSD)
+- `nitrux` (Nitrux)
- `nixos` (NixOS)
- `openbsd` (OpenBSD)
- `openindiana` (OpenIndiana)
- `opensuse` (openSUSE)
- `oraclelinux` (Oracle Linux)
+- `parrotsec` (Parrot Security)
- `peppermint` (PeppermintOS)
- `popos` (Pop!\_OS)
- `porteus` (Porteus)
+- `primtux` (Primtux)
+- `pureos` (PureOS)
- `reactos` (ReactOS)
- `rebornos` (RebornOS)
- `rockylinux` (Rocky Linux)
- `siduction` (Siduction)
- `slackware` (Slackware)
+- `slax` (Slax)
+- `slint` (Slint)
+- `slitaz` (SliTaz GNU/Linux)
- `solus` (Solus)
-- `spiral` (Spiral)
+- `sparkylinux` (SparkyLinux)
+- `spirallinux` (Spirallinux)
- `tails` (Tails)
- `tinycore` (Tiny Core Linux)
- `trisquel` (Trisquel)
- `truenas-core` (TrueNAS Core)
- `truenas-scale` (TrueNAS Scale)
+- `tuxedo-os` (Tuxedo OS)
- `vanillaos` (Vanilla OS)
- `void` (Void Linux)
- `vxlinux` (VX Linux)
-- `xerolinux` (XeroLinux)
- `zorin` (Zorin OS)
+### Custom Linux guests
+
Or you can download a Linux image and manually create a VM
configuration.
- Download a .iso image of a Linux distribution
- Create a VM configuration file; for example `debian-bullseye.conf`
-``` bash
+``` shell
guest_os="linux"
disk_img="debian-bullseye/disk.qcow2"
iso="debian-bullseye/firmware-11.0.0-amd64-DVD-1.iso"
@@ -195,7 +217,7 @@ iso="debian-bullseye/firmware-11.0.0-amd64-DVD-1.iso"
- Use `quickemu` to start the virtual machine:
-``` bash
+``` shell
quickemu --vm debian-bullseye.conf
```
@@ -206,18 +228,18 @@ quickemu --vm debian-bullseye.conf
- Install the SPICE WebDAV agent (`spice-webdavd`) in the guest to
enable file sharing.
-## macOS Guest
+## Creating macOS Guests 🍏
`quickget` automatically downloads a macOS recovery image and creates a
virtual machine configuration.
-``` bash
+``` shell
quickget macos catalina
quickemu --vm macos-catalina.conf
```
-macOS `high-sierra`, `mojave`, `catalina`, `big-sur`, `monterey` and
-`ventura` are supported.
+macOS `high-sierra`, `mojave`, `catalina`, `big-sur`, `monterey`,
+`ventura` and `sonoma` are supported.
- Use cursor keys and enter key to select the **macOS Base System**
- From **macOS Utilities**
@@ -227,8 +249,8 @@ macOS `high-sierra`, `mojave`, `catalina`, `big-sur`, `monterey` and
click **Erase**.
- Enter a `Name:` for the disk
- If you are installing macOS Mojave or later (Catalina, Big
- Sur, Monterey and Ventura), choose any of the APFS options
- as the filesystem. MacOS Extended may not work.
+ Sur, Monterey, Ventura and Sonoma), choose any of the APFS
+ options as the filesystem. MacOS Extended may not work.
- Click **Erase**.
- Click **Done**.
- Close Disk Utility
@@ -251,21 +273,22 @@ macOS `high-sierra`, `mojave`, `catalina`, `big-sur`, `monterey` and
when you delete lots of data inside macOS.
- To enable TRIM, open the Terminal application and type the
following command followed by pressing
- ``{=html}enter``{=html} to tell macos to use the TRIM
+ enter to tell macos to use the TRIM
command on the hard disk when files are deleted:
-``` bash
+``` shell
sudo trimforce enable
```
You will be prompted to enter your account's password to gain the
privilege needed. Once you've entered your password and pressed
-``{=html}enter``{=html} the command will request confirmation
+enter the command will request confirmation
in the form of two questions that require you to type
-``{=html}y``{=html} (for a "yes" response) followed by
-``{=html}enter``{=html} to confirm. If you press
-``{=html}enter``{=html} without first typing
-``{=html}y``{=html} the system will consider that a negative
+y (for a "yes" response) followed by
+enter to confirm.
+
+If you press enter without first typing
+y the system will consider that a negative
response as though you said "no":
``` plain
@@ -285,7 +308,7 @@ soon as the command completes.
The default macOS configuration looks like this:
-``` bash
+``` shell
guest_os="macos"
img="macos-catalina/RecoveryImage.img"
disk_img="macos-catalina/disk.qcow2"
@@ -311,6 +334,7 @@ There are some considerations when running macOS via Quickemu.
- Big Sur
- Monterey
- Ventura
+ - Sonoma
- `quickemu` will automatically download the required
[OpenCore](https://github.com/acidanthera/OpenCorePkg) bootloader
and OVMF firmware from [OSX-KVM](https://github.com/kholia/OSX-KVM).
@@ -352,25 +376,35 @@ If the wired ethernet device is not `en0`, then then go to *System
Preferences* -\> *Network*, delete all the network devices and apply the
changes. Next, open a terminal and run the following:
-``` bash
+``` shell
sudo rm /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist
```
Now reboot, and the App Store should work.
-## Windows 8, 10 & 11 Guests
+## Creating Windows guests 🪟
-`quickget` can download
-[Windows10](https://www.microsoft.com/software-download/windows10) and
-[Windows 11](https://www.microsoft.com/software-download/windows11)
+`quickget` can download [**Windows
+10**](https://www.microsoft.com/software-download/windows10) and
+[**Windows 11**](https://www.microsoft.com/software-download/windows11)
automatically and create an optimised virtual machine configuration.
This configuration also includes the [VirtIO drivers for
Windows](https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/).
-Windows 8.1 is also supported but doesn't feature any automated
+**Windows 8.1** is also supported but doesn't feature any automated
installation or driver optimisation.
-``` bash
+`quickget` can also download [Windows 10
+LTSC](https://www.microsoft.com/en-us/evalcenter/download-windows-10-enterprise)
+and Windows Server
+[2012-r2](https://www.microsoft.com/en-us/evalcenter/download-windows-server-2012-r2),
+[2016](https://www.microsoft.com/en-us/evalcenter/download-windows-server-2016),
+[2019](https://www.microsoft.com/en-us/evalcenter/download-windows-server-2019),
+and
+[2022](https://www.microsoft.com/en-us/evalcenter/download-windows-server-2022).
+No automated installation is supported for these releases.
+
+``` shell
quickget windows 11
quickemu --vm windows-11.conf
```
@@ -382,9 +416,19 @@ quickemu --vm windows-11.conf
- Username: `Quickemu`
- Password: `quickemu`
+### Regional versions
+
+By default `quickget` will download the *"English International"*
+release (*"English (United States)"* for server releases), but you can
+optionally specify one of the supported languages: For example:
+
+``` shell
+quickget windows 11 "Chinese (Traditional)"
+```
+
The default Windows 11 configuration looks like this:
-``` bash
+``` shell
guest_os="windows"
disk_img="windows-11/disk.qcow2"
iso="windows-11/windows-11.iso"
diff --git a/flake.lock b/flake.lock
new file mode 100644
index 0000000000..1a3f14ee28
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,40 @@
+{
+ "nodes": {
+ "flake-schemas": {
+ "locked": {
+ "lastModified": 1697467827,
+ "narHash": "sha256-j8SR19V1SRysyJwpOBF4TLuAvAjF5t+gMiboN4gYQDU=",
+ "rev": "764932025c817d4e500a8d2a4d8c565563923d29",
+ "revCount": 29,
+ "type": "tarball",
+ "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.1.2/018b3da8-4cc3-7fbb-8ff7-1588413c53e2/source.tar.gz"
+ },
+ "original": {
+ "type": "tarball",
+ "url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%2A.tar.gz"
+ }
+ },
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1712963716,
+ "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=",
+ "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176",
+ "revCount": 611350,
+ "type": "tarball",
+ "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz"
+ },
+ "original": {
+ "type": "tarball",
+ "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz"
+ }
+ },
+ "root": {
+ "inputs": {
+ "flake-schemas": "flake-schemas",
+ "nixpkgs": "nixpkgs"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000000..7bd0ea17f4
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,54 @@
+# This flake was initially generated by fh, the CLI for FlakeHub (version 0.1.10)
+{
+ # A helpful description of your flake
+ description = "Quickemu";
+
+ # Flake inputs
+ inputs = {
+ flake-schemas.url = "https://flakehub.com/f/DeterminateSystems/flake-schemas/*.tar.gz";
+
+ nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
+ };
+
+ # Flake outputs that other flakes can use
+ outputs = { self, flake-schemas, nixpkgs }:
+ let
+ # Helpers for producing system-specific outputs
+ supportedSystems = [ "x86_64-linux" "aarch64-linux" ];
+ forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
+ pkgs = import nixpkgs { inherit system; };
+ });
+ in {
+ # Schemas tell Nix about the structure of your flake's outputs
+ schemas = flake-schemas.schemas;
+
+ # Development environments
+ devShells = forEachSupportedSystem ({ pkgs }: {
+ default = pkgs.mkShell {
+ # Pinned packages available in the environment
+ packages = with pkgs; [
+ cdrtools
+ curl
+ lsb-release
+ git
+ gnugrep
+ gnused
+ jq
+ nixpkgs-fmt
+ procps
+ python3
+ qemu
+ socat
+ swtpm
+ unzip
+ usbutils
+ util-linux
+ wget
+ xdg-user-dirs
+ xorg.xrandr
+ zsync
+ ];
+ };
+ });
+ };
+}
diff --git a/macrecovery b/macrecovery
deleted file mode 100755
index e6799b2f94..0000000000
--- a/macrecovery
+++ /dev/null
@@ -1,518 +0,0 @@
-#!/usr/bin/env python3
-
-"""
-Gather recovery information for Macs.
-
-Copyright (c) 2019, vit9696
-"""
-
-from __future__ import print_function
-
-import argparse
-import binascii
-import datetime
-import hashlib
-import json
-import linecache
-import os
-import random
-import struct
-import sys
-import textwrap
-import time
-
-try:
- from urllib.request import Request,HTTPError,urlopen
- from urllib.parse import urlencode,urlparse
-except ImportError:
- from urllib2 import Request,HTTPError,urlopen
- from urllib import urlencode
- from urlparse import urlparse
-
-SELF_DIR = os.path.dirname(os.path.realpath(__file__))
-
-RECENT_MAC = 'Mac-7BA5B2D9E42DDD94'
-MLB_ZERO = '00000000000000000'
-MLB_VALID = 'C02749200YGJ803AX'
-MLB_PRODUCT = '00000000000J80300'
-
-TYPE_SID = 16
-TYPE_K = 64
-TYPE_FG = 64
-
-INFO_PRODUCT = 'AP'
-INFO_IMAGE_LINK = 'AU'
-INFO_IMAGE_HASH = 'AH'
-INFO_IMAGE_SESS = 'AT'
-INFO_SIGN_LINK = 'CU'
-INFO_SIGN_HASH = 'CH'
-INFO_SIGN_SESS = 'CT'
-INFO_REQURED = [ INFO_PRODUCT, INFO_IMAGE_LINK, INFO_IMAGE_HASH, INFO_IMAGE_SESS,
- INFO_SIGN_LINK, INFO_SIGN_HASH, INFO_SIGN_SESS ]
-
-def run_query(url, headers, post=None, raw=False):
- if post is not None:
- data = '\n'.join([entry + '=' + post[entry] for entry in post])
- if sys.version_info[0] >= 3:
- data = data.encode('utf-8')
- else:
- data = None
-
- req = Request(url=url, headers=headers, data=data)
- try:
- response = urlopen(req)
- if raw: return response
- return dict(response.info()), response.read()
- except HTTPError as e:
- print('ERROR: "{}" when connecting to {}'.format(e, url))
- sys.exit(1)
-
-def generate_id(type, id=None):
- valid_chars = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F']
- if id is None:
- return ''.join(random.choice(valid_chars) for i in range(type))
- return id
-
-def product_mlb(mlb):
- return '00000000000' + mlb[11] + mlb[12] + mlb[13] + mlb[14] + '00'
-
-def mlb_from_eeee(eeee):
- if len(eeee) != 4:
- print('ERROR: Invalid EEEE code length!')
- sys.exit(1)
-
- return '00000000000' + eeee + '00'
-
-def int_from_unsigned_bytes(bytes, byteorder):
- if byteorder == 'little': bytes = bytes[::-1]
- encoded = binascii.hexlify(bytes)
- return int(encoded, 16)
-
-# zhangyoufu https://gist.github.com/MCJack123/943eaca762730ca4b7ae460b731b68e7#gistcomment-3061078 2021-10-08
-Apple_EFI_ROM_public_key_1 = 0xC3E748CAD9CD384329E10E25A91E43E1A762FF529ADE578C935BDDF9B13F2179D4855E6FC89E9E29CA12517D17DFA1EDCE0BEBF0EA7B461FFE61D94E2BDF72C196F89ACD3536B644064014DAE25A15DB6BB0852ECBD120916318D1CCDEA3C84C92ED743FC176D0BACA920D3FCF3158AFF731F88CE0623182A8ED67E650515F75745909F07D415F55FC15A35654D118C55A462D37A3ACDA08612F3F3F6571761EFCCBCC299AEE99B3A4FD6212CCFFF5EF37A2C334E871191F7E1C31960E010A54E86FA3F62E6D6905E1CD57732410A3EB0C6B4DEFDABE9F59BF1618758C751CD56CEF851D1C0EAA1C558E37AC108DA9089863D20E2E7E4BF475EC66FE6B3EFDCF
-
-ChunkListHeader = struct.Struct('<4sIBBBxQQQ')
-assert ChunkListHeader.size == 0x24
-
-Chunk = struct.Struct(' 0
- assert chunk_offset == 0x24
- assert signature_offset == chunk_offset + Chunk.size * chunk_count
- for i in range(chunk_count):
- data = f.read(Chunk.size)
- hash_ctx.update(data)
- chunk_size, chunk_sha256 = Chunk.unpack(data)
- yield chunk_size, chunk_sha256
- digest = hash_ctx.digest()
- if signature_method == 1:
- data = f.read(256)
- assert len(data) == 256
- signature = int_from_unsigned_bytes(data, 'little')
- plaintext = 0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d0609608648016503040201050004200000000000000000000000000000000000000000000000000000000000000000 | int_from_unsigned_bytes(digest, 'big')
- assert pow(signature, 0x10001, Apple_EFI_ROM_public_key_1) == plaintext
- elif signature_method == 2:
- data = f.read(32)
- assert data == digest
- raise RuntimeError('Chunklist missing digital signature')
- else:
- raise NotImplementedError
- assert f.read(1) == b''
-
-def get_session(args):
- headers = {
- 'Host' : 'osrecovery.apple.com',
- 'Connection': 'close',
- 'User-Agent': 'InternetRecovery/1.0',
- }
-
- headers, output = run_query('http://osrecovery.apple.com/', headers)
-
- if args.verbose:
- print('Session headers:')
- for header in headers:
- print('{}: {}'.format(header, headers[header]))
-
- for header in headers:
- if header.lower() == 'set-cookie':
- cookies = headers[header].split('; ')
- for cookie in cookies:
- if cookie.startswith('session='):
- return cookie
-
- raise RuntimeError('No session in headers ' + str(headers))
-
-def get_image_info(session, bid, mlb=MLB_ZERO, diag = False, os_type = 'default', cid=None):
- headers = {
- 'Host' : 'osrecovery.apple.com',
- 'Connection' : 'close',
- 'User-Agent' : 'InternetRecovery/1.0',
- 'Cookie' : session,
- 'Content-Type': 'text/plain',
- }
-
- post = {
- 'cid': generate_id(TYPE_SID, cid),
- 'sn' : mlb,
- 'bid': bid,
- 'k' : generate_id(TYPE_K),
- 'fg' : generate_id(TYPE_FG)
- }
-
- if diag:
- url = 'http://osrecovery.apple.com/InstallationPayload/Diagnostics'
- else:
- url = 'http://osrecovery.apple.com/InstallationPayload/RecoveryImage'
- post['os'] = os_type
-
- headers, output = run_query(url, headers, post)
-
- if sys.version_info[0] >= 3:
- output = output.decode('utf-8')
-
- info = {}
- for line in output.split('\n'):
- try:
- key, value = line.split(': ')
- info[key] = value
- except:
- continue
-
- for k in INFO_REQURED:
- if k not in info:
- raise RuntimeError('Missing key ' + k)
-
- return info
-
-def save_image(url, sess, filename='', dir=''):
- purl = urlparse(url)
- headers = {
- 'Host' : purl.hostname,
- 'Connection': 'close',
- 'User-Agent': 'InternetRecovery/1.0',
- 'Cookie' : '='.join(['AssetToken', sess])
- }
-
- if filename == '':
- filename = os.path.basename(purl.path)
- if filename.find('/') >= 0 or filename == '':
- raise RuntimeError('Invalid save path ' + filename)
-
- print('Saving ' + url + ' to ' + filename + '...')
-
- with open (os.path.join(dir, filename), 'wb') as fh:
- response = run_query(url, headers, raw=True)
- size = 0
- while True:
- chunk = response.read(2**20)
- if not chunk:
- break
- fh.write(chunk)
- size += len(chunk)
- print('\r{} MBs downloaded...'.format(size / (2**20)), end='')
- sys.stdout.flush()
- print('\rDownload complete!')
-
- return os.path.join(dir, os.path.basename(filename))
-
-def verify_image(dmgpath, cnkpath):
- print('Verifying image with chunklist...')
-
- with open (dmgpath, 'rb') as dmgf:
- cnkcount = 0
- for cnksize, cnkhash in verify_chunklist(cnkpath):
- cnkcount += 1
- print('\rChunk {} ({} bytes)'.format(cnkcount, cnksize), end='')
- sys.stdout.flush()
- cnk = dmgf.read(cnksize)
- if len(cnk) != cnksize:
- raise RuntimeError('Invalid chunk {} size: expected {}, read {}'.format(cnkcount, cnksize, len(cnk)))
- if hashlib.sha256(cnk).digest() != cnkhash:
- raise RuntimeError('Invalid chunk {}: hash mismatch'.format(cnkcount))
- if dmgf.read(1) != b'':
- raise RuntimeError('Invalid image: larger than chunklist')
- print('\rImage verification complete!')
-
-def action_download(args):
- """
- Reference information for queries:
-
- Recovery latest:
- cid=3076CE439155BA14
- sn=...
- bid=Mac-E43C1C25D4880AD6
- k=4BE523BB136EB12B1758C70DB43BDD485EBCB6A457854245F9E9FF0587FB790C
- os=latest
- fg=B2E6AA07DB9088BE5BDB38DB2EA824FDDFB6C3AC5272203B32D89F9D8E3528DC
-
- Recovery default:
- cid=4A35CB95FF396EE7
- sn=...
- bid=Mac-E43C1C25D4880AD6
- k=0A385E6FFC3DDD990A8A1F4EC8B98C92CA5E19C9FF1DD26508C54936D8523121
- os=default
- fg=B2E6AA07DB9088BE5BDB38DB2EA824FDDFB6C3AC5272203B32D89F9D8E3528DC
-
- Diagnostics:
- cid=050C59B51497CEC8
- sn=...
- bid=Mac-E43C1C25D4880AD6
- k=37D42A8282FE04A12A7D946304F403E56A2155B9622B385F3EB959A2FBAB8C93
- fg=B2E6AA07DB9088BE5BDB38DB2EA824FDDFB6C3AC5272203B32D89F9D8E3528DC
- """
-
- session = get_session(args)
- info = get_image_info(session, bid=args.board_id, mlb=args.mlb,
- diag=args.diagnostics, os_type=args.os_type)
- if args.verbose:
- print(info)
- print('Downloading ' + info[INFO_PRODUCT] + '...')
- dmgname = '' if args.basename == '' else args.basename + '.dmg'
- dmgpath = save_image(info[INFO_IMAGE_LINK], info[INFO_IMAGE_SESS], dmgname, args.outdir)
- cnkname = '' if args.basename == '' else args.basename + '.chunklist'
- cnkpath = save_image(info[INFO_SIGN_LINK], info[INFO_SIGN_SESS], cnkname, args.outdir)
- try:
- verify_image(dmgpath, cnkpath)
- return 0
- except Exception as err:
- if isinstance(err, AssertionError) and str(err)=='':
- try:
- tb = sys.exc_info()[2]
- while tb.tb_next:
- tb = tb.tb_next
- err = linecache.getline(tb.tb_frame.f_code.co_filename, tb.tb_lineno, tb.tb_frame.f_globals).strip()
- except:
- err = "Invalid chunklist"
- print('\rImage verification failed. ({})'.format(err))
- return 1
-
-def action_selfcheck(args):
- """
- Sanity check server logic for recovery:
-
- if not valid(bid):
- return error()
- ppp = get_ppp(sn)
- if not valid(ppp):
- return latest_recovery(bid = bid) # Returns newest for bid.
- if valid(sn):
- if os == 'default':
- return default_recovery(sn = sn, ppp = ppp) # Returns oldest for sn.
- else:
- return latest_recovery(sn = sn, ppp = ppp) # Returns newest for sn.
- return default_recovery(ppp = ppp) # Returns oldest.
- """
-
- session = get_session(args)
- valid_default = get_image_info(session, bid=RECENT_MAC, mlb=MLB_VALID,
- diag=False, os_type='default')
- valid_latest = get_image_info(session, bid=RECENT_MAC, mlb=MLB_VALID,
- diag=False, os_type='latest')
- product_default = get_image_info(session, bid=RECENT_MAC, mlb=MLB_PRODUCT,
- diag=False, os_type='default')
- product_latest = get_image_info(session, bid=RECENT_MAC, mlb=MLB_PRODUCT,
- diag=False, os_type='latest')
- generic_default = get_image_info(session, bid=RECENT_MAC, mlb=MLB_ZERO,
- diag=False, os_type='default')
- generic_latest = get_image_info(session, bid=RECENT_MAC, mlb=MLB_ZERO,
- diag=False, os_type='latest')
-
- if args.verbose:
- print(valid_default)
- print(valid_latest)
- print(product_default)
- print(product_latest)
- print(generic_default)
- print(generic_latest)
-
- if valid_default[INFO_PRODUCT] == valid_latest[INFO_PRODUCT]:
- # Valid MLB must give different default and latest if this is not a too new product.
- print('ERROR: Cannot determine any previous product, got {}'.format(valid_default[INFO_PRODUCT]))
- return 1
-
- if product_default[INFO_PRODUCT] != product_latest[INFO_PRODUCT]:
- # Product-only MLB must give the same value for default and latest.
- print('ERROR: Latest and default do not match for product MLB, got {} and {}'.format(
- product_default[INFO_PRODUCT], product_latest[INFO_PRODUCT]))
- return 1
-
- if generic_default[INFO_PRODUCT] != generic_latest[INFO_PRODUCT]:
- # Zero MLB always give the same value for default and latest.
- print('ERROR: Generic MLB gives different product, got {} and {}'.format(
- generic_default[INFO_PRODUCT], generic_latest[INFO_PRODUCT]))
- return 1
-
- if valid_latest[INFO_PRODUCT] != generic_latest[INFO_PRODUCT]:
- # Valid MLB must always equal generic MLB.
- print('ERROR: Cannot determine unified latest product, got {} and {}'.format(
- valid_latest[INFO_PRODUCT], generic_latest[INFO_PRODUCT]))
- return 1
-
- if product_default[INFO_PRODUCT] != valid_default[INFO_PRODUCT]:
- # Product-only MLB can give the same value with valid default MLB.
- # This is not an error for all models, but for our chosen code it is.
- print('ERROR: Valid and product MLB give mismatch, got {} and {}'.format(
- product_default[INFO_PRODUCT], valid_default[INFO_PRODUCT]))
- return 1
-
- print('SUCCESS: Found no discrepancies with MLB validation algorithm!')
- return 0
-
-def action_verify(args):
- """
- Try to verify MLB serial number.
- """
- session = get_session(args)
- generic_latest = get_image_info(session, bid=RECENT_MAC, mlb=MLB_ZERO,
- diag=False, os_type='latest')
- uvalid_default = get_image_info(session, bid=args.board_id, mlb=args.mlb,
- diag=False, os_type='default')
- uvalid_latest = get_image_info(session, bid=args.board_id, mlb=args.mlb,
- diag=False, os_type='latest')
- uproduct_default = get_image_info(session, bid=args.board_id, mlb=product_mlb(args.mlb),
- diag=False, os_type='default')
-
- if args.verbose:
- print(generic_latest)
- print(uvalid_default)
- print(uvalid_latest)
- print(uproduct_default)
-
- # Verify our MLB number.
- if uvalid_default[INFO_PRODUCT] != uvalid_latest[INFO_PRODUCT]:
- if uvalid_latest[INFO_PRODUCT] == generic_latest[INFO_PRODUCT]:
- print('SUCCESS: {} MLB looks valid and supported!'.format(args.mlb))
- else:
- print('SUCCESS: {} MLB looks valid, but probably unsupported!'.format(args.mlb))
- return 0
-
- print('UNKNOWN: Run selfcheck, check your board-id, or try again later!')
-
- # Here we have matching default and latest products. This can only be true for very
- # new models. These models get either latest or special builds.
- if uvalid_default[INFO_PRODUCT] == generic_latest[INFO_PRODUCT]:
- print('UNKNOWN: {} MLB can be valid if very new!'.format(args.mlb))
- return 0
- if uproduct_default[INFO_PRODUCT] != uvalid_default[INFO_PRODUCT]:
- print('UNKNOWN: {} MLB looks invalid, other models use product {} instead of {}!'.format(
- args.mlb, uproduct_default[INFO_PRODUCT], uvalid_default[INFO_PRODUCT]))
- return 0
- print('UNKNOWN: {} MLB can be valid if very new and using special builds!'.format(args.mlb))
- return 0
-
-def action_guess(args):
- """
- Attempt to guess which model does this MLB belong.
- """
-
- mlb = args.mlb
- anon = mlb.startswith('000')
-
- with open(args.board_db, 'r') as fh:
- db = json.load(fh)
-
- supported = {}
-
- session = get_session(args)
-
- generic_latest = get_image_info(session, bid=RECENT_MAC, mlb=MLB_ZERO,
- diag=False, os_type='latest')
-
- for model in db:
- try:
- if anon:
- # For anonymous lookup check when given model does not match latest.
- model_latest = get_image_info(session, bid=model, mlb=MLB_ZERO,
- diag=False, os_type='latest')
-
- if model_latest[INFO_PRODUCT] != generic_latest[INFO_PRODUCT]:
- if db[model] == 'current':
- print('WARN: Skipped {} due to using latest product {} instead of {}'.format(
- model, model_latest[INFO_PRODUCT], generic_latest[INFO_PRODUCT]))
- continue
-
- user_default = get_image_info(session, bid=model, mlb=mlb,
- diag=False, os_type='default')
-
- if user_default[INFO_PRODUCT] != generic_latest[INFO_PRODUCT]:
- supported[model] = [db[model], user_default[INFO_PRODUCT], generic_latest[INFO_PRODUCT]]
- else:
- # For normal lookup check when given model has mismatching normal and latest.
- user_latest = get_image_info(session, bid=model, mlb=mlb,
- diag=False, os_type='latest')
-
- user_default = get_image_info(session, bid=model, mlb=mlb,
- diag=False, os_type='default')
-
- if user_latest[INFO_PRODUCT] != user_default[INFO_PRODUCT]:
- supported[model] = [db[model], user_default[INFO_PRODUCT], user_latest[INFO_PRODUCT]]
-
- except Exception as e:
- print('WARN: Failed to check {}, exception: {}'.format(model, str(e)))
-
- if len(supported) > 0:
- print('SUCCESS: MLB {} looks supported for:'.format(mlb))
- for model in supported:
- print('- {}, up to {}, default: {}, latest: {}'.format(model, supported[model][0],
- supported[model][1], supported[model][2]))
- return 0
-
- print('UNKNOWN: Failed to determine supported models for MLB {}!'.format(mlb))
-
-def main():
- parser = argparse.ArgumentParser(description='Gather recovery information for Macs')
- parser.add_argument('action', choices = ['download', 'selfcheck', 'verify', 'guess'],
- help='Action to perform: "download" - performs recovery downloading,'
- ' "selfcheck" checks whether MLB serial validation is possible, "verify" performs'
- ' MLB serial verification, "guess" tries to find suitable mac model for MLB.')
- parser.add_argument('-o', '--outdir', type=str, default=os.getcwd(),
- help='customise output directory for downloading, defaults to current directory')
- parser.add_argument('-n', '--basename', type=str, default='',
- help='customise base name for downloading, defaults to remote name')
- parser.add_argument('-b', '--board-id', type=str, default=RECENT_MAC,
- help='use specified board identifier for downloading, defaults to ' + RECENT_MAC)
- parser.add_argument('-m', '--mlb', type=str, default=MLB_ZERO,
- help='use specified logic board serial for downloading, defaults to ' + MLB_ZERO)
- parser.add_argument('-e', '--code', type=str, default='',
- help='generate product logic board serial with specified product EEEE code')
- parser.add_argument('-os', '--os-type', type=str, default='default', choices = ['default', 'latest'],
- help='use specified os type, defaults to default ' + MLB_ZERO)
- parser.add_argument('-diag', '--diagnostics', action='store_true', help='download diagnostics image')
- parser.add_argument('-v', '--verbose', action='store_true', help='print debug information')
- parser.add_argument('-db', '--board-db', type=str, default=os.path.join(SELF_DIR, 'boards.json'),
- help='use custom board list for checking, defaults to boards.json')
-
- args = parser.parse_args()
-
- if args.code != '':
- args.mlb = mlb_from_eeee(args.code)
-
- if len(args.mlb) != 17:
- print('ERROR: Cannot use MLBs in non 17 character format!')
- sys.exit(1)
-
- if args.action == 'download':
- return action_download(args)
- elif args.action == 'selfcheck':
- return action_selfcheck(args)
- elif args.action == 'verify':
- return action_verify(args)
- elif args.action == 'guess':
- return action_guess(args)
- else:
- assert(False)
-
-if __name__ == '__main__':
- sys.exit(main())
diff --git a/megalinter-reports/empty b/megalinter-reports/empty
new file mode 100644
index 0000000000..8b13789179
--- /dev/null
+++ b/megalinter-reports/empty
@@ -0,0 +1 @@
+
diff --git a/quickemu b/quickemu
index ee519f7d39..4b85a4b6bc 100755
--- a/quickemu
+++ b/quickemu
@@ -250,12 +250,14 @@ function vm_boot() {
elif [ -e /etc/os-release ]; then
LSB_DESCRIPTION=$(grep PRETTY_NAME /etc/os-release | cut -d'"' -f2)
fi
+ # Strip quotes from LSB_DESCRIPTION
+ LSB_DESCRIPTION="$(echo "${LSB_DESCRIPTION}" | sed 's/"//g')"
echo "Quickemu ${VERSION} using ${QEMU} v${QEMU_VER_LONG}"
echo " - Host: ${LSB_DESCRIPTION} running ${KERNEL_NAME} ${KERNEL_VER} ${KERNEL_NODE}"
HOST_CPU_CORES=$(nproc)
- HOST_CPU_MODEL=$(lscpu | grep '^Model name:' | cut -d':' -f2 | sed 's/ //g')
+ HOST_CPU_MODEL=$(lscpu | grep '^Model name:' | cut -d':' -f2 | sed -e 's/^[[:space:]]*//')
HOST_CPU_SOCKETS=$(lscpu | grep -E 'Socket' | cut -d':' -f2 | sed 's/ //g')
HOST_CPU_VENDOR=$(lscpu | grep -E 'Vendor' | cut -d':' -f2 | sed 's/ //g')
@@ -288,6 +290,12 @@ function vm_boot() {
GUEST_CPU_CORES="${cpu_cores}"
fi
+ if [ "${guest_os}" == "macos" ] && [ "${GUEST_CPU_CORES}" -gt 10 ] || [ "${GUEST_CPU_CORES}" -eq 6 ] || [ "${GUEST_CPU_CORES}" -eq 7 ]; then
+ # macOS guests cannot boot with most core counts not powers of 2. This will fix the issue by rounding the core count down to a power of 2. Uses wc and factor from coreutils.
+ factorCPUCores=$(factor "${GUEST_CPU_CORES}")
+ GUEST_CPU_CORES=$(( 2 ** $(echo "${factorCPUCores#*:}" | grep -o '[0-9]' | wc -l) ))
+ fi
+
# Account for Hyperthreading/SMT.
if [ -e /sys/devices/system/cpu/smt/control ] && [ "${GUEST_CPU_CORES}" -ge 2 ]; then
HOST_CPU_SMT=$(cat /sys/devices/system/cpu/smt/control)
@@ -313,9 +321,8 @@ function vm_boot() {
local RAM_VM="2G"
if [ -z "${ram}" ]; then
local RAM_HOST=""
- RAM_HOST=$(free --mega -h | grep Mem | cut -d':' -f2 | cut -d'G' -f1 | sed 's/ //g')
- #Round up - https://github.com/wimpysworld/quickemu/issues/11
- RAM_HOST=$(printf '%.*f\n' 0 "${RAM_HOST}")
+ # Determine the number of gigabytes of RAM in the host by extracting the first numerical value from the output.
+ RAM_HOST=$(free --giga | tr ' ' '\n' | grep -m 1 [0-9])
if [ "${RAM_HOST}" -ge 128 ]; then
RAM_VM="32G"
elif [ "${RAM_HOST}" -ge 64 ]; then
@@ -330,7 +337,7 @@ function vm_boot() {
fi
echo ", ${RAM_VM} RAM"
- if [ "${guest_os}" == "macos" ] || [ "${guest_os}" == "windows" ]; then
+ if [ "${guest_os}" == "macos" ] || [ "${guest_os}" == "windows" ] || [ "${guest_os}" == "windows-server" ]; then
if [ "${RAM_VM//G/}" -lt 4 ]; then
echo "ERROR! You have insufficient RAM to run ${guest_os} in a VM"
exit 1
@@ -341,7 +348,7 @@ function vm_boot() {
boot=${boot,,}
guest_os=${guest_os,,}
- if [ "${guest_os}" == "macos" ] || [ "${guest_os}" == "windows" ]; then
+ if [ "${guest_os}" == "macos" ] || [ "${guest_os}" == "windows" ] || [ "${guest_os}" == "windows-server" ]; then
# Display MSRs alert if the guest is macOS or windows
ignore_msrs_alert
fi
@@ -472,7 +479,7 @@ function vm_boot() {
# Make any OS specific adjustments
case ${guest_os} in
- batocera|*bsd|freedos|haiku|linux|*solaris)
+ batocera|*bsd|freedos|haiku|linux*|*solaris)
CPU="-cpu host,kvm=on"
if [ "${HOST_CPU_VENDOR}" == "AuthenticAMD" ]; then
CPU="${CPU},topoext"
@@ -520,9 +527,9 @@ function vm_boot() {
# A CPU with SSE4.1 support is required for >= macOS Sierra
# A CPU with AVX2 support is required for >= macOS Ventura
case ${macos_release} in
- ventura)
+ ventura|sonoma)
if check_cpu_flag sse4_1 && check_cpu_flag avx2; then
- CPU="-cpu Haswell,kvm=on,vendor=GenuineIntel,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc,+avx2"
+ CPU="-cpu Broadwell-noTSX-IBRS,kvm=on,vendor=GenuineIntel,+sse,+sse4.1,+avx,+avx2,+hypervisor,+popcnt,+aes,+xsave,+xsavec,+xsaveopt,+xgetbv1,+bmi1,+bmi2,+smep,+fma,+movbe,+invtsc"
else
echo "ERROR! macOS ${macos_release} requires a CPU with SSE 4.1 and AVX2 support."
exit 1
@@ -542,7 +549,14 @@ function vm_boot() {
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}"
+ GUEST_TWEAKS="-global kvm-pit.lost_tick_policy=discard -global ICH9-LPC.disable_s3=1 -device isa-applesmc,osk=${OSK}"
+
+ # Disable High Precision Timer
+ if [ "${QEMU_VER_SHORT}" -ge 70 ]; then
+ MACHINE_TYPE+=",hpet=off"
+ else
+ GUEST_TWEAKS+=" -no-hpet"
+ fi
# Tune Qemu optimisations based on the macOS release, or fallback to lowest
# common supported options if none is specified.
@@ -557,12 +571,13 @@ function vm_boot() {
NET_DEVICE="vmxnet3"
USB_HOST_PASSTHROUGH_CONTROLLER="usb-ehci"
;;
- big-sur|monterey|ventura)
+ big-sur|monterey|ventura|sonoma)
BALLOON="-device virtio-balloon"
MAC_DISK_DEV="virtio-blk-pci"
NET_DEVICE="virtio-net"
USB_HOST_PASSTHROUGH_CONTROLLER="nec-usb-xhci"
GUEST_TWEAKS="${GUEST_TWEAKS} -global nec-usb-xhci.msi=off"
+ USB_CONTROLLER="xhci"
;;
*)
# Backwards compatibility if no macos_release is specified.
@@ -578,7 +593,7 @@ function vm_boot() {
disk_size="96G"
fi
;;
- windows)
+ windows|windows-server)
if [ "${QEMU_VER_SHORT}" -gt 60 ]; then
CPU="-cpu host,kvm=on,+hypervisor,+invtsc,l3-cache=on,migratable=no,hv_passthrough"
else
@@ -589,7 +604,14 @@ function vm_boot() {
fi
# 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
- GUEST_TWEAKS="-no-hpet -global kvm-pit.lost_tick_policy=discard -global ICH9-LPC.disable_s3=1"
+ GUEST_TWEAKS="-global kvm-pit.lost_tick_policy=discard -global ICH9-LPC.disable_s3=1"
+
+ # Disable High Precision Timer
+ if [ "${QEMU_VER_SHORT}" -ge 70 ]; then
+ MACHINE_TYPE+=",hpet=off"
+ else
+ GUEST_TWEAKS+=" -no-hpet"
+ fi
if [ -z "${disk_size}" ]; then
disk_size="64G"
@@ -720,7 +742,9 @@ function vm_boot() {
fi
# https://www.kraxel.org/blog/2019/09/display-devices-in-qemu/
- if [ "${guest_os}" == "linux" ]; then
+ if [ "${guest_os}" == "linux_old" ]; then
+ DISPLAY_DEVICE="vmware-svga"
+ elif [ "${guest_os}" == "linux" ]; then
case ${OUTPUT} in
none|spice|spice-app)
DISPLAY_DEVICE="virtio-gpu";;
@@ -731,7 +755,7 @@ function vm_boot() {
# qxl-vga supports seamless mouse and sane resolutions if only one scanout
# is used. Which is whay '-vga none' is added to the QEMU command line.
DISPLAY_DEVICE="qxl-vga"
- elif [ "${guest_os}" == "windows" ]; then
+ elif [ "${guest_os}" == "windows" ] || [ "${guest_os}" == "windows-server" ]; then
case ${OUTPUT} in
# virtio-gpu "works" with gtk but is limited to 1024x1024 and exhibits other issues.
# https://kevinlocke.name/bits/2021/12/10/windows-11-guest-virtio-libvirt/#video
@@ -770,7 +794,11 @@ function vm_boot() {
# Try and coerce the display resolution for Linux guests only.
if [ "${guest_os}" == "linux" ]; then
- VIDEO="${VIDEO},xres=${X_RES},yres=${Y_RES}"
+ if [ -n "${WIDTH}" ] && [ -n "${HEIGHT}" ]; then
+ VIDEO="${VIDEO},xres=${WIDTH},yres=${HEIGHT}"
+ else
+ VIDEO="${VIDEO},xres=${X_RES},yres=${Y_RES}"
+ fi
fi
# Allocate VRAM to VGA devices
@@ -896,7 +924,7 @@ function vm_boot() {
esac
fi
- if [ "${guest_os}" != "windows" ] && [ -n "${PUBLIC}" ]; then
+ if [ "${guest_os}" != "windows" ] || [ "${guest_os}" == "windows-server" ] && [ -n "${PUBLIC}" ]; then
echo -n " - 9P: On guest: "
if [ "${guest_os}" == "linux" ]; then
echo "sudo mount -t 9p -o trans=virtio,version=9p2000.L,msize=104857600 ${PUBLIC_TAG} ~/$(basename "${PUBLIC}")"
@@ -972,10 +1000,15 @@ function vm_boot() {
-device usb-redir,chardev=usbredirchardev3,id=usbredirdev3
-device pci-ohci,id=smartpass
-device usb-ccid
- -chardev spicevmc,id=ccid,name=smartcard
- -device ccid-card-passthru,chardev=ccid
)
+ if "${QEMU}" -chardev spicevmc,id=ccid,name= 2>&1 | grep -q smartcard; then
+ args+=(-chardev spicevmc,id=ccid,name=smartcard
+ -device ccid-card-passthru,chardev=ccid)
+ else
+ echo "WARNING! ${QEMU} was not compiled with support for smartcard devices"
+ fi
+
# setup usb-controller
[ -z "${USB_CONTROLLER}" ] && USB_CONTROLLER="$usb_controller"
if [ "${USB_CONTROLLER}" == "ehci" ]; then
@@ -1142,15 +1175,19 @@ function vm_boot() {
# shellcheck disable=SC2054,SC2206
args+=(-drive if=ide,index=0,media=disk,file="${disk_img}")
+ elif [ "${guest_os}" == "windows-server" ]; then
+ args+=(-device ide-hd,drive=SystemDisk
+ -drive id=SystemDisk,if=none,format=qcow2,file="${disk_img}" ${STATUS_QUO})
+
else
# shellcheck disable=SC2054,SC2206
args+=(-device virtio-blk-pci,drive=SystemDisk
- -drive id=SystemDisk,if=none,format=qcow2,file="${disk_img}" ${STATUS_QUO})
+ -drive id=SystemDisk,if=none,format=${disk_format:-qcow2},file="${disk_img}" ${STATUS_QUO})
fi
# https://wiki.qemu.org/Documentation/9psetup
# https://askubuntu.com/questions/772784/9p-libvirt-qemu-share-modes
- if [ "${guest_os}" != "windows" ] && [ -n "${PUBLIC}" ]; then
+ if [ "${guest_os}" != "windows" ] || [ "${guest_os}" == "windows-server" ] && [ -n "${PUBLIC}" ]; then
# shellcheck disable=SC2054
args+=(-fsdev local,id=fsdev0,path="${PUBLIC}",security_model=mapped-xattr
-device virtio-9p-pci,fsdev=fsdev0,mount_tag="${PUBLIC_TAG}")
@@ -1335,9 +1372,9 @@ EOF
function usage() {
echo
echo "Usage"
- echo " ${LAUNCHER} --vm ubuntu.conf"
+ echo " ${LAUNCHER} --vm ubuntu.conf [optional params]"
echo
- echo "You can also pass optional parameters"
+ echo "List of optional parameters:"
echo " --access : Enable remote spice access support. 'local' (default), 'remote', 'clientipaddress'"
echo " --braille : Enable braille support. Requires SDL."
echo " --delete-disk : Delete the disk image and EFI variables"
@@ -1354,6 +1391,8 @@ function usage() {
echo " --snapshot info : Show disk/snapshot info."
echo " --status-quo : Do not commit any changes to disk/snapshot."
echo " --viewer : Choose an alternative viewer. @Options: 'spicy' (default), 'remote-viewer', 'none'"
+ echo " --width : Set VM screen width. Does nothing without --height"
+ echo " --height : Set VM screen height. Does nothing without --width"
echo " --ssh-port : Set ssh-port manually"
echo " --spice-port : Set spice-port manually"
echo " --public-dir : Expose share directory. @Options: '' (default: xdg-user-dir PUBLICSHARE), '', 'none'"
@@ -1473,6 +1512,7 @@ function monitor_send_cmd {
boot="efi"
cpu_cores=""
disk_img=""
+disk_format=""
disk_size=""
display=""
extra_args=""
@@ -1491,6 +1531,8 @@ secureboot="off"
tpm="off"
usb_devices=()
viewer="spicy"
+width=""
+height=""
ssh_port=""
spice_port=""
public_dir=""
@@ -1533,6 +1575,8 @@ VMDIR=""
VMNAME=""
VMPATH=""
VIEWER=""
+WIDTH=""
+HEIGHT=""
SSH_PORT=""
SPICE_PORT=""
MONITOR=""
@@ -1554,7 +1598,7 @@ SOUND_CARD=""
# shellcheck disable=SC2155
readonly LAUNCHER=$(basename "${0}")
readonly DISK_MIN_SIZE=$((197632 * 8))
-readonly VERSION="4.9.1"
+readonly VERSION="4.9.3"
# TODO: Make this run the native architecture binary
QEMU=$(command -v qemu-system-x86_64)
@@ -1651,6 +1695,14 @@ else
VIEWER="${2}"
shift
shift;;
+ -width|--width)
+ WIDTH="${2}"
+ shift;
+ shift;;
+ -height|--height)
+ HEIGHT="${2}"
+ shift;
+ shift;;
-ssh-port|--ssh-port)
SSH_PORT="${2}"
shift;
@@ -1695,6 +1747,10 @@ else
KEYBOARD="${2}"
shift;
shift;;
+ -keyboard_layout|--keyboard_layout)
+ KEYBOARD_LAYOUT="${2}"
+ shift;
+ shift;;
-mouse|--mouse)
MOUSE="${2}"
shift;
@@ -1731,11 +1787,23 @@ if [ -n "${VM}" ] && [ -e "${VM}" ]; then
exit 1
fi
+ if [ -e "${disk_img}" ]; then
+ DiskChkMsg="$("$QEMU_IMG" check -q "${disk_img}" 2>&1)"
+ if [[ $DiskChkMsg ]]; then
+ echo; echo "ERROR! disk.qcow2 has problems. Try qemu-img check --help."
+ echo; echo "$DiskChkMsg" ; echo
+ exit 1
+ fi
+ fi
+
VMDIR=$(dirname "${disk_img}")
VMNAME=$(basename "${VM}" .conf)
VMPATH=$(realpath "$(dirname "${VM}")")
VM_MONITOR_SOCKETPATH="${VMDIR}/${VMNAME}-monitor.socket"
VM_SERIAL_SOCKETPATH="${VMDIR}/${VMNAME}-serial.socket"
+ if [ ! -f "${disk_img}" ]; then
+ cd "${VMPATH}"
+ fi
# Backwards compatibility for ${driver_iso}
if [ -n "${driver_iso}" ] && [ -z "${fixed_iso}" ]; then
@@ -1747,6 +1815,11 @@ if [ -n "${VM}" ] && [ -e "${VM}" ]; then
disk_size="${disk}"
fi
+ # Set the default disk_format if not provided by user
+ if [ -z "${disk_format}" ]; then
+ disk_format=$(${QEMU_IMG} info "${disk_img}" | grep 'file format' | cut -d ':' -f 2 | tr -cd '[:graph:]')
+ fi
+
if [ -n "${display}" ]; then
OUTPUT="${display}"
fi
@@ -1767,6 +1840,11 @@ if [ -n "${VM}" ] && [ -e "${VM}" ]; then
fi
viewer_param_check
+ if [ -z "${WIDTH}" ] || [ -z "${HEIGHT}" ] ; then
+ WIDTH="${width}"
+ HEIGHT="${height}"
+ fi
+
# Set the default 3D acceleration.
if [ -z "${gl}" ]; then
gl="on"
@@ -1887,12 +1965,18 @@ if [ ${VM_UP} -eq 0 ]; then
sleep 3.5
monitor_send_cmd "sendkey ret"
fi
+ if [ -n "${iso}" ] && [ "${guest_os}" == "windows-server" ]; then
+ sleep 7
+ monitor_send_cmd "sendkey ret"
+ fi
start_viewer
else
parse_ports_from_file
start_viewer
fi
-[ -n "${MONITOR_CMD}" ] && monitor_send_cmd "${MONITOR_CMD}"
+if [ -n "${MONITOR_CMD}" ]; then
+ monitor_send_cmd "${MONITOR_CMD}"
+fi
# vim:tabstop=2:shiftwidth=2:expandtab
diff --git a/quickget b/quickget
index 4ea03d1fb8..6c5c0c8016 100755
--- a/quickget
+++ b/quickget
@@ -3,13 +3,15 @@ export LC_ALL=C
# Here the quick 'n dirty guide to adding a new OS to quickget
#
-# 1. Update os_support() - add new OS, all lowercase
-# 2. Update pretty_name() - add a pretty name for new OS *only if the catch all is not suitable*
-# 3. Update os_homepages() - add a homepage for new OS
-# 4. Create a releases_newos() generator (required) outputs the current supported release versions
-# 5. Create a editions_newos() generator (optional) outputs the editions if new OS has multiple flavours/editions
-# 6. Update make_vm_config() - add any *required* new OS tweaks
-# 7. Create a get_newos() function - that does something like this:
+# 1. Update os_support() - add new OS, all lowercase
+# 2. Update os_info() - Fill all posible fields for new OS (leave empty if no login, but | must stay same)
+# Here is whats should be there...
+# ) INFO="||||";;
+# 4. Create a releases_newos() generator (required) outputs the current supported release versions (from newest)
+# 5. Create a editions_newos() generator (optional) outputs the editions if new OS has multiple flavours/editions
+# 6. Update make_vm_config() - add any *required* new OS tweaks
+# 7. Create a get_newos() function - that does something like this: (Look at other OS)
+# For cutting first field with hash you can use function `cut_1` instead of `cut -d' ' -f1``
#
#function get_newos() {
# local EDITION="${1:-}"
@@ -17,189 +19,472 @@ export LC_ALL=C
# local ISO="newos-${RELEASE}-${EDITION}-amd64.iso"
# local URL="https://www.newos.org/download/${RELEASE}/${EDITION}"
#
-# HASH=$(wget -q -O- "${URL}/SHA512SUMS" | grep "${ISO}" | cut -d' ' -f1)
+# HASH=$(web_pipe "${URL}/SHA512SUMS" | grep "${ISO}" | cut_1)
# echo "${URL}/${ISO} ${HASH}"
#}
function cleanup() {
- if [ -n "$(jobs -p)" ]; then
- kill "$(jobs -p)"
- fi
+ if [ -n "$(jobs -p)" ]; then
+ kill "$(jobs -p)"
+ fi
}
-if [ "${1}" == '--test-iso-url' ] || [ "${1}" == '-t' ]; then
- test_iso_url="on"
- if [ -n "$4" ]; then
- set -- "$2" "$3" "$4"
- elif [ -n "$3" ]; then
- set -- "$2" "$3"
- else
- set -- "$2"
+# Get string before first whitespace (HASH)
+function cut_1() {
+ cut -d' ' -f1
+}
+
+{
+ {
+ {
+ { ### UGGLY BUUGS TO SEE reviewdog barking
+
+
+os_info() {
+ local SIMPLE_NAME=""
+ local INFO=""
+ SIMPLE_NAME="${1}"
+ case ${SIMPLE_NAME} in
+ #name) INFO="PrettyName|BasedOf|Credentials|Homepage|Info";;
+ alma) INFO="Alma Linux|Fedora,RedHat||https://almalinux.org/|Community owned and governed, forever-free enterprise Linux distribution, focused on long-term stability, providing a robust production-grade platform. AlmaLinux OS is binary compatible with RHEL®.";;
+ alpine) INFO="Alpine Linux|Independent||https://alpinelinux.org/|Security-oriented, lightweight Linux distribution based on musl libc and busybox.";;
+ android) INFO="Android x86|Independent||https://www.android-x86.org/|Port Android Open Source Project to x86 platform.";;
+ antix) INFO="Antix|Debian||https://antixlinux.com/|Fast, lightweight and easy to install systemd-free linux live CD distribution based on Debian Stable for Intel-AMD x86 compatible systems.";;
+ archcraft) INFO="Archcraft|Arch||https://archcraft.io/|Yet another minimal Linux distribution, based on Arch Linux.";;
+ archlinux) INFO="Arch Linux|Independent||https://archlinux.org/|Lightweight and flexible Linux® distribution that tries to Keep It Simple.";;
+ arcolinux) INFO="Arco Linux|Arch||https://arcolinux.com/|Is all about becoming an expert in linux.";;
+ artixlinux) INFO="Artix Linux|Arch||https://artixlinux.org/|The Art of Linux. Simple. Fast. Systemd-free.";;
+ athenaos) INFO="Athena OS|Arch||https://athenaos.org/|Offer a different experience than the most used pentesting distributions by providing only tools that fit with the user needs and improving the access to hacking resources and learning materials.";;
+ batocera) INFO="Batocera|Independent||https://batocera.org/|Retro-gaming distribution with the aim of turning any computer/nano computer into a gaming console during a game or permanently.";;
+ bazzite) INFO="bazzite|Fedora,SteamOS||https://github.com/ublue-os/bazzite/|Container native gaming and a ready-to-game SteamOS like.";;
+ biglinux) INFO="Big Linux|unknown||https://www.biglinux.com.br/|Is the right choice if you want to have an easy and enriching experience with Linux. It has been perfected over more than 19 years, following our motto: 'In search of the perfect system'.";;
+ blendos) INFO="BlendOS|Arch||https://blendos.co/|A seamless blend of all Linux distributions. Allows you to have an immutable, atomic and declarative Arch Linux system, with application support from several Linux distributions & Android.";;
+ bodhi) INFO="Bodhi|Debian,Ubuntu||https://www.bodhilinux.com/|Lightweight distribution featuring the fast & fully customizable Moksha Desktop.";;
+ bunsenlabs) INFO="Bunsenlab|Debian||https://www.bunsenlabs.org/|Light-weight and easily customizable Openbox desktop. The project is a community continuation of CrunchBang Linux.";;
+ cachyos) INFO="CachyOS|Arch||https://cachyos.org/|Designed to deliver lightning-fast speeds and stability, ensuring a smooth and enjoyable computing experience every time you use it.";;
+ centos-stream) INFO="CentOS Stream|Fedora,RedHat||https://www.centos.org/centos-stream/|Continuously delivered distro that tracks just ahead of Red Hat Enterprise Linux (RHEL) development, positioned as a midstream between Fedora Linux and RHEL.";;
+ chimeralinux) INFO="Chimera Linux|Independent|anon:chimera root:chimera|https://chimera-linux.org/|Modern, general-purpose non-GNU Linux distribution.";;
+ crunchbang++) INFO="#!++|Debian||https://www.crunchbangplusplus.org/|The classic minimal crunchbang feel, now with debian 12 bookworm.";;
+ debian) INFO="Debian|Independent||https://www.debian.org/|Complete Free Operating System with perfect level of ease of use and stability.";;
+ deepin) INFO="Deepin|Debian||https://www.deepin.org/|Beautiful UI design, intimate human-computer interaction, and friendly community environment make you feel at home.";;
+ devuan) INFO="Devuan|Debian||https://www.devuan.org/|Fork of Debian without systemd that allows users to reclaim control over their system by avoiding unnecessary entanglements and ensuring Init Freedom.";;
+ dragonflybsd) INFO="DragonFlyBSD|FreeBSD||https://www.dragonflybsd.org/|Provides an opportunity for the BSD base to grow in an entirely different direction from the one taken in the FreeBSD, NetBSD, and OpenBSD series.";;
+ easyos) INFO="EasyOS|Independent||https://easyos.org/|Experimental distribution designed from scratch to support containers.";;
+ edubuntu) INFO="Edubuntu|Ubuntu||https://www.edubuntu.org/|Stable, secure and privacy concious option for schools.";;
+ elementary) INFO="elementary OS|Debian,Ubuntu||https://elementary.io/|Thoughtful, capable, and ethical replacement for Windows and macOS.";;
+ endeavouros) INFO="EndeavourOS|Arch||https://endeavouros.com/|Provides an Arch experience without the hassle of installing it manually for both x86_64 and ARM systems.";;
+ endless) INFO="Endless OS|Debian||https://www.endlessos.org/os|Completely Free, User-Friendly Operating System Packed with Educational Tools, Games, and More.";;
+ fedora) INFO="Fedora|Independent||https://www.fedoraproject.org/|Innovative platform for hardware, clouds, and containers, built with love by you.";;
+ freebsd) INFO="FreeBSD|Independent||https://www.freebsd.org/|Operating system used to power modern servers, desktops, and embedded platforms.";;
+ freedos) INFO="FreeDOS|Independent||https://freedos.org/|DOS-compatible operating system that you can use to play classic DOS games, run legacy business software, or develop embedded systems.";;
+ garuda) INFO="Garuda Linux|Arch||https://garudalinux.org/|Feature rich and easy to use Linux distribution.";;
+ gentoo) INFO="Gentoo|Independent||https://www.gentoo.org/|Highly flexible, source-based Linux distribution.";;
+ ghostbsd) INFO="GhostBSD|FreeBSD||https://www.ghostbsd.org/|Simple, elegant desktop BSD Operating System.";;
+ guix) INFO="Guix|Independent||https://guix.gnu.org/|Distribution of the GNU operating system developed by the GNU Project—which respects the freedom of computer users.";;
+ haiku) INFO="Haiku|Independent||https://www.haiku-os.org/|Specifically targets personal computing. Inspired by the BeOS, Haiku is fast, simple to use, easy to learn and yet very powerful.";;
+ holoiso) INFO="SteamOS HoloISO|Arch,SteamOS||https://github.com/HoloISO/holoiso|Bring the Steam Decks SteamOS Holo redistribution and provide a close-to-official SteamOS experience.";;
+ kali) INFO="Kali|Debian||https://www.kali.org/|The most advanced Penetration Testing Distribution.";;
+ kdeneon) INFO="KDE Neon|Debian,Ubuntu||https://neon.kde.org/|Latest and greatest of KDE community software packaged on a rock-solid base.";;
+ kolibrios) INFO="KolibriOS|Independent||http://kolibrios.org/en/|Tiny yet incredibly powerful and fast operating system.";;
+ kubuntu) INFO="Kubuntu|Ubuntu||https://kubuntu.org/|Free, complete, and open-source alternative to Microsoft Windows and Mac OS X which contains everything you need to work, play, or share.";;
+ linuxlite) INFO="Linux Lite|Debian,Ubuntu||https://www.linuxliteos.com/|Your first simple, fast and free stop in the world of Linux.";;
+ linuxmint) INFO="Linux Mint|Debian,Ubuntu||https://linuxmint.com/|Designed to work out of the box and comes fully equipped with the apps most people need.";;
+ lmde) INFO="Linux Mint Debian Edition|Debian||https://www.linuxmint.com/download_lmde.php|Aims to be as similar as possible to Linux Mint, but without using Ubuntu. The package base is provided by Debian instead.";;
+ lubuntu) INFO="Lubuntu|Ubuntu||https://lubuntu.me/|Complete Operating System that ships the essential apps and services for daily use: office applications, PDF reader, image editor, music and video players, etc. Using lightwave lxde/lxqt.";;
+ mageia) INFO="Mageia|Independent||https://www.mageia.org/|Stable, secure operating system for desktop & server.";;
+ manjaro) INFO="Manjaro|Arch||https://manjaro.org/|Versatile, free, and open-source Linux operating system designed with a strong focus on safeguarding user privacy and offering extensive control over hardware.";;
+ mxlinux) INFO="MX Linux|Debian,Antix||https://mxlinux.org/|Designed to combine elegant and efficient desktops with high stability and solid performance.";;
+ netboot) INFO="netboot.xyz|iPXE||https://netboot.xyz/|Your favorite operating systems in one place.";;
+ netbsd) INFO="NetBSD|Independent||https://www.netbsd.org/|Free, fast, secure, and highly portable Unix-like Open Source operating system. It is available for a wide range of platforms, from large-scale servers and powerful desktop systems to handheld and embedded devices.";;
+ nitrux) INFO="Nitrux|Debian||https://nxos.org/|Powered by Debian, KDE Plasma and Frameworks, and AppImages.";;
+ nixos) INFO="NixOS|Independent||https://nixos.org/|Linux distribution based on Nix package manager, tool that takes a unique approach to package management and system configuration.";;
+ nwgiso) INFO="nwg-shell|Arch|nwg:nwg|https://nwg-piotr.github.io/nwg-shell/|Arch Linux ISO with nwg-shell for sway and Hyprland";;
+ macos) INFO="macOS|proprietary||https://www.apple.com/macos/|Work and play on your Mac are even more powerful. Elevate your presence on video calls. Access information in all-new ways. Boost gaming performance. And discover even more ways to personalize your Mac.";;
+ openbsd) INFO="OpenBSD|Independent||https://www.openbsd.org/|FREE, multi-platform 4.4BSD-based UNIX-like operating system. Our efforts emphasize portability, standardization, correctness, proactive security and integrated cryptography.";;
+ openindiana) INFO="OpenIndiana|Solaris,OpenSolaris||https://www.openindiana.org/|Community supported illumos-based operating system.";;
+ opensuse) INFO="openSUSE|Independent||https://www.opensuse.org/|The makers choice for sysadmins, developers and desktop users.";;
+ oraclelinux) INFO="Oracle Linux|RedHat||https://www.oracle.com/linux/|Linux with everything required to deploy, optimize, and manage applications on-premises, in the cloud, and at the edge.";;
+ parrotsec) INFO="Parrot Security|Debian|parrot:parrot|https://www.parrotsec.org/|Provides a huge arsenal of tools, utilities and libraries that IT and security professionals can use to test and assess the security of their assets in a reliable, compliant and reproducible way.";;
+ peppermint) INFO="PeppermintOS|Debian,Devuan||https://peppermintos.com/|Provides a user with the opportunity to build the system that best fits their needs. While at the same time providing a functioning OS with minimum hassle out of the box.";;
+ popos) INFO="Pop!_OS|Ubuntu||https://pop.system76.com/|Operating system for STEM and creative professionals who use their computer as a tool to discover and create.";;
+ porteus) INFO="Porteus|Slackware||http://www.porteus.org/|Complete linux operating system that is optimized to run from CD, USB flash drive, hard drive, or other bootable storage media.";;
+ pureos) INFO="PureOS|Debian||https://www.pureos.net/|A fully free/libre and open source GNU/Linux operating system, endorsed by the Free Software Foundation.";;
+ primtux) INFO="PrimTux|Ubuntu||https://primtux.fr/|Upgrade for obsolete equipment and benefiting the school or educational environment in the spirit of education.";;
+ reactos) INFO="ReactOS|Independent||https://reactos.org/|Imagine running your favorite Windows applications and drivers in an open-source environment you can trust.";;
+ rebornos) INFO="RebornOS|Arch||https://rebornos.org/|Aiming to make Arch Linux as user friendly as possible by providing interface solutions to things you normally have to do in a terminal.";;
+ rockylinux) INFO="Rocky Linux|RedHat||https://rockylinux.org/|Open-source enterprise operating system designed to be 100% bug-for-bug compatible with Red Hat Enterprise Linux®.";;
+ siduction) INFO="Siduction|Debian||https://siduction.org/|Operating system based on the Linux kernel and the GNU project. In addition, there are applications and libraries from Debian.";;
+ slackware) INFO="Slackware|Independent||http://www.slackware.com/|Advanced Linux operating system, designed with the twin goals of ease of use and stability as top priorities.";;
+ slax) INFO="Slax|Debian Slackware||https://www.slax.org/|Compact, fast, and modern Linux operating system that combines sleek design with modular approach. With the ability to run directly from a USB flash drive without the need for installation, Slax is truly portable and fits easily in your pocket.";;
+ slint) INFO="Slint|Slackware||https://slint.fr/|Slint is an easy-to-use, versatile, blind-friendly Linux distribution for 64-bit computers. Slint is based on Slackware and borrows tools from Salix. Maintainer: Didier Spaier.";;
+ slitaz) INFO="SliTaz|Independent||https://www.slitaz.org/en/|Simple, fast and low resource Linux OS for servers & desktops.";;
+ solus) INFO="Solus|Independent||https://getsol.us/|Designed for home computing. Every tweak enables us to deliver a cohesive computing experience.";;
+ sparkylinux) INFO="SparkyLinux|Debian||https://sparkylinux.org/|Fast, lightweight and fully customizable operating system which offers several versions for different use cases.";;
+ spirallinux) INFO="Spiral Linux|Debian||https://spirallinux.github.io/|Selection of Linux spins built from Debian GNU/Linux, with a focus on simplicity and out-of-the-box usability across all the major desktop environments.";;
+ tails) INFO="Tails|Debian||https://tails.net/|Portable operating system that protects against surveillance and censorship.";;
+ tinycore) INFO="Tiny Core Linux|Independent||http://www.tinycorelinux.net/|Highly modular based system with community build extensions.";;
+ trisquel) INFO="Trisquel|Debian,Ubuntu||https://trisquel.info/|Fully free operating system for home users, small enterprises and educational centers.";;
+ truenas-core) INFO="TrueNAS Core|FreeBSD||https://www.truenas.com/truenas-core/|World’s most popular storage OS because it gives you the power to build your own professional-grade storage system to use in a variety of data-intensive applications without any software costs.";;
+ truenas-scale) INFO="TrueNAS Scale|Debian||https://www.truenas.com/truenas-scale/|Open Source Hyperconverged Infrastructure (HCI) solution. In addition to powerful scale-out storage capabilities, SCALE adds Linux Containers and VMs (KVM) so apps run closer to data.";;
+ ubuntu) INFO="Ubuntu|Debian||https://ubuntu.com/|Complete desktop Linux operating system, freely available with both community and professional support.";;
+ ubuntu-budgie) INFO="Ubuntu Budgie|Ubuntu||https://ubuntubudgie.org/|Community developed distribution, integrating the Budgie Desktop Environment with Ubuntu at its core.";;
+ ubuntucinnamon) INFO="Ubuntu Cinnamon|Ubuntu||https://ubuntucinnamon.org/|Community-driven, featuring Linux Mint’s Cinnamon Desktop with Ubuntu at the core, packed fast and full of features, here is the most traditionally modern desktop you will ever love.";;
+ ubuntukylin) INFO="Ubuntu Kylin|Ubuntu||https://ubuntukylin.com/|Universal desktop operating system for personal computers, laptops, and embedded devices. It is dedicated to bringing a smarter user experience to users all over the world.";;
+ ubuntu-mate) INFO="Ubuntu MATE|Ubuntu||https://ubuntu-mate.org/|Stable, easy-to-use operating system with a configurable desktop environment. It is ideal for those who want the most out of their computers and prefer a traditional desktop metaphor. Using Mate desktop.";;
+ ubuntu-server) INFO="Ubuntu Server|Ubuntu||https://ubuntu.com/server|Brings economic and technical scalability to your datacentre, public or private. Whether you want to deploy an OpenStack cloud, a Kubernetes cluster or a 50,000-node render farm, Ubuntu Server delivers the best value scale-out performance available.";;
+ ubuntustudio) INFO="Ubuntu Studio|Ubuntu||https://ubuntustudio.org/|Comes preinstalled with a selection of the most common free multimedia applications available, and is configured for best performance for various purposes: Audio, Graphics, Video, Photography and Publishing.";;
+ ubuntu-unity) INFO="Ubuntu Unity|Ubuntu||https://ubuntuunity.org/|Flavor of Ubuntu featuring the Unity7 desktop environment (the default desktop environment used by Ubuntu from 2010-2017).";;
+ vanillaos) INFO="Vanilla OS|Debian,Ubuntu||https://vanillaos.org/|Designed to be a reliable and productive operating system for your daily work.";;
+ void) INFO="Void Linux|Independent|anon:voidlinux|https://voidlinux.org/|General purpose operating system. Its package system allows you to quickly install, update and remove software; software is provided in binary packages or can be built directly from sources.";;
+ vxlinux) INFO="VX Linux|Void||https://vxlinux.org/|Pre-configured, secure systemd-free Plasma desktop with focus on convenience, performance and simplicity. Based on the excellent Void Linux.";;
+ whonix) INFO="Whonix|Debian||https://www.whonix.org/|Superior Internet Privacy with Whonix™ As handy as an app - delivering maximum anonymity and security.";;
+ windows) INFO="Windows|proprietary||https://www.microsoft.com/en-us/windows/|Whether you’re gaming, studying, running a business, or running a household, Windows helps you get it done.";;
+ windows-server) INFO="Windows Server|proprietary||https://www.microsoft.com/en-us/windows-server/|Platform for building an infrastructure of connected applications, networks, and web services.";;
+ xubuntu) INFO="Xubuntu|Ubuntu||https://xubuntu.org/|Elegant and easy to use operating system. Xubuntu comes with Xfce, which is a stable, light and configurable desktop environment.";;
+ zorin) INFO="Zorin OS|Ubuntu||https://zorin.com/os/|Alternative to Windows and macOS designed to make your computer faster, more powerful, secure, and privacy-respecting.";;
+ esac
+ echo "${INFO}"
+}
+
+function show_os_info() {
+ while getopts ":12345" opt; do
+ case $opt in
+ 1) os_info "${2}" | cut -d'|' -f1;;
+ 2) os_info "${2}" | cut -d'|' -f2;;
+ 3) os_info "${2}" | cut -d'|' -f3;;
+ 4) os_info "${2}" | cut -d'|' -f4;;
+ 5) os_info "${2}" | cut -d'|' -f5;;
+ *) echo "Wrong choice!" && exit 1;;
+ esac
+ done
+}
+
+function pretty_name() {
+ echo $(show_os_info -1 "${1}")
+}
+
+# Just in case quickget want use it
+function os_homepage(){
+ echo $(show_os_info -4 "${1}")
+}
+
+function error_specify_os() {
+ echo 'ERROR! You must specify an operating system.'
+ echo '- Supported Operating Systems:'
+ os_support | fold -s -w "$(tput cols)"
+ echo -e "\nTo see all possible arguments, use:\n quickget -h or quickget --help"
+ exit 1
+}
+
+os_supported() {
+ if [[ ! " $(os_support) " =~ " ${OS} " ]]; then
+ os_not_supported
fi
-elif [ "${1}" == '--show-iso-url' ] || [ "${1}" == '-s' ]; then
- show_iso_url="on"
- if [ -n "$4" ]; then
- set -- "$2" "$3" "$4"
- elif [ -n "$3" ]; then
- set -- "$2" "$3"
- else
- set -- "$2"
+}
+
+function error_specify_release() {
+ echo 'ERROR! You must specify a release.'
+ case ${OS} in
+ *ubuntu-server*)
+ echo -n ' - Releases: '
+ releases_ubuntu-server | sed -Ee 's/eol-\S+//g' # hide eol releases
+ ;;
+ *ubuntu*)
+ echo -n ' - Releases: '
+ releases_ubuntu | sed -Ee 's/eol-\S+//g' # hide eol releases
+ ;;
+ *windows*)
+ echo -n ' - Releases: '
+ "releases_${OS}"
+ echo -n ' - Languages: '
+ "languages_${OS}" && echo "${LANGS[@]}"
+ ;;
+ *)
+ echo -n ' - Releases: '
+ "releases_${OS}" | fold -s -w "$(tput cols)"
+ if [[ $(type -t "editions_${OS}") == function ]]; then
+ echo -n ' - Editions: '
+ "editions_${OS}" | fold -s -w "$(tput cols)"
+ fi
+ ;;
+ esac
+ exit 1
+}
+
+function error_specify_edition() {
+ echo -en "ERROR! You must specify an edition.\n - Editions: "
+ #TODO ERROR here
+ "editions_${OS}"
+ exit 1
+}
+
+#TODO: Not yet used!
+function error_specify_path() {
+ echo 'ERROR! You must specify path.'
+ error_specify_os
+ exit 1
+}
+
+function error_not_supported_os() {
+ echo -e "ERROR! ${OS} is not a supported OS.\n"
+ os_support | fold -s -w "$(tput cols)"
+ exit 1
+}
+
+function error_not_supported_release() {
+ if [[ ! " ${RELEASES[*]} " =~ " ${RELEASE} " ]]; then
+ echo -e "ERROR! ${DISPLAY_NAME} ${RELEASE} is not a supported release."
+ echo -n 'Supported releases: '
+ "releases_${OS}"
+ exit 1
fi
-elif [ "${1}" == '--open-distro-homepage' ] || [ "${1}" == '-o' ]; then
- open_distro_homepage="on"
- set -- "$2"
-fi
+}
-function pretty_name() {
- local SIMPLE_NAME=""
- local PRETTY_NAME=""
- SIMPLE_NAME="${1}"
- case ${SIMPLE_NAME} in
- alma) PRETTY_NAME="Alma Linux";;
- alpine) PRETTY_NAME="Alpine Linux";;
- android) PRETTY_NAME="Android x86";;
- archlinux) PRETTY_NAME="Arch Linux";;
- archcraft) PRETTY_NAME="Archcraft";;
- arcolinux) PRETTY_NAME="Arco Linux";;
- blendos) PRETTY_NAME="BlendOS";;
- cachyos) PRETTY_NAME="CachyOS";;
- centos-stream) PRETTY_NAME="CentOS Stream";;
- dragonflybsd) PRETTY_NAME="DragonFlyBSD";;
- easyos) PRETTY_NAME="EasyOS";;
- elementary) PRETTY_NAME="elementary OS";;
- endeavouros) PRETTY_NAME="EndeavourOS";;
- endless) PRETTY_NAME="Endless OS";;
- freebsd) PRETTY_NAME="FreeBSD";;
- freedos) PRETTY_NAME="FreeDOS";;
- garuda) PRETTY_NAME="Garuda Linux";;
- ghostbsd) PRETTY_NAME="GhostBSD";;
- holoiso) PRETTY_NAME="SteamOS HoloISO";;
- kdeneon) PRETTY_NAME="KDE Neon";;
- kolibrios) PRETTY_NAME="KolibriOS";;
- linuxlite) PRETTY_NAME="Linux Lite";;
- linuxmint) PRETTY_NAME="Linux Mint";;
- lmde) PRETTY_NAME="Linux Mint Debian Edition";;
- mageia) PRETTY_NAME="Mageia";;
- mxlinux) PRETTY_NAME="MX Linux";;
- netboot) PRETTY_NAME="netboot.xyz";;
- netbsd) PRETTY_NAME="NetBSD";;
- nixos) PRETTY_NAME="NixOS";;
- macos) PRETTY_NAME="macOS";;
- openbsd) PRETTY_NAME="OpenBSD";;
- openindiana) PRETTY_NAME="OpenIndiana";;
- opensuse) PRETTY_NAME="openSUSE";;
- oraclelinux) PRETTY_NAME="Oracle Linux";;
- peppermint) PRETTY_NAME="PeppermintOS";;
- popos) PRETTY_NAME="Pop!_OS";;
- reactos) PRETTY_NAME="ReactOS";;
- rebornos) PRETTY_NAME="RebornOS";;
- rockylinux) PRETTY_NAME="Rocky Linux";;
- tinycore) PRETTY_NAME="Tiny Core Linux";;
- truenas-core) PRETTY_NAME="TrueNAS Core";;
- truenas-scale) PRETTY_NAME="TrueNAS Scale";;
- ubuntu-budgie) PRETTY_NAME="Ubuntu Budgie";;
- ubuntucinnamon) PRETTY_NAME="Ubuntu Cinnamon";;
- ubuntukylin) PRETTY_NAME="Ubuntu Kylin";;
- ubuntu-mate) PRETTY_NAME="Ubuntu MATE";;
- ubuntu-server) PRETTY_NAME="Ubuntu Server";;
- ubuntustudio) PRETTY_NAME="Ubuntu Studio";;
- ubuntu-unity) PRETTY_NAME="Ubuntu Unity";;
- vanillaos) PRETTY_NAME="Vanilla OS";;
- void) PRETTY_NAME="Void Linux";;
- vxlinux) PRETTY_NAME="VX Linux";;
- xerolinux) PRETTY_NAME="XeroLinux";;
- zorin) PRETTY_NAME="Zorin OS";;
- *) PRETTY_NAME="${SIMPLE_NAME^}";;
- esac
- echo "${PRETTY_NAME}"
+function error_not_supported_edition() {
+ if [[ ! " ${EDITIONS[*]} " =~ " ${EDITION} " ]]; then
+ echo -e "ERROR! ${EDITION} is not a supported $(pretty_name "${OS}") edition\n"
+ echo -n ' - Editions: '
+ for EDITION in "${EDITIONS[@]}"; do
+ echo -n "${EDITION} "
+ done
+ echo ""
+ exit 1
+ fi
}
-function validate_release() {
- local DISPLAY_NAME=""
- local RELEASE_GENERATOR=""
- local RELEASES=""
+function error_not_supported_lang() {
+ echo -e "ERROR! ${LANG} is not a supported $(pretty_name "${OS}") language\n"
+ echo -n ' - Editions: '
+ for LANG in "${LANGS[@]}"; do
+ echo -n "${LANG} "
+ done
+ exit 1
+}
- DISPLAY_NAME="$(pretty_name "${OS}")"
- case ${OS} in
- *ubuntu-server*) RELEASE_GENERATOR="releases_ubuntu-server";;
- *ubuntu*) RELEASE_GENERATOR="releases_ubuntu";;
- *) RELEASE_GENERATOR="${1}";;
- esac
+handle_missing() {
+ # Handle odd missing Fedora combinations
+ if [[ $OS == fedora ]] ; then
+ if [[ ${RELEASE} = "33" && ${EDITION} = "i3" ]] || [[ ${RELEASE} = "34" && ${EDITION} = "Cinnamon" ]] || [[ "${RELEASE}" < "39" && ${EDITION} = "Onyx" ]]; then
+ echo "ERROR! Unsupported combination"
+ echo " Fedora ${RELEASE} ${EDITION} is not available, please choose another Release or Edition"
+ exit 1;
+ fi
+ fi
+ # Handle missing Manjaro Sway minimal
+ if [[ $OS == manjaro ]] ; then
+ if [[ ${RELEASE} == "sway" && ${EDITION} == "minimal" ]] ; then
+ echo "ERROR! Unsupported combination"
+ echo " Manjaro Sway does not have a minimal edition"
+ exit 1;
+ fi
+ fi
+}
+
+function validate_release() {
+ local DISPLAY_NAME=""
+ local RELEASE_GENERATOR=""
+ local RELEASES=""
- RELEASES=$(${RELEASE_GENERATOR})
- if [[ "${RELEASES}" != *"${RELEASE}"* ]]; then
- echo -e "ERROR! ${DISPLAY_NAME} ${RELEASE} is not a supported release.\n"
- echo -n "${RELEASES}"
- exit 1
- fi
+ DISPLAY_NAME="$(pretty_name "${OS}")"
+ case ${OS} in
+ *ubuntu-server*) RELEASE_GENERATOR="releases_ubuntu-server";;
+ *ubuntu*) RELEASE_GENERATOR="releases_ubuntu";;
+ *) RELEASE_GENERATOR="${1}";;
+ esac
+ RELEASES=$(${RELEASE_GENERATOR})
+ error_not_supported_release
}
function list_json() {
- # Reference: https://stackoverflow.com/a/67359273
- list_csv | jq -R 'split(",") as $h|reduce inputs as $in ([]; . += [$in|split(",")|. as $a|reduce range(0,length) as $i ({};.[$h[$i]]=$a[$i])])'
- exit 0
+ # Reference: https://stackoverflow.com/a/67359273
+ list_csv | jq -R 'split(",") as $h|reduce inputs as $in ([]; . += [$in|split(",")|. as $a|reduce range(0,length) as $i ({};.[$h[$i]]=$a[$i])])'
+ exit 0
}
function list_csv() {
- local DISPLAY_NAME
- local DL=""
- local DOWNLOADER
- local FUNC
- local OPTION
- local OS
- local PNG
- local RELEASE
- local SVG
- local HAS_ZSYNC=0
-
- # Check if zsync is available
- if command -v zsync &>/dev/null; then
- HAS_ZSYNC=1
- fi
-
- if command -v aria2c &>/dev/null; then
- DL="aria2c"
- elif command -v wget &>/dev/null; then
- DL="wget"
- fi
-
- echo "Display Name,OS,Release,Option,Downloader,PNG,SVG"
- for OS in $(os_support); do
- DISPLAY_NAME="$(pretty_name "${OS}")"
+ local DISPLAY_NAME
+ local DL=""
+ local DOWNLOADER
+ local FUNC
+ local OPTION
+ local OS
+ local PNG
+ local RELEASE
+ local SVG
+ local HAS_ZSYNC=0
+
+ # Check if zsync is available
+ if command -v zsync &>/dev/null; then
+ HAS_ZSYNC=1
+ fi
- case ${OS} in
- *ubuntu-server*) FUNC="ubuntu-server";;
- *ubuntu*) FUNC="ubuntu";;
- *) FUNC="${OS}";;
- esac
+ echo "Display Name,OS,Release,Option,Downloader,PNG,SVG"
+ for OS in $(os_support); do
+ DISPLAY_NAME="$(pretty_name "${OS}")"
+
+ case ${OS} in
+ *ubuntu-server*) FUNC="ubuntu-server";;
+ *ubuntu*) FUNC="ubuntu";;
+ *) FUNC="${OS}";;
+ esac
- PNG="https://quickemu-project.github.io/quickemu-icons/png/${FUNC}/${FUNC}-quickemu-white-pinkbg.png"
- SVG="https://quickemu-project.github.io/quickemu-icons/svg/${FUNC}/${FUNC}-quickemu-white-pinkbg.svg"
-
- for RELEASE in $("releases_${FUNC}" | sed -Ee 's/eol-\S+//g' ); do # hide eol releases
- if [ "${OS}" == "macos" ]; then
- DOWNLOADER="macrecovery"
- elif [[ "${OS}" == *"ubuntu"* ]] && [ "${RELEASE}" == "devel" ] && [ ${HAS_ZSYNC} -eq 1 ]; then
- DOWNLOADER="zsync"
- else
- DOWNLOADER="${DL}"
- fi
-
- # If the OS has an editions_() function, use it.
- if [[ $(type -t "editions_${OS}") == function ]]; then
- for OPTION in $(editions_"${OS}"); do
- echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}"
+ PNG="https://quickemu-project.github.io/quickemu-icons/png/${FUNC}/${FUNC}-quickemu-white-pinkbg.png"
+ SVG="https://quickemu-project.github.io/quickemu-icons/svg/${FUNC}/${FUNC}-quickemu-white-pinkbg.svg"
+
+ for RELEASE in $("releases_${FUNC}" | sed -Ee 's/eol-\S+//g' ); do # hide eol releases
+ if [[ "${OS}" == *"ubuntu"* ]] && [[ ${RELEASE} == *"daily"* ]] && [ ${HAS_ZSYNC} -eq 1 ]; then
+ DOWNLOADER="zsync"
+ else
+ DOWNLOADER="${DL}"
+ fi
+
+ # If the OS has an editions_() function, use it.
+ if [[ $(type -t "editions_${OS}") == function ]]; then
+ for OPTION in $(editions_"${OS}"); do
+ echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}"
+ done
+ elif [[ "${OS}" == "windows"* ]]; then
+ "languages_${OS}"
+ for OPTION in "${LANGS[@]}"; do
+ echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}"
+ done
+ else
+ echo "${DISPLAY_NAME},${OS},${RELEASE},,${DOWNLOADER},${PNG},${SVG}"
+ fi
+ done
+ done
+ exit 0
+}
+
+function list_supported() {
+ # output OS RELEASE EDITION (usefull for straight testing...)
+ local DL=""
+ local FUNC
+ local OPTION
+ local OS
+ for OS in $(os_support); do
+ case ${OS} in
+ *ubuntu-server*) FUNC="ubuntu-server";;
+ *ubuntu*) FUNC="ubuntu";;
+ *) FUNC="${OS}";;
+ esac
+ for RELEASE in $("releases_${FUNC}" | sed -Ee 's/eol-\S+//g' ); do # hide eol releases
+ # If the OS has an editions_() function, use it.
+ if [[ $(type -t "editions_${OS}") == function ]]; then
+ for OPTION in $(editions_"${OS}"); do
+ echo "${OS} ${RELEASE} ${OPTION}"
+ done
+ elif [[ "${OS}" == "windows"* ]]; then
+ "languages_${OS}"
+ for OPTION in "${LANGS[@]}"; do
+ echo "${OS} ${RELEASE} ${OPTION}"
+ done
+ else
+ echo "${OS} ${RELEASE}"
+ fi
+ done
+ done
+ exit 0
+}
+
+function list_isos() {
+ local showIsoUrl=on
+ local DIR="/dev/null"
+ local URL
+ local FUNC
+ local OPTION
+ local OS
+ for OS in $(os_support); do
+ case ${OS} in
+ *ubuntu-server*) FUNC="ubuntu-server";;
+ *ubuntu*) FUNC="ubuntu";;
+ *) FUNC="${OS}";;
+ esac
+ for RELEASE in $("releases_${FUNC}" | sed -Ee 's/eol-\S+//g' ); do # hide eol releases
+ if [[ $(type -t "editions_${OS}") == function ]]; then
+ for OPTION in $(editions_"${OS}"); do
+ validate_release releases_"${OS}"
+ get_"${OS}" "${OPTION}" | cut_1 || echo "ERROR! - ${OS} ${RELEASE} ${OPTION}"
+ done
+ elif [[ "${OS}" == "windows"* ]]; then
+ "languages_${OS}"
+ for OPTION in "${LANGS[@]}"; do
+ echo "skipped: ${OS} ${RELEASE} ${OPTION}"
+ #validate_release releases_${OS}
+ #get_${OS} ${OPTION} | cut_1
+ done
+ #TODO NEEDED?
+ elif [[ "${OS}" == "macos" ]]; then
+ validate_release releases_"${OS}"
+ get_macos || echo "ERROR! - ${OS} ${RELEASE} ${OPTION}"
+ elif [[ "${OS}" == *"ubuntu"* ]]; then
+ validate_release releases_ubuntu
+ get_ubuntu || echo "ERROR! - ${OS} ${RELEASE}"
+ elif [[ "${OS}" == *"ubuntu-server"* ]]; then
+ validate_release releases_ubuntu
+ get_ubuntu-server || echo "ERROR! - ${OS} ${RELEASE}"
+ else
+ validate_release releases_"${OS}"
+ get_"${OS}" "${RELEASE}" | cut_1 || echo "ERROR! - ${OS} ${RELEASE}"
+ fi
done
- elif [ "${OS}" == "windows" ]; then
- for OPTION in "${LANGS[@]}"; do
- echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}"
+ done
+ exit 0
+}
+
+function test_isos() {
+ local testIsoUrl=on
+ local DIR="/dev/null"
+ local FUNC
+ local OPTION
+ local OS
+
+ check_it() {
+ validate_release releases_"${OS}"
+ URL=$(get_"${OS}" "${OPTION}" | cut_1)
+ GOOD=$(timeout 3 wget -q --spider "${URL}" && echo 'OK' || echo 'ERROR!')
+ }
+
+ for OS in $(os_support); do
+ local GOOD=""
+
+ case "${OS}" in
+ *ubuntu-server*) FUNC="ubuntu-server";;
+ *ubuntu*) FUNC="ubuntu";;
+ *) FUNC="${OS}";;
+ esac
+
+ for RELEASE in $("releases_${FUNC}" | sed -Ee 's/eol-\S+//g' ); do # hide eol releases
+ if [[ $(type -t "editions_${OS}") == function ]]; then
+ for OPTION in $(editions_"${OS}"); do
+ check_it
+ done
+ elif [[ "${OS}" == "windows"* ]]; then
+ # skipping because of microsoft
+ "languages_${OS}"
+ for OPTION in "${LANGS[@]}"; do
+ GOOD='ERROR!'
+ done
+ elif [[ "${OS}" == *"ubuntu"* ]]; then
+ URL=$(get_"${OS}" )
+ GOOD=$(timeout 3 wget -q --spider "${URL}" && echo 'OK' || echo 'ERROR!')
+ elif [[ "${OS}" == *"ubuntu-server"* ]]; then
+ URL="$(get_ubuntu-server)"
+ GOOD=$(timeout 3 wget -q --spider "${URL}" && echo 'OK' || echo 'ERROR!')
+ else
+ validate_release releases_"${OS}"
+ URL=$(get_"${OS}" "${RELEASE}" | cut_1)
+ GOOD=$(timeout 3 wget -q --spider "${URL}" && echo 'OK' || echo 'ERROR!')
+ fi
+
+ if [[ "${GOOD}" == "OK" ]]; then
+ echo "OK - ${OS} ${RELEASE} ${OPTION} ${URL}"
+ else
+ echo "ERROR - ${OS} ${RELEASE} ${OPTION} ${URL}"
+ fi
done
- else
- echo "${DISPLAY_NAME},${OS},${RELEASE},,${DOWNLOADER},${PNG},${SVG}"
- fi
done
- done
- exit 0
+ exit 0
}
function os_support() {
@@ -210,12 +495,18 @@ function os_support() {
archlinux \
archcraft \
arcolinux \
+ artixlinux \
+ athenaos \
batocera \
+ bazzite \
+ biglinux \
blendos \
bodhi \
bunsenlabs \
cachyos \
centos-stream \
+ chimeralinux \
+ crunchbang++ \
debian \
deepin \
devuan \
@@ -231,6 +522,8 @@ function os_support() {
garuda \
gentoo \
ghostbsd \
+ gnomeos \
+ guix \
haiku \
holoiso \
kali \
@@ -245,6 +538,7 @@ function os_support() {
mxlinux \
netboot \
netbsd \
+ nitrux \
nixos \
lubuntu \
macos \
@@ -253,20 +547,28 @@ function os_support() {
opensuse \
oraclelinux \
peppermint \
+ parrotsec \
popos \
porteus \
+ primtux \
+ pureos \
reactos \
rebornos \
rockylinux \
siduction \
slackware \
+ slax \
+ slint \
+ slitaz \
solus \
- spiral \
+ sparkylinux \
+ spirallinux \
tails \
tinycore \
trisquel \
truenas-core \
truenas-scale \
+ tuxedo-os \
ubuntu \
ubuntu-budgie \
ubuntucinnamon \
@@ -279,101 +581,13 @@ function os_support() {
void \
vxlinux \
windows \
- xerolinux \
+ windows-server \
xubuntu \
zorin
}
-function os_homepages(){
- local SIMPLE_NAME=""
- local HOMEPAGE=""
- SIMPLE_NAME="${1}"
- case ${SIMPLE_NAME} in
- alma) HOMEPAGE="https://almalinux.org/";;
- alpine) HOMEPAGE="https://alpinelinux.org/";;
- android) HOMEPAGE="https://www.android-x86.org/";;
- antix) HOMEPAGE="https://antixlinux.com/";;
- archlinux) HOMEPAGE="https://archlinux.org/";;
- archcraft) HOMEPAGE="https://archcraft.io/";;
- arcolinux) HOMEPAGE="https://arcolinux.com/";;
- batocera) HOMEPAGE="https://batocera.org/";;
- blendos) HOMEPAGE="https://blendos.co/";;
- bodhi) HOMEPAGE="https://www.bodhilinux.com/";;
- bunsenlabs) HOMEPAGE="https://www.bunsenlabs.org/";;
- cachyos) HOMEPAGE="https://cachyos.org/";;
- centos-stream) HOMEPAGE="https://www.centos.org/centos-stream/";;
- debian) HOMEPAGE="https://www.debian.org/";;
- deepin) HOMEPAGE="https://www.deepin.org/";;
- devuan) HOMEPAGE="https://www.devuan.org/";;
- dragonflybsd) HOMEPAGE="https://www.dragonflybsd.org/";;
- easyos) HOMEPAGE="https://easyos.org/";;
- edubuntu) HOMEPAGE="https://www.edubuntu.org/";;
- elementary) HOMEPAGE="https://elementary.io/";;
- endeavouros) HOMEPAGE="https://endeavouros.com/";;
- endless) HOMEPAGE="https://www.endlessos.org/os";;
- fedora) HOMEPAGE="https://www.fedoraproject.org/";;
- freebsd) HOMEPAGE="https://www.freebsd.org/";;
- freedos) HOMEPAGE="https://freedos.org/";;
- garuda) HOMEPAGE="https://garudalinux.org/";;
- gentoo) HOMEPAGE="https://www.gentoo.org/";;
- ghostbsd) HOMEPAGE="https://www.ghostbsd.org/";;
- haiku) HOMEPAGE="https://www.haiku-os.org/";;
- holoiso) HOMEPAGE="https://github.com/HoloISO/holoiso";;
- kali) HOMEPAGE="https://www.kali.org/";;
- kdeneon) HOMEPAGE="https://neon.kde.org/";;
- kolibrios) HOMEPAGE="http://kolibrios.org/en/";;
- kubuntu) HOMEPAGE="https://kubuntu.org/";;
- linuxlite) HOMEPAGE="https://www.linuxliteos.com/";;
- linuxmint) HOMEPAGE="https://linuxmint.com/";;
- lmde) HOMEPAGE="https://www.linuxmint.com/download_lmde.php";;
- mageia) HOMEPAGE="https://www.mageia.org/";;
- manjaro) HOMEPAGE="https://manjaro.org/";;
- mxlinux) HOMEPAGE="https://mxlinux.org/";;
- netboot) HOMEPAGE="https://netboot.xyz/";;
- netbsd) HOMEPAGE="https://www.netbsd.org/";;
- nixos) HOMEPAGE="https://nixos.org/";;
- lubuntu) HOMEPAGE="https://lubuntu.me/";;
- macos) HOMEPAGE="https://www.apple.com/macos/";;
- openbsd) HOMEPAGE="https://www.openbsd.org/";;
- openindiana) HOMEPAGE="https://www.openindiana.org/";;
- opensuse) HOMEPAGE="https://www.opensuse.org/";;
- oraclelinux) HOMEPAGE="https://www.oracle.com/linux/";;
- peppermint) HOMEPAGE="https://peppermintos.com/";;
- popos) HOMEPAGE="https://pop.system76.com/";;
- porteus) HOMEPAGE="http://www.porteus.org/";;
- reactos) HOMEPAGE="https://reactos.org/";;
- rebornos) HOMEPAGE="https://rebornos.org/";;
- rockylinux) HOMEPAGE="https://rockylinux.org/";;
- siduction) HOMEPAGE="https://siduction.org/";;
- slackware) HOMEPAGE="http://www.slackware.com/";;
- solus) HOMEPAGE="https://getsol.us/";;
- spiral) HOMEPAGE="https://spirallinux.github.io/";;
- tails) HOMEPAGE="https://tails.net/";;
- tinycore) HOMEPAGE="http://www.tinycorelinux.net/";;
- trisquel) HOMEPAGE="https://trisquel.info/";;
- truenas-core) HOMEPAGE="https://www.truenas.com/truenas-core/";;
- truenas-scale) HOMEPAGE="https://www.truenas.com/truenas-scale/";;
- ubuntu) HOMEPAGE="https://ubuntu.com/";;
- ubuntu-budgie) HOMEPAGE="https://ubuntubudgie.org/";;
- ubuntucinnamon) HOMEPAGE="https://ubuntucinnamon.org/";;
- ubuntukylin) HOMEPAGE="https://ubuntukylin.com/";;
- ubuntu-mate) HOMEPAGE="https://ubuntu-mate.org/";;
- ubuntu-server) HOMEPAGE="https://ubuntu.com/server";;
- ubuntustudio) HOMEPAGE="https://ubuntustudio.org/";;
- ubuntu-unity) HOMEPAGE="https://ubuntuunity.org/";;
- vanillaos) HOMEPAGE="https://vanillaos.org/";;
- void) HOMEPAGE="https://voidlinux.org/";;
- vxlinux) HOMEPAGE="https://vxlinux.org/";;
- windows) HOMEPAGE="https://www.microsoft.com/en-us/windows/";;
- xerolinux) HOMEPAGE="https://xerolinux.xyz/";;
- xubuntu) HOMEPAGE="https://xubuntu.org/";;
- zorin) HOMEPAGE="https://zorin.com/os/";;
- esac
- echo "${HOMEPAGE}"
-}
-
function releases_alma() {
- echo 8 9
+ echo 9 8
}
function editions_alma() {
@@ -381,57 +595,75 @@ function editions_alma() {
}
function releases_alpine() {
- echo 3.12 3.13 3.14 3.15 3.16 3.17 3.18 latest
+ echo latest 3.19 3.18 3.17 3.16 3.15 3.14 3.13 3.12
}
function releases_android() {
- echo 7.1 8.1 9.0
+ echo 9.0 8.1 7.1
}
function editions_android() {
- echo x86 x86_64
+ echo x86_64 x86
}
function releases_antix() {
- echo 21 22 23
+ echo 23.1 23 22 21
}
function editions_antix() {
- echo net-sysv core-sysv base-sysv full-sysv net-runit core-runit base-runit full-runit
+ echo net-sysv core-sysv base-sysv full-sysv net-runit core-runit base-runit full-runit
}
-function releases_archlinux() {
+function releases_archcraft() {
echo latest
}
-function releases_archcraft() {
+function releases_archlinux() {
echo latest
}
function releases_arcolinux() {
- local RLIST
- RLIST=$(curl -s https://ant.seedhost.eu/arcolinux/iso/ | grep -o -E ">v[[:digit:]]{2}.[[:digit:]]{2}.[[:digit:]]{2}" | sed -e "s/>//" | tr '\r\n' ' ')
- echo ${RLIST}
+ echo $(web_pipe "https://mirror.accum.se/mirror/arcolinux.info/iso/" | grep -o -E ">v[[:digit:]]{2}.[[:digit:]]{2}.[[:digit:]]{2}" | sed -e "s/>//" | sort -r | head -n 5 | tr '\n' ' ')
}
function editions_arcolinux() {
echo large small
}
-function releases_blendos() {
+function releases_artixlinux() {
+ echo $(web_pipe "https://mirror1.artixlinux.org/iso/" | grep "artix-" | cut -d'"' -f2 | grep -v sig | cut -d'-' -f 4 | sort -ru | tail -1)
+}
+
+function editions_artixlinux() {
+ echo $(web_pipe "https://mirror1.artixlinux.org/iso/" | grep "artix-" | cut -d'"' -f2 | grep -v sig | cut -d'-' -f2-3 | sort -u | tr '\n' ' ')
+}
+
+function releases_athenaos() {
+ echo $(web_pipe "https://api.github.com/repos/Athena-OS/athena/releases" | grep 'download_url' | grep rolling | cut -d'/' -f8 | uniq | tr '\n' ' ')
+}
-# Pull the rss feed
-wget -q https://sourceforge.net/projects/blendos/rss?path=/ISOs/ -O- | grep -E -o 'https://.*blendOS\.iso.*/tmp/blendos-isos.rss
+function releases_batocera() {
+ echo $(web_pipe "https://mirrors.o2switch.fr/batocera/x86_64/stable/" | grep ^\ -f9|cut -d\/ -f1)
- local DEBOLD=$(wget -q https://cdimage.debian.org/cdimage/archive/ -O- |grep -e '>[1-9][0-9]\.'|grep -v 'live' | cut -d\> -f9|cut -d\/ -f1 )
+function releases_chimeralinux() {
+ echo latest
+}
+
+function editions_chimeralinux() {
+ echo base gnome
+}
- echo ${DEBOLD} ${DEBCURRENT}
+function releases_crunchbang++() {
+ echo 12 11 10 9 8
+}
+
+function releases_debian() {
+ local DEBOLD
+ DEBCURRENT=$(web_pipe "https://cdimage.debian.org/debian-cd/" | grep '\.[0-9]/' | cut -d'>' -f 9 | cut -d'/' -f 1)
+ DEBOLD=$(web_pipe "https://cdimage.debian.org/cdimage/archive/" | grep -e '>[1-9][0-9]\.' | grep -v 'live' | grep -v NEVER | cut -d'>' -f 9 | cut -d'/' -f 1 | tac)
+ echo -n "${DEBCURRENT} "
+ echo ${DEBOLD}
}
function editions_debian() {
@@ -470,81 +719,59 @@ function editions_debian() {
}
function releases_deepin() {
- echo 20 20.1 20.2 20.2.1 20.2.2 20.2.3 20.2.4 20.3 20.4 20.5 20.6 20.7
+ web_pipe "https://cdimage.deepin.com/releases/" | grep "href=" | cut -d'"' -f2 | grep -v "\.\." | grep -v nightly | grep -v preview | sed 's|/||g' | sort -r | tr '\n' ' '
}
function releases_devuan() {
- echo beowulf chimaera daedalus
+ echo daedalus chimaera beowulf
}
function releases_dragonflybsd() {
# If you remove "".bz2" from the end of the searched URL, you will get only the current release - currently 6.4.0
# We could add a variable so this behaviour is optional/switchable (maybe from option or env)
- DBSD_RELEASES=$(curl -sL http://mirror-master.dragonflybsd.org/iso-images/| grep -E -o '"dfly-x86_64-.*_REL.iso.bz2"' | grep -o -E '[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+' )
- echo $DBSD_RELEASES
+ DBSD_RELEASES=$(web_pipe "http://mirror-master.dragonflybsd.org/iso-images/" | grep -E -o '"dfly-x86_64-.*_REL.iso.bz2"' | grep -o -E '[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+' | tr '\n' ' ')
+ echo "$DBSD_RELEASES"
}
function releases_easyos() {
- #local RLIST
- #RLIST=$(curl -s https://distro.ibiblio.org/easyos/amd64/releases/kirkstone/2023/ | grep 'href="' | tail +2 | cut -d'/' -f1 | cut -d'"' -f6)
- #RLIST=$(wget -q -O- 'https://distro.ibiblio.org/easyos/amd64/releases/kirkstone/2023/' | grep 'href="' | tail +2 | cut -d'/' -f1 | cut -d'"' -f6)
- #echo ${RLIST}
+ #local Y2023=""
+ #local Y2024=""
+ #Y2024=$(web_pipe https://distro.ibiblio.org/easyos/amd64/releases/kirkstone/2024/ | grep "tr class" | tail +2 | cut -d'"' -f6 | cut -d'/' -f1 | sort -r)
+ #Y2023=$(web_pipe https://distro.ibiblio.org/easyos/amd64/releases/kirkstone/2023/ | grep "tr class" | tail +2 | cut -d'"' -f6 | cut -d'/' -f1 | sort -r)
+ #echo -n ${2024}
+ #echo ${Y2023}
# Not dynamic for now
- echo 5.6.4 5.6.3 5.6.2 5.6.1 5.5.5 5.5.4
+ echo 5.7 5.6.7 5.6.6 5.6.5 5.6.4 5.6.3 5.6.2 5.6.1
}
function releases_elementary() {
- echo 7.0 7.1
+ echo 7.1 7.0
}
function releases_endeavouros() {
- echo apollo_22_1 \
- artemis-22_6 \
- artemis_neo_22_7 \
- artemis_neo_22_8 \
- artemis_nova_22_9 \
- atlantis-21_4 \
- atlantis_neo-21_5 \
- cassini_22_12
+ local ENDEAVOUR_RELEASES="$(web_pipe "https://mirror.alpix.eu/endeavouros/iso/" | LC_ALL="en_US.UTF-8" sort -Mr | grep -o -P '(?<=)' | grep -v 'x86_64' | cut -c 13- | head -n 5 | tr '\n' ' ')"
+ echo "${ENDEAVOUR_RELEASES,,}"
}
function releases_endless() {
- echo 5.0.0
+ echo 5.1.1
}
function editions_endless() {
- echo base en fr pt_BR es
+ echo base en fr pt_BR es
}
function releases_fedora() {
- echo 38 39
-}
-
-function releases_batocera() {
- echo latest
+ echo 39 38
}
function editions_fedora() {
- echo Workstation \
- Budgie \
- Cinnamon \
- i3 \
- KDE \
- LXDE \
- LXQt \
- Mate \
- Xfce \
- Silverblue \
- Sericea \
- Kinoite \
- Sway \
- Server \
- Onyx
+ echo Workstation Budgie Cinnamon i3 KDE LXDE LXQt Mate Xfce Silverblue Sericea Kinoite Sway Server Onyx
}
function releases_freebsd(){
- local FBSD_RELEASES=$(curl -sL https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/|grep -e 'class="link"' |grep -v '\.\.'|cut -d\" -f4|tr -d '/')
- echo ${FBSD_RELEASES}
+ local FBSD_RELEASES=$(web_pipe "https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/" |grep -e 'class="link"' |grep -v '\.\.'|cut -d\" -f4|tr -d '/' | sort -r | tr '\n' ' ')
+ echo "${FBSD_RELEASES}"
}
function editions_freebsd(){
@@ -552,7 +779,7 @@ function editions_freebsd(){
}
function releases_freedos() {
- echo 1.2 1.3
+ echo 1.3 1.2
}
function releases_garuda() {
@@ -567,16 +794,31 @@ function releases_gentoo() {
echo latest
}
+function editions_gentoo() {
+ echo minimal livegui
+}
+
function releases_ghostbsd() {
- echo 21.10.16 21.11.24 22.01.12
+ web_pipe "https://download.ghostbsd.org/releases/amd64/" | grep "href" | cut -d'"' -f2 | cut -d'/' -f1 | sort -r | tail +3 | head -n 5 | tr '\n' ' '
+ echo
}
function editions_ghostbsd() {
echo mate xfce
}
+function releases_gnomeos() {
+ local GNOMEOS_RELEASES=""
+ GNOMEOS_RELEASES="$(web_pipe "https://download.gnome.org/gnomeos/" | grep -o -P '(?<= ${ALL_VERSIONS[$(expr $i - 1)]} ]]; then
if [[ $(expr ${ALL_VERSIONS[${i}]%.*} % 2) == 0 && ${ALL_VERSIONS[${i}]#*.} == "04" ]]; then
@@ -851,12 +1135,11 @@ function releases_ubuntu-server() {
break
fi
done
-
echo ${LTS_SUPPORT[@]} ${INTERIM_SUPPORT[@]} daily-live
}
function releases_vanillaos() {
- echo 22.10
+ echo $(web_pipe "https://api.github.com/repos/Vanilla-OS/live-iso/releases" | grep 'download_url' | cut -d'/' -f8 | sort -ru)
}
function releases_void() {
@@ -868,19 +1151,40 @@ function editions_void() {
}
function releases_vxlinux() {
- wget -q https://github.com/VX-Linux/main/releases/latest -O- | grep -o -e 'releases/tag/[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]' | head -1 | cut -d/ -f3
+ web_pipe "https://github.com/VX-Linux/main/releases/latest" | grep -o -e 'releases/tag/[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]' | head -n 1 | cut -d'/' -f 3
}
function releases_windows() {
- echo 8 10 11
+ echo 11 10-ltsc 10 8
+}
+
+function languages_windows() {
+ if [ "${RELEASE}" == 8 ]; then
+ LANGS=("Arabic" "Brazilian Portuguese" "Bulgarian" "Chinese (Simplified)" "Chinese (Traditional)" "Chinese (Traditional Hong Kong)" \
+ "Croatian" "Czech" "Danish" "Dutch" "English (United States)" "English International" "Estonian" "Finnish" "French" "German" "Greek" \
+ "Hebrew" "Hungarian" "Italian" "Japanese" "Latvian" "Lithuanian" "Norwegian" "Polish" "Portuguese" "Romanian" "Russian" "Serbian Latin" \
+ "Slovak" "Slovenian" "Spanish" "Swedish" "Thai" "Turkish" "Ukrainian")
+ elif [ "${RELEASE}" == "10-ltsc" ]; then
+ LANGS=("English (United States)" "English (Great Britain)" "Chinese (Simplified)" "Chinese (Traditional)" \
+ "French" "German" "Italian" "Japanese" "Korean" "Portuguese (Brazil)" "Spanish")
+ else
+ LANGS=("Arabic" "Brazilian Portuguese" "Bulgarian" "Chinese (Simplified)" "Chinese (Traditional)" "Croatian" "Czech" "Danish" "Dutch" \
+ "English (United States)" "English International" "Estonian" "Finnish" "French" "French Canadian" "German" "Greek" "Hebrew" "Hungarian" \
+ "Italian" "Japanese" "Korean" "Latvian" "Lithuanian" "Norwegian" "Polish" "Portuguese" "Romanian" "Russian" "Serbian Latin" "Slovak" \
+ "Slovenian" "Spanish" "Spanish (Mexico)" "Swedish" "Thai" "Turkish" "Ukrainian")
+ fi
}
-function releases_xerolinux() {
- echo kde
+function releases_windows-server() {
+ echo 2022 2019 2016 2012-r2
+}
+
+function languages_windows-server() {
+ LANGS=("English (United States)" "Chinese (Simplified)" "French" "German" "Italian" "Japanese" "Russian" "Spanish")
}
function releases_zorin() {
- echo 16
+ echo 17 16
}
function editions_zorin() {
@@ -891,19 +1195,21 @@ function check_hash() {
local iso=""
local hash=""
local hash_algo=""
- iso="${VM_PATH}/${1}"
+ if [ "${just}" == 'download' ]; then
+ iso="${1}"
+ else
+ iso="${VM_PATH}/${1}"
+ fi
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;;
+ *) 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!"
@@ -914,10 +1220,17 @@ function check_hash() {
fi
}
+# Download a file from the web and pipe it to stdout
+function web_pipe() {
+ curl --silent --location "${1}"
+}
+
+# Download a file from the web
function web_get() {
+ local URL="${1}"
local DIR="${2}"
local FILE=""
- local URL="${1}"
+ local USER_AGENT="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"
if [ -n "${3}" ]; then
FILE="${3}"
@@ -925,46 +1238,89 @@ function web_get() {
FILE="${URL##*/}"
fi
- # Test mode for ISO
- if [ "${show_iso_url}" == 'on' ]; then
- echo "${URL}"
- exit 0
- elif [ "${test_iso_url}" == 'on' ]; then
- wget --spider "${URL}"
- exit 0
+ # Process any URL redirections after the file name has been extracted
+ URL=$(web_redirect "${URL}")
+
+ while (( "$#" )); do
+ if [[ $1 == --header ]]; then
+ HEADERS+=("$1" "$2")
+ shift 2
+ else
+ shift
+ fi
+ done
+ # Test mode for ISO
+ if [ "${just}" == 'show' ]; then
+ echo "${URL}"
+ exit 0
+ elif [ "${just}" == 'test' ]; then
+ echo -n "Testing if $(echo "${URL}" | rev | cut -d'/' -f1 | rev) is available... "
+ wget -q --spider "${URL}" && echo 'Sucessfull' || echo 'ERROR!'
+ exit 0
+ elif [ "${just}" == 'download' ]; then
+ DIR="$(pwd)"
+ fi
+
+ if [ "${DIR}" != "$(pwd)" ] && ! mkdir -p "${DIR}" 2>/dev/null; then
+ echo "ERROR! Unable to create directory ${DIR}"
+ exit 1
fi
- if ! mkdir -p "${DIR}" 2>/dev/null; then
- echo "ERROR! Unable to create directory ${DIR}"
- exit 1
+ if [[ ${OS} != windows && ${OS} != macos && ${OS} != windows-server ]]; then
+ echo Downloading $(pretty_name "${OS}") ${RELEASE} ${EDITION:+ $EDITION}
+ echo "- URL: ${URL}"
fi
- if command -v aria2c &>/dev/null; then
- if ! aria2c --stderr -x16 --continue=true --summary-interval=0 --download-result=hide --console-log-level=error "${URL}" --dir "${DIR}" -o "${FILE}"; then
- echo #Necessary as aria2c in suppressed mode does not have new lines
- echo "ERROR! Failed to download ${URL} with aria2c. Try running 'quickget' again."
- exit 1
+ if ! curl --progress-bar --location --output "${DIR}/${FILE}" --continue-at - --user-agent "${USER_AGENT}" "${HEADERS[@]}" -- "${URL}"; then
+ echo "ERROR! Failed to download ${URL} with curl."
+ echo " Will try again with wget."
+ rm -f "${DIR}/${FILE}"
+ if command -v wget2 &>/dev/null; then
+ if ! wget2 --quiet --continue --tries=3 --read-timeout=10 --force-progress --progress=bar:force:noscroll "${URL}" -O "${DIR}/${FILE}" "${HEADERS[@]}"; then
+ echo "ERROR! Failed to download ${URL} with wget2."
+ echo " Try deleting '${DIR}/${FILE}' running 'quickget' again."
+ exit 1
+ fi
+ elif ! wget --quiet --continue --tries=3 --read-timeout=10 --show-progress --progress=bar:force:noscroll "${URL}" -O "${DIR}/${FILE}" "${HEADERS[@]}"; then
+ echo "ERROR! Failed to download ${URL} with wget."
+ echo " Try deleting '${DIR}/${FILE}' running 'quickget' again."
+ exit 1
fi
- echo #Necessary as aria2c in suppressed mode does not have new lines
- elif ! wget --quiet --continue --tries=3 --read-timeout=10 --show-progress --progress=bar:force:noscroll "${URL}" -O "${DIR}/${FILE}"; then
- echo "ERROR! Failed to download ${URL} with wget. Try running 'quickget' again."
- exit 1
fi
}
+# checks if a URL needs to be redirected and returns the final URL
+function web_redirect() {
+ local URL="${1}"
+ # Check for URL redirections
+ # Output to nonexistent directory so the download fails fast
+ local REDIRECT_URL=$(curl --silent --location --fail --write-out %{url_effective} --output /var/cache/${RANDOM}/${RANDOM} "${URL}")
+ if [ "${REDIRECT_URL}" != "${URL}" ]; then
+ echo "${REDIRECT_URL}"
+ else
+ echo "${URL}"
+ fi
+}
+
+# checks if a URL is reachable
+function web_check() {
+ local URL=""
+ URL=$(web_redirect "${1}")
+ curl --silent --location --head --output /dev/null --fail "${URL}"
+}
+
function zsync_get() {
local DIR="${2}"
local FILE="${1##*/}"
local OUT=""
local URL="${1}"
-
- # Test mode for ISO
- if [ "${show_iso_url}" == 'on' ]; then
- echo "${URL}"
- exit 0
- elif [ "${test_iso_url}" == 'on' ]; then
- wget --spider "${URL}"
- exit 0
+ # Test mode for ISO
+ if [ "${just}" == 'show' ]; then
+ echo "${URL}"
+ exit 0
+ elif [ "${just}" == 'test' ]; then
+ wget --spider "${URL}"
+ exit 0
elif command -v zsync &>/dev/null; then
if [ -n "${3}" ]; then
OUT="${3}"
@@ -973,10 +1329,10 @@ function zsync_get() {
fi
if ! mkdir -p "${DIR}" 2>/dev/null; then
- echo "ERROR! Unable to create directory ${DIR}"
- exit 1
+ echo "ERROR! Unable to create directory ${DIR}"
+ exit 1
fi
-
+ echo -e Downloading $(pretty_name "${OS}") ${RELEASE} ${EDITION+ ${EDITION}} from ${URL}'\n'
# Only force http for zsync - not earlier because we might fall through here
if ! zsync "${URL/https/http}.zsync" -i "${DIR}/${OUT}" -o "${DIR}/${OUT}" 2>/dev/null; then
echo "ERROR! Failed to download ${URL/https/http}.zsync"
@@ -987,7 +1343,7 @@ function zsync_get() {
rm "${DIR}/${OUT}.zs-old"
fi
else
- echo "INFO: zsync not found, falling back to wget/aria2c"
+ echo "INFO: zsync not found, falling back to curl/wget"
if [ -n "${3}" ]; then
web_get "${1}" "${2}" "${3}"
else
@@ -1003,59 +1359,74 @@ function make_vm_config() {
local IMAGE_TYPE=""
local GUEST=""
local SEC_BOOT=""
-
+ if [ "${just}" == 'download' ]; then
+ exit 0
+ fi
IMAGE_FILE="${1}"
ISO_FILE="${2}"
case "${OS}" in
- batocera)
- GUEST="batocera"
- IMAGE_TYPE="img";;
- dragonflybsd)
- GUEST="dragonflybsd"
- IMAGE_TYPE="iso";;
- freebsd|ghostbsd)
- GUEST="freebsd"
- IMAGE_TYPE="iso";;
- haiku)
- GUEST="haiku"
- IMAGE_TYPE="iso";;
- freedos)
- GUEST="freedos"
- IMAGE_TYPE="iso";;
- kolibrios)
- GUEST="kolibrios"
- IMAGE_TYPE="iso";;
- macos)
- GUEST="macos"
- IMAGE_TYPE="img";;
- netbsd)
- GUEST="netbsd"
- IMAGE_TYPE="iso";;
- openbsd)
- GUEST="openbsd"
- IMAGE_TYPE="iso";;
- openindiana)
- GUEST="solaris"
- IMAGE_TYPE="iso";;
- reactos)
- GUEST="reactos"
- IMAGE_TYPE="iso";;
- truenas*)
- GUEST="truenas"
- IMAGE_TYPE="iso";;
- windows)
- GUEST="windows"
- IMAGE_TYPE="iso";;
- *)
- GUEST="linux"
- IMAGE_TYPE="iso";;
+ batocera)
+ GUEST="batocera"
+ IMAGE_TYPE="img";;
+ dragonflybsd)
+ GUEST="dragonflybsd"
+ IMAGE_TYPE="iso";;
+ easyos)
+ GUEST="linux"
+ IMAGE_TYPE="img";;
+ freebsd|ghostbsd)
+ GUEST="freebsd"
+ IMAGE_TYPE="iso";;
+ haiku)
+ GUEST="haiku"
+ IMAGE_TYPE="iso";;
+ freedos)
+ GUEST="freedos"
+ IMAGE_TYPE="iso";;
+ kolibrios)
+ GUEST="kolibrios"
+ IMAGE_TYPE="iso";;
+ macos)
+ GUEST="macos"
+ IMAGE_TYPE="img";;
+ netbsd)
+ GUEST="netbsd"
+ IMAGE_TYPE="iso";;
+ openbsd)
+ GUEST="openbsd"
+ IMAGE_TYPE="iso";;
+ openindiana)
+ GUEST="solaris"
+ IMAGE_TYPE="iso";;
+ reactos)
+ GUEST="reactos"
+ IMAGE_TYPE="iso";;
+ truenas*)
+ GUEST="truenas"
+ IMAGE_TYPE="iso";;
+ ubuntu*)
+ GUEST="linux"
+ IMAGE_TYPE="iso"
+ # If there is a point in the release, check if it is less than 16.04
+ if [[ "${RELEASE}" == "*.*" ]]; then
+ local SHORT_RELEASE=${RELEASE//./}
+ if [ "${SHORT_RELEASE}" -lt 1604 ]; then
+ GUEST="linux_old"
+ fi
+ fi
+ ;;
+ windows)
+ GUEST="windows"
+ IMAGE_TYPE="iso";;
+ windows-server)
+ GUEST="windows-server"
+ IMAGE_TYPE="iso";;
+ *)
+ GUEST="linux"
+ IMAGE_TYPE="iso";;
esac
- if [ -n "${EDITION}" ]; then
- CONF_FILE="${OS}-${RELEASE}-${EDITION}.conf"
- else
- CONF_FILE="${OS}-${RELEASE}.conf"
- fi
+ CONF_FILE="${VM_PATH}.conf"
if [ ! -e "${CONF_FILE}" ]; then
echo "Making ${CONF_FILE}"
@@ -1065,7 +1436,7 @@ guest_os="${GUEST}"
disk_img="${VM_PATH}/disk.qcow2"
${IMAGE_TYPE}="${VM_PATH}/${IMAGE_FILE}"
EOF
- echo "Giving user execute permissions on ${CONF_FILE},"
+ echo "Setting ${CONF_FILE} executable"
chmod u+x "${CONF_FILE}"
if [ -n "${ISO_FILE}" ]; then
echo "fixed_iso=\"${VM_PATH}/${ISO_FILE}\"" >> "${CONF_FILE}"
@@ -1073,14 +1444,14 @@ EOF
# OS specific tweaks
case ${OS} in
- alma|centos-stream|endless|garuda|nixos|oraclelinux|popos|rockylinux)
+ alma|athenaos|centos-stream|endless|garuda|gentoo|kali|nixos|oraclelinux|popos|rockylinux)
echo "disk_size=\"32G\"" >> "${CONF_FILE}";;
openindiana)
echo "boot=\"legacy\"" >> "${CONF_FILE}"
echo "disk_size=\"32G\"" >> "${CONF_FILE}";;
batocera)
echo "disk_size=\"8G\"" >> "${CONF_FILE}";;
- dragonflybsd|haiku|openbsd|netbsd|slackware|tails|tinycore)
+ dragonflybsd|haiku|openbsd|netbsd|slackware|slax|tails|tinycore)
echo "boot=\"legacy\"" >> "${CONF_FILE}";;
deepin)
echo "disk_size=\"64G\"" >> "${CONF_FILE}"
@@ -1096,12 +1467,20 @@ EOF
echo "disk_size=\"2G\"" >> "${CONF_FILE}"
echo "ram=\"128M\"" >> "${CONF_FILE}"
;;
+ slint)
+ echo "disk_size=\"50G\"" >> "${CONF_FILE}"
+ ;;
+ slitaz)
+ echo "boot=\"legacy\"" >> "${CONF_FILE}"
+ echo "disk_size=\"4G\"" >> "${CONF_FILE}"
+ echo "ram=\"512M\"" >> "${CONF_FILE}"
+ ;;
truenas-scale|truenas-core)
echo "boot=\"legacy\"" >> "${CONF_FILE}"
- # the rest is non-functional
- # echo "bootdrive_size=\"5G\"" >> "${CONF_FILE}" # boot drive
- # echo "1stdrive_size=\"20G\"" >> "${CONF_FILE}" # for testing
- # echo "2nddrive_size=\"20G\"" >> "${CONF_FILE}" # again, for testing
+ # the rest is non-functional
+ # echo "bootdrive_size=\"5G\"" >> "${CONF_FILE}" # boot drive
+ # echo "1stdrive_size=\"20G\"" >> "${CONF_FILE}" # for testing
+ # echo "2nddrive_size=\"20G\"" >> "${CONF_FILE}" # again, for testing
;;
ubuntu-server)
# 22.04+ fails on LVM build if disk size is < 10G
@@ -1109,15 +1488,15 @@ EOF
echo "disk_size=\"10G\"" >> "${CONF_FILE}"
echo "ram=\"4G\"" >> "${CONF_FILE}"
if [[ "${RELEASE}" == *"22.04"* ]]; then
- echo "tpm=\"on\"" >> "${CONF_FILE}"
+ echo "tpm=\"on\"" >> "${CONF_FILE}"
fi
;;
vanillaos)
- ## Minimum is 50G for abroot, but a 64GB is allocated to give some headroom
- echo "disk_size=\"64G\"" >> "${CONF_FILE}"
- ;;
+ ## Minimum is 50G for abroot, but a 64GB is allocated to give some headroom
+ echo "disk_size=\"64G\"" >> "${CONF_FILE}"
+ ;;
zorin)
- case ${EDITION} in
+ case ${EDITION} in
education64|edulite64)
echo "disk_size=\"32G\"" >> "${CONF_FILE}";;
esac
@@ -1137,18 +1516,22 @@ EOF
esac
if [ "${OS}" == "ubuntu" ] && [[ ${RELEASE} == *"daily"* ]]; then
- # Minimum to install lobster testing is 18GB but 32GB are allocated for headroom
- echo "disk_size=\"32G\"" >> "${CONF_FILE}"
+ # Minimum to install lobster testing is 18GB but 32GB are allocated for headroom
+ echo "disk_size=\"32G\"" >> "${CONF_FILE}"
fi
# Enable TPM for Windows 11
- if [ "${OS}" == "windows" ] && [ "${RELEASE}" -ge 11 ]; then
+ if [ "${OS}" == "windows" ] && [ "${RELEASE}" == 11 ] || [ "${OS}" == "windows-server" ] && [ "${RELEASE}" == "2022" ]; then
echo "tpm=\"on\"" >> "${CONF_FILE}"
echo "secureboot=\"off\"" >> "${CONF_FILE}"
fi
fi
- echo
- echo "To start your $(pretty_name "${OS}") virtual machine run:"
- echo " quickemu --vm ${CONF_FILE}"
+ echo -e "\nTo start your $(pretty_name "${OS}") virtual machine run:"
+ if [ ${OS} == "slint" ]; then
+ echo -e " quickemu --vm ${CONF_FILE}\nTo start Slint with braille support run:\n quickemu --vm --braille --display sdl ${CONF_FILE}"
+ else
+ echo " quickemu --vm ${CONF_FILE}"
+ fi
+
echo
exit 0
}
@@ -1158,7 +1541,7 @@ function get_alma() {
local HASH=""
local ISO="AlmaLinux-${RELEASE}-latest-x86_64-${EDITION}.iso"
local URL="https://repo.almalinux.org/almalinux/${RELEASE}/isos/x86_64"
- HASH="$(wget -q -O- "${URL}/CHECKSUM" | grep "(${ISO}" | cut -d' ' -f4)"
+ HASH="$(web_pipe "${URL}/CHECKSUM" | grep "(${ISO}" | cut -d' ' -f4)"
echo "${URL}/${ISO} ${HASH}"
}
@@ -1167,14 +1550,13 @@ function get_alpine() {
local ISO=""
local URL=""
local VERSION=""
-
case ${RELEASE} in
latest) URL="https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/x86_64";;
*) URL="https://dl-cdn.alpinelinux.org/alpine/v${RELEASE}/releases/x86_64";;
esac
- VERSION=$(wget -qO- "${URL}/latest-releases.yaml" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'version:' | awk '{print $2}')
+ VERSION=$(web_pipe "${URL}/latest-releases.yaml" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'version:' | awk '{print $2}')
ISO="alpine-virt-${VERSION}-x86_64.iso"
- HASH=$(wget -qO- "${URL}/latest-releases.yaml" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'sha256:' | awk '{print $2}')
+ HASH=$(web_pipe "${URL}/latest-releases.yaml" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'sha256:' | awk '{print $2}')
echo "${URL}/${ISO} ${HASH}"
}
@@ -1185,14 +1567,13 @@ function get_android() {
local JSON_ALL=""
local JSON_REL=""
local URL="https://mirrors.gigenet.com/OSDN/android-x86"
-
- JSON_ALL=$(wget -q -O- "https://www.fosshub.com/Android-x86-old.html" | grep "var settings =" | cut -d'=' -f2-)
+ JSON_ALL=$(web_pipe "https://www.fosshub.com/Android-x86-old.html" | grep "var settings =" | cut -d'=' -f2-)
JSON_REL=$(echo "${JSON_ALL}" | jq --arg ver "${OS}-${EDITION}-${RELEASE}" 'first(.pool.f[] | select((.n | startswith($ver)) and (.n | endswith(".iso"))))')
ISO=$(echo "${JSON_REL}" | jq -r .n)
HASH=$(echo "${JSON_REL}" | jq -r .hash.sha256)
# Traverse the directories to find the .iso location
- for DIR in $(wget -4 -q -O- "${URL}" | grep -o -E '[0-9]{5}' | sort -ur); do
- if wget -4 -q -O- "${URL}/${DIR}" | grep "${ISO}" &>/dev/null; then
+ for DIR in $(web_pipe "${URL}" | grep -o -E '[0-9]{5}' | sort -ur); do
+ if web_pipe "${URL}/${DIR}" | grep "${ISO}" &>/dev/null; then
URL="${URL}/${DIR}"
break
fi
@@ -1203,110 +1584,101 @@ function get_android() {
function get_antix() {
local EDITION="${1:-}"
local HASH=""
- local ISO=""
+ local ISO="antiX-${RELEASE}"
+ local README="README"
local URL="https://sourceforge.net/projects/antix-linux/files/Final/antiX-${RELEASE}"
- case ${RELEASE} in
- 21) URL_runit="${URL}/runit-bullseye";;
- *) URL_runit="${URL}/runit-antiX-${RELEASE}";;
- esac
-
+ # antiX uses a different URL and ISO naming for runit editions
+ if [[ "${EDITION}" == *"runit"* ]];then
+ ISO+="-runit"
+ README="README2"
+ case ${RELEASE} in
+ 21) URL+="/runit-bullseye";;
+ *) URL+="/runit-antiX-${RELEASE}";;
+ esac
+ fi
case ${EDITION} in
- net-sysv) ISO="antiX-${RELEASE}-net_x64-net.iso";;
- core-sysv) ISO="antiX-${RELEASE}_x64-core.iso";;
- base-sysv) ISO="antiX-${RELEASE}_x64-base.iso";;
- full-sysv) ISO="antiX-${RELEASE}_x64-full.iso";;
- net-runit) ISO="antiX-${RELEASE}-runit-net_x64-net.iso"
- URL="${URL_runit}"
- ;;
- core-runit) ISO="antiX-${RELEASE}-runit_x64-core.iso"
- URL="${URL_runit}"
- ;;
- base-runit) ISO="antiX-${RELEASE}-runit_x64-base.iso"
- URL="${URL_runit}"
- ;;
- full-runit) ISO="antiX-${RELEASE}-runit_x64-full.iso"
- URL="${URL_runit}"
- ;;
+ base-*) ISO+="_x64-base.iso";;
+ core-*) ISO+="_x64-core.iso";;
+ full-*) ISO+="_x64-full.iso";;
+ net-*) ISO+="-net_x64-net.iso";;
esac
-
- HASH=$(wget -q -O- ${URL}/README.txt | grep "${ISO}" | cut -d' ' -f1 | head -1)
- echo "${URL}/${ISO} ${HASH}"
-}
-
-function get_archlinux() {
- local HASH=""
- local ISO=""
- local URL="https://mirror.rackspace.com/archlinux"
- ISO=$(wget -q -O- "https://archlinux.org/releng/releases/json/" | jq -r '.releases[0].iso_url')
- HASH=$(wget -q -O- "https://archlinux.org/releng/releases/json/" | jq -r '.releases[0].sha1_sum')
+ HASH=$(web_pipe "${URL}/${README}.txt" | grep "${ISO}" | cut_1 | head -1)
echo "${URL}/${ISO} ${HASH}"
}
function get_archcraft() {
local HASH=""
local URL=""
- local TMPURL=""
-
- TMPURL=$(wget -q -S -O- --max-redirect=0 "https://sourceforge.net/projects/archcraft/files/latest/download" 2>&1 | grep -i Location | cut -d' ' -f4)
- URL=${TMPURL%\?*}
+ URL="https://sourceforge.net/projects/archcraft/files/${RELEASE}/download"
echo "${URL} ${HASH}"
}
+function get_archlinux() {
+ local HASH=""
+ local ISO=""
+ local URL="https://mirror.rackspace.com/archlinux"
+ ISO=$(web_pipe "https://archlinux.org/releng/releases/json/" | jq -r '.releases[0].iso_url')
+ HASH=$(web_pipe "https://archlinux.org/releng/releases/json/" | jq -r '.releases[0].sha256_sum')
+ echo "${URL}${ISO} ${HASH}"
+}
+
function get_arcolinux() {
local EDITION="${1:-}"
local HASH=""
local ISO="arcolinux${EDITION:0:1}-${RELEASE}-x86_64.iso"
- local URL="https://ant.seedhost.eu/arcolinux/iso/${RELEASE}"
- HASH=$(wget -q -O- "${URL}/${ISO}.sha1" | cut -d' ' -f1)
+ local URL="https://mirror.accum.se/mirror/arcolinux.info/iso/${RELEASE}"
+ HASH=$(web_pipe "${URL}/${ISO}.sha1" | cut_1)
echo "${URL}/${ISO} ${HASH}"
}
-function get_bunsenlabs() {
+function get_artixlinux() {
+ local EDITION="${1:-}"
local HASH=""
- local ISO="beryllium-1-amd64.hybrid.iso"
- local URL="https://ddl.bunsenlabs.org/ddl"
- HASH=$(wget -q -O- "${URL}/release.sha256.txt" | head -1 | cut -d' ' -f1)
+ local ISO=""
+ local URL="https://iso.artixlinux.org/iso"
+ ISO="artix-${EDITION}-${RELEASE}-x86_64.iso"
+ HASH=$(web_pipe "${URL}/sha256sums" | grep "${ISO}")
echo "${URL}/${ISO} ${HASH}"
}
-function get_blendos() {
+function get_athenaos() {
+ local HASH=""
+ local URL="https://github.com/Athena-OS/athena/releases/download/${RELEASE}"
+ local ISO="athena-rolling-x86_64.iso"
+ HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut_1)
+ echo "${URL}/${ISO} ${HASH}"
+}
+function get_batocera() {
local HASH=""
- local URL=""
+ local URL="https://mirrors.o2switch.fr/batocera/x86_64/stable/${RELEASE}"
+ local ISO="$(web_pipe "${URL}/" | grep -e 'batocera.*img.gz'| cut -d'"' -f2)"
+ echo "${URL}/${ISO} ${HASH}"
+}
- # BlendOS has more editions and releases but there's a tracker indirect and other issues
- # so easier to use the rss feed
- #
- # We have to provide edition/release as RELEASE or have a major refactor
- # But this works for now ... or does it ....
- URL=$(grep ${RELEASE} /tmp/blendos-isos.rss | grep -E -o 'https://.*blendOS\.iso')
- HASH=$(grep ${RELEASE} /tmp/blendos-isos.rss | grep -E -o '[[:alnum:]]{32}')
- # ## fix up variables for path naming
- EDITION=${RELEASE%%/*}
- RELEASE=${RELEASE##*/}
- # For UX maybe show the date of the release
- #echo ${RELEASE##*/} "(" $(date -d @${RELEASE##*/}) ")"
- # maybe $(date -d @${RELEASE##*/} '+%Y%m%d')
- echo "${URL} ${HASH}"
+function get_bazzite() {
+ local HASH=""
+ local ISO=""
+ local URL="https://github.com/ublue-os/bazzite/releases/download/v${RELEASE}"
+ ISO=$(web_pipe "https://api.github.com/repos/ublue-os/bazzite/releases" | grep 'download_url' | grep 'sum' | cut -d '"' -f4 | cut -d'.' -f1-5 | grep "${RELEASE}" | cut -d'/' -f9)
+ HASH=$(web_pipe "${URL}/${ISO}.sha256sum" | grep 'SHA256' | cut -d' ' -f4)
+ echo "${URL}/${ISO} ${HASH}"
}
-function get_vanillaos() {
- # maybe use github api and dynamism for R2.0 but for 22.10 just
- # hit their CDN
- #
- # https://cdn.vanillaos.org/assets/ISO/22.10-r8/VanillaOS-22.10-all.20230226.md5.txt
- # https://cdn.vanillaos.org/assets/ISO/22.10-r8/VanillaOS-22.10-all.20230226.sha256.txt
- local HASH=$(curl -s "https://cdn.vanillaos.org/assets/ISO/22.10-r8/VanillaOS-22.10-all.20230226.sha256.txt" | cut -d' ' -f1)
- local URL="https://cdn.vanillaos.org/assets/ISO/22.10-r8/VanillaOS-22.10-all.20230226.iso"
- echo "${URL} ${HASH}"
+function get_biglinux() {
+ local HASH=""
+ local ISO="biglinux_${RELEASE}_${EDITION}.iso"
+ local URL="https://iso.biglinux.com.br"
+ HASH=$(web_pipe "${URL}/${ISO}.md5" | grep -Eo '[[:alnum:]]{32}')
+ echo "${URL}/${ISO} ${HASH}"
}
-function get_batocera() {
+function get_blendos() {
local HASH=""
- local URL="https://mirrors.o2switch.fr/batocera/x86_64/stable/last"
- local ISO="$(curl -sl ${URL}/ | grep -e 'batocera.*img.gz'|cut -d\" -f2)"
- echo "${URL}/${ISO} ${HASH}"
+ local ISO="blendos-${RELEASE}-stable-${EDITION}.iso"
+ local URL="https://mirror.ico277.xyz/blendos/${EDITION}"
+ echo "${URL}/${ISO} ${HASH}"
}
function get_bodhi() {
@@ -1314,39 +1686,76 @@ function get_bodhi() {
local HASH=""
local ISO=""
local URL="https://sourceforge.net/projects/bodhilinux/files/${RELEASE}"
-
case ${EDITION} in
standard) ISO="bodhi-${RELEASE}-64.iso";;
*) ISO="bodhi-${RELEASE}-64-${EDITION}.iso";;
esac
- HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f1)
+ HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut_1)
echo "${URL}/${ISO} ${HASH}"
}
-function get_cachyos() {
+function get_bunsenlabs() {
local HASH=""
- local ISO="cachyos-${EDITION}-linux-${RELEASE}.iso"
- local URL="https://mirror.cachyos.org/ISO/${EDITION}/${RELEASE}"
- HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f1)
+ local ISO="boron-1-240123-amd64.hybrid.iso"
+ local URL="https://ddl.bunsenlabs.org/ddl"
+ HASH=$(web_pipe "${URL}/release.sha256.txt" | head -1 | cut_1)
echo "${URL}/${ISO} ${HASH}"
}
+function get_cachyos() {
+ local URL="https://mirror.cachyos.org/ISO/${EDITION}/"
+ local REL=$(web_pipe "${URL}" | grep -Po '(?<=">)[0-9]+(?=/)' | sort -ru | tail -n 1)
+ local ISO="cachyos-${EDITION}-linux-${REL}.iso"
+ local HASH=$(web_pipe "${URL}/${REL}/${ISO}.sha256" | cut_1)
+ echo "${URL}/${REL}/${ISO} ${HASH}"
+}
+
function get_centos-stream() {
+ local ISO="CentOS-Stream-${RELEASE}-latest-x86_64-${EDITION}.iso"
+ local URL="https://linuxsoft.cern.ch/centos-stream/${RELEASE}-stream/BaseOS/x86_64/iso"
+ local HASH=$(web_pipe "${URL}/${ISO}.SHA256SUM" | grep "SHA256 (${ISO}" | cut -d' ' -f4)
+ echo "${URL}/${ISO} ${HASH}"
+}
+
+function get_chimeralinux() {
+ local EDITION="${1:-}"
+ local URL="https://repo.chimera-linux.org/live/${RELEASE}"
+ local DATE=$(web_pipe "${URL}/sha256sums.txt" | head -n1 | cut -d'-' -f5)
+ local ISO="chimera-linux-x86_64-LIVE-${DATE}-${EDITION}.iso"
+ local HASH=$(web_pipe "${URL}/sha256sums.txt" | grep 'x86_64-LIVE' | grep "${EDITION}" | cut_1)
+ echo "${URL}/${ISO} ${HASH}"
+}
+
+function get_crunchbang++() {
local HASH=""
local ISO=""
+ local URL=""
+ local URLPART=""
+ local URLPART2=""
+ URLPART="https://github.com/CBPP/cbpp"
case ${RELEASE} in
8)
- ISO="CentOS-Stream-${RELEASE}-x86_64-latest-${EDITION}.iso"
- URL="https://mirrors.ocf.berkeley.edu/centos/8-stream/isos/x86_64"
- HASH=$(wget -q -O- ${URL}/CHECKSUM | grep "SHA256 (${ISO}" | cut -d' ' -f4)
+ URLPART2="releases/download/v1.0-amd64"
+ ISO="cbpp-1.0-amd64-20150428.iso"
;;
9)
- ISO="CentOS-Stream-${RELEASE}-latest-x86_64-${EDITION}.iso"
- URL="https://mirrors.ocf.berkeley.edu/centos-stream/9-stream/BaseOS/x86_64/iso"
- HASH=$(wget -q -O- ${URL}/${ISO}.SHA256SUM | grep "SHA256 (${ISO}" | cut -d' ' -f4)
+ URLPART2="9-amd64/releases/download/v9.0"
+ ISO="cbpp-9.0-amd64-20170621.iso"
+ ;;
+ 10)
+ URLPART2="releases/download/v10"
+ ISO="cbpp-10.1-amd64-20190713.iso"
+ ;;
+ 11)
+ URLPART2="releases/download/v11.2"
+ ISO="cbpp-11.2-amd64-20230514.iso"
+ ;;
+ 12)
+ URLPART2="releases/download/v12.0"
+ ISO="cbpp-12.0-amd64-20230611.iso"
;;
esac
-
+ URL="${URLPART}/${URLPART2}"
echo "${URL}/${ISO} ${HASH}"
}
@@ -1355,20 +1764,17 @@ function get_debian() {
local HASH=""
local ISO="debian-live-${RELEASE}-amd64-${EDITION}.iso"
local URL=""
-
- DEBCURRENT=$(wget -q https://cdimage.debian.org/debian-cd/ -O- |grep '\.[0-9]/'|cut -d\> -f9|cut -d\/ -f1)
- case ${RELEASE} in
+ DEBCURRENT=$(web_pipe "https://cdimage.debian.org/debian-cd/" |grep '\.[0-9]/'|cut -d\> -f9|cut -d\/ -f1)
+ case ${RELEASE} in
"${DEBCURRENT}") URL="https://cdimage.debian.org/debian-cd/${RELEASE}-live/amd64/iso-hybrid";;
- *) URL="https://cdimage.debian.org/cdimage/archive/${RELEASE}-live/amd64/iso-hybrid/";;
+ *) URL="https://cdimage.debian.org/cdimage/archive/${RELEASE}-live/amd64/iso-hybrid/";;
esac
-
if [ "${EDITION}" == "netinst" ]; then
URL="${URL/-live/}"
URL="${URL/hybrid/cd}"
ISO="${ISO/-live/}"
fi
-
- HASH=$(wget -q -O- "${URL}/SHA512SUMS" | grep "${ISO}" | cut -d' ' -f1)
+ HASH=$(web_pipe "${URL}/SHA512SUMS" | grep "${ISO}" | cut_1)
echo "${URL}/${ISO} ${HASH}"
}
@@ -1378,18 +1784,15 @@ function get_deepin() {
local ISO="deepin-desktop-community-${RELEASE}-amd64.iso"
# deepin-desktop-community-20.3-amd64.iso
local URL="https://cdimage.deepin.com/releases/"${RELEASE}
-
# fix iso name
if [[ "${RELEASE}" == *"20" ]] ; then
- EDITION="1003"
- ISO="deepin-desktop-community-${EDITION}-amd64.iso"
+ EDITION="1003"
+ ISO="deepin-desktop-community-${EDITION}-amd64.iso"
elif [[ "${RELEASE}" == *"20.1" ]]; then
- EDITION="1010"
- ISO="deepin-desktop-community-${EDITION}-amd64.iso"
+ EDITION="1010"
+ ISO="deepin-desktop-community-${EDITION}-amd64.iso"
fi
-
- HASH=$(wget -q -O- "${URL}/SHA256SUMS" | grep "${ISO}" | cut -d' ' -f1)
-
+ HASH=$(web_pipe "${URL}/SHA256SUMS" | grep "${ISO}" | cut_1)
#echo "${URL}/${ISO} ${HASH}"
web_get "${URL}/${ISO}" "${VM_PATH}"
check_hash "${ISO}" "${HASH}"
@@ -1400,13 +1803,12 @@ function get_devuan() {
local HASH=""
local ISO=""
local URL="https://files.devuan.org/devuan_${RELEASE}/desktop-live"
-
case ${RELEASE} in
beowulf) ISO="devuan_${RELEASE}_3.1.1_amd64_desktop-live.iso";;
chimaera) ISO="devuan_${RELEASE}_4.0.2_amd64_desktop-live.iso";;
daedalus) ISO="devuan_${RELEASE}_5.0.0_amd64_desktop-live.iso";;
esac
- HASH=$(wget -q -O- "${URL}/SHASUMS.txt" | grep "${ISO}" | cut -d' ' -f1)
+ HASH=$(web_pipe "${URL}/SHASUMS.txt" | grep "${ISO}" | cut_1)
echo "${URL}/${ISO} ${HASH}"
}
@@ -1414,42 +1816,43 @@ function get_dragonflybsd() {
local HASH=""
local ISO="dfly-x86_64-${RELEASE}_REL.iso.bz2"
local URL="http://mirror-master.dragonflybsd.org/iso-images"
-
- HASH=$(wget -q -O- "${URL}/md5.txt" | grep "(${ISO})" | cut -d' ' -f4)
+ HASH=$(web_pipe "${URL}/md5.txt" | grep "(${ISO})" | cut -d' ' -f4)
echo "${URL}/${ISO} ${HASH}"
}
function get_easyos() {
local HASH=""
- local URL="https://distro.ibiblio.org/easyos/amd64/releases/kirkstone/2023/${RELEASE}"
- local ISO="easy-${RELEASE}-amd64.img"
-
- HASH=$(wget -q -O- "${URL}/md5.sum.txt" | cut -d' ' -f1)
+ local URL=""
+ local ISO=""
+ local YEAR=""
+ ISO="easy-${RELEASE}-amd64.img"
+ case ${RELEASE} in
+ 5.6.5|5.6.4|5.6.3|5.6.2|5.6.1) YEAR="2023";;
+ 5.7|5.6.7|5.6.6) YEAR="2024";;
+ esac
+ URL="https://distro.ibiblio.org/easyos/amd64/releases/kirkstone/${YEAR}/${RELEASE}"
+ HASH=$(web_pipe "${URL}/md5.sum.txt" | cut_1)
echo "${URL}/${ISO} ${HASH}"
}
function get_elementary() {
local HASH=""
case ${RELEASE} in
- 7.0)
- local ISO="elementaryos-${RELEASE}-stable.20230129rc.iso"
- ;;
- 7.1)
- local ISO="elementaryos-${RELEASE}-stable.20230926rc.iso"
- HASH="5c7f6b388e5787c366587985301ea05ab16e4cc0de3be2b3d6a559ce81a2f102"
- ;;
+ 7.0) STAMP="20230129rc";;
+ 7.1) STAMP="20230926rc";;
esac
+ local ISO="elementaryos-${RELEASE}-stable.${STAMP}.iso"
local URL="https://ams3.dl.elementary.io/download"
echo "${URL}/$(date +%s | base64)/${ISO} ${HASH}"
}
function get_endeavouros() {
local HASH=""
- # Endeavour release names are Capitalized and our $RELEASE is forced to lowercase so we have to revert it
- local ISO="EndeavourOS_${RELEASE@u}.iso"
- local URL="https://github.com/endeavouros-team/ISO/releases/download/1-EndeavourOS-ISO-releases-archive"
-
- HASH=$(wget -q -O- "${URL}/${ISO}.sha512sum" | cut -d' ' -f1)
+ local URL="https://mirror.alpix.eu/endeavouros/iso"
+ # Find EndeavourOS releases from mirror, pick one matching release
+ local ENDEAVOUR_RELEASES="$(web_pipe "${URL}/" | grep -o -P '(?<=)' | grep -v 'x86_64')"
+ local ISO="$(echo "${ENDEAVOUR_RELEASES}" | grep -i "${RELEASE}").iso"
+ HASH=$(web_pipe "${URL}/${ISO}.sha512sum" | cut_1)
echo "${URL}/${ISO} ${HASH}"
}
@@ -1463,22 +1866,15 @@ function get_endless() {
# Endless edition names are "base" for the small minimal one or the Language for the large full release
# The isos are stamped as they are finished so ....
case ${EDITION} in
- base)
- FILE_TS="230127-211122";;
- fr)
- FILE_TS="230127-213415";;
- en)
- FILE_TS="230127-212436";;
- es)
- FILE_TS="230127-212646";;
- pt_BR)
- FILE_TS="230127-220328";;
- esac
-
- URL="https://images-dl.endlessm.com/release/${RELEASE}/eos-amd64-amd64/${EDITION}"
- ISO="eos-eos${RELEASE:0:3}-amd64-amd64.${FILE_TS}.${EDITION}.iso"
-
- echo "${URL}/${ISO}"
+ base) FILE_TS="240103-025438";;
+ en) FILE_TS="240103-025437";;
+ es) FILE_TS="240103-025438";;
+ fr) FILE_TS="240103-025438";;
+ pt_BR) FILE_TS="240103-030103";;
+ esac
+ URL="https://images-dl.endlessm.com/release/${RELEASE}/eos-amd64-amd64/${EDITION}"
+ ISO="eos-eos${RELEASE:0:3}-amd64-amd64.${FILE_TS}.${EDITION}.iso"
+ echo "${URL}/${ISO} ${HASH}"
}
function get_fedora() {
@@ -1488,13 +1884,11 @@ function get_fedora() {
local JSON=""
local URL=""
local VARIANT=""
-
case ${EDITION} in
- Server|Kinoite|Onyx|Silverblue|Sericea|Workstation) VARIANT="${EDITION}";;
- *) VARIANT="Spins";;
+ Server|Kinoite|Onyx|Silverblue|Sericea|Workstation) VARIANT="${EDITION}";;
+ *) VARIANT="Spins";;
esac
-
- JSON=$(wget -q -O- "https://getfedora.org/releases.json" | jq '.[] | select(.variant=="'${VARIANT}'" and .subvariant=="'"${EDITION}"'" and .arch=="x86_64" and .version=="'"${RELEASE}"'")')
+ JSON=$(web_pipe "https://getfedora.org/releases.json" | jq '.[] | select(.variant=="'${VARIANT}'" and .subvariant=="'"${EDITION}"'" and .arch=="x86_64" and .version=="'"${RELEASE}"'")')
URL=$(echo "${JSON}" | jq -r '.link' | head -n1)
HASH=$(echo "${JSON}" | jq -r '.sha256' | head -n1)
echo "${URL} ${HASH}"
@@ -1505,8 +1899,7 @@ function get_freebsd() {
local HASH=""
local ISO="FreeBSD-${RELEASE}-RELEASE-amd64-${EDITION}.iso"
local URL="https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/${RELEASE}"
-
- HASH=$(wget -q -O- "${URL}/CHECKSUM.SHA256-FreeBSD-${RELEASE}-RELEASE-amd64" | grep "${ISO}" | grep -v ".xz" | cut -d' ' -f4)
+ HASH=$(web_pipe "${URL}/CHECKSUM.SHA256-FreeBSD-${RELEASE}-RELEASE-amd64" | grep "${ISO}" | grep -v ".xz" | cut -d' ' -f4)
echo "${URL}/${ISO} ${HASH}"
}
@@ -1514,40 +1907,38 @@ function get_freedos() {
local HASH=""
local ISO=""
local URL="http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/${RELEASE}/official"
-
case ${RELEASE} in
- 1.2)
- ISO="FD12CD.iso"
- HASH=$(wget -q -O- "${URL}/FD12.sha" | grep "${ISO}" | cut -d' ' -f1)
- ;;
- 1.3)
- ISO="FD13-LiveCD.zip"
- HASH=$(wget -q -O- "${URL}/verify.txt" | grep -A 8 "sha256sum" | grep "${ISO}" | cut -d' ' -f1)
- ;;
+ 1.2)
+ ISO="FD12CD.iso"
+ HASH=$(web_pipe "${URL}/FD12.sha" | grep "${ISO}" | cut_1)
+ ;;
+ 1.3)
+ ISO="FD13-LiveCD.zip"
+ HASH=$(web_pipe "${URL}/verify.txt" | grep -A 8 "sha256sum" | grep "${ISO}" | cut_1)
+ ;;
esac
-
echo "${URL}/${ISO} ${HASH}"
}
function get_garuda() {
- local EDITION="${1:-}"
- local HASH=""
- local ISO=""
- local URL="https://iso.builds.garudalinux.org/iso/latest/garuda"
-
- ISO=${EDITION}/latest.iso
-
- HASH="$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f1)"
- echo "${URL}/${ISO} ${HASH}"
+ local EDITION="${1:-}"
+ local HASH=""
+ local ISO=""
+ local URL="https://iso.builds.garudalinux.org/iso/latest/garuda"
+ ISO=${EDITION}/latest.iso
+ HASH="$(web_pipe "${URL}/${ISO}.sha256" | cut_1)"
+ echo "${URL}/${ISO} ${HASH}"
}
function get_gentoo() {
local HASH=""
local ISO=""
local URL="https://mirror.bytemark.co.uk/gentoo/releases/amd64/autobuilds/"
-
- ISO=$(wget -q -O- "${URL}/${RELEASE}-iso.txt" | grep install | cut -d' ' -f1)
- HASH=$( wget -q -O- "${URL}/${ISO}.DIGESTS" | grep -A 1 SHA512 | grep iso | grep -v CONTENTS | cut -d' ' -f1)
+ case ${EDITION} in
+ minimal) ISO=$(web_pipe "${URL}/${RELEASE}-iso.txt" | grep install | cut_1);;
+ livegui) ISO=$(web_pipe "${URL}/${RELEASE}-iso.txt" | grep livegui | cut_1);;
+ esac
+ HASH=$(web_pipe "${URL}/${ISO}.DIGESTS" | grep -A 1 SHA512 | grep iso | grep -v CONTENTS | cut_1)
echo "${URL}/${ISO} ${HASH}"
}
@@ -1556,43 +1947,63 @@ function get_ghostbsd() {
local ISO=""
local URL="https://download.ghostbsd.org/releases/amd64/${RELEASE}"
local HASH=""
-
case ${EDITION} in
- mate) ISO="GhostBSD-${RELEASE}.iso";;
- xfce) ISO="GhostBSD-${RELEASE}-XFCE.iso";;
+ mate) ISO="GhostBSD-${RELEASE}.iso";;
+ xfce) ISO="GhostBSD-${RELEASE}-XFCE.iso";;
esac
- HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | grep "${ISO}" | cut -d' ' -f4)
+ HASH=$(web_pipe "${URL}/${ISO}.sha256" | grep "${ISO}" | cut -d' ' -f4)
+ echo "${URL}/${ISO} ${HASH}"
+}
+
+function get_gnomeos() {
+ local HASH=""
+ local ISO=""
+ local URL=""
+ case ${RELEASE} in
+ nightly)
+ URL="https://os.gnome.org/download/latest"
+ ISO="gnome_os_installer.iso";;
+ # The download.gnome.org mirror does not currently link to ISOs for 44.rc or 45.rc
+ 44.rc|45.rc)
+ URL="https://mirror.umd.edu/gnome/gnomeos/${RELEASE}"
+ ISO="gnome_os_installer_${RELEASE}.iso";;
+ 3.38*)
+ URL="https://download.gnome.org/gnomeos/${RELEASE}"
+ ISO="gnome_os_installer.iso";;
+ *)
+ URL="https://download.gnome.org/gnomeos/${RELEASE}"
+ ISO="gnome_os_installer_${RELEASE}.iso";;
+ esac
+ echo "${URL}/${ISO} ${HASH}"
+}
+
+function get_guix() {
+ local HASH=""
+ local ISO="guix-system-install-${RELEASE}.x86_64-linux.iso"
+ local URL="https://ftpmirror.gnu.org/gnu/guix/"
echo "${URL}/${ISO} ${HASH}"
}
function get_haiku() {
local EDITION="${1:-}"
local ISO="haiku-${RELEASE}-${EDITION}-anyboot.iso"
- # local URL="https://cdn.haiku-os.org/haiku-release/${RELEASE}" # domain gone
- local URL="http://mirror.rit.edu/haiku/${RELEASE}" # NY, USA
- # local URL="https://mirrors.tnonline.net/haiku/haiku-release/${RELEASE}" # Sweden
- # local URL="https://mirror.aarnet.edu.au/pub/haiku/${RELEASE}" # Aus
-
- HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | grep "${ISO}" | cut -d' ' -f4)
+ local URL="http://mirror.rit.edu/haiku/${RELEASE}"
+ HASH=$(web_pipe "${URL}/${ISO}.sha256" | grep "${ISO}" | cut -d' ' -f4)
echo "${URL}/${ISO} ${HASH}"
}
function get_holoiso() {
- #local HASH=""
- local ISO=$(wget -q -O- "https://api.github.com/repos/HoloISO/holoiso/releases" | sed 's/ /\n/g' | grep "HoloISO_${RELEASES}" | cut -d'\' -f1 | cut -d'/' -f4)
- local URL="https://cd2.holoiso.ru.eu.org"
- # Can't find hash
- #HASH=$(wget -q -O- "${URL}/${ISO}.sha256sum" | cut -d' ' -f1)
- echo "${URL}/${ISO} #${HASH}"
+ local HASH=""
+ local URL=$(web_pipe "https://api.github.com/repos/HoloISO/releases/releases" | jq ".[] | select(.tag_name==\"${RELEASE}\") | .body" | grep -Po "https://\S+holoiso.ru.eu.org/\S+.iso" | head -n 1)
+ echo "${URL} ${HASH}"
}
function get_kali() {
local HASH=""
local ISO=""
local URL="https://cdimage.kali.org/${RELEASE}"
-
- ISO=$(wget -q -O- "${URL}/?C=M;O=D" | grep -o ">kali-linux-.*-installer-amd64.iso" | head -n 1 | cut -c 2-)
- HASH=$(wget -q -O- "${URL}/SHA256SUMS" | grep -v torrent | grep "${ISO}" | cut -d' ' -f1)
+ ISO=$(web_pipe "${URL}/?C=M;O=D" | grep -o ">kali-linux-.*-installer-amd64.iso" | head -n 1 | cut -c 2-)
+ HASH=$(web_pipe "${URL}/SHA256SUMS" | grep -v torrent | grep "${ISO}" | cut_1)
echo "${URL}/${ISO} ${HASH}"
}
@@ -1600,9 +2011,8 @@ function get_kdeneon() {
local HASH=""
local ISO=""
local URL="https://files.kde.org/neon/images/${RELEASE}/current"
-
- ISO=$(wget -q -O- "${URL}/neon-${RELEASE}-current.sha256sum" | cut -d' ' -f3-)
- HASH=$(wget -q -O- "${URL}/neon-${RELEASE}-current.sha256sum" | cut -d' ' -f1)
+ ISO=$(web_pipe "${URL}/neon-${RELEASE}-current.sha256sum" | cut -d' ' -f3-)
+ HASH=$(web_pipe "${URL}/neon-${RELEASE}-current.sha256sum" | cut_1)
echo "${URL}/${ISO} ${HASH}"
}
@@ -1617,8 +2027,7 @@ function get_linuxlite() {
local HASH=""
local ISO="linux-lite-${RELEASE}-64bit.iso"
local URL="https://sourceforge.net/projects/linux-lite/files/${RELEASE}"
-
- HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f1)
+ HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut_1)
echo "${URL}/${ISO} ${HASH}"
}
@@ -1627,8 +2036,7 @@ function get_linuxmint() {
local HASH=""
local ISO="linuxmint-${RELEASE}-${EDITION}-64bit.iso"
local URL="https://mirror.bytemark.co.uk/linuxmint/stable/${RELEASE}"
-
- HASH=$(wget -q -O- "${URL}/sha256sum.txt" | grep "${ISO}" | cut -d' ' -f1)
+ HASH=$(web_pipe "${URL}/sha256sum.txt" | grep "${ISO}" | cut_1)
echo "${URL}/${ISO} ${HASH}"
}
@@ -1637,88 +2045,135 @@ function get_lmde() {
local HASH=""
local ISO="lmde-${RELEASE}-${EDITION}-64bit.iso"
local URL="https://mirror.bytemark.co.uk/linuxmint/debian"
-
- HASH=$(wget -q -O- "${URL}/sha256sum.txt" | grep "${ISO}" | cut -d' ' -f1)
+ HASH=$(web_pipe "${URL}/sha256sum.txt" | grep "${ISO}" | cut_1)
echo "${URL}/${ISO} ${HASH}"
}
+function generate_id() {
+ local macRecoveryID=""
+ local TYPE="${1}"
+ local valid_chars=("0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "A" "B" "C" "D" "E" "F")
+ for ((i=0; i<$TYPE; i++)); do
+ macRecoveryID+="${valid_chars[$((RANDOM % 16))]}"
+ done
+ echo "${macRecoveryID}"
+}
+
function get_macos() {
local BOARD_ID=""
local CWD=""
- local MACRECOVERY=""
+ local CHUNKCHECK=""
local MLB="00000000000000000"
local OS_TYPE="default"
case ${RELEASE} in
- lion) #10.7
- BOARD_ID="Mac-2E6FAB96566FE58C"
- MLB="00000000000F25Y00";;
- mountainlion) #10.8
- BOARD_ID="Mac-7DF2A3B5E5D671ED"
- MLB="00000000000F65100";;
- mavericks) #10.9
- BOARD_ID="Mac-F60DEB81FF30ACF6"
- MLB="00000000000FNN100";;
- yosemite) #10.10
- BOARD_ID="Mac-E43C1C25D4880AD6"
- MLB="00000000000GDVW00";;
- elcapitan) #10.11
- BOARD_ID="Mac-FFE5EF870D7BA81A"
- MLB="00000000000GQRX00";;
- sierra) #10.12
- BOARD_ID="Mac-77F17D7DA9285301"
- MLB="00000000000J0DX00";;
- high-sierra) #10.13
- BOARD_ID="Mac-BE088AF8C5EB4FA2"
- MLB="00000000000J80300";;
- mojave) #10.14
- BOARD_ID="Mac-7BA5B2DFE22DDD8C"
- MLB="00000000000KXPG00";;
- catalina) #10.15
- BOARD_ID="Mac-00BE6ED71E35EB86";;
- big-sur) #11
- BOARD_ID="Mac-42FD25EABCABB274";;
- monterey) #12
- BOARD_ID="Mac-E43C1C25D4880AD6";;
- ventura) #13
- BOARD_ID="Mac-BE088AF8C5EB4FA2";;
- *) echo "ERROR! Unknown release: ${RELEASE}"
- releases_macos
- exit 1;;
+ lion) #10.7
+ BOARD_ID="Mac-2E6FAB96566FE58C"
+ MLB="00000000000F25Y00";;
+ mountainlion) #10.8
+ BOARD_ID="Mac-7DF2A3B5E5D671ED"
+ MLB="00000000000F65100";;
+ mavericks) #10.9
+ BOARD_ID="Mac-F60DEB81FF30ACF6"
+ MLB="00000000000FNN100";;
+ yosemite) #10.10
+ BOARD_ID="Mac-E43C1C25D4880AD6"
+ MLB="00000000000GDVW00";;
+ elcapitan) #10.11
+ BOARD_ID="Mac-FFE5EF870D7BA81A"
+ MLB="00000000000GQRX00";;
+ sierra) #10.12
+ BOARD_ID="Mac-77F17D7DA9285301"
+ MLB="00000000000J0DX00";;
+ high-sierra) #10.13
+ BOARD_ID="Mac-BE088AF8C5EB4FA2"
+ MLB="00000000000J80300";;
+ mojave) #10.14
+ BOARD_ID="Mac-7BA5B2DFE22DDD8C"
+ MLB="00000000000KXPG00";;
+ catalina) #10.15
+ BOARD_ID="Mac-00BE6ED71E35EB86";;
+ big-sur) #11
+ BOARD_ID="Mac-42FD25EABCABB274";;
+ monterey) #12
+ BOARD_ID="Mac-E43C1C25D4880AD6";;
+ ventura) #13
+ BOARD_ID="Mac-BE088AF8C5EB4FA2";;
+ sonoma)
+ BOARD_ID="Mac-53FDB3D8DB8CA971";;
+ *) echo "ERROR! Unknown release: ${RELEASE}"
+ releases_macos
+ exit 1;;
esac
- # Use a bundled macrecovery if possible
CWD="$(dirname "${0}")"
- if [ -x "${CWD}/macrecovery" ]; then
- MACRECOVERY="${CWD}/macrecovery"
- elif [ -x /usr/bin/macrecovery ]; then
- MACRECOVERY="/usr/bin/macrecovery"
+ if [ -x "${CWD}/chunkcheck" ]; then
+ CHUNKCHECK="${CWD}/chunkcheck"
+ elif [ -x /usr/bin/chunkcheck ]; then
+ CHUNKCHECK="/usr/bin/chunkcheck"
else
- web_get "https://raw.githubusercontent.com/wimpysworld/quickemu/master/macrecovery" "${HOME}/.quickemu"
- MACRECOVERY="python3 ${HOME}/.quickemu/macrecovery"
+ web_get "https://raw.githubusercontent.com/quickemu-project/quickemu/master/chunkcheck" "${HOME}/.quickemu"
+ CHUNKCHECK="${HOME}/.quickemu/chunkcheck"
fi
- if [ -z "${MACRECOVERY}" ]; then
- echo "ERROR! Can not find a usable macrecovery."
- exit 1
+ if [ -z "${CHUNKCHECK}" ]; then
+ read -p "ERROR! Can not find chunkcheck. Will not be able to verify image. Proceed anyway?" skipVerification
+ if [ "${skipVerification,,}" != "y" ] && [ "${skipVerification,,}" != "yes" ]; then
+ exit 1
+ fi
+ echo 'Skipping verification' && skipVerification="true"
fi
- # Get firmware
- web_get "https://github.com/kholia/OSX-KVM/raw/master/OpenCore/OpenCore.qcow2" "${VM_PATH}"
- web_get "https://github.com/kholia/OSX-KVM/raw/master/OVMF_CODE.fd" "${VM_PATH}"
- if [ ! -e "${VM_PATH}/OVMF_VARS-1920x1080.fd" ]; then
- web_get "https://github.com/kholia/OSX-KVM/raw/master/OVMF_VARS-1920x1080.fd" "${VM_PATH}"
+ OpenCore_qcow2="https://github.com/kholia/OSX-KVM/raw/master/OpenCore/OpenCore.qcow2"
+ OVMF_CODE="https://github.com/kholia/OSX-KVM/raw/master/OVMF_CODE.fd"
+ OVMF_VARS="https://github.com/kholia/OSX-KVM/raw/master/OVMF_VARS-1920x1080.fd"
+
+ local appleSession=$(curl -v -H "Host: osrecovery.apple.com" -H "Connection: close" -A "InternetRecovery/1.0" http://osrecovery.apple.com/ 2>&1 | tr ';' '\n' | awk -F'session=|;' '{print $2}' | grep 1)
+ local info=$(curl -s -X POST -H "Host: osrecovery.apple.com" -H "Connection: close" -A "InternetRecovery/1.0" -b "session=\"${appleSession}\"" -H "Content-Type: text/plain"\
+ -d $'cid='$(generate_id 16)$'\nsn='${MLB}$'\nbid='${BOARD_ID}$'\nk='$(generate_id 64)$'\nfg='$(generate_id 64)$'\nos='${OS_TYPE} \
+ http://osrecovery.apple.com/InstallationPayload/RecoveryImage | tr ' ' '\n')
+ local downloadLink=$(echo "$info" | grep 'oscdn' | grep 'dmg')
+ local downloadSession=$(echo "$info" | grep 'expires' | grep 'dmg')
+ local chunkListLink=$(echo "$info" | grep 'oscdn' | grep 'chunklist')
+ local chunkListSession=$(echo "$info" | grep 'expires' | grep 'chunklist')
+
+ if [ "${just}" == 'show' ]; then
+ echo -e "Recovery URL (inaccessible through normal browser):\n${downloadLink}\nChunklist (used for verifying the Recovery Image):\n${chunkListLink}\nFirmware URLs:\n${OpenCore_qcow2}\n${OVMF_CODE}\n${OVMF_VARS}"
+ exit 0
+ elif [ "${just}" == 'test' ]; then
+ wget --spider --header "Host: oscdn.apple.com" --header "Connection: close" --header "User-Agent: InternetRecovery/1.0" --header "Cookie: AssetToken=${downloadSession}" "${downloadLink}"
+ wget --spider --header "Host: oscdn.apple.com" --header "Connection: close" --header "User-Agent: InternetRecovery/1.0" --header "Cookie: AssetToken=${chunkListSession}" "${chunkListLink}"
+ exit 0
+ elif [ "${just}" == 'download' ]; then
+ echo "Downloading macOS ${RELEASE} from ${downloadLink}"
+ web_get "${downloadLink}" "${VM_PATH}" RecoveryImage.dmg --header "Host: oscdn.apple.com" --header "Connection: close" --header "User-Agent: InternetRecovery/1.0" --header "Cookie: AssetToken=${downloadSession}"
+ web_get "${chunkListLink}" RecoveryImage.chunklist --header "Host: oscdn.apple.com" --header "Connection: close" --header "User-Agent: InternetRecovery/1.0" --header "Cookie: AssetToken=${chunkListSession}"
+ VM_PATH="$(pwd)"
+
+ else
+ echo "Downloading macOS firmware"
+ web_get "${OpenCore_qcow2}" "${VM_PATH}"
+ web_get "${OVMF_CODE}" "${VM_PATH}"
+ if [ ! -e "${VM_PATH}/OVMF_VARS-1920x1080.fd" ]; then
+ web_get "${OVMF_VARS}" "${VM_PATH}"
+ fi
+
+ if [ ! -e "${VM_PATH}/RecoveryImage.chunklist" ]; then
+ echo "Downloading macOS ${RELEASE} from ${downloadLink}"
+ web_get "${downloadLink}" "${VM_PATH}" RecoveryImage.dmg --header "Host: oscdn.apple.com" --header "Connection: close" --header "User-Agent: InternetRecovery/1.0" --header "Cookie: AssetToken=${downloadSession}"
+ web_get "${chunkListLink}" "${VM_PATH}/RecoveryImage.chunklist" --header "Host: oscdn.apple.com" --header "Connection: close" --header "User-Agent: InternetRecovery/1.0" --header "Cookie: AssetToken=${chunkListSession}"
+ fi
fi
- if [ ! -e "${VM_PATH}/RecoveryImage.chunklist" ]; then
- echo "Downloading ${RELEASE}..."
- ${MACRECOVERY} \
- --board-id "${BOARD_ID}" \
- --mlb "${MLB}" \
- --os-type "${OS_TYPE}" \
- --basename RecoveryImage \
- --outdir "${VM_PATH}" \
- download
+ if [ "${skipVerification}" != "true" ]; then
+ if ! "${CHUNKCHECK}" "${VM_PATH}" 2> /dev/null; then
+ echo "Verification failed."
+ exit 1
+ else
+ echo "Verified macOS ${RELEASE} image using chunklist."
+ fi
+ else
+ echo "Skipping verification of image."
fi
if [ -e "${VM_PATH}/RecoveryImage.dmg" ] && [ ! -e "${VM_PATH}/RecoveryImage.img" ]; then
@@ -1726,13 +2181,14 @@ function get_macos() {
qemu-img convert "${VM_PATH}/RecoveryImage.dmg" -O raw "${VM_PATH}/RecoveryImage.img" 2>/dev/null
fi
+ rm "${VM_PATH}/RecoveryImage.dmg" "${VM_PATH}/RecoveryImage.chunklist"
make_vm_config RecoveryImage.img
}
function get_mageia() {
local EDITION="${1:-}"
- local ISO=$(wget -q https://www.mageia.org/en/downloads/get/?q="Mageia-${RELEASE}-Live-${EDITION}-x86_64.iso" -O- | grep 'click here'| grep -o 'href=.*\.iso'|cut -d\" -f2)
- local HASH=$(wget -q -O- "${ISO}.sha512" | cut -d' ' -f1)
+ local ISO=$(web_pipe https://www.mageia.org/en/downloads/get/?q="Mageia-${RELEASE}-Live-${EDITION}-x86_64.iso" | grep 'click here'| grep -o 'href=.*\.iso'|cut -d\" -f2)
+ local HASH=$(web_pipe "${ISO}.sha512" | cut_1)
echo "${ISO} ${HASH}"
}
@@ -1743,24 +2199,19 @@ function get_manjaro() {
local MANIFEST=""
local URL=""
local TYPE=""
-
case ${RELEASE} in
- sway) MANIFEST="$( wget -qO- https://mirror.manjaro-sway.download/manjaro-sway/release.json )";;
+ sway) MANIFEST="$(web_pipe https://mirror.manjaro-sway.download/manjaro-sway/release.json)";;
gnome|xfce|plasma) TYPE="official";;
*) TYPE="community";;
esac
-
- [[ ${RELEASE} != "sway" ]] && MANIFEST="$(wget -qO- https://gitlab.manjaro.org/web/iso-info/-/raw/master/file-info.json)"
-
+ [[ ${RELEASE} != "sway" ]] && MANIFEST="$(web_pipe https://gitlab.manjaro.org/web/iso-info/-/raw/master/file-info.json)"
[[ ${EDITION} == "minimal" && ${TYPE} != "sway" ]] && EDITION=".minimal" || EDITION=""
-
if [[ ${RELEASE} != "sway" ]]; then
URL="$(echo ${MANIFEST} | jq -r .${TYPE}.${RELEASE}${EDITION}.image)"
else
URL=$(echo ${MANIFEST} | jq -r '.[] | select(.name|test("^manjaro-sway-.*[.]iso$")) | select(.name|contains("unstable")|not) | .url')
fi
-
- HASH=$(wget -qO- "${URL}.sha512" | cut -d' ' -f1)
+ HASH=$(web_pipe "${URL}.sha512" | cut_1)
echo "${URL} ${HASH}"
}
@@ -1769,13 +2220,12 @@ function get_mxlinux() {
local HASH=""
local ISO=""
local URL="https://sourceforge.net/projects/mx-linux/files/Final/${EDITION}"
-
case ${EDITION} in
Xfce) ISO="MX-${RELEASE}_x64.iso";;
KDE) ISO="MX-${RELEASE}_KDE_x64.iso";;
Fluxbox) ISO="MX-${RELEASE}_fluxbox_x64.iso";;
esac
- HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f1)
+ HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut_1)
echo "${URL}/${ISO} ${HASH}"
}
@@ -1783,7 +2233,7 @@ function get_netboot() {
local ISO="netboot.xyz.iso"
local HASH=""
local URL="https://boot.netboot.xyz/ipxe"
- HASH=$(wget -q -O- "${URL}/netboot.xyz-sha256-checksums.txt" | grep "${ISO}" | cut -d' ' -f1)
+ HASH=$(web_pipe "${URL}/netboot.xyz-sha256-checksums.txt" | grep "${ISO}" | cut_1)
echo "${URL}/${ISO} ${HASH}"
}
@@ -1791,7 +2241,19 @@ function get_netbsd() {
local HASH=""
local ISO="NetBSD-${RELEASE}-amd64.iso"
local URL="https://cdn.netbsd.org/pub/NetBSD/NetBSD-${RELEASE}/images/"
- HASH=$(wget -q -O- "${URL}/MD5" | grep "${ISO}" | cut -d' ' -f4)
+ HASH=$(web_pipe "${URL}/MD5" | grep "${ISO}" | cut -d' ' -f4)
+ echo "${URL}/${ISO} ${HASH}"
+}
+
+function get_nitrux() {
+ local HASH=""
+ local URLBASE=""
+ local URL=""
+ local ISO=""
+ URLBASE="https://sourceforge.net/projects/nitruxos/files/Release"
+ URL="${URLBASE}/ISO"
+ ISO=$(web_pipe 'https://sourceforge.net/projects/nitruxos/rss?path=/Release/ISO' | grep '.iso' | head -1 | cut -d']' -f1 | cut -d '/' -f4)
+ HASH=$(web_pipe "${URLBASE}/MD5/${ISONAME}.md5sum" | grep "${ISO}" | cut_1)
echo "${URL}/${ISO} ${HASH}"
}
@@ -1800,7 +2262,7 @@ function get_nixos() {
local HASH=""
local ISO="latest-nixos-${EDITION}-x86_64-linux.iso"
local URL="https://channels.nixos.org/nixos-${RELEASE}"
- HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f1)
+ HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut_1)
echo "${URL}/${ISO} ${HASH}"
}
@@ -1808,7 +2270,7 @@ function get_openbsd() {
local HASH=""
local ISO="install${RELEASE//\./}.iso"
local URL="https://mirror.leaseweb.com/pub/OpenBSD/${RELEASE}/amd64"
- HASH=$(wget -q -O- "${URL}/SHA256" | grep "${ISO}" | cut -d' ' -f4)
+ HASH=$(web_pipe "${URL}/SHA256" | grep "${ISO}" | cut -d' ' -f4)
echo "${URL}/${ISO} ${HASH}"
}
@@ -1818,14 +2280,13 @@ function get_openindiana(){
local URL=""
URL="https://dlc.openindiana.org/isos/hipster/${RELEASE}"
ISO="OI-hipster-${EDITION}-${RELEASE}.iso"
- HASH=$(wget -q -O- "${URL}/${ISO}.sha256" |cut -d' ' -f1)
+ HASH=$(web_pipe "${URL}/${ISO}.sha256" |cut_1)
echo "${URL}/${ISO} ${HASH}"
}
function get_opensuse() {
local HASH=""
local ISO=""
local URL=""
-
if [ "${RELEASE}" == "tumbleweed" ]; then
ISO="openSUSE-Tumbleweed-DVD-x86_64-Current.iso"
URL="https://download.opensuse.org/tumbleweed/iso"
@@ -1839,7 +2300,7 @@ function get_opensuse() {
ISO="openSUSE-Leap-${RELEASE}-DVD-x86_64-Current.iso"
URL="https://download.opensuse.org/distribution/leap/${RELEASE}/iso"
fi
- HASH=$(wget -q -O- "${URL}/${ISO}.sha256" |awk '{if(NR==4) print $0}'|cut -d' ' -f1)
+ HASH=$(web_pipe "${URL}/${ISO}.sha256" | awk '{if(NR==4) print $0}' | cut_1)
echo "${URL}/${ISO} ${HASH}"
}
@@ -1849,12 +2310,22 @@ function get_oraclelinux() {
local VER_MAJ=${RELEASE::1}
local VER_MIN=${RELEASE:2:1}
local URL="https://yum.oracle.com/ISOS/OracleLinux/OL${VER_MAJ}/u${VER_MIN}/x86_64/"
-
case ${VER_MAJ} in
7) ISO="OracleLinux-R${VER_MAJ}-U${VER_MIN}-Server-x86_64-dvd.iso";;
*) ISO="OracleLinux-R${VER_MAJ}-U${VER_MIN}-x86_64-dvd.iso";;
esac
- HASH=$(wget -q -O- "https://linux.oracle.com/security/gpg/checksum/OracleLinux-R${VER_MAJ}-U${VER_MIN}-Server-x86_64.checksum" | grep "${ISO}" | cut -d' ' -f1)
+ HASH=$(web_pipe "https://linux.oracle.com/security/gpg/checksum/OracleLinux-R${VER_MAJ}-U${VER_MIN}-Server-x86_64.checksum" | grep "${ISO}" | cut_1)
+ echo "${URL}/${ISO} ${HASH}"
+}
+
+function get_parrotsec() {
+ local EDITION="${1:-}"
+ local HASH=""
+ local ISO=""
+ local URL=""
+ ISO="Parrot-${EDITION}-${RELEASE}_amd64.iso"
+ URL="https://download.parrot.sh/parrot/iso/${RELEASE}"
+ HASH="$(web_pipe "${URL}/signed-hashes.txt" | grep "${ISO}" | cut_1)"
echo "${URL}/${ISO} ${HASH}"
}
@@ -1863,7 +2334,6 @@ function get_peppermint() {
local HASH=""
local ISO=""
local URL="https://sourceforge.net/projects/peppermintos/files/isos"
-
case ${EDITION} in
devuan-xfce) ISO="PeppermintOS-devuan_64_xfce.iso"
URL="${URL}/XFCE"
@@ -1878,8 +2348,7 @@ function get_peppermint() {
URL="${URL}/Gnome_FlashBack"
;;
esac
-
- HASH=$(wget -q -O- "${URL}/${ISO}-sha512.checksum" | grep "${ISO}" | cut -d' ' -f1)
+ HASH=$(web_pipe "${URL}/${ISO}-sha512.checksum" | grep "${ISO}" | cut_1)
echo "${URL}/${ISO} ${HASH}"
}
@@ -1888,8 +2357,8 @@ function get_popos() {
local HASH=""
local ISO=""
local URL=""
- URL=$(wget -q -O- "https://api.pop-os.org/builds/${RELEASE}/${EDITION}" | jq -r .url)
- HASH=$(wget -q -O- "https://api.pop-os.org/builds/${RELEASE}/${EDITION}" | jq -r .sha_sum)
+ URL=$(web_pipe "https://api.pop-os.org/builds/${RELEASE}/${EDITION}" | jq -r .url)
+ HASH=$(web_pipe "https://api.pop-os.org/builds/${RELEASE}/${EDITION}" | jq -r .sha_sum)
echo "${URL} ${HASH}"
}
@@ -1898,40 +2367,64 @@ function get_porteus() {
local HASH=""
local ISO=""
local URL=""
-
edition="${EDITION~~}"
ISO="Porteus-${edition}-v${RELEASE}-x86_64.iso"
URL="https://mirrors.dotsrc.org/porteus/x86_64/Porteus-v${RELEASE}"
- HASH=$(wget -q -O- "${URL}/sha256sums.txt" | grep "${ISO}" | cut -d' ' -f1)
+ HASH=$(web_pipe "${URL}/sha256sums.txt" | grep "${ISO}" | cut_1)
echo "${URL}/${ISO} ${HASH}"
}
-function get_reactos() {
+function get_primtux() {
+ local HASH=""
+ local URL=""
+ local ISO=""
+ ISO="PrimTux${RELEASE}-amd64-${EDITION}.iso"
+ URL="https://sourceforge.net/projects/primtux/files/Distribution"
+ HASH=$(web_pipe "${URL}/${ISO}.md5" | grep "${ISO}" | cut_1)
+ echo "${URL}/${ISO} ${HASH}"
+}
+
+function get_pureos() {
+ local EDITION="${1:-}"
local HASH=""
+ local ISO=""
local URL=""
- local TMPURL=""
+ local PureName=
+ PureName="$(web_pipe "https://www.pureos.net/download/" | grep -m 1 "downloads.puri" | cut -d '/' -f 4)"
+ local PureDate=
+ PureDate="$(web_pipe "https://www.pureos.net/download/" | grep -m 1 "downloads.puri" | cut -d '/' -f 6)"
+ local PureDateSquashed="${PureDate//'-'/}"
+ edition="${EDITION,,}"
+ URL="https://downloads.puri.sm/${PureName}/${edition}/${PureDate}"
+ ISO="pureos-${RELEASE}-${edition}-live-${PureDateSquashed}_amd64.iso"
+ local IsoTrimmed=
+ IsoTrimmed="${ISO%.*}"
+ HASH="$(web_pipe "${URL}/${IsoTrimmed}.checksums_sha256.txt" | grep -m 1 '.iso' | cut -d '.' -f 1)"
+ echo "${URL}/${ISO} ${HASH}"
+}
- TMPURL=$(wget -q -S -O- --max-redirect=0 "https://sourceforge.net/projects/reactos/files/latest/download" 2>&1 | grep -i Location | cut -d' ' -f4)
- URL=${TMPURL%\?*}
+function get_reactos() {
+ local HASH=""
+ local URL="https://sourceforge.net/projects/reactos/files/latest/download"
echo "${URL} ${HASH}"
}
+function get_rebornos() {
+ local ISO=$(web_pipe "https://meta.cdn.soulharsh007.dev/RebornOS-ISO?format=json" | jq -r ".url")
+ local HASH=$(web_pipe "https://meta.cdn.soulharsh007.dev/RebornOS-ISO?format=json" | jq -r ".md5")
+ echo "${ISO} ${HASH}"
+}
+
function get_rockylinux() {
local EDITION="${1:-}"
- if [[ "${RELEASE}" =~ ^8. ]] && [[ "${EDITION}" == "dvd" ]]
- then
- EDITION="dvd1"
+ if [[ "${RELEASE}" =~ ^8. ]] && [[ "${EDITION}" == "dvd" ]]; then
+ EDITION="dvd1"
fi
local HASH=""
local ISO="Rocky-${RELEASE}-x86_64-${EDITION}.iso"
local URL=""
-
- case ${RELEASE} in
- 9.1) URL="https://download.rockylinux.org/pub/rocky/9/isos/x86_64";;
- 8.7) URL="https://download.rockylinux.org/pub/rocky/8/isos/x86_64";;
- *) URL="http://dl.rockylinux.org/vault/rocky/${RELEASE}/isos/x86_64";;
- esac
- HASH=$(wget -q -O- "${URL}/CHECKSUM" | grep "SHA256" | grep "${ISO})" | cut -d' ' -f4)
+ URL="http://dl.rockylinux.org/vault/rocky/${RELEASE}/isos/x86_64"
+ HASH=$(web_pipe "${URL}/CHECKSUM" | grep "SHA256" | grep "${ISO})" | cut -d' ' -f4)
echo "${URL}/${ISO} ${HASH}"
}
@@ -1940,8 +2433,8 @@ function get_siduction() {
local DATE=""
local ISO=""
local URL="https://mirrors.dotsrc.org/siduction/iso/Standing_on_the_Shoulders_of_Giants/${EDITION}"
- DATE=$(wget -q -O- "${URL}"| grep .iso.md5 | cut -d'-' -f6 | cut -d'.' -f1)
- HASH=$(wget -q -O- "${URL}/${ISO}.md5" | cut -d' ' -f1)
+ DATE=$(web_pipe "${URL}"| grep .iso.md5 | cut -d'-' -f6 | cut -d'.' -f1)
+ HASH=$(web_pipe "${URL}/${ISO}.md5" | cut_1)
ISO="siduction-2023.1.1-Standing_on_the_Shoulders_of_Giants-${EDITION}-amd64-${DATE}.iso"
echo "${URL}/${ISO} ${HASH}"
}
@@ -1950,37 +2443,89 @@ function get_slackware() {
local HASH=""
local ISO="slackware64-${RELEASE}-install-dvd.iso"
local URL="https://slackware.nl/slackware/slackware-iso/slackware64-${RELEASE}-iso"
- HASH=$(wget -q -O- "${URL}/${ISO}.md5" | cut -d' ' -f1)
+ HASH=$(web_pipe "${URL}/${ISO}.md5" | cut_1)
+ echo "${URL}/${ISO} ${HASH}"
+}
+
+function get_slax() {
+ local HASH=""
+ local ISO=""
+ local URL=""
+ case ${EDITION} in
+ debian)
+ URL="https://ftp.fi.muni.cz/pub/linux/slax/Slax-12.x"
+ ISO=$(web_pipe "${URL}/md5.txt" | grep '64bit-' | cut -d' ' -f3 | tail -n1)
+ ;;
+ slackware)
+ URL="https://ftp.fi.muni.cz/pub/linux/slax/Slax-15.x"
+ ISO=$(web_pipe "${URL}/md5.txt" | grep '64bit-' | cut -d' ' -f3 | tail -n1)
+ ;;
+ esac
+ HASH=$(web_pipe "${URL}/md5.txt" | grep '64bit-' | cut -d' ' -f1 | tail -n1)
echo "${URL}/${ISO} ${HASH}"
}
+function get_slint() {
+ local HASH=""
+ local ISO=""
+ local URL=""
+ # Change to latest if needed
+ ISO="slint64-15.0-5.iso"
+ URL="https://slackware.uk/slint/x86_64/slint-${RELEASE}/iso"
+ HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut -d' ' -f4)
+ echo "${URL}/${ISO}" "${HASH}"
+}
+
+function get_slitaz() {
+ local HASH=""
+ local ISO="slitaz-rolling-${RELEASE}"
+ local URL="http://mirror.slitaz.org/iso/rolling"
+ case ${RELEASE} in
+ preferred) ISO="slitaz-rolling";;
+ *) ISO="slitaz-rolling-${RELEASE}";;
+ esac
+ HASH=$(web_pipe "${URL}/${ISO}.md5" | cut_1)
+ echo "${URL}/${ISO}.iso ${HASH}"
+}
+
function get_solus() {
local EDITION="${1:-}"
local HASH=""
local ISO="Solus-${RELEASE}-${EDITION}.iso"
local URL="https://mirrors.rit.edu/solus/images/${RELEASE}"
-
- HASH=$(wget -q -O- "${URL}/${ISO}.sha256sum" | cut -d' ' -f1)
+ HASH=$(web_pipe "${URL}/${ISO}.sha256sum" | cut_1)
echo "${URL}/${ISO} ${HASH}"
}
-function get_spiral() {
- local EDITION="${1:-}"
- local HASH=""
- local ISO="SpiralLinux_${EDITION}_12.231005_x86-64.iso"
- local URL="https://sourceforge.net/projects/spirallinux/files/12.231005"
+function get_sparkylinux() {
+ local EDITION="${1:-}"
+ local HASH=""
+ local ISO=""
+ local URL=""
+ ISO="sparkylinux-${RELEASE}-x86_64-${EDITION}.iso"
+ case ${EDITION} in
+ minimalcli) URL="https://sourceforge.net/projects/sparkylinux/files/cli";;
+ minimalgui) URL="https://sourceforge.net/projects/sparkylinux/files/base";;
+ *) URL="https://sourceforge.net/projects/sparkylinux/files/${EDITION}";;
+ esac
+ HASH=$(web_pipe "${URL}/${ISO}.allsums.txt" | head -2 | grep 'iso' | cut_1)
+ echo "${URL}/${ISO}" "${HASH}"
+}
- HASH=$(wget -q -O- 'https://sourceforge.net/projects/spirallinux/rss?path=/' | grep "${ISO}" | grep 'md5' | cut -d'<' -f3 | cut -d'>' -f2)
- echo "${URL}/${ISO}" "${HASH}"
+function get_spirallinux() {
+ local EDITION="${1:-}"
+ local HASH=""
+ local ISO="SpiralLinux_${EDITION}_12.231005_x86-64.iso"
+ local URL="https://sourceforge.net/projects/spirallinux/files/12.231005"
+ HASH=$(web_pipe 'https://sourceforge.net/projects/spirallinux/rss?path=/' | grep "${ISO}" | grep 'md5' | cut -d'<' -f3 | cut -d'>' -f2)
+ echo "${URL}/${ISO}" "${HASH}"
}
function get_tails() {
- local ISO=""
local JSON=""
local HASH=""
local URL=""
-
- JSON="$(wget -q -O- "https://tails.boum.org/install/v2/Tails/amd64/${RELEASE}/latest.json")"
+ JSON="$(web_pipe "https://tails.boum.org/install/v2/Tails/amd64/${RELEASE}/latest.json")"
URL=$(echo "${JSON}" | jq -r '.installations[0]."installation-paths"[]|select(.type=="iso")|."target-files"[0].url')
HASH=$(echo "${JSON}" | jq -r '.installations[0]."installation-paths"[]|select(.type=="iso")|."target-files"[0].sha256')
echo "${URL} ${HASH}"
@@ -1990,14 +2535,12 @@ function get_tinycore() {
local HASH=""
local ISO="${EDITION}-${RELEASE}.iso"
local URL=""
-
if [ "${EDITION}" == "Core" ] || [ "${EDITION}" == "TinyCore" ] || [ "${EDITION}" == "CorePlus" ]; then
URL="http://www.tinycorelinux.net/14.x/x86/release"
elif [ "${EDITION}" == "CorePure64" ] || [ "${EDITION}" == "TinyCorePure64" ]; then
URL="http://www.tinycorelinux.net/14.x/x86_64/release"
fi
-
- HASH=$(wget -q -O- "${URL}/${ISO}.md5.txt" | cut -d' ' -f1)
+ HASH=$(web_pipe "${URL}/${ISO}.md5.txt" | cut_1)
echo "${URL}/${ISO} ${HASH}"
}
@@ -2006,69 +2549,67 @@ function get_trisquel() {
local HASH=""
local ISO=""
local URL="https://mirrors.ocf.berkeley.edu/trisquel-images"
-
case ${EDITION} in
- mate) ISO="trisquel_${RELEASE}_amd64.iso";;
- lxde) ISO="trisquel-mini_${RELEASE}_amd64.iso";;
- kde) ISO="triskel_${RELEASE}_amd64.iso";;
- sugar) ISO="trisquel-sugar_${RELEASE}_amd64.iso";;
+ mate) ISO="trisquel_${RELEASE}_amd64.iso";;
+ lxde) ISO="trisquel-mini_${RELEASE}_amd64.iso";;
+ kde) ISO="triskel_${RELEASE}_amd64.iso";;
+ sugar) ISO="trisquel-sugar_${RELEASE}_amd64.iso";;
esac
- HASH=$(wget -q -O- "${URL}/${ISO}.sha1" | grep "${ISO}" | cut -d' ' -f1)
+ HASH=$(web_pipe "${URL}/${ISO}.sha1" | grep "${ISO}" | cut_1)
echo "${URL}/${ISO} ${HASH}"
}
function get_truenas-scale() {
local ISO=""
local URL=""
-
local DLINFO="https://www.truenas.com/download-truenas-scale/"
-
- URL=$(wget -q ${DLINFO} -O- | grep -o "\"https://.*${RELEASE}.*\.iso\""|cut -d\" -f2)
- HASH=$(wget -q ${URL}.sha256 -O- | cut -d' ' -f1 )
-
+ URL=$(web_pipe ${DLINFO} | grep -o "\"https://.*${RELEASE}.*\.iso\"" | cut -d'"' -f 2)
+ HASH=$(web_pipe "${URL}.sha256" | cut_1)
echo "${URL} ${HASH}"
}
function get_truenas-core() {
local ISO=""
local URL=""
-
local DLINFO="https://www.truenas.com/download-truenas-core/"
- URL=$(wget -q ${DLINFO} -O- | grep -o "\"https://.*${RELEASE}.*\.iso\""|cut -d\" -f2)
- HASH=$(wget -q ${URL}.sha256 -O- | cut -d' ' -f1)
+ URL=$(web_pipe ${DLINFO} | grep -o "\"https://.*${RELEASE}.*\.iso\"" | cut -d'"' -f 2)
+ HASH=$(web_pipe "${URL}".sha256 | cut_1)
+ echo "${URL} ${HASH}"
+}
+function get_tuxedo-os() {
+ local ISO=""
+ local URL=""
+ local Current=
+ Current="$(web_pipe "https://os.tuxedocomputers.com/" | grep -m 1 current.iso | cut -d '=' -f 4 | cut -d '"' -f 2)"
+ URL="https://os.tuxedocomputers.com/${Current}"
+ HASH="$(web_pipe "https://os.tuxedocomputers.com/checksums/${Current}.sha256" | cut -d ' ' -f 1)"
echo "${URL} ${HASH}"
}
function get_ubuntu-server() {
-
local HASH=""
local ISO=""
local URL=""
-
[[ $RELEASE = daily ]] && RELEASE=daily-live
-
if [[ "${RELEASE}" == "daily"* ]]; then
URL="https://cdimage.ubuntu.com/${OS}/${RELEASE}/current"
else
URL="https://releases.ubuntu.com/${RELEASE}"
fi
-
if wget -q --spider "${URL}/SHA256SUMS"; then
- DATA=$(wget -qO- "${URL}/SHA256SUMS" | grep 'live-server' | grep amd64 | grep iso)
+ DATA=$(web_pipe "${URL}/SHA256SUMS" | grep 'live-server' | grep amd64 | grep iso)
ISO=$(cut -d'*' -f2 <<<${DATA})
- HASH=$(cut -d' ' -f1 <<<${DATA})
+ HASH=$(cut_1 <<<${DATA})
else
- DATA=$(wget -qO- "${URL}/MD5SUMS" | grep 'live-server' | grep amd64 | grep iso)
+ DATA=$(web_pipe "${URL}/MD5SUMS" | grep 'live-server' | grep amd64 | grep iso)
ISO=$(cut -d' ' -f3 <<<${DATA})
- HASH=$(cut -d' ' -f1 <<<${DATA})
+ HASH=$(cut_1 <<<${DATA})
fi
-
if [ -z $ISO ] || [ -z $HASH ]; then
echo "$(pretty_name $OS) ${RELEASE} is currently unavailable. Please select other OS/Release combination"
exit 1
fi
-
if [[ "${RELEASE}" == "daily"* ]] || [ "${RELEASE}" == "dvd" ]; then
zsync_get "${URL}/${ISO}" "${VM_PATH}" "${OS}-devel.iso"
make_vm_config "${OS}-devel.iso"
@@ -2084,14 +2625,11 @@ function get_ubuntu() {
local HASH=""
local URL=""
local DATA=""
-
[[ $RELEASE = daily ]] && RELEASE=daily-live
-
if [[ "${RELEASE}" == "daily"* ]] && [ "${OS}" == "ubuntustudio" ]; then
# Ubuntu Studio daily-live images are in the dvd directory
RELEASE="dvd"
fi
-
if [[ "${RELEASE}" == "eol-"* ]]; then
URL="https://old-releases.ubuntu.com/releases/${RELEASE/eol-/}"
elif [[ "${RELEASE}" == "jammy-daily" ]]; then
@@ -2109,22 +2647,19 @@ function get_ubuntu() {
else
URL="https://cdimage.ubuntu.com/${OS}/releases/${RELEASE}/release"
fi
-
if wget -q --spider "${URL}/SHA256SUMS"; then
- DATA=$(wget -qO- "${URL}/SHA256SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | grep -v "+mac")
+ DATA=$(web_pipe "${URL}/SHA256SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | grep -v "+mac")
ISO=$(cut -d'*' -f2 <<<${DATA} | sed '1q;d')
- HASH=$(cut -d' ' -f1 <<<${DATA} | sed '1q;d')
+ HASH=$(cut_1 <<<${DATA} | sed '1q;d')
else
- DATA=$(wget -qO- "${URL}/MD5SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | grep -v "+mac")
+ DATA=$(web_pipe "${URL}/MD5SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | grep -v "+mac")
ISO=$(cut -d'*' -f2 <<<${DATA})
- HASH=$(cut -d' ' -f1 <<<${DATA})
+ HASH=$(cut_1 <<<${DATA})
fi
-
if [ -z $ISO ] || [ -z $HASH ]; then
echo "$(pretty_name $OS) ${RELEASE} is currently unavailable. Please select other OS/Release combination"
exit 1
fi
-
if [[ "${RELEASE}" == "daily"* ]] || [ "${RELEASE}" == "dvd" ]; then
zsync_get "${URL}/${ISO}" "${VM_PATH}" "${OS}-devel.iso"
make_vm_config "${OS}-devel.iso"
@@ -2138,21 +2673,27 @@ function get_ubuntu() {
fi
}
+function get_vanillaos() {
+ local ISO=$(web_pipe "https://api.github.com/repos/Vanilla-OS/live-iso/releases" | grep 'download_url' | grep "${RELEASE}" | head -1 | cut -d'"' -f4)
+ local HASH_URL=$(echo "${ISO}" | sed s'|\.iso|\.sha256\.txt|g')
+ local HASH=$(web_pipe "${HASH_URL}" | cut_1)
+ echo "${ISO} ${HASH}"
+}
+
function get_void() {
local DATE=""
local EDITION="${1:-}"
local HASH=""
local ISO=""
local URL="https://repo-default.voidlinux.org/live/current"
-
- DATE=$(wget -q -O- "${URL}/sha256sum.txt" | head -n1 | cut -d'.' -f1 | cut -d'-' -f4)
+ DATE=$(web_pipe "${URL}/sha256sum.txt" | head -n1 | cut -d'.' -f1 | cut -d'-' -f4)
case ${EDITION} in
- glibc) ISO="void-live-x86_64-${DATE}-base.iso";;
- musl) ISO="void-live-x86_64-musl-${DATE}-base.iso";;
- xfce-glibc) ISO="void-live-x86_64-${DATE}-xfce.iso";;
- xfce-musl) ISO="void-live-x86_64-musl-${DATE}-xfce.iso";;
+ glibc) ISO="void-live-x86_64-${DATE}-base.iso";;
+ musl) ISO="void-live-x86_64-musl-${DATE}-base.iso";;
+ xfce-glibc) ISO="void-live-x86_64-${DATE}-xfce.iso";;
+ xfce-musl) ISO="void-live-x86_64-musl-${DATE}-xfce.iso";;
esac
- HASH="$(wget -q -O- "${URL}/sha256sum.txt" | grep "${ISO}" | cut -d' ' -f4)"
+ HASH="$(web_pipe "${URL}/sha256sum.txt" | grep "${ISO}" | cut -d' ' -f4)"
echo "${URL}/${ISO} ${HASH}"
}
@@ -2160,18 +2701,7 @@ function get_vxlinux() {
local HASH=""
local ISO="vx-${RELEASE}.iso"
local URL="https://github.com/VX-Linux/main/releases/download/${RELEASE}"
-
- HASH=$(wget -q -O- "${URL}/vx-${RELEASE}.md5" | cut -d' ' -f1)
- echo "${URL}/${ISO} ${HASH}"
-}
-
-function get_xerolinux() {
- local HASH=""
- local URL=""
- local ISO="xerolinux-2022.12-x86_64.iso"
- local URL="https://sourceforge.net/projects/xerolinux/files/Releases"
-
- HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f1)
+ HASH=$(web_pipe "${URL}/vx-${RELEASE}.md5" | cut_1)
echo "${URL}/${ISO} ${HASH}"
}
@@ -2180,9 +2710,7 @@ function get_zorin() {
local HASH=""
local ISO=""
local URL=""
-
- # Parse out the iso URL from the redirector
- URL=$(wget -q -S -O- --max-redirect=0 "https://zrn.co/${RELEASE}${EDITION}" 2>&1 | grep Location | cut -d' ' -f4)
+ URL="https://zrn.co/${RELEASE}${EDITION}"
echo "${URL} ${HASH}"
}
@@ -2473,84 +3001,238 @@ EOF
handle_curl_error() {
local error_code="$1"
-
local fatal_error_action=2
-
case "$error_code" in
- 6)
- echo "Failed to resolve Microsoft servers! Is there an Internet connection? Exiting..."
- return "$fatal_error_action"
- ;;
- 7)
- echo "Failed to contact Microsoft servers! Is there an Internet connection or is the server down?"
- ;;
- 23)
- echo "Failed at writing Windows media to disk! Out of disk space or permission error? Exiting..."
- return "$fatal_error_action"
- ;;
- 26)
- echo "Ran out of memory during download! Exiting..."
- return "$fatal_error_action"
- ;;
- 36)
- echo "Failed to continue earlier download!"
- ;;
- 22)
- echo "Microsoft servers returned failing HTTP status code!"
- ;;
+ 6)
+ echo "Failed to resolve Microsoft servers! Is there an Internet connection? Exiting..."
+ return "$fatal_error_action"
+ ;;
+ 7)
+ echo "Failed to contact Microsoft servers! Is there an Internet connection or is the server down?"
+ ;;
+ 8)
+ echo "Microsoft servers returned a malformed HTTP response!"
+ ;;
+ 22)
+ echo "Microsoft servers returned a failing HTTP status code!"
+ ;;
+ 23)
+ echo "Failed at writing Windows media to disk! Out of disk space or permission error? Exiting..."
+ return "$fatal_error_action"
+ ;;
+ 26)
+ echo "Ran out of memory during download! Exiting..."
+ return "$fatal_error_action"
+ ;;
+ 36)
+ echo "Failed to continue earlier download!"
+ ;;
+ 63)
+ echo "Microsoft servers returned an unexpectedly large response!"
+ ;;
# POSIX defines exit statuses 1-125 as usable by us
# https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_08_02
$((error_code <= 125)))
- # Must be some other server error (possibly with this specific request/file)
- # This is when accounting for all possible errors in the curl manual assuming a correctly formed curl command and HTTP(S) request, using only the curl features we're using, and a sane build
- echo "Server returned an error status!"
+ # Must be some other server or network error (possibly with this specific request/file)
+ # This is when accounting for all possible errors in the curl manual assuming a correctly formed curl command and an HTTP(S) request, using only the curl features we're using, and a sane build
+ echo "Miscellaneous server or network error!"
+ ;;
+ 126 | 127 )
+ echo "Curl command not found! Please install curl and try again. Exiting..."
+ return "$fatal_error_action"
+ ;;
+ # Exit statuses are undefined by POSIX beyond this point
+ *)
+ case "$(kill -l "$error_code")" in
+ # Signals defined to exist by POSIX:
+ # https://pubs.opengroup.org/onlinepubs/009695399/basedefs/signal.h.html
+ INT)
+ echo "Curl was interrupted!"
;;
- 126 | 127)
- echo "Curl command not found! Please install curl and try again. Exiting..."
+ # There could be other signals but these are most common
+ SEGV | ABRT )
+ echo "Curl crashed! Failed exploitation attempt? Please report any core dumps to curl developers. Exiting..."
return "$fatal_error_action"
;;
- # Exit statuses are undefined by POSIX beyond this point
- *)
- case "$(kill -l "$error_code")" in
- # Signals defined to exist by POSIX:
- # https://pubs.opengroup.org/onlinepubs/009695399/basedefs/signal.h.html
- INT)
- echo "Curl was interrupted!"
- ;;
- # There could be other signals but these are most common
- SEGV | ABRT)
- echo "Curl crashed! Failed exploitation attempt? Please report any core dumps to curl developers. Exiting..."
- return "$fatal_error_action"
- ;;
- *)
- echo "Curl terminated due to a fatal signal!"
- ;;
- esac
+ *)
+ echo "Curl terminated due to a fatal signal!"
+ ;;
+ esac
esac
-
return 1
}
-function download_windows() {
+function curl_windows() {
+ local part_ext=".PART"
+ local vm_path="$1"
+ local out_file="$2"
+ local tls_version="$3"
+ local url="$4"
+
+ mkdir -p "${vm_path}"
+
+ real_file="${vm_path}/${out_file}"
+ part_file="${vm_path}/${out_file}${part_ext}"
+
+ # --location: Microsoft likes to change which endpoint these downloads are stored on but is usually kind enough to add redirects
+ # --fail: Return an error on server errors where the HTTP response code is 400 or greater
+ curl --progress-bar --location --output "${part_file}" --continue-at - --max-filesize 10G --fail --proto =https "--tlsv$tls_version" --http1.1 -- "$url" || {
+ error_code=$?
+ handle_curl_error "$error_code"
+ error_action=$?
+
+ # Clean up and make sure a future resume doesn't happen from a bad download resume file
+ if [ -f "${part_file}" ]; then
+ # If file is empty, bad HTTP code, or bad download resume file
+ if [ ! -s "${part_file}" ] || [ "$error_code" = 22 ] || [ "$error_code" = 36 ]; then
+ echo "- Deleting failed download..."
+ rm -f "${part_file}"
+ fi
+ fi
+
+ local url="https://www.microsoft.com/en-us/software-download/windows$windows_version"
+ case "$windows_version" in
+ 8 | 10) url="${url}ISO";;
+ esac
+
+ echo
+ echo " - Manually download the Windows ${windows_version} ISO using a web browser from: ${url}"
+ echo " - Save the downloaded ISO to: $(realpath "${VM_PATH}")"
+ echo " - Update the config file to reference the downloaded ISO: ./${VM_PATH}.conf"
+ echo " - Continuing with the VM creation process..."
+
+ return "$error_action"
+ }
+
+ # Full downloaded succeeded
+ mv "${part_file}" "${real_file}"
+}
+
+function download_windows_server() {
+ # Copyright (C) 2024 Elliot Killick
+ # This function is adapted from the Mido project:
+ # https://github.com/ElliotKillick/Mido
+
+ # Download enterprise evaluation Windows versions
+ local windows_version="$1"
+ local enterprise_type="$2"
+
+ local url="https://www.microsoft.com/en-us/evalcenter/download-$windows_version"
+
+ local iso_download_page_html="$(curl --silent --location --max-filesize 1M --fail --proto =https --tlsv1.2 --http1.1 -- "$url")" || {
+ handle_curl_error $?
+ return $?
+ }
+
+ if ! [ "$iso_download_page_html" ]; then
+ # This should only happen if there's been some change to where this download page is located
+ echo " - Windows server download page gave us an empty response"
+ return 1
+ fi
+
+ local CULTURE=""
+ local COUNTRY=""
+ local PRETTY_RELEASE=""
+
+ case "$RELEASE" in
+ "10-ltsc") PRETTY_RELEASE="10 LTSC";;
+ "2012-r2") PRETTY_RELEASE="2012 R2";;
+ *) PRETTY_RELEASE="$RELEASE";;
+ esac
+
+ case "$LANG" in
+ "English (Great Britain)")
+ CULTURE="en-gb"
+ COUNTRY="GB";;
+ "Chinese (Simplified)")
+ CULTURE="zh-cn"
+ COUNTRY="CN";;
+ "Chinese (Traditional)")
+ CULTURE="zh-tw"
+ COUNTRY="TW";;
+ "French")
+ CULTURE="fr-fr"
+ COUNTRY="FR";;
+ "German")
+ CULTURE="de-de"
+ COUNTRY="DE";;
+ "Italian")
+ CULTURE="it-it"
+ COUNTRY="IT";;
+ "Japanese")
+ CULTURE="ja-jp"
+ COUNTRY="JP";;
+ "Korean")
+ CULTURE="ko-kr"
+ COUNTRY="KR";;
+ "Portuguese (Brazil)")
+ CULTURE="pt-br"
+ COUNTRY="BR";;
+ "Spanish")
+ CULTURE="es-es"
+ COUNTRY="ES";;
+ "Russian")
+ CULTURE="ru-ru"
+ COUNTRY="RU";;
+ *)
+ CULTURE="en-us"
+ COUNTRY="US";;
+ esac
+
+ iso_download_links="$(echo "$iso_download_page_html" | grep -o "https://go.microsoft.com/fwlink/p/?LinkID=[0-9]\+&clcid=0x[0-9a-z]\+&culture=$CULTURE&country=$COUNTRY")" || {
+ # This should only happen if there's been some change to the download endpoint web address
+ echo "- Windows server download page gave us no download link"
+ return 1
+ }
+
+ # Limit untrusted size for input validation
+ iso_download_links="$(echo "$iso_download_links" | head -c 1024)"
+
+ case "$enterprise_type" in
+ # Select x64 download link
+ "enterprise") iso_download_link=$(echo "$iso_download_links" | head -n 2 | tail -n 1) ;;
+ # Select x64 LTSC download link
+ "ltsc") iso_download_link=$(echo "$iso_download_links" | head -n 4 | tail -n 1) ;;
+ *) iso_download_link="$iso_download_links" ;;
+ esac
+
+ # Follow redirect so proceeding log message is useful
+ # This is a request we make this Fido doesn't
+ # We don't need to set "--max-filesize" here because this is a HEAD request and the output is to /dev/null anyway
+ iso_download_link="$(curl --silent --location --output /dev/null --silent --write-out "%{url_effective}" --head --fail --proto =https --tlsv1.2 --http1.1 -- "$iso_download_link")" || {
+ # This should only happen if the Microsoft servers are down
+ handle_curl_error $?
+ return $?
+ }
+
+ # Limit untrusted size for input validation
+ iso_download_link="$(echo "$iso_download_link" | head -c 1024)"
+
+ echo "Downloading $(pretty_name "${OS}") ${PRETTY_RELEASE} (${LANG}): $iso_download_link"
+
+ # Use highest TLS version for endpoints that support it
+ case "$iso_download_link" in
+ "https://download.microsoft.com"*) tls_version="1.2" ;;
+ *) tls_version="1.3" ;;
+ esac
+
+ # Download ISO
+ FILE_NAME="${iso_download_link##*/}"
+ curl_windows "${VM_PATH}" "${FILE_NAME}" "$tls_version" "$iso_download_link"
+ OS="windows-server"
+}
+
+function download_windows_workstation() {
+ # This function is adapted from the Mido project:
+ # https://github.com/ElliotKillick/Mido
# Download newer consumer Windows versions from behind gated Microsoft API
- # This function aims to precisely emulate what Fido does down to the URL requests and HTTP headers (exceptions: updated user agent and referer adapts to Windows version instead of always being "windows11") but written in POSIX sh (with coreutils) and curl instead of PowerShell (also simplified to greatly reduce attack surface)
- # However, differences such as the order of HTTP headers and TLS stacks (could be used to do TLS fingerprinting) still exist
- #
- # Command translated: ./Fido -Win 10 -Lang English -Verbose
- # "English" = "English (United States)" (as opposed to the default "English (International)")
- # For testing Fido, replace all "https://" with "http://" and remove all instances of "-MaximumRedirection 0" (to allow redirection of HTTP traffic to HTTPS) so HTTP requests can easily be inspected in Wireshark
- # Fido (command-line only) works under PowerShell for Linux if that makes it easier for you
- # UPDATE: Fido v1.4.2+ no longer works without being edited on Linux due to these issues on the Fido GitHub repo (and possibly others after these): #56 and #58
- #
- # If this function in Mido fails to work for you then please test with the Fido script before creating an issue because we basically just copy what Fido does exactly:
- # https://github.com/pbatard/Fido
# Either 8, 10, or 11
local windows_version="$1"
local url="https://www.microsoft.com/en-us/software-download/windows$windows_version"
case "$windows_version" in
- 8 | 10) url="${url}ISO";;
+ 8 | 10) url="${url}ISO";;
esac
local user_agent="Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0"
@@ -2562,22 +3244,20 @@ function download_windows() {
# This is the *only* request we make that Fido doesn't. Fido manually maintains a list of all the Windows release/edition product edition IDs in its script (see: $WindowsVersions array). This is helpful for downloading older releases (e.g. Windows 10 1909, 21H1, etc.) but we always want to get the newest release which is why we get this value dynamically
# Also, keeping a "$WindowsVersions" array like Fido does would be way too much of a maintenance burden
# Remove "Accept" header that curl sends by default
- local iso_download_page_html="$(curl --silent --user-agent "$user_agent" --header "Accept:" --fail --proto =https --tlsv1.2 --http1.1 -- "$url")" || {
+ local iso_download_page_html="$(curl --silent --user-agent "$user_agent" --header "Accept:" --max-filesize 1M --fail --proto =https --tlsv1.2 --http1.1 -- "$url")" || {
handle_curl_error $?
return $?
}
- # Limit untrusted size for input validation
- iso_download_page_html="$(echo "$iso_download_page_html" | head -c 102400)"
# tr: Filter for only numerics to prevent HTTP parameter injection
# head -c was recently added to POSIX: https://austingroupbugs.net/view.php?id=407
local product_edition_id="$(echo "$iso_download_page_html" | grep -Eo '