JustinInTime
Posts: 1
Joined: Tue Dec 24, 2019 1:42 am

QEMU fails to run Raspbian on windows with unmountable drive

Tue Dec 24, 2019 2:39 am

I'm hoping someone will be able to help me because most likely I'm not the only one struggling with this. I've recently needed to look into using QEMU for work. My team and I have thought, using Raspberry Pi would be an easy learning block. However it appears that may not be the case or I'm missing a step. I have downloaded everything for QEMU and the following binaries, kernel-qemu-4.4.34-jessie (tried kernel-qemu-4.19.50-buster as well) and 2019-09-26-raspbian-buster even the lite version. I have gone through all the steps to emulate this with QEMU as demonstrated in other tutorials. However they are dated by 2 years or so. https://www.instructables.com/id/Raspbe ... indows-10/. They never show steps for mounting space.

This should be a complete list of the steps I've tried based on many articles.

-I've resized the image to add +5G to this 2019-09-26-raspbian-buster file
-Tried changing the format from raw to qcow2.

It seems like everything I've tried results in failure to bring up an emulated environment. It always fails on the following.

"No filesystem could mount root, tried: ext4
kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,2)"

The commandline I'm executing is below and I"ve tried many different variations as well.

qemu-system-arm -kernel kernel-qemu-4.4.34-jessie -cpu arm1176 -m 256 -no-reboot -serial stdio -machine versatilepb -append "console=ttyAMA0 root=/dev/sda2 -panic=1 rootfstype=ext4 rw init=/bin/bash" -drive "file=2019-09-26-raspbian-buster-full.img,format=raw" -no-reboot

I don't have any clue as to what I"m missing other then I"m running QEMU on a windows 7 machine and for some reason theres an issue/bug with mounting the drive because of the OS. However, I don't even think it needs to mount anything as QEMU is all emulated. However, I even just put in a sdcard in for kicks and giggles.

What I do get. I'm able to get the Rasberry logo in the QEMU emulator. It just won't bootup all the way for command prompt.

