Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VFS: Cannot open root device "vda1" or unknown-block(0,0): error -6 #35

Open
yslys opened this issue Mar 24, 2022 · 0 comments
Open

VFS: Cannot open root device "vda1" or unknown-block(0,0): error -6 #35

yslys opened this issue Mar 24, 2022 · 0 comments

Comments

@yslys
Copy link

yslys commented Mar 24, 2022

Hi, I followed the instructions to generate the disk image for QEMU but came across some errors while booting.

OpenSBI version: v0.8
Linux version: v5.10.0
U-Boot version: v2020.04
Disk image: pre-built Ubuntu Focal tarball with wget -O rootfs.tar.bz2 https://github.com/carlosedp/riscv-bringup/releases/download/v1.0/UbuntuFocal-riscv64-rootfs.tar.gz

While generating initrd on rootfs by using chroot, I got the following message:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "en_US.UTF-8",
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
update-initramfs: Generating /boot/initrd.img-5.10.0
W: Couldn't identify type of root file system for fsck hook

(Since I am not sure whether this is the cause to the problem, I would just paste it there.)

The command to boot the system I executed was:

qemu-system-riscv64 \
    -nographic \
    -machine virt \
    -smp 4 \
    -m 4G \
    -bios qemu-boot/opensbi/build/platform/generic/firmware/fw_jump.elf \
    -kernel qemu-boot/linux-5.10.0/arch/riscv/boot/Image \
    -append "console=ttyS0 root=/dev/vda1 rw" \
    -drive file=riscv64-QemuVM.qcow2,format=qcow2,id=hd0 \
    -object rng-random,filename=/dev/urandom,id=rng0 \
    -device virtio-rng-device,rng=rng0
    -device virtio-net-device,netdev=usernet \
    -netdev user,id=usernet,hostfwd=tcp::22222-:22

Below is the error message I got during boot: (The error message is shown on the last few lines.)

