Subject: Image-based Linux-DomUs fail to boot ("VFS: Cannot open root device "hda1" or unknown-block(0,0)")
To: None <port-xen@netbsd.org>
From: Mark Weinem <mark.weinem@onlinehome.de>
List: port-xen
Date: 08/03/2006 17:39:32
Hi,

Thanks to community efforts there are now  many ready-to-use VM-Images 
available, to "kickstart" Linux-DomUs. Just for examples: 

	http://www.xen-get.org/
	http://cdprojekte.mattiasschlenker.de/Public/Xen-Images/

But   unfortunately I don't get them run with Xen3/NetBSD-3.99.21
I tried the following three methods without luck.

1) Copying  a Linux system over to a ext2 filesystem (created by NetBSD):

- I started "disklabel -i" and   changed "fstype" of /dev/wd0g 
from "4.2BSD" to   "Linux Ext2" 

- "mke2fs /dev/wd0g"

- "mount_ext2fs /dev/wd0g /mnt" , "cp -R /linux_files/ /mnt/"

and my config file for the Linux domU:

	kernel = "/vmlinuz-2.6.16.13-xen"
	memory = 300
	name = "suse"
	vif = [ 'bridge=bridge0' ]
	disk = [ 'phy:/dev/wd0g,0x301,w' ]
	root = "/dev/hda1 rw"

The corresponding error message after "xm create ..."
-----
VFS: Cannot open root device "hda1" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on 
unknown-block(0,0)
-----


2) Booting a file-based Linux image directly:

- the config file for the Linux domU:

	kernel = "/vmlinuz-2.6.16.13-xen"
	memory = 300
	name = "suse"
	vif = [ 'bridge=bridge0' ]
	disk = [ 'file:/usr/xen/linux_hda1.img,0x301,w' ]
	root = "/dev/hda1 rw"

ends with the same error message:
-----
VFS: Cannot open root device "hda1" or unknown-block(0,0)
[...]
-----


3) Using  "vnd" to integrate "linux_hda1.img"

- "vnconfig -u vnd0"

- "vnconfig -c vnd0 linux_hda1.img"

- the config file for the Linux domU:

	kernel = "/vmlinuz-2.6.16.13-xen"
	memory = 300
	name = "suse"
	vif = [ 'bridge=bridge0' ]
	disk = [ 'phy:/dev/vnd0,0x301,w' ]
	root = "/dev/hda1 rw"

- error message:
-----
"Device 769 (vbd) could not be connected. Hotplug scripts not working"
-----


The system runs 2x NetBSD-3.01 domUs and one Ubuntu Linux domU (from an   
ordinary installation via CD) without such problems.

Greetings, Mark Weinem












 -