Qemu error while launching Risc-V emulation

guys, I am trying to launch Linux emulation on Risc-V platform using Qemu. I did it step by step using this tutorial https://risc-v-getting-started-guide.readthedocs.io/en/latest/linux-qemu.html
On the last step, when I starting this thing it gives some errors (they are mostly at the bottom of console output):

type hePlatform Name             : riscv-virtio,qemu
Platform Features         : medeleg
Platform HART Count       : 1
Platform IPI Device       : aclint-mswi
Platform Timer Device     : aclint-mtimer @ 10000000Hz
Platform Console Device   : uart8250
Platform HSM Device       : ---
Platform PMU Device       : ---
Platform Reboot Device    : sifive_test
Platform Shutdown Device  : sifive_test
Platform Suspend Device   : ---
Platform CPPC Device      : ---
Firmware Base             : 0x80000000
Firmware Size             : 194 KB
Firmware RW Offset        : 0x20000
Firmware RW Size          : 66 KB
Firmware Heap Offset      : 0x28000
Firmware Heap Size        : 34 KB (total), 2 KB (reserved), 9 KB (used), 22 KB (free)
Firmware Scratch Size     : 4096 B (total), 760 B (used), 3336 B (free)
Runtime SBI Version       : 1.0

Domain0 Name              : root
Domain0 Boot HART         : 0
Domain0 HARTs             : 0*
Domain0 Region00          : 0x0000000002000000-0x000000000200ffff M: (I,R,W) S/U: ()
Domain0 Region01          : 0x0000000080000000-0x000000008001ffff M: (R,X) S/U: ()
Domain0 Region02          : 0x0000000080020000-0x000000008003ffff M: (R,W) S/U: ()
Domain0 Region03          : 0x0000000000000000-0xffffffffffffffff M: (R,W,X) S/U: (R,W,X)
Domain0 Next Address      : 0x0000000080200000
Domain0 Next Arg1         : 0x0000000087e00000
Domain0 Next Mode         : S-mode
Domain0 SysReset          : yes
Domain0 SysSuspend        : yes