Below is the full log output and Thank you for you time.
:mrgreen: Justin

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Initializing cgroup subsys cpuacct
Linux version 4.4.34+ ([email protected]) (gcc version 6.2.1 20161119 (Debian 6.2.1-4) ) #3 Thu Dec 1 14:44:23 IST 2016
CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
CPU: VIPT aliasing data cache, unknown instruction cache
Machine: ARM-Versatile PB
Memory policy: Data cache writeback
sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 64960
Kernel command line: console=ttyAMA0 root=/dev/null -panic=1 rootfstype=ext4 rw init=/bin/bash
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 253716K/262144K available (4270K kernel code, 56K rwdata, 1008K rodata, 176K init, 139K bss, 8428K reserved, 0K cma-reserved)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xd0800000 - 0xff800000 ( 752 MB)
lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0xc0008000 - 0xc052fd68 (5280 kB)
.init : 0xc0530000 - 0xc055c000 ( 176 kB)
.data : 0xc055c000 - 0xc056a120 ( 57 kB)
.bss : 0xc059ae50 - 0xc05bdb58 ( 140 kB)
NR_IRQS:224
VIC @f1140000: id 0x00041190, vendor 0x41
FPGA IRQ chip 0 "SIC" @ f1003000, 13 irqs, parent IRQ: 63
clocksource: timer3: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
Console: colour dummy device 80x30
Calibrating delay loop... 373.55 BogoMIPS (lpj=1867776)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
Disabling cpuset control group subsystem
Initializing cgroup subsys memory
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x8220 - 0x827c
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
Serial: AMBA PL011 UART driver
dev:f1: ttyAMA0 at MMIO 0x101f1000 (irq = 44, base_baud = 0) is a PL011 rev1
console [ttyAMA0] enabled
dev:f2: ttyAMA1 at MMIO 0x101f2000 (irq = 45, base_baud = 0) is a PL011 rev1
dev:f3: ttyAMA2 at MMIO 0x101f3000 (irq = 46, base_baud = 0) is a PL011 rev1
fpga:09: ttyAMA3 at MMIO 0x10009000 (irq = 70, base_baud = 0) is a PL011 rev1
PCI core found (slot 11)
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [mem 0x50000000-0x5fffffff]
pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff pref]
pci_bus 0000:00: root bus resource [io 0x1000-0xffff]
pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
PCI: bus0: Fast back to back transfers disabled
pci 0000:00:0c.0: BAR 2: assigned [mem 0x50000000-0x50001fff]
pci 0000:00:0c.0: BAR 1: assigned [mem 0x50002000-0x500023ff]
pci 0000:00:0c.0: BAR 0: assigned [io 0x1000-0x10ff]
vgaarb: loaded
SCSI subsystem initialized
clocksource: Switched to clocksource timer3
NET: Registered protocol family 2
TCP established hash table entries: 2048 (order: 1, 8192 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NetWinder Floating Point Emulator V0.97 (double precision)
futex hash table entries: 256 (order: -1, 3072 bytes)
Installing knfsd (copyright (C) 1996 [email protected]).
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
romfs: ROMFS MTD (C) 2007 Red Hat, Inc.
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
pl061_gpio dev:e4: PL061 GPIO chip @0x101e4000 registered
pl061_gpio dev:e5: PL061 GPIO chip @0x101e5000 registered
pl061_gpio dev:e6: PL061 GPIO chip @0x101e6000 registered
pl061_gpio dev:e7: PL061 GPIO chip @0x101e7000 registered
clcd-pl11x dev:20: PL110 rev0 at 0x10120000
clcd-pl11x dev:20: Versatile hardware, VGA display
Console: switching to colour frame buffer device 80x30
brd: module loaded
sym53c8xx 0000:00:0c.0: enabling device (0100 -> 0103)
sym0: <895a> rev 0x0 at pci 0000:00:0c.0 irq 93
sym0: No NVRAM, ID 7, Fast-40, LVD, parity checking
sym0: SCSI BUS has been reset.
scsi host0: sym-2.2.3
scsi 0:0:0:0: Direct-Access QEMU QEMU HARDDISK 2.5+ PQ: 0 ANSI: 5
scsi target0:0:0: tagged command queuing enabled, command queue depth 16.
scsi target0:0:0: Beginning Domain Validation
scsi target0:0:0: Domain Validation skipping write tests
scsi target0:0:0: Ending Domain Validation
scsi 0:0:2:0: CD-ROM QEMU QEMU CD-ROM 2.5+ PQ: 0 ANSI: 5
scsi target0:0:2: tagged command queuing enabled, command queue depth 16.
scsi target0:0:2: Beginning Domain Validation
scsi target0:0:2: Domain Validation skipping write tests
scsi target0:0:2: Ending Domain Validation
sr 0:0:2:0: [sr0] scsi3-mmc drive: 16x/50x cd/rw xa/form2 cdda tray
cdrom: Uniform CD-ROM driver Revision: 3.20
sd 0:0:0:0: [sda] 10552737 512-byte logical blocks: (5.40 GB/5.03 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
physmap platform flash device: 04000000 at 34000000
physmap-flash.0: Found 1 x32 devices at 0x0 in 32-bit bank. Manufacturer ID 0x000000 Chip ID 0x000000
Intel/Sharp Extended Query Table at 0x0031
Using buffer write method
sda: sda1 sda2
sd 0:0:0:0: [sda] Attached SCSI disk
smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <[email protected]>
smc91x smc91x.0 eth0: SMC91C11xFD (rev 1) at d0a68000 IRQ 57
[nowait]
smc91x smc91x.0 eth0: Ethernet addr: 52:54:00:12:34:56
mousedev: PS/2 mouse device common for all mice
ledtrig-cpu: registered to indicate activity on CPUs
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (3964 buckets, 15856 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 17
bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
Bridge firewalling registered
input: AT Raw Set 2 keyboard as /devices/fpga:06/serio0/input/input0
input: ImExPS/2 Generic Explorer Mouse as /devices/fpga:07/serio1/input/input2
VFS: Cannot open root device "null" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
0100 4096 ram0 (driver?)
0101 4096 ram1 (driver?)
0102 4096 ram2 (driver?)
0103 4096 ram3 (driver?)
0104 4096 ram4 (driver?)
0105 4096 ram5 (driver?)
0106 4096 ram6 (driver?)
0107 4096 ram7 (driver?)
0108 4096 ram8 (driver?)
0109 4096 ram9 (driver?)
010a 4096 ram10 (driver?)
010b 4096 ram11 (driver?)
010c 4096 ram12 (driver?)
010d 4096 ram13 (driver?)
010e 4096 ram14 (driver?)
010f 4096 ram15 (driver?)
0b00 1048575 sr0 driver: sr
0800 5276368 sda driver: sd
0801 262144 sda1 6c586e13-01
0802 1929216 sda2 6c586e13-02
1f00 65536 mtdblock0 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
CPU: 0 PID: 1 Comm: swapper Not tainted 4.4.34+ #3
Hardware name: ARM-Versatile PB
[<c001ca90>] (unwind_backtrace) from [<c0018f14>] (show_stack+0x10/0x14)
[<c0018f14>] (show_stack) from [<c0080c2c>] (panic+0x94/0x240)
[<c0080c2c>] (panic) from [<c05314f0>] (mount_block_root+0x1e4/0x2d4)
[<c05314f0>] (mount_block_root) from [<c0531820>] (mount_root+0x130/0x16c)
[<c0531820>] (mount_root) from [<c0531a10>] (prepare_namespace+0x1b4/0x244)
[<c0531a10>] (prepare_namespace) from [<c0531034>] (kernel_init_freeable+0x214/0x26c)
[<c0531034>] (kernel_init_freeable) from [<c04110f8>] (kernel_init+0x8/0x118)
[<c04110f8>] (kernel_init) from [<c00151b8>] (ret_from_fork+0x14/0x3c)
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
random: nonblocking pool is initialized

C:\Users\Justin Cook\Documents\QEMU>qemu-system-arm -kernel kernel-qemu-4.4.34-jessie -cpu arm1176 -m 256 -no-reboot -serial stdio -machine versatilepb -append "console=ttyAMA0 root=/dev/sda2 -panic=1 rootfstype=ext4 rw init=/bin/bash" -hda 2019-09-26-raspbian-buster-lite.qcow2
Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Initializing cgroup subsys cpuacct
Linux version 4.4.34+ ([email protected]) (gcc version 6.2.1 20161119 (Debian 6.2.1-4) ) #3 Thu Dec 1 14:44:23 IST 2016
CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
CPU: VIPT aliasing data cache, unknown instruction cache
Machine: ARM-Versatile PB
Memory policy: Data cache writeback
sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 64960
Kernel command line: console=ttyAMA0 root=/dev/sda2 -panic=1 rootfstype=ext4 rw init=/bin/bash
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 253716K/262144K available (4270K kernel code, 56K rwdata, 1008K rodata, 176K init, 139K bss, 8428K reserved, 0K cma-reserved)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xd0800000 - 0xff800000 ( 752 MB)
lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0xc0008000 - 0xc052fd68 (5280 kB)
.init : 0xc0530000 - 0xc055c000 ( 176 kB)
.data : 0xc055c000 - 0xc056a120 ( 57 kB)
.bss : 0xc059ae50 - 0xc05bdb58 ( 140 kB)
NR_IRQS:224
VIC @f1140000: id 0x00041190, vendor 0x41
FPGA IRQ chip 0 "SIC" @ f1003000, 13 irqs, parent IRQ: 63
clocksource: timer3: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
Console: colour dummy device 80x30
Calibrating delay loop... 1.63 BogoMIPS (lpj=8191)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
Disabling cpuset control group subsystem
Initializing cgroup subsys memory
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x8220 - 0x827c
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
Serial: AMBA PL011 UART driver
dev:f1: ttyAMA0 at MMIO 0x101f1000 (irq = 44, base_baud = 0) is a PL011 rev1
console [ttyAMA0] enabled
dev:f2: ttyAMA1 at MMIO 0x101f2000 (irq = 45, base_baud = 0) is a PL011 rev1
dev:f3: ttyAMA2 at MMIO 0x101f3000 (irq = 46, base_baud = 0) is a PL011 rev1
fpga:09: ttyAMA3 at MMIO 0x10009000 (irq = 70, base_baud = 0) is a PL011 rev1
PCI core found (slot 11)
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [mem 0x50000000-0x5fffffff]
pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff pref]
pci_bus 0000:00: root bus resource [io 0x1000-0xffff]
pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
PCI: bus0: Fast back to back transfers disabled
pci 0000:00:0c.0: BAR 2: assigned [mem 0x50000000-0x50001fff]
pci 0000:00:0c.0: BAR 1: assigned [mem 0x50002000-0x500023ff]
pci 0000:00:0c.0: BAR 0: assigned [io 0x1000-0x10ff]
vgaarb: loaded
SCSI subsystem initialized
clocksource: Switched to clocksource timer3
NET: Registered protocol family 2
TCP established hash table entries: 2048 (order: 1, 8192 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NetWinder Floating Point Emulator V0.97 (double precision)
futex hash table entries: 256 (order: -1, 3072 bytes)
Installing knfsd (copyright (C) 1996 [email protected]).
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
romfs: ROMFS MTD (C) 2007 Red Hat, Inc.
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
pl061_gpio dev:e4: PL061 GPIO chip @0x101e4000 registered
pl061_gpio dev:e5: PL061 GPIO chip @0x101e5000 registered
pl061_gpio dev:e6: PL061 GPIO chip @0x101e6000 registered
pl061_gpio dev:e7: PL061 GPIO chip @0x101e7000 registered
clcd-pl11x dev:20: PL110 rev0 at 0x10120000
clcd-pl11x dev:20: Versatile hardware, VGA display
Console: switching to colour frame buffer device 80x30
brd: module loaded
sym53c8xx 0000:00:0c.0: enabling device (0100 -> 0103)
sym0: <895a> rev 0x0 at pci 0000:00:0c.0 irq 93
sym0: No NVRAM, ID 7, Fast-40, LVD, parity checking
sym0: SCSI BUS has been reset.
scsi host0: sym-2.2.3
scsi 0:0:0:0: Direct-Access QEMU QEMU HARDDISK 2.5+ PQ: 0 ANSI: 5
scsi target0:0:0: tagged command queuing enabled, command queue depth 16.
scsi target0:0:0: Beginning Domain Validation
scsi target0:0:0: Domain Validation skipping write tests
scsi target0:0:0: Ending Domain Validation
scsi 0:0:2:0: CD-ROM QEMU QEMU CD-ROM 2.5+ PQ: 0 ANSI: 5
scsi target0:0:2: tagged command queuing enabled, command queue depth 16.
scsi target0:0:2: Beginning Domain Validation
scsi target0:0:2: Domain Validation skipping write tests
scsi target0:0:2: Ending Domain Validation
sr 0:0:2:0: [sr0] scsi3-mmc drive: 16x/50x cd/rw xa/form2 cdda tray
cdrom: Uniform CD-ROM driver Revision: 3.20
sd 0:0:0:0: [sda] 10552737 512-byte logical blocks: (5.40 GB/5.03 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
physmap platform flash device: 04000000 at 34000000
physmap-flash.0: Found 1 x32 devices at 0x0 in 32-bit bank. Manufacturer ID 0x000000 Chip ID 0x000000
Intel/Sharp Extended Query Table at 0x0031
Using buffer write method
sda: sda1 sda2
sd 0:0:0:0: [sda] Attached SCSI disk
smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <[email protected]>
smc91x smc91x.0 eth0: SMC91C11xFD (rev 1) at d0a68000 IRQ 57
[nowait]
smc91x smc91x.0 eth0: Ethernet addr: 52:54:00:12:34:56
mousedev: PS/2 mouse device common for all mice
ledtrig-cpu: registered to indicate activity on CPUs
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (3964 buckets, 15856 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 17
bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
Bridge firewalling registered
input: AT Raw Set 2 keyboard as /devices/fpga:06/serio0/input/input0
input: ImExPS/2 Generic Explorer Mouse as /devices/fpga:07/serio1/input/input2
List of all partitions:
0100 4096 ram0 (driver?)
0101 4096 ram1 (driver?)
0102 4096 ram2 (driver?)
0103 4096 ram3 (driver?)
0104 4096 ram4 (driver?)
0105 4096 ram5 (driver?)
0106 4096 ram6 (driver?)
0107 4096 ram7 (driver?)
0108 4096 ram8 (driver?)
0109 4096 ram9 (driver?)
010a 4096 ram10 (driver?)
010b 4096 ram11 (driver?)
010c 4096 ram12 (driver?)
010d 4096 ram13 (driver?)
010e 4096 ram14 (driver?)
010f 4096 ram15 (driver?)
0b00 1048575 sr0 driver: sr
0800 5276368 sda driver: sd
0801 262144 sda1 6c586e13-01
0802 1929216 sda2 6c586e13-02
1f00 65536 mtdblock0 (driver?)
No filesystem could mount root, tried: ext4
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,2)
CPU: 0 PID: 1 Comm: swapper Not tainted 4.4.34+ #3
Hardware name: ARM-Versatile PB
[<c001ca90>] (unwind_backtrace) from [<c0018f14>] (show_stack+0x10/0x14)
[<c0018f14>] (show_stack) from [<c0080c2c>] (panic+0x94/0x240)
[<c0080c2c>] (panic) from [<c0531580>] (mount_block_root+0x274/0x2d4)
[<c0531580>] (mount_block_root) from [<c0531820>] (mount_root+0x130/0x16c)
[<c0531820>] (mount_root) from [<c0531a10>] (prepare_namespace+0x1b4/0x244)
[<c0531a10>] (prepare_namespace) from [<c0531034>] (kernel_init_freeable+0x214/0x26c)
[<c0531034>] (kernel_init_freeable) from [<c04110f8>] (kernel_init+0x8/0x118)
[<c04110f8>] (kernel_init) from [<c00151b8>] (ret_from_fork+0x14/0x3c)
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,2)
random: nonblocking pool is initialized

fruitoftheloom
Posts: 22701
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: QEMU fails to run Raspbian on windows with unmountable drive

Tue Dec 24, 2019 8:40 am

JustinInTime wrote:
Tue Dec 24, 2019 2:39 am
I'm hoping someone will be able to help me because most likely I'm not the only one struggling with this. I've recently needed to look into using QEMU for work. My team and I have thought, using Raspberry Pi would be an easy learning block. However it appears that may not be the case or I'm missing a step. I have downloaded everything for QEMU and the following binaries, kernel-qemu-4.4.34-jessie (tried kernel-qemu-4.19.50-buster as well) and 2019-09-26-raspbian-buster even the lite version. I have gone through all the steps to emulate this with QEMU as demonstrated in other tutorials. However they are dated by 2 years or so. https://www.instructables.com/id/Raspbe ... indows-10/. They never show steps for mounting space.



First and foremost you should install qemu from the Buster repositories, that will ensure compatibility.


On a fresh install of Raspbian Buster with Desktop fully update, before installing qemu:

Code: Select all

sudo apt update
sudo apt full-upgrade
sudo reboot

Code: Select all

sudo apt update
sudo apt install qemu

Plus whatever other packages you require:

https://packages.debian.org/source/buster/qemu



Alternatively you could try Pi386:

https://www.raspberrypi.org/forums/view ... p?t=226376
Last edited by fruitoftheloom on Tue Dec 24, 2019 9:31 am, edited 2 times in total.
Rather than negativity think outside the box !

Asus ChromeBox 3 Celeron is my other computer.

dustnbone
Posts: 226
Joined: Tue Nov 05, 2019 2:49 am

Re: QEMU fails to run Raspbian on windows with unmountable drive

Tue Dec 24, 2019 8:53 am

It looks like the OP is trying to achieve the opposite, emulating Pi hardware on a Windows PC. I've never tried this myself but if I get time later tonight I'll try to replicate.

fruitoftheloom
Posts: 22701
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: QEMU fails to run Raspbian on windows with unmountable drive

Tue Dec 24, 2019 9:29 am

dustnbone wrote:
Tue Dec 24, 2019 8:53 am
It looks like the OP is trying to achieve the opposite, emulating Pi hardware on a Windows PC. I've never tried this myself but if I get time later tonight I'll try to replicate.

If the Host Operating System is Windows, then as far I am aware only up to equivalent of early Raspberry Pi SBC can be emulated successfully.

Just easier to buy a Raspberry Pi SBC, even a Zero would be better !!
Rather than negativity think outside the box !

Asus ChromeBox 3 Celeron is my other computer.

mikerr
Posts: 2825
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: QEMU fails to run Raspbian on windows with unmountable drive

Tue Dec 24, 2019 12:27 pm

The following works ok

1. Install QEMU for Windows https://www.qemu.org/download/#windows

2. Grab the kernels and dtb from https://github.com/dhruvvyas90/qemu-rpi-kernel

3. Download a raspbian image & extract it https://www.raspberrypi.org/downloads/raspbian/

4. Start qemu

Code: Select all

"c:\Program Files\qemu\qemu-system-arm.exe" -M versatilepb -cpu arm1176 -hda 2019-09-26-raspbian-buster-lite.img  -kernel kernel-qemu-4.19.50-buster -m 256 -append "root=/dev/sda2 panic=1" -no-reboot -dtb versatile-pb.dtb -serial stdio
Android app - Raspi Card Imager - download and image SD cards - No PC required !

davidtuti
Posts: 93
Joined: Tue Oct 22, 2013 6:21 am

Re: QEMU fails to run Raspbian on windows with unmountable drive

Sat May 16, 2020 9:53 am

mikerr wrote:
Tue Dec 24, 2019 12:27 pm
The following works ok

1. Install QEMU for Windows https://www.qemu.org/download/#windows

2. Grab the kernels and dtb from https://github.com/dhruvvyas90/qemu-rpi-kernel

3. Download a raspbian image & extract it https://www.raspberrypi.org/downloads/raspbian/

4. Start qemu

Code: Select all

"c:\Program Files\qemu\qemu-system-arm.exe" -M versatilepb -cpu arm1176 -hda 2019-09-26-raspbian-buster-lite.img  -kernel kernel-qemu-4.19.50-buster -m 256 -append "root=/dev/sda2 panic=1" -no-reboot -dtb versatile-pb.dtb -serial stdio
hI,
I've tried with :

"D:\Program Files\qemu\qemu-system-arm.exe" ^
-M versatilepb -cpu arm1176 ^
-hda 2020-02-13-raspbian-buster-full.img ^
-kernel kernel-qemu-4.19.50-buster -m 256 ^
-append "root=/dev/sda2 panic=1" ^
-no-reboot ^
-dtb versatile-pb.dtb ^
-serial stdio

But it gives me error:


Error: invalid dtb and unrecognized/unsupported machine ID
r1=0x00000183, r2=0x00000100
r2[]=05 00 00 00 01 00 41 54 01 00 00 00 00 10 00 00
Available machine support:

ID (hex) NAME
ffffffff Generic DT based system
ffffffff ARM-Versatile (Device Tree Support)

Any help please?

Return to “General discussion”