OpenWrt Forum Archive

Topic: self compiled qemu - Waiting for root device /dev/sda2

The content of this topic has been archived on 28 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

I try to compile me a new qemu image on the todays bleeding edge branch (barrier braker). I've been running openwrt on qemu as my central router at home for months now. It's a lot of fun because it's so blazingly fast even compared e.g. to a WNDR3700v2.

Though I'm stuck because when I boot it it won't get further than this
Waiting for root device /dev/sda2...

I already tried some different kernel modules like scsi-core or ata but none worked so far.

My libvirt configuration:
http://pastebin.com/TznTTxnA

My compile config:
http://pastebin.com/9cqi3GVf

PunBB bbcode test

I have this attitude adjustment qemu image running with the exact same libvirt configuration (but of course with network interfaces). Working like a charm.
OpenWrt Attitude Adjustment 12.09.1 / LuCI 0.11 Branch (0.11+svn9951)

Doesn't anybody have  barrier breaker running via qemu?

I have x86 and x86-64 target images running succesful on trunk with Qemu on Arch Linux (qemu 2.0)

I usually start with command line.

The wiki pages for Qemu were recently redesigned and updated.
have a read at : http://wiki.openwrt.org/doc/howto/qemu

notice the x86-64 "machine" issue with Qemu there
the commandline there is working on my end - test it on your side

Instead of providing the config it is better to supply just the output of

./scripts/diffconfig.sh

That long config file is not really helpful for quickly seeing what stuff you selected that is different from default.

Somebody needs to add import/export XML profile libvirt stuff to wiki(for quick + dirty command line normally is fine and not overkill like xml)

I seem to be using qemu 1.0 at ubuntu 12.04.

You are right I'm sorry. Here's the diff:

CONFIG_TARGET_x86_64=y
CONFIG_TARGET_x86_64_Default=y
CONFIG_TARGET_BOARD="x86_64"
CONFIG_OPENSSL_WITH_EC=y
CONFIG_PACKAGE_bridge=y
CONFIG_PACKAGE_glib2=y
CONFIG_PACKAGE_kmod-crypto-core=y
CONFIG_PACKAGE_kmod-crypto-hash=y
CONFIG_PACKAGE_kmod-fs-ext4=y
CONFIG_PACKAGE_kmod-lib-crc16=y
CONFIG_PACKAGE_libattr=y
CONFIG_PACKAGE_libdbi=y
CONFIG_PACKAGE_libeventlog=y
CONFIG_PACKAGE_libffi=y
CONFIG_PACKAGE_libopenssl=y
CONFIG_PACKAGE_libpcre=y
CONFIG_PACKAGE_libpthread=y
CONFIG_PACKAGE_librt=y
CONFIG_PACKAGE_libwrap=y
CONFIG_PACKAGE_syslog-ng3=y
CONFIG_PACKAGE_zlib=y
CONFIG_TARGET_KERNEL_PARTSIZE=8
CONFIG_TARGET_ROOTFS_PARTSIZE=250

Regarding the x86_64 issue: I'm not using vdi images. Should I be using it? I will try now.

I tried .vdi image with the command given at the wiki qemu page of openwrt you linked, but my qemu version doesn't support pc-q35-2.0 so I didn't use the "-M" switch. I also did not give any network interfaces.

Anyhow I run into the exact same problem:
Waiting for root device /dev/sda2...

I also tried the vdi image with virtualbox (mac) 4.3.8 and this it working fine.

Update:
I updated to Ubuntu 14.04 with Qemu 2.0.0. The problem persists.
Update 2:
I forgot to run the qemu command line with emulation type pc-q35-2.0. It's working now.

Could we conclude that qemu 1.0.0 won't work with Barrier Breaker trunk since it does not support pc-q35-2.0?

(Last edited by juni on 13 Jul 2014, 13:44)

Well, it works with qemu 2 to the point where it hangs at hardware / disk detection - it boots grub, so it works to a certain degree (no coredump / Oops)

afaik there was a ticket asking for IDE drivers that are used in older Qemu machines to be activated but that ticket was denied + closed

check sth like

CONFIG_TARGET_x86_64=y
CONFIG_TARGET_x86_64_Default=y
CONFIG_TARGET_BOARD="x86_64"
CONFIG_DEVEL=y
CONFIG_BUILD_LOG=y
CONFIG_PACKAGE_kmod-ata-ahci=y
CONFIG_PACKAGE_kmod-ata-core=y
CONFIG_PACKAGE_kmod-ata-marvell-sata=y
CONFIG_PACKAGE_kmod-ata-nvidia-sata=y
CONFIG_PACKAGE_kmod-ata-piix=y
CONFIG_PACKAGE_kmod-ata-sil=y
CONFIG_PACKAGE_kmod-crypto-core=y
CONFIG_PACKAGE_kmod-crypto-hash=y
CONFIG_PACKAGE_kmod-fs-ext4=y
CONFIG_PACKAGE_kmod-ide-core=y
CONFIG_PACKAGE_kmod-ide-generic=y
CONFIG_PACKAGE_kmod-ide-generic-old=y
CONFIG_PACKAGE_kmod-lib-crc16=y
CONFIG_PACKAGE_kmod-scsi-core=y
CONFIG_PACKAGE_kmod-scsi-generic=y
# CONFIG_TARGET_IMAGES_GZIP is not set
CONFIG_TARGET_INITRAMFS_COMPRESSION_NONE=y
CONFIG_TARGET_KERNEL_PARTSIZE=48
CONFIG_TARGET_OPTIONS=y
CONFIG_TARGET_ROOTFS_INCLUDE_KERNEL=y
CONFIG_TARGET_ROOTFS_INITRAMFS=y
CONFIG_TARGET_ROOTFS_PARTSIZE=512
# CONFIG_TARGET_ROOTFS_TARGZ is not set
CONFIG_VDI_IMAGES=y
CONFIG_VMDK_IMAGES=y

at my end this boots again with the old

qemu-system-x86_64 -hda openwrt-x86_64-combined-ext4.vdi

commandline

edit: notice according to http://wiki.qemu.org/Features/Q35 the new machine has better features like easier pcie passthrough

(Last edited by zloop on 15 Jul 2014, 08:11)

Using pc-1.0, qemu 2.0 and your kernel compile config, I'm again stuck at waiting for /dev/sda2

No matter what I do, I am not able to run openwrt barrier breaker via qemu.
Could someone please lead me into the right direction.

I'm using ubuntu 14.04 with
qemu 2.0
libvirt 1.2.8

I would like to have an xml configuration file as in /etc/libvirt/qemu so that it's easy to handle the virtual machine.
The wiki page (http://wiki.openwrt.org/doc/howto/qemu) does not really help.
It's using a vdi image which I do not intend to. Plus there is no xml configuration given.

Here I read that libvirt can handle q35 only with version 1.3+ (http://fedoraproject.org/wiki/Features/ … xpress_Q35).
Is it really necessary for me to use q35 in order to be able to use openwrt kvm guest?

(Last edited by juni on 5 Oct 2014, 09:22)

What's the status here? I really would like to run openwrt CC trunk in qemu with libvirt.

The discussion might have continued from here.