Boot HART ID              : 0
Boot HART Domain          : root
Boot HART Priv Version    : v1.12
Boot HART Base ISA        : rv64imafdch
Boot HART ISA Extensions  : time,sstc
Boot HART PMP Count       : 16
Boot HART PMP Granularity : 4
Boot HART PMP Address Bits: 54
Boot HART MHPM Count      : 16
Boot HART MIDELEG         : 0x0000000000001666
Boot HART MEDELEG         : 0x0000000000f0b509
[    0.000000] Linux version 6.6.0-rc6-00334-g1acfd2bd3f0d (konnnst@archlinux) (riscv64-linux-gnu-gcc (GCC) 12.2.0, GNU ld (GNU Binutils) 2.39) #1 SMP Sun Oct 22 12:42:18 MSK 2023
[    0.000000] random: crng init done
[    0.000000] Machine model: riscv-virtio,qemu
[    0.000000] SBI specification v1.0 detected
[    0.000000] SBI implementation ID=0x1 Version=0x10003
[    0.000000] SBI TIME extension detected
[    0.000000] SBI IPI extension detected
[    0.000000] SBI RFENCE extension detected
[    0.000000] SBI SRST extension detected
[    0.000000] efi: UEFI not found.
[    0.000000] OF: reserved mem: 0x0000000080000000..0x000000008001ffff (128 KiB) nomap non-reusable mmode_resv0@80000000
[    0.000000] OF: reserved mem: 0x0000000080020000..0x000000008003ffff (128 KiB) nomap non-reusable mmode_resv1@80020000
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000080000000-0x0000000087ffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080000000-0x000000008003ffff]
[    0.000000]   node   0: [mem 0x0000000080040000-0x0000000087ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x0000000087ffffff]
[    0.000000] SBI HSM extension detected
[    0.000000] Falling back to deprecated "riscv,isa"
[    0.000000] riscv: base ISA extensions acdfhim
[    0.000000] riscv: ELF capabilities acdfim
[    0.000000] percpu: Embedded 20 pages/cpu s41016 r8192 d32712 u81920
[    0.000000] Kernel command line: root=/dev/vda ro console=ttyS0
[    0.000000] Dentry cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.000000] Inode-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32256
[    0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
[    0.000000] Virtual kernel memory layout:
[    0.000000]       fixmap : 0xff1bfffffea00000 - 0xff1bffffff000000   (6144 kB)
[    0.000000]       pci io : 0xff1bffffff000000 - 0xff1c000000000000   (  16 MB)
[    0.000000]      vmemmap : 0xff1c000000000000 - 0xff20000000000000   (1024 TB)
[    0.000000]      vmalloc : 0xff20000000000000 - 0xff60000000000000   (16384 TB)
[    0.000000]      modules : 0xffffffff0157b000 - 0xffffffff80000000   (2026 MB)
[    0.000000]       lowmem : 0xff60000000000000 - 0xff60000008000000   ( 128 MB)
[    0.000000]       kernel : 0xffffffff80000000 - 0xffffffffffffffff   (2047 MB)
[    0.000000] Memory: 89500K/131072K available (8898K kernel code, 4974K rwdata, 4096K rodata, 2200K init, 483K bss, 41572K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=1.
[    0.000000] rcu:     RCU debug extended QS entry/exit.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] riscv-intc: 64 local interrupts mapped
[    0.000000] plic: plic@c000000: mapped 95 interrupts with 1 handlers for 2 contexts.
[    0.000000] riscv: providing IPIs using SBI IPI extension
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x24e6a1710, max_idle_ns: 440795202120 ns
[    0.000159] sched_clock: 64 bits at 10MHz, resolution 100ns, wraps every 4398046511100ns
[    0.000413] riscv-timer: Timer interrupt in S-mode is available via sstc extension
[    0.017776] Console: colour dummy device 80x25
[    0.020738] Calibrating delay loop (skipped), value calculated using timer frequency.. 20.00 BogoMIPS (lpj=40000)
[    0.021035] pid_max: default: 32768 minimum: 301
[    0.023705] LSM: initializing lsm=capability,integrity
[    0.027353] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.027442] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.095220] RCU Tasks Trace: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1.
[    0.096205] riscv: ELF compat mode supported
[    0.096823] ASID allocator using 16 bits (65536 entries)
[    0.099671] rcu: Hierarchical SRCU implementation.
[    0.099755] rcu:     Max phase no-delay instances is 1000.
[    0.104845] EFI services will not be available.
[    0.111034] smp: Bringing up secondary CPUs ...
[    0.112338] smp: Brought up 1 node, 1 CPU
[    0.134532] devtmpfs: initialized
[    0.150730] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.151295] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[    0.155559] pinctrl core: initialized pinctrl subsystem
[    0.169082] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.188712] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
[    0.189688] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.190430] audit: initializing netlink subsys (disabled)
[    0.198898] thermal_sys: Registered thermal governor 'step_wise'
[    0.200331] audit: type=2000 audit(0.172:1): state=initialized audit_enabled=0 res=1
[    0.201570] cpuidle: using governor menu
[    0.226758] cpu0: Ratio of byte access time to unaligned word access is 6.93, unaligned accesses are fast
[    0.258602] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
[    0.258707] HugeTLB: 28 KiB vmemmap can be freed for a 2.00 MiB page
[    0.268014] ACPI: Interpreter disabled.
[    0.269130] iommu: Default domain type: Translated
[    0.269201] iommu: DMA domain TLB invalidation policy: strict mode
[    0.274214] SCSI subsystem initialized
[    0.279180] usbcore: registered new interface driver usbfs
[    0.279715] usbcore: registered new interface driver hub
[    0.280109] usbcore: registered new device driver usb
[    0.308831] vgaarb: loaded
[    0.316159] clocksource: Switched to clocksource riscv_clocksource
[    0.320740] pnp: PnP ACPI: disabled
[    0.363925] NET: Registered PF_INET protocol family
[    0.366004] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.377028] tcp_listen_portaddr_hash hash table entries: 128 (order: 0, 4096 bytes, linear)
[    0.377312] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.377455] TCP established hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.377808] TCP bind hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.378398] TCP: Hash tables configured (established 1024 bind 1024)
[    0.380709] UDP hash table entries: 256 (order: 2, 24576 bytes, linear)
[    0.381294] UDP-Lite hash table entries: 256 (order: 2, 24576 bytes, linear)
[    0.383920] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.390656] RPC: Registered named UNIX socket transport module.
[    0.390788] RPC: Registered udp transport module.
[    0.390811] RPC: Registered tcp transport module.
[    0.390831] RPC: Registered tcp-with-tls transport module.
[    0.390850] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.391202] PCI: CLS 0 bytes, default 64
[    0.406413] workingset: timestamp_bits=46 max_order=15 bucket_order=0
[    0.416470] NFS: Registering the id_resolver key type
[    0.418597] Key type id_resolver registered
[    0.418670] Key type id_legacy registered
[    0.419202] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.419380] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    0.421016] 9p: Installing v9fs 9p2000 file system support
[    0.424380] NET: Registered PF_ALG protocol family
[    0.425295] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    0.425532] io scheduler mq-deadline registered
[    0.425662] io scheduler kyber registered
[    0.425912] io scheduler bfq registered
[    0.434445] pci-host-generic 30000000.pci: host bridge /soc/pci@30000000 ranges:
[    0.436059] pci-host-generic 30000000.pci:       IO 0x0003000000..0x000300ffff -> 0x0000000000
[    0.436877] pci-host-generic 30000000.pci:      MEM 0x0040000000..0x007fffffff -> 0x0040000000
[    0.437007] pci-host-generic 30000000.pci:      MEM 0x0400000000..0x07ffffffff -> 0x0400000000
[    0.438375] pci-host-generic 30000000.pci: Memory resource size exceeds max for 32 bits
[    0.439237] pci-host-generic 30000000.pci: ECAM at [mem 0x30000000-0x3fffffff] for [bus 00-ff]
[    0.442052] pci-host-generic 30000000.pci: PCI host bridge to bus 0000:00
[    0.442806] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.442959] pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
[    0.443040] pci_bus 0000:00: root bus resource [mem 0x40000000-0x7fffffff]
[    0.443067] pci_bus 0000:00: root bus resource [mem 0x400000000-0x7ffffffff]
[    0.445463] pci 0000:00:00.0: [1b36:0008] type 00 class 0x060000
[    0.669617] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.694589] printk: console [ttyS0] disabled
[    0.701037] 10000000.serial: ttyS0 at MMIO 0x10000000 (irq = 12, base_baud = 230400) is a 16550A
[    0.704073] printk: console [ttyS0] enabled
[    0.772189] SuperH (H)SCI(F) driver initialized
[    0.816438] loop: module loaded
[    0.818950] virtio_blk virtio0: 1/0/0 default/read/poll queues
[    0.827605] virtio_blk virtio0: [vda] 2020 512-byte logical blocks (1.03 MB/1010 KiB)
[    0.878217] e1000e: Intel(R) PRO/1000 Network Driver
[    0.878794] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[    0.884768] usbcore: registered new interface driver uas
[    0.885999] usbcore: registered new interface driver usb-storage
[    0.888896] mousedev: PS/2 mouse device common for all mice
[    0.896860] goldfish_rtc 101000.rtc: registered as rtc0
[    0.898716] goldfish_rtc 101000.rtc: setting system clock to 2023-10-23T18:54:07 UTC (1698087247)
[    0.906923] syscon-poweroff poweroff: pm_power_off already claimed for sbi_srst_power_off
[    0.908416] syscon-poweroff: probe of poweroff failed with error -16
[    0.913291] sdhci: Secure Digital Host Controller Interface driver
[    0.913911] sdhci: Copyright(c) Pierre Ossman
[    0.915310] sdhci-pltfm: SDHCI platform and OF driver helper
[    0.917528] usbcore: registered new interface driver usbhid
[    0.918031] usbhid: USB HID core driver
[    0.920325] riscv-pmu-sbi: SBI PMU extension is available
[    0.921908] riscv-pmu-sbi: 16 firmware and 18 hardware counters
[    0.922741] riscv-pmu-sbi: Perf sampling/filtering is not supported as sscof extension is not available
[    0.930501] NET: Registered PF_INET6 protocol family
[    0.946674] Segment Routing with IPv6
[    0.947859] In-situ OAM (IOAM) with IPv6
[    0.949471] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    0.956513] NET: Registered PF_PACKET protocol family
[    0.959933] 9pnet: Installing 9P2000 support
[    0.961086] Key type dns_resolver registered
[    1.045383] debug_vm_pgtable: [debug_vm_pgtable         ]: Validating architecture page table helpers
[    1.067210] clk: Disabling unused clocks
[    1.135743] List of all partitions:
[    1.136609] fe00            1010 vda 
[    1.136700]  driver: virtio_blk
[    1.137324] No filesystem could mount root, tried: 
[    1.137361]  ext3
[    1.137747]  ext2
[    1.137901]  ext4
[    1.138055]  vfat
[    1.138482]  msdos
[    1.138638]  iso9660
[    1.138819] 
[    1.139444] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(254,0)
[    1.140462] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.6.0-rc6-00334-g1acfd2bd3f0d #1
[    1.141194] Hardware name: riscv-virtio,qemu (DT)
[    1.141719] Call Trace:
[    1.142246] [<ffffffff80005c78>] dump_backtrace+0x1c/0x24
[    1.142880] [<ffffffff8089cda2>] show_stack+0x2c/0x38
[    1.143290] [<ffffffff808a9010>] dump_stack_lvl+0x3c/0x54
[    1.143686] [<ffffffff808a903c>] dump_stack+0x14/0x1c
[    1.144036] [<ffffffff8089d2b4>] panic+0x106/0x29e
[    1.144419] [<ffffffff80a01668>] mount_root_generic+0x284/0x29e
[    1.144861] [<ffffffff80a01874>] mount_root+0x1f2/0x224
[    1.145244] [<ffffffff80a01aa4>] prepare_namespace+0x1fe/0x25a
[    1.145650] [<ffffffff80a01044>] kernel_init_freeable+0x248/0x26a
[    1.146144] [<ffffffff808aa880>] kernel_init+0x1e/0x10a
[    1.146567] [<ffffffff800035aa>] ret_from_fork+0xa/0x1c
[    1.147693] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(254,0) ]---
re

I tried reinstall it several times, but it has not any result.
Be nice, please, I’m quite new to system emulators.

  • No filesystem could mount root What root filesystem did you give to qemu?

    – 

Leave a Comment