Trying to emulate Librem 5

Hello! I’m trying to follow the developer documentation. I downloaded Qemu, and the script and trying to emulate the phone OS.

I’m on Windows.

Qemu gets stuck on “Booting from Hard Disk…”

In task manager Qemu is using CPU and Memory but no disk?

What can I do to troubleshoot?

Can you tell us how exactly you are running qemu? In other words, the command line you used, the image file, etc.

It’s easy to get the wrong image by accident, and qemu won’t boot it if the architecture of the image doesn’t match the architecture it expects.

1 Like

“C:\Program Files\qemu\qemu-system-x86_64.exe”
“D:\imx6.img”

If I change the name of the image, then it won’t find anything and give an error.

I’m using the powershell script, so I can just run that instead of copy pasting the same command, so everything should be correct, apart from having to change the locations of the files. Which I did.

You need the qemu-x86_64.img.xz file from this page, which seems to be the latest x86 build.

Sorry about the confusion. I will take a look to see if this can be made clearer in the documentation.

Edit: I changed the link above to a later version.

2 Likes

That’s okay! I’ll try it with this image now :slight_smile:

Edit:

I’m getting farther now! I have the lockscreen up now! I’ll mess around and ask questions if I run into any trouble:) Thank you for the help!

with qemu i start librem5 and i see the pin lock: what is the pin? I can not unlock it :face_with_raised_eyebrow::joy:

123456 is the pin.

Extra text Extra text Extra text

thanks very much …

1 Like

Hi! Im facing the same issue, getting stuck at “Booting from Hard Disk”.
Im on Ubuntu 18.04, i tried from virt-manager and the qemu cli, both stuck at that message.

This was the command:
sudo qemu-system-x86_64 -boot menu=on -drive file=librem5.img -vga virtio -m 3G -enable-kvm

I tried with several builds from this site:
https://arm01.puri.sm/job/Images/job/Image%20Build/
which i learned from the documentation:
https://developer.puri.sm/Librem5/Development_Environment/Boards/qemu.html#linux-environments

Some builds were devkit.img, some were librem5.img, neither worked.

I even tried converting the image to a qcow2 (documentation uses that format) with the following command:
qemu-img convert -f raw -O qcow2 librem5.img qemu-x86_64.qcow2

It also didnt work, this was the command:
sudo qemu-system-x86_64 -boot menu=on -drive file=qemu-x86_64.qcow2,format=qcow2 -vga virtio -m 3G -enable-kvm

You need the qcow image from the server, not an img file or a converted qcow file. I believe the qcow image is built to run on x86 and the img file for ARM.

It looks like the plain ​qemu-x86_64 ​amber-phone ​image is not building at the moment. Perhaps try the current ​qemu-x86_64 ​buster+ci ​image instead.

@Jt0 Do you know where i can get a qcow server image? Or is there any way to use the raw image i got from the builds site?
I get this error when using the image_builder from: https://source.puri.sm/Librem5/image-builder
ERROR: Only UEFI is supported on arm64
And im not even sure if the build will get me the image i need or the ones that dont work.

@david.boddie I tried both amber and buster, neither worked. Should i keep downloading images every once in a while to check or is it likely that working builds wont be available anymore? if so, is there any other way to emulate the OS?

I haven’t been able to get the image builder to work, so I just download the images from the successful builds on the server.

From the image server, search for “qemu” in the search box and find the most recent successful build with the description “current ​qemu-x86_64 ​buster+ci ​image.” As of right now this is build #4321. From the files in that build, all you need is the qcow2 file.

That build worked! thank you!

1 Like