Subject: netbsd as a non-domain0 os : init problem
To: None <port-xen@netbsd.org>
From: Thomas Riboulet <ange@librium.org>
List: port-xen
Date: 02/23/2005 10:13:58
This is a multi-part message in MIME format.
--------------060205050000010106050501
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

hi,


I'm having an error when starting netbsd as a domainU os in xen 2.
The error has already appear in this list but I wasn't able to make it 
work with all the info in the archive.

the error :
"init: copying out path `/sbin/init' 11"

and then hang out



the context :
dom0 os : linux 2.6.10

os : Ubuntu GNU/Linux

more :
attached boot messages and config file


more :

I've tried to rebuild the kernel without the "options NTP" and with 
"options HZ=50", still got the error.

Then I've tried to boot on the kernels builded by Manuel Bouyer there : 
ftp://asim.lip6.fr/outgoing/bouyer/

the netbsd-XENU-INSTALL boot and launch the install process but I can't 
do anything more because it doesn't find any disk.
the netbsd-XENU kernel got the same error (copying out path ...)

so I've tried to build my own using the Manuel Bouyer cvs branch and I 
got the same error.


So : I'm thinking that the kernel isn't the problem and that it might 
come from the config file and more precisely the disks. I'm using ext2 
formated diskfiles. I've extracted the base and etc i386 sets in the 
root diskfile, also tried with xen-i386 sets from xen website.


question : any idea of what's the problem ? is it because I'm using 
diskfiles and not partitions ? or is it a kernel problem ?



ange

--------------060205050000010106050501
Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0";
 name="netbsd20_U"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="netbsd20_U"

#  -*- mode: python; -*-
#============================================================================
# Example Python setup script for 'xm create'.
# This script sets the parameters used when a domain is created using 'xm create'.
#
# This is a relatively advanced script that uses a parameter, vmid, to control
# the settings. So this script can be used to start a set of domains by
# setting the vmid parameter on the 'xm create' command line. For example:
#
# xm create vmid=1
# xm create vmid=2
# xm create vmid=3
#
# The vmid is purely a script variable, and has no effect on the the domain
# id assigned to the new domain.
#============================================================================

# Define script variables here.
# xm_vars is defined automatically, use xm_vars.var() to define a variable.

# This function checks that 'vmid' has been given a valid value.
# It is called automatically by 'xm create'.
def vmid_check(var, val):
    val = int(val)
    if val <= 0:
        raise ValueError
    return val

# Define the 'vmid' variable so that 'xm create' knows about it.
xm_vars.var('vmid',
            use="Virtual machine id. Integer greater than 0.",
            check=vmid_check)

# Check the defined variables have valid values..
xm_vars.check()

#----------------------------------------------------------------------------
# Kernel image file.
#kernel = "/boot/vmlinuz-2.6.9-xenU"
kernel = "/boot/netbsd-XENU-ange"

# Optional ramdisk.
#ramdisk = "/boot/initrd.gz"

# The domain build function. Default is 'linux'.
#builder='linux'

# Initial memory allocation (in megabytes) for the new domain.
memory = 64

# A name for the new domain. All domains have to have different names,
# so we use the vmid to create a name.
name = "VM%d" % vmid

# Which CPU to start domain on? 
#cpu = -1   # leave to Xen to pick
cpu = vmid  # set based on vmid (mod number of CPUs)

#----------------------------------------------------------------------------
# Define network interfaces.

# Number of network interfaces. Default is 1.
#nics=1

# Optionally define mac and/or bridge for the network interfaces.
# Random MACs are assigned if not given.
#vif = [ 'mac=aa:00:00:00:00:11, bridge=xen-br0' ]

#----------------------------------------------------------------------------
# Define the disk devices you want the domain to have access to, and
# what you want them accessible as.
# Each disk entry is of the form phy:UNAME,DEV,MODE
# where UNAME is the device, DEV is the device name the domain will see,
# and MODE is r for read-only, w for read-write.

# This makes the disk device depend on the vmid - assuming
# that devices sda7, sda8 etc. exist. The device is exported
# to all domains as sda1.
# All domains get sda6 read-only (to use for /usr, see below).
#disk = [ 'phy:sda%d,sda1,w' % (7+vmid),
#         'phy:sda6,sda6,r' ]
disk = ['file:/plus/xen_diskimages/netbsd_root1,sda1,w', 'file:/plus/xen_diskimages/netbsd_swap1,sda2,w' ]

#----------------------------------------------------------------------------
# Set the kernel command line for the new domain.
# You only need to define the IP parameters and hostname if the domain's
# IP config doesn't, e.g. in ifcfg-eth0 or via DHCP.
# You can use 'extra' to set the runlevel and custom environment
# variables used by custom rc scripts (e.g. VMID=, usr= ).

# Set if you want dhcp to allocate the IP address.
dhcp="dhcp"
# Set netmask.
#netmask=
# Set default gateway.
#gateway=
# Set the hostname.
#hostname= "vm%d" % vmid

# Set root device.
root = "/dev/sda1 ro"

# Root device for nfs.
#root = "/dev/nfs"
# The nfs server.
#nfs_server = '192.168.1.1'  
# Root directory on the nfs server.
#nfs_root   = '/plus/xen_nfsed/netbsd_root'

# Sets runlevel 4 and the device for /usr.
extra = "4 VMID=%d usr=/dev/sda6" % vmid

#----------------------------------------------------------------------------
# Set according to whether you want the domain restarted when it exits.
# The default is 'onreboot', which restarts the domain when it shuts down
# with exit code reboot.
# Other values are 'always', and 'never'.

#restart = 'onreboot'

#============================================================================

--------------060205050000010106050501
Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0";
 name="netbsd_boot"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="netbsd_boot"


NetBSD 2.99.16 (XEN) #0: Wed Feb 23 09:19:46 CET 2005
        root@yggdrasill:/plus/sources/netbsd/src/sys/arch/xen/compile/obj/XEN
total memory = 63164 KB
avail memory = 61640 KB
mainbus0 (root)
cpu0 at mainbus0: (uniprocessor)
cpu0: Intel Celeron (686-class), 2400.24 MHz, id 0xf29
cpu0: features bfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu0: features bfebfbff<PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX>
cpu0: features bfebfbff<FXSR,SSE,SSE2,SS,HTT,TM,SBF>
cpu0: I-cache 12K uOp cache 8-way, D-cache 8 KB 64B/line 4-way
cpu0: ITLB 4K/4M: 128 entries
cpu0: DTLB 4K/4M: 64 entries
hypervisor0 at mainbus0
xencons0 at hypervisor0: Xen Virtual Console Driver
xencons0: console major 143, unit 0
Initialising Xen virtual ethernet frontend driver.
npx0 at hypervisor0: using exception 16
xennet0 at hypervisor0: Xen Virtual Network Interface
xennet0: MAC address aa:00:00:38:22:84
IPsec: Initialized Security Association Processing.
xbd0 at hypervisor0: Xen Virtual Block Device 2048 MB
xbd1 at hypervisor0: Xen Virtual Block Device 256 MB
boot device: xbd0
root on xbd0a dumps on xbd0b
mountroot: trying nfs...
mountroot: trying ext2fs...
root file system type: ext2fs
warning: no /dev/console
init: copying out path `/sbin/init' 11


--------------060205050000010106050501--