Forum

Full Version: QEMU Testing/Setup
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I like booting my images in Qemu so that I can set them up before I actually start using them. However, I cannot boot Xbian in Qemu due to a kernel panic. Has anyone tried/got Xbian to boot in Qemu?

Here is how I get it to boot in Qemu:

Terminal
qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1 rw init=/bin/bash" -hda xbian.img

Thanks in advance.

Will
(11th May, 2014 09:40 AM)iamwill Wrote: [ -> ]I like booting my images in Qemu so that I can set them up before I actually start using them. However, I cannot boot Xbian in Qemu due to a kernel panic. Has anyone tried/got Xbian to boot in Qemu?

Here is how I get it to boot in Qemu:

Terminal
qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1 rw init=/bin/bash" -hda xbian.img

Thanks in advance.

Will

Did you try root=/dev/mmcblk0p2 instead of root=/dev/sda2?

KB
@Killerbee, the mmcblk refers to a SD card but Qemu uses a emulated hard drive so /dev/sda2 is correct.
@iamwill, are you sure you are using a qemu kernel that supports btrfs?
(11th May, 2014 10:52 PM)CurlyMo Wrote: [ -> ]@Killerbee, the mmcblk refers to a SD card but Qemu uses a emulated hard drive so /dev/sda2 is correct.
@iamwill, are you sure you are using a qemu kernel that supports btrfs?

@CurlyMo, I am now, I did some more research and found qemu-env from xbianonpi here and it gets past the first kernel panic but now I'm running into another problem.

Terminal
qemu-system-arm -initrd qemu-env-master/initramfs.gz -hda xbian.img -cpu arm1176 -M versatilepb -m 256 -net nic -kernel qemu-env-master/zImage -serial stdio -append "rw bcm2708_fb.fbwidth=1280 bcm2708_fb.fbheight=1024 dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 console=tty1 root=LABEL=xbian-beta2,autodefrag,noatime,relatime,compress=lzo rootfstype=btrfs rw rootflags=subvol=root/@,autodefrag,compress=lzo sdhci-bcm2708.sync_after_dma=0 dwc_otg.lpm_enable=0 rootwait"

That is how I am running it now, and it seems to recognize btrfs now but it isn't properly mounting sda2. Again, mmcblk doesn't work at all. (I did change the "root=LABEL=xbian-beta2" because when booting with "LABEL=xbian-root-btrfs" it didn't recognize the label. Here is a screenshot of where I am getting stuck now...

https://docs.google.com/file/d/0B0sRwZ5dDRKCTlc3eWU0TGRSclE/edit

Thanks again for the help.

duno

I am missing "ld.so.preload".

Code:
file ~/qemu_vms/XBian_1.0_RC2.img

Code:
XBian_1.0_RC2.img: x86 boot sector; partition 1: ID=0xb, active, starthead 0, startsector 2048, 69632 sectors; partition 2: ID=0x83, starthead 3, startsector 71680, 1435648 sectors, code offset 0xb8

71680 x 512 = 36700160

Code:
sudo mount ~/qemu_vms/XBian_1.0_RC2.img -o offset=36700160 /mnt/image

Code:
sudo nano /mnt/image/root/@/etc/ld.so.preload

But there is no "ld.so.preload" to disable like "#/usr/lib/arm-linux-gnueabihf/libcofi_rpi.so"

How to change that in Xbian?
Huh
Reference URL's