StefanoBossi
Topic Author
Posts: 4
Joined: 03 Jun 2020, 17:13

Default Password for QEMU image

03 Jun 2020, 17:38

Dear forum members,

I am trying to emulate via QEMU the image 2020-03-02-revpi-stretch.
My purpose here is to have an image for testing Ansible scripts I am writing in order to automate the deployment process in our environment.
What I did is:
  • Installing the last version of QEMU with:
    brew install qemu
  • Download from your site the image
  • Convert the image file from img to qcow2:
    qemu-img convert -f raw -O qcow2 2020-03-02-revpi-stretch.img 2020-03-02-revpi-stretch.qcow
  • Expand the image:
    qemu-img resize 2020-03-02-revpi-stretch.qcow +6G
  • Download the buster kernel kernel-qemu-4.19.50-buster from the same github
  • Launch Qemu with:
    qemu-system-arm -kernel ./kernel-qemu-4.19.50-buster -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw" -hda 2020-03-02-revpi-stretch.qcow -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -dtb ./versatile-pb-buster.dtb -net nic -net user,hostfwd=tcp::10022-:22
In this way the image boot and the localhost:10022 port is forwarder in the ssh port on the guest machine, so I could potentially login via ssh with:
ssh localhost:10022

My question is: which is the login and password ?
I have understood that on the real RevPi the password is written on the external qrcode so I suppose there is some sort of initial configuration at the first boot (this is just mine supposition, I wasn't able to find any documentation).

Is there a way to connect via a temporary user and insert a new user in the image?

Regards,
Stefano Bossi
 
User avatar
lukas
Expert
Posts: 184
Joined: 13 Feb 2017, 10:29

Re: Default Password for QEMU image

03 Jun 2020, 19:36

Username "pi", password "raspberry".

On first login you'll be prompted to enter the serial number, MAC address and product type. You can skip this step by pressing ^C and you can avoid it on future logins with "touch /home/pi/.revpi-factory-reset". (The mechanism is part of the package "piserial", see "dpkg -l piserial".)

The product type determines the devicetree overlay added to /boot/config.txt. Our products have devices such as a crypto chip, Ethernet chips etc. attached to various buses. To fully emulate the products, you'd have to emulate the functionality of all the chips, which is probably not supported by qemu.

Who is online

Users browsing this forum: No registered users and 2 guests