X Linux
Documentation menu

Overview/X Linux (distro)

Testing X in a VM

Helper commands to run the X live ISO and to boot an installed disk with QEMU. Adjust the paths (ISO, DISK) to your machine.

ISO=/home/x0z/Documents/repos/x-lnux/x/out/x-2026.09.06-x86_64.iso
DISK=/home/x0z/x-vm.qcow2

Adjust ISO to the artifact produced by xbuild.sh (see Building the ISO); out/ may contain more than one ISO.

Create a target disk (first time)

qemu-img create -f qcow2 "$DISK" 32G

Boot the ISO (install / live, BIOS)

qemu-system-x86_64 -enable-kvm -m 6144 -smp 4 -cpu host \
  -cdrom "$ISO" \
  -drive file="$DISK",if=virtio,format=qcow2 \
  -netdev user,id=net0 -device virtio-net-pci,netdev=net0 \
  -boot d

The text installer runs automatically on the first TTY1 login (root autologin via /root/.zlogin). If you are dropped to a shell instead, run the shortcut:

xinstall

xinstall (a live helper in /usr/local/bin) execs /root/x-installer/installer.sh. You can also call it as bash /root/x-installer/installer.sh. See Text installer.

Boot the installed disk (BIOS boot: GRUB)

qemu-system-x86_64 -enable-kvm -m 6144 -smp 4 -cpu host \
  -drive file="$DISK",if=virtio,format=qcow2 \
  -netdev user,id=net0 -device virtio-net-pci,netdev=net0 \
  -boot c

Boot the installed disk (UEFI: systemd-boot or GRUB EFI)

cp /usr/share/edk2/x64/OVMF_VARS.4m.fd /tmp/ovmf_vars.fd

qemu-system-x86_64 -enable-kvm -m 6144 -smp 4 -cpu host \
  -drive file=/usr/share/edk2/x64/OVMF_CODE.4m.fd,if=pflash,format=raw,readonly=on \
  -drive file=/tmp/ovmf_vars.fd,if=pflash,format=raw \
  -drive file="$DISK",if=virtio,format=qcow2 \
  -netdev user,id=net0 -device virtio-net-pci,netdev=net0

Unattended install (optional)

To exercise the autoinstall path, provide a small seed disk labeled cidata with an x-install.json and boot the ISO with xauto=1 appended to the kernel command line at the boot menu.

SEED=/tmp/cidata
rm -rf "$SEED" && mkdir -p "$SEED"
printf '{"disk":"/dev/vda","hostname":"x-vm","username":"x","password":"secret","profile":"core","bootloader":"grub","encryption":"no","hyprland":"no"}\n' \
  > "$SEED/x-install.json"

qemu-img create -f raw /home/x0z/cidata.img 64M
mkfs.vfat -n cidata /home/x0z/cidata.img
mcopy -i /home/x0z/cidata.img "$SEED/x-install.json" ::x-install.json

Then add the seed disk to the ISO boot command and pass xauto=1 to the kernel:

qemu-system-x86_64 -enable-kvm -m 6144 -smp 4 -cpu host \
  -cdrom "$ISO" \
  -drive file=/home/x0z/cidata.img,format=raw,if=virtio \
  -netdev user,id=net0 -device virtio-net-pci,netdev=net0 \
  -boot d

mkfs.vfat needs dosfstools and mcopy needs mtools on the host. See Autoinstall for the exact trigger conditions.

Notes

  • When GRUB is selected, the installer writes both a BIOS boot (GRUB + bios_grub partition) and a UEFI boot path, so either boot command works.
  • systemd-boot is UEFI-only: boot the disk with the OVMF command above.
  • -netdev user (slirp) provides NAT without libvirt/virtual networks.
  • On hosts whose kernel lacks the htb qdisc (for example custom builds), libvirt's default network and VirtualBox host modules may fail; the direct QEMU commands above avoid both.

Edit this page on GitHub