-
Notifications
You must be signed in to change notification settings - Fork 669
Update general QEMU instructions in main README #4009
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
fcdffd6
e7e8bdc
8ea58d3
bd35f85
f740727
7f04c8d
ce41775
acc03a4
7ff176a
daebc4b
0010b33
bcf190d
8706e77
086a658
7084174
3bca27b
967d219
77f1ebf
3a01236
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -135,55 +135,89 @@ The profiles' definitions and the packages they will install can be directly vie | |
|
|
||
| ## Using a Live ISO Image | ||
|
|
||
| If you want to test a commit, branch, or bleeding edge release from the repository using the standard Arch Linux Live ISO image, | ||
| replace the archinstall version with a newer one and execute the subsequent steps defined below. | ||
|
|
||
| *Note: When booting from a live USB, the space on the ramdisk is limited and may not be sufficient to allow | ||
| running a re-installation or upgrade of the installer. In case one runs into this issue, any of the following can be used | ||
| - Resize the root partition https://wiki.archlinux.org/title/Archiso#Adjusting_the_size_of_the_root_file_system | ||
| - The boot parameter `copytoram=y` (https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio-archiso/-/blob/master/docs/README.bootparams#L26) | ||
| can be specified which will copy the root filesystem to tmpfs.* | ||
|
|
||
| 1. You need a working network connection | ||
| 2. Install the build requirements with `pacman -Sy; pacman -S git python-pip gcc pkgconf` | ||
| *(note that this may or may not work depending on your RAM and current state of the squashfs maximum filesystem free space)* | ||
| 3. Uninstall the previous version of archinstall with `pip uninstall --break-system-packages archinstall` | ||
| 4. Now clone the latest repository with `git clone https://github.com/archlinux/archinstall` | ||
| 5. Enter the repository with `cd archinstall` | ||
| *At this stage, you can choose to check out a feature branch for instance with `git checkout v2.3.1-rc1`* | ||
| 6. To run the source code, there are 2 different options: | ||
| - Run a specific branch version from source directly using `python -m archinstall`, in most cases this will work just fine, the | ||
| rare case it will not work is if the source has introduced any new dependencies that are not installed yet | ||
| - Installing the branch version with `pip install --break-system-packages .` and `archinstall` | ||
| Using [`QEMU`](https://wiki.archlinux.org/title/QEMU): | ||
| > Provided you have KVM compatible hardware: check using `lsmod | grep -i "kvm"` this can often be enabled/disabled in motherboard settings under term "Virtualisation". And an ISO from [ArchDownload](https://archlinux.org/download/) | ||
|
|
||
| ```shell | ||
| # deps | ||
| pacman -S qemu-system-x86 qemu-img | ||
| # create a disk (note its allocated not used yet) | ||
| qemu-img create -f qcow2 "$image_name" 40G | ||
| # boot for installation | ||
| qemu-system-x86_64 -enable-kvm -m 4096 -cpu host -smp 4 \ | ||
| -vga std -hda "$image_name" -cdrom archlinux-x86_64.iso -boot d | ||
| ``` | ||
| Once inside QEMU/ISO (example testing branches): | ||
|
|
||
| ```shell | ||
| pacman -Sy git | ||
| git clone -b testing-branch https://github.com/archlinux/archinstall | ||
| # alternative is to clone master then checkout <branch> | ||
| cd archinstall && python -m archinstall | ||
| ``` | ||
|
|
||
| Collaborators maintain their own [forks](https://github.com/archlinux/archinstall/forks?include=active&page=1&period=2y&sort_by=last_updated) that can also be tested. | ||
|
|
||
| To test with UEFI vars add: | ||
| ```shell | ||
| -drive if=pflash,format=raw,readonly=on,file=/usr/share/edk2/x64/OVMF_CODE.4m.fd | ||
| -drive if=pflash,format=raw,file=/usr/share/ovmf/x64/OVMF_VARS.4m.fd | ||
| ``` | ||
| Check these path exists on your system `ls -la /usr/share/ovmf/x64/`. | ||
|
|
||
| Once install is done use `poweroff` then: | ||
|
|
||
| ```shell | ||
| # standard (after installation) | ||
| qemu-system-x86 -enable-kvm -m 4096 -cpu host -smp 4 \ | ||
| -vga std -hda "$image_name" -boot c | ||
| ``` | ||
|
|
||
| More advanced use cases can use `virglrenderer qemu-hw-display-virtio-gpu-pci qemu-hw-display-virtio-gpu qemu-ui-sdl qemu-ui-gtk qemu-audio-pipewire`. And full list of subjects can be found [here](https://wiki.archlinux.org/title/Category:Virtualization) | ||
|
|
||
| Possibly get hardware acceleration/sound to work via `-device virtio-gpu-pci`, `-vga none -display sdl,gl=on` and `-audiodev pipewire,id=snd0 -device intel-hda -device hda-duplex,audiodev=snd0`. Illustrative examples. The guest system my also require drivers such as `vulkan-swrast` or `vulkan-virtio`. | ||
|
|
||
| Or use any of the GUI managers which should handle parts of this for you: [VirtManager](https://wiki.archlinux.org/title/Virt-manager), [VirtualBox](https://wiki.archlinux.org/title/VirtualBox), [VMWare](https://wiki.archlinux.org/title/VMware), RemoteBox, etc. | ||
|
|
||
| ## Without a Live ISO Image | ||
|
|
||
| To test this without a live ISO, the simplest approach is to use a local image and create a loop device.<br> | ||
| This can be done by installing `pacman -S arch-install-scripts util-linux` locally and doing the following: | ||
| To test this without a live ISO, the simplest approach is to use a local image and create a loop device. | ||
| This can be done by installing pacman -S arch-install-scripts util-linux locally and doing the following: | ||
| ```shell | ||
| # truncate -s 20G testimage.img | ||
| # losetup --partscan --show ./testimage.img | ||
| # pip install --upgrade archinstall | ||
| # python -m archinstall --script guided | ||
| # qemu-system-x86_64 -enable-kvm -machine q35,accel=kvm -device intel-iommu -cpu host -m 4096 -boot order=d -drive file=./testimage.img,format=raw -drive if=pflash,format=raw,readonly,file=/usr/share/ovmf/x64/OVMF.4m.fd -drive if=pflash,format=raw,readonly,file=/usr/share/ovmf/x64/OVMF.4m.fd | ||
| ``` | ||
|
|
||
| This will create a 20 GB testimage.img and create a loop device which we can use to format and install to. | ||
| archinstall is installed and executed in guided mode. Once the installation is complete, you can use qemu/kvm to boot the test media. | ||
| (You'd actually need to do some EFI magic in order to point the EFI vars to the partition 0 in the test medium, so this won't work entirely out of the box, but that gives you a general idea of what we're going for here) | ||
|
|
||
| # truncate -s 20G testimage.img | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we leave this in as it is very useful for running archinstall locally during dev and use the loopback device
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried them locally and didn't really feel it was clear enough (second command didn't seem to work) maybe I'm missing something here and we can clarify.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They work fine for me. has changed recently as the |
||
| # losetup --partscan --show --find ./testimage.img | ||
| # pip install --upgrade archinstall | ||
| # python -m archinstall --script guided | ||
| # qemu-system-x86_64 -enable-kvm -machine q35,accel=kvm -device intel-iommu -cpu host -m 4096 -boot order=d -drive file=./testimage.img,format=raw -drive if=pflash,format=raw,readonly,file=/usr/share/ovmf/x64/OVMF.4m.fd -drive if=pflash,format=raw,readonly,file=/usr/share/ovmf/x64/OVMF.4m.fd | ||
| Or using [`archiso`](https://wiki.archlinux.org/title/Archiso) to create your own ISO. | ||
|
|
||
| This will create a *20 GB* `testimage.img` and create a loop device which we can use to format and install to.<br> | ||
| `archinstall` is installed and executed in [guided mode](#docs-todo). Once the installation is complete, ~~you can use qemu/kvm to boot the test media.~~<br> | ||
| *(You'd actually need to do some EFI magic in order to point the EFI vars to the partition 0 in the test medium, so this won't work entirely out of the box, but that gives you a general idea of what we're going for here)* | ||
| This is neat as you can pre-cache packages as a [local repo](https://wiki.archlinux.org/title/Archiso#Custom_local_repository) in order to shorten testing time. | ||
|
|
||
| There's also a [Building and Testing](https://github.com/archlinux/archinstall/wiki/Building-and-Testing) guide.<br> | ||
| It will go through everything from packaging, building and running *(with qemu)* the installer against a dev branch. | ||
|
|
||
| You can also run archinstall from an existing host-system to install to another target without an ISO. | ||
|
|
||
| # FAQ | ||
|
|
||
| ## Keyring out-of-date | ||
| For a description of the problem see https://archinstall.archlinux.page/help/known_issues.html#keyring-is-out-of-date-2213 and discussion in issue https://github.com/archlinux/archinstall/issues/2213. | ||
| For a description of the problem [see here](https://archinstall.archlinux.page/help/known_issues.html#keyring-is-out-of-date-2213) and discussion in [issue](https://github.com/archlinux/archinstall/issues/2213.) | ||
|
|
||
| For a quick fix the below command will install the latest keyrings | ||
|
|
||
| ```pacman -Sy archlinux-keyring``` | ||
|
|
||
| ## Wkd or ntp hang | ||
| For a more complete solution see [here](https://archinstall.archlinux.page/help/known_issues.html#waiting-for-arch-linux-keyring-sync-archlinux-keyring-wkd-sync-to-complete-2679) | ||
|
|
||
| ```archinstall --skip-ntp --skip-wkd``` | ||
|
|
||
| ## How to dual boot with Windows | ||
|
|
||
| To install Arch Linux alongside an existing Windows installation using `archinstall`, follow these steps: | ||
|
|
@@ -201,6 +235,7 @@ To install Arch Linux alongside an existing Windows installation using `archins | |
| 11. Modify any additional settings for your installation as necessary. | ||
| 12. Start the installation upon completion of setup. | ||
|
|
||
| Another approach is to install to a second disk (if you hardware support `Other OS` secure boot) and refer to [GrubWiki](https://wiki.archlinux.org/title/GRUB#Detecting_other_operating_systems) or your respective bootloader. | ||
|
|
||
| # Mission Statement | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is still relevant or not?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added
git clone -b testing-branch https://github.com/archlinux/archinstallAs I think that clearer way to put it and a link to forks which I thought is cleaner