0

I tried to create a vm for raspbian in ubuntu. I made a few changes in the raspbian to test if it works in other machines or not. After that i copied the edited image into my computer. Now i try to boot it with qemu but each time qemu opens, i can't see the raspbian. Here is my work

qemu-system-arm -kernel /usr/share/qemu_vms/kernel-qemu -cpu arm1176 -m 256 -M versatilepb -serial stdio -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw" -hda /usr/share/raspi-image.img

So my kernel image is in the /usr/share/qemu_vms and my image is in /usr/share.

I tried to increase the ram amount but in that case even qemu didn't start up. Also i was following this tutorial(which is almost the same with other tutorials and my /etc/ld.so.preload is missing(i can't edit it at all).

I deleted -no-reboot option so it is in a loop for rebooting everytime but it seems that it can't find the image to start.

Any help would be very appreciated.

Sorry to add another thing but i guess i need to edit the question a bit.

All the problem seems to be with the root path. I fixed that problem with adding rootfstype=ext4 rw into the root section.

Now it is entering emergency mode. I tried to change the kernel from wheezy to jessie but it is still the same problem. What is going on?this is the current position

user3104760
  • 143
  • 6
  • From where did you obtain the kernel? The stock raspbian kernel won't boot under QEMU. What sort of errors -- if any -- are you seeing on the console when trying to start the image? – larsks Feb 03 '16 at 14:02
  • Does it work with a stock raspbian image? I would verify that first before trying your own (raspi-image.img). – jamieguinan Feb 03 '16 at 14:02
  • I got the image from https://github.com/dhruvvyas90/qemu-rpi-kernel/blob/master/kernel-qemu-4.1.13-jessie[here] https://github.com/dhruvvyas90/qemu-rpi-kernel/blob/master/kernel-qemu-4.1.13-jessie My raspbian image works with a raspberry-pi when i plug the sd card and i copied with dd command in my pc which is ubuntu. And i don't get any errors it just stands like that. Is my code wrong? Also i couldn't boot my computer when i rebooted all the system so i had to format my computer. Is my qemu code correct? It seems something is wrong. – user3104760 Feb 04 '16 at 08:42
  • I just posted this Answer. [http://stackoverflow.com/questions/38837606/emulate-raspberry-pi-raspbian-with-qemu/39109860#39109860](http://stackoverflow.com/questions/38837606/emulate-raspberry-pi-raspbian-with-qemu/39109860#39109860) – Daddyfix Aug 24 '16 at 22:07

0 Answers0