openSUSE / perl-bootloader

Perl modules for configuring various boot loaders
GNU General Public License v2.0
11 stars 18 forks source link

Testing aarch64 on x86 with qemu #132

Open wfeldt opened 3 years ago

wfeldt commented 3 years ago

Requirements

What you need are these two packages:

1. Testing aarch64 installation

Get an installation ISO. I was using openSUSE-Tumbleweed-DVD-aarch64-Current.iso (Snapshot20210203 at the time I'm writing this).

Create an empty disk image to install into; for example:

qemu-img create -f qcow2 foo.qcow2 60G

Then run this qemu command (as non-root user):

qemu-system-aarch64 -machine virt -cpu cortex-a57 -m 2048 -bios qemu-uefi-aarch64.bin \
  -device virtio-gpu-pci \
  -device qemu-xhci -device usb-kbd -device usb-tablet \
  -device virtio-scsi -device scsi-hd,drive=id0 \
  -device virtio-net,netdev=net0 \
  -drive file=foo.qcow2,id=id0,media=disk,format=qcow2,if=none \
  -drive file=openSUSE-Tumbleweed-DVD-aarch64-Snapshot20210203-Media.iso,media=cdrom,format=raw,readonly \
  -netdev user,id=net0,hostfwd=tcp::22222-:22

Notes:

At the boot screen, edit boot options to add:

plymouth=0 console=tty1 sshd=1 password=xxxxx
Boot screen ![xx_01](https://user-images.githubusercontent.com/927244/107546821-12095000-6bcd-11eb-968b-11610cafefc3.jpg)

Note:

When yast is running, you can connect to the virtual machine running:

ssh -Xl root -p 22222 -o NoHostAuthenticationForLocalhost=yes localhost

The emulation is incredibly slow. You might think it's dead at some spots.

See these timestamps on the serial console ![xx_02](https://user-images.githubusercontent.com/927244/107547029-4e3cb080-6bcd-11eb-8b52-f8e66ed4f1f6.jpg)

Switch between serial0 and virtio-gpu-pci consoles in qemu when you get bored.

Finally, installation is starting:

xx_03

2. Testing aarch64 using pre-built images

Get one of the pre-built images. I was using openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64.qcow2 (Snapshot20210203 at the time I'm writing this).

Then run this qemu command (as non-root user):

qemu-system-aarch64 -machine virt -cpu cortex-a57 -m 2048 -bios qemu-uefi-aarch64.bin \
  -device virtio-gpu-pci \
  -device qemu-xhci -device usb-kbd -device usb-tablet \
  -device virtio-scsi -device scsi-hd,drive=id0 \
  -device virtio-net,netdev=net0 \
  -drive file=openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64.qcow2,id=id0,media=disk,format=qcow2,if=none \
  -netdev user,id=net0,hostfwd=tcp::22222-:22

There are (text console) login prompts on both the serial0 and virtio-gpu-pci screens in qemu.

The initial root password is:

Click here ``` linux ```

Note: