1

I am trying to use QEMU to emulate an RPI running the buster lite raspbian. The command I use is:

qemu-system-arm -kernel ~/qemu_vms/kernel-qemu-4.19.50-buster -cpu arm1176 -m 256 -M versatilepb -serial stdio -append "root=/dev/sda2 rootfstype=ext4 rw" -hda ~/qemu_vms/2020-02-13-raspbian-buster-lite.img,format=raw -redir tcp:5022::22 -no-reboot

but I get the error:

    Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
qemu-system-arm: -no-reboot: drive with bus=0, unit=0 (index=0) exists

I know the solution is inserting format=raw somewhere in the command, but where?

Also the tutorial I'm using seems a little dated so If I am using any outdated commands please tell me.

0

1 Answer 1

0

Looks like this will work for you (courtesy of man qemu-system-arm)

qemu-system-arm -kernel ~/qemu_vms/kernel-qemu-4.19.50-buster -cpu arm1176 -m 256 -M versatilepb -serial stdio -append "root=/dev/sda2 rootfstype=ext4 rw" -drive file="$HOME"/qemu_vms/2020-02-13-raspbian-buster-lite.img,format=raw -net user,hostfwd=tcp::5022-:22 -no-reboot

Basically, I've updated the disk definition to use -drive file="$HOME"/qemu_vms/2020-02-13-raspbian-buster-lite.img,format=raw and the port redirection to -net user,hostfwd=tcp::5022-:22

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.