[    0.000000] Linux version 5.10.0 (yusen@ubuntu) (riscv64-unknown-linux-gnu-gcc (GCC) 11.1.0, GNU ld (GNU Binutils) 2.37) #4 SMP Wed Mar 23 22:46:46 PDT 2022
[    0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
[    0.000000] efi: UEFI not found.
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000080200000-0x00000000ffffffff]
[    0.000000]   Normal   [mem 0x0000000100000000-0x000000017fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080200000-0x000000017fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x000000017fffffff]
[    0.000000] software IO TLB: mapped [mem 0x00000000fbfff000-0x00000000fffff000] (64MB)
[    0.000000] SBI specification v0.2 detected
[    0.000000] SBI implementation ID=0x1 Version=0x8
[    0.000000] SBI v0.2 TIME extension detected
[    0.000000] SBI v0.2 IPI extension detected
[    0.000000] SBI v0.2 RFENCE extension detected
[    0.000000] SBI v0.2 HSM extension detected
[    0.000000] riscv: ISA extensions acdfimsu
[    0.000000] riscv: ELF capabilities acdfim
[    0.000000] percpu: Embedded 18 pages/cpu s33240 r8192 d32296 u73728
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 1031688
[    0.000000] Kernel command line: console=ttyS0 root=/dev/vda1 rw
[    0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[    0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.000000] Sorting __ex_table...
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 4034488K/4192256K available (8209K kernel code, 4931K rwdata, 4096K rodata, 240K init, 470K bss, 157768K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[    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=4
[    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 53 interrupts with 4 handlers for 8 contexts.
[    0.000000] random: get_random_bytes called from start_kernel+0x310/0x482 with crng_init=0
[    0.000000] riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [0]
[    0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x24e6a1710, max_idle_ns: 440795202120 ns
[    0.000082] sched_clock: 64 bits at 10MHz, resolution 100ns, wraps every 4398046511100ns
[    0.002171] Console: colour dummy device 80x25
[    0.002982] Calibrating delay loop (skipped), value calculated using timer frequency.. 20.00 BogoMIPS (lpj=40000)
[    0.003072] pid_max: default: 32768 minimum: 301
[    0.003826] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.003857] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.021960] rcu: Hierarchical SRCU implementation.
[    0.023368] EFI services will not be available.
[    0.024672] smp: Bringing up secondary CPUs ...
[    0.029676] smp: Brought up 1 node, 4 CPUs
[    0.037516] devtmpfs: initialized
[    0.041674] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.041778] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.047544] NET: Registered protocol family 16
[    0.065332] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.145545] raid6: int64x8  gen()   849 MB/s
[    0.223612] raid6: int64x8  xor()   659 MB/s
[    0.300114] raid6: int64x4  gen()  2548 MB/s
[    0.377570] raid6: int64x4  xor()  1473 MB/s
[    0.455190] raid6: int64x2  gen()  3326 MB/s
[    0.528895] raid6: int64x2  xor()  1903 MB/s
[    0.603391] raid6: int64x1  gen()  2458 MB/s
[    0.676883] raid6: int64x1  xor()  1567 MB/s
[    0.676909] raid6: using algorithm int64x2 gen() 3326 MB/s
[    0.676923] raid6: .... xor() 1903 MB/s, rmw enabled
[    0.676964] raid6: using intx1 recovery algorithm
[    0.679760] vgaarb: loaded
[    0.680740] SCSI subsystem initialized
[    0.682143] usbcore: registered new interface driver usbfs
[    0.682332] usbcore: registered new interface driver hub
[    0.682471] usbcore: registered new device driver usb
[    0.690260] clocksource: Switched to clocksource riscv_clocksource
[    0.691104] VFS: Disk quotas dquot_6.6.0
[    0.691235] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.699735] NET: Registered protocol family 2
[    0.705242] tcp_listen_portaddr_hash hash table entries: 2048 (order: 3, 32768 bytes, linear)
[    0.705351] TCP established hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.705606] TCP bind hash table entries: 32768 (order: 7, 524288 bytes, linear)
[    0.705971] TCP: Hash tables configured (established 32768 bind 32768)
[    0.707033] MPTCP token hash table entries: 4096 (order: 4, 98304 bytes, linear)
[    0.707212] UDP hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    0.707393] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    0.708594] NET: Registered protocol family 1
[    0.710774] RPC: Registered named UNIX socket transport module.
[    0.710819] RPC: Registered udp transport module.
[    0.710831] RPC: Registered tcp transport module.
[    0.710843] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.710891] NET: Registered protocol family 44
[    0.711040] PCI: CLS 0 bytes, default 64
[    0.714075] Initialise system trusted keyrings
[    0.715045] workingset: timestamp_bits=46 max_order=20 bucket_order=0
[    0.721247] NFS: Registering the id_resolver key type
[    0.721399] Key type id_resolver registered
[    0.721437] Key type id_legacy registered
[    0.721825] 9p: Installing v9fs 9p2000 file system support
[    0.722707] NET: Registered protocol family 38
[    0.722796] xor: measuring software checksum speed
[    0.727322]    8regs           :  2294 MB/sec
[    0.731878]    8regs_prefetch  :  2202 MB/sec
[    0.734206]    32regs          :  4380 MB/sec
[    0.736651]    32regs_prefetch :  4376 MB/sec
[    0.736682] xor: using function: 32regs (4380 MB/sec)
[    0.736723] Key type asymmetric registered
[    0.736772] Asymmetric key parser 'x509' registered
[    0.736896] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[    0.737335] io scheduler mq-deadline registered
[    0.737396] io scheduler kyber registered
[    0.737631] io scheduler bfq registered
[    0.740073] pci-host-generic 30000000.pci: host bridge /soc/pci@30000000 ranges:
[    0.740608] pci-host-generic 30000000.pci:       IO 0x0003000000..0x000300ffff -> 0x0000000000
[    0.740881] pci-host-generic 30000000.pci:      MEM 0x0040000000..0x007fffffff -> 0x0040000000
[    0.742061] pci-host-generic 30000000.pci: ECAM at [mem 0x30000000-0x3fffffff] for [bus 00-ff]
[    0.742609] pci-host-generic 30000000.pci: PCI host bridge to bus 0000:00
[    0.742934] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.743013] pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
[    0.743026] pci_bus 0000:00: root bus resource [mem 0x40000000-0x7fffffff]
[    0.743801] pci 0000:00:00.0: [1b36:0008] type 00 class 0x060000
[    0.785566] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.789415] printk: console [ttyS0] disabled
[    0.790414] 10000000.uart: ttyS0 at MMIO 0x10000000 (irq = 2, base_baud = 230400) is a 16550A
[    0.808323] printk: console [ttyS0] enabled
[    0.809643] [drm] radeon kernel modesetting enabled.
[    0.824840] loop: module loaded
[    0.827063] libphy: Fixed MDIO Bus: probed
[    0.827633] e1000e: Intel(R) PRO/1000 Network Driver
[    0.827742] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[    0.828034] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.828190] ehci-pci: EHCI PCI platform driver
[    0.828384] ehci-platform: EHCI generic platform driver
[    0.828563] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.828737] ohci-pci: OHCI PCI platform driver
[    0.828931] ohci-platform: OHCI generic platform driver
[    0.829896] usbcore: registered new interface driver uas
[    0.830193] usbcore: registered new interface driver usb-storage
[    0.830873] mousedev: PS/2 mouse device common for all mice
[    0.833038] goldfish_rtc 101000.rtc: registered as rtc0
[    0.833772] goldfish_rtc 101000.rtc: setting system clock to 2022-03-24T09:08:08 UTC (1648112888)
[    0.835642] syscon-poweroff soc:poweroff: pm_power_off already claimed (____ptrval____) sbi_shutdown
[    0.835890] syscon-poweroff: probe of soc:poweroff failed with error -16
[    0.838590] usbcore: registered new interface driver usbhid
[    0.838721] usbhid: USB HID core driver
[    0.840094] NET: Registered protocol family 10
[    0.855733] Segment Routing with IPv6
[    0.856190] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    0.859802] NET: Registered protocol family 17
[    0.861178] 9pnet: Installing 9P2000 support
[    0.861487] Key type dns_resolver registered
[    0.861922] registered taskstats version 1
[    0.862065] Loading compiled-in X.509 certificates
[    0.868305] md: Waiting for all devices to be available before autodetect
[    0.868451] md: If you don't use raid, use raid=noautodetect
[    0.868567] md: Autodetecting RAID arrays.
[    0.868679] md: autorun ...
[    0.868772] md: ... autorun DONE.
[    0.870223] VFS: Cannot open root device "vda1" or unknown-block(0,0): error -6
[    0.870618] Please append a correct "root=" boot option; here are the available partitions:
[    0.870897] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    0.871172] SMP: stopping secondary CPUs
[    0.875251] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---

May I know how I could solve this problem? Thanks in advance.

@yslys yslys changed the title run-init: can't execute '/sbin/init': No such file or directory VFS: Cannot open root device "vda1" or unknown-block(0,0): error -6 Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant