qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to solve: 'Please append a correct "root=" boot option' ?


From: Freitas GDH
Subject: Re: How to solve: 'Please append a correct "root=" boot option' ?
Date: Thu, 20 Apr 2023 08:53:39 -0300

Thank you Frank and Thomas !!

Before use if=none I've tried:

-drive file=1.squashfs,if=virtio,format=raw,id=foo -device virtio-blk-device,drive=foo 
qemu-system-mipsel: -device virtio-blk-device,drive-foo: No 'virtio-bus' bus found for device 'virtio-blk-device'
and
-drive file=1.squashfs,if=virtio,format=raw
qemu-system-mipsel: -drive file=1.squashfs,if=virtio,format=raw: No 'PCI' bus found for device 'virtio-blk-pci'

After watch the Thomas video, I ran:
-blockdev file,node-name=f1,filename=/home/fenix/files/1/1.squashfs \
-blockdev raw,node-name=q1,file=f1 \
-device virtio-blk,drive=q1 \

qemu-system-mipsel: -device virtio-blk,drive=q1: No 'PCI' bus found for device 'virtio-blk-pci'


However running  ~/qemu-4.0.0/mipsel-softmmu/qemu-system-mipsel -machine fg_DIR_615_D_ralink_rt3050_soc -device help outputs:

Storage devices:
name "am53c974", bus PCI, desc "AMD Am53c974 PCscsi-PCI SCSI adapter"
name "dc390", bus PCI, desc "Tekram DC-390 SCSI adapter"
name "floppy", bus floppy-bus, desc "virtual floppy drive"
name "ich9-ahci", bus PCI, alias "ahci"
name "ide-cd", bus IDE, desc "virtual IDE CD-ROM"
name "ide-drive", bus IDE, desc "virtual IDE disk or CD-ROM (legacy)"
name "ide-hd", bus IDE, desc "virtual IDE disk"
name "isa-fdc", bus ISA
name "isa-ide", bus ISA
name "lsi53c810", bus PCI
name "lsi53c895a", bus PCI, alias "lsi"
name "megasas", bus PCI, desc "LSI MegaRAID SAS 1078"
name "megasas-gen2", bus PCI, desc "LSI MegaRAID SAS 2108"
name "mptsas1068", bus PCI, desc "LSI SAS 1068"
name "nvme", bus PCI, desc "Non-Volatile Memory Express"
name "piix3-ide", bus PCI
name "piix3-ide-xen", bus PCI
name "piix4-ide", bus PCI
name "pvscsi", bus PCI
name "scsi-block", bus SCSI, desc "SCSI block device passthrough"
name "scsi-cd", bus SCSI, desc "virtual SCSI CD-ROM"
name "scsi-disk", bus SCSI, desc "virtual SCSI disk or CD-ROM (legacy)"
name "scsi-generic", bus SCSI, desc "pass through generic scsi device (/dev/sg*)"
name "scsi-hd", bus SCSI, desc "virtual SCSI disk"
name "sd-card", bus sd-bus
name "sdhci-pci", bus PCI
name "usb-bot", bus usb-bus
name "usb-mtp", bus usb-bus, desc "USB Media Transfer Protocol device"
name "usb-storage", bus usb-bus
name "usb-uas", bus usb-bus
name "vhost-scsi", bus virtio-bus
name "vhost-scsi-pci", bus PCI
name "vhost-scsi-pci-non-transitional", bus PCI
name "vhost-scsi-pci-transitional", bus PCI
name "vhost-user-blk", bus virtio-bus
name "vhost-user-blk-pci", bus PCI
name "vhost-user-blk-pci-non-transitional", bus PCI
name "vhost-user-blk-pci-transitional", bus PCI
name "vhost-user-scsi", bus virtio-bus
name "vhost-user-scsi-pci", bus PCI
name "vhost-user-scsi-pci-non-transitional", bus PCI
name "vhost-user-scsi-pci-transitional", bus PCI
name "virtio-blk-device", bus virtio-bus
name "virtio-blk-pci", bus PCI, alias "virtio-blk"

name "virtio-blk-pci-non-transitional", bus PCI
name "virtio-blk-pci-transitional", bus PCI
name "virtio-scsi-device", bus virtio-bus
name "virtio-scsi-pci", bus PCI, alias "virtio-scsi"
name "virtio-scsi-pci-non-transitional", bus PCI
name "virtio-scsi-pci-transitional", bus PCI

I'm still trying to figure out what's happening.


Considering I'm able to run with the -initrd option, how could I convert squashfs into cpio file? I mount squashfs image file and  find . | cpio -o -H newc > /tmp/file.cpio   but this didn't work.


On Thu, Apr 20, 2023 at 4:48 AM Frantisek Rysanek <Frantisek.Rysanek@post.cz> wrote:
On 19 Apr 2023 at 23:40, Freitas GDH wrote:

> [    1.579213] VFS: Cannot open root device "vda" or
> unknown-block(0,0): error -6
> [    1.579566] Please append a correct "root=" boot option; here are
> the available partitions:
> [    1.580137] Kernel panic - not syncing: VFS: Unable to mount root
> fs on unknown-block(0,0)

Regardless of platform and kernel version, this generally means that
the device desired has not "emerged" before the "time to mount the
root fs" - typically because your monolithic kernel is missing the
driver module(s) that cater for the hardware and that should
nominally advertise the block device desired.

In your case, I believe you need virtio-blk .
Your log should then contain something like:

# dmesg | grep vda
[    9.549329] virtio_blk virtio0: [vda] 20971520 512-byte logical blocks (10.7 GB/10.0 GiB)
...and further notes about the FS getting recognized on the block
device, perhaps only upon a successful mount attempt.

Perhaps you should use the initrd, load the driver from there, and
"pivot the root" ?

Another thought: on the host side, how about
-drive ... if=virtio ?

Frank

reply via email to

[Prev in Thread] Current Thread [Next in Thread]