Subject: Problem using bouyer-xen2 netbsd as guest domain
To: None <port-xen@NetBSD.org>
From: Dave Thompson <davetho@cisco.com>
List: port-xen
Date: 02/23/2005 15:18:53
This is a multi-part message in MIME format.

------=_NextPart_000_0053_01C519BA.FCEFE9C0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

I am having a problem using the netbsd kernel built from the bouyer-xen2
branch (latest as of yesterday) in an unpriviledged domain.  I built the
netbsd kernel using the XEN config and built the sets for the i386
architecture.   SInce I am running linux in domain 0, I created a partition
on my disk (/dev/sda3) and formatted it with the ext2 FS.  I mounted the
partition and then extracted the sets I built unto this partition.
 
After unmounting the partition from linux, I then created a domain using the
following config script:
 
kernel = "/root/xen/netbsd/netbsd-xenU"
memory = 48
name = "netbsd-xen"
nics = 1
ip = "192.168.2.11"
vif = ['mac=00:06:AA:F6:BB:B4']
disk = [('phy:/dev/sda3,sda1,w')]
root = "/dev/sda1"
 
The first attempt stuck at the line "init: copying out path `/sbin/init' 11"
so I destroyed it, re-mounted the partition on linux and created the
/dev/console character device (as suggested in the email today) using the
linux mknod command.  I then unmounted and created the domain again.  This
time I got past the hang and was able to get into single user mode.
 
I now want to run the MAKEDEV script in /dev, add /etc/rc.conf, and other
initialization tasks but my root file system is mounted as read only:
 
# mount
root_device on / type ext2fs (read-only, local)
 
I tried using 'mount -u -w /' but get the following errors:
 
# mount -u -w /
mount: Cannot open `/etc/fstab': No such file or directory
mount_ext2fs: "root_device" is a relative path.
mount_ext2fs: using "/root_device" instead.
mount_ext2fs: /root_device on /: No such file or directory
 
Any help on how to change the read-only attribute so I can finish setting up
the disk image?
 
Thanks in advance!
Dave Thompson
 
 
Here is the boot messages:
 
Loaded initial symtab at 0xc02fa984, strtab at 0xc0318968, # entries 7609
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.
 
NetBSD 2.99.16 (XEN) #0: Tue Feb 22 22:35:22 CST 2005
        root@dually:/root/netbsd/src/sys/arch/xen/compile/obj/XEN
total memory = 46796 KB
avail memory = 45620 KB
mainbus0 (root)
cpu0 at mainbus0: (uniprocessor)
cpu0: Intel Pentium III (686-class), 999.81 MHz, id 0x68a
cpu0: features 383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu0: features 383fbff<PGE,MCA,CMOV,PAT,PSE36,MMX>
cpu0: features 383fbff<FXSR,SSE>
cpu0: I-cache 16 KB 32B/line 4-way, D-cache 16 KB 32B/line 4-way
cpu0: L2 cache 256 KB 32B/line 8-way
cpu0: ITLB 32 4 KB entries 4-way, 2 4 MB entries fully associative
cpu0: DTLB 64 4 KB entries 4-way, 8 4 MB entries 4-way
cpu0: 8 page colors
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 00:06:aa:f6:bb:b4
IPsec: Initialized Security Association Processing.
xbd0 at hypervisor0: Xen Virtual Block Device 4188 MB
boot device: xbd0
root on xbd0a dumps on xbd0b
mountroot: trying nfs...
mountroot: trying ext2fs...
root file system type: ext2fs
init: copying out path `/sbin/init' 11
/etc/rc.conf is not configured.  Multiuser boot aborted.
Enter pathname of shell or RETURN for /bin/sh: 
 

------=_NextPart_000_0053_01C519BA.FCEFE9C0
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2800.1491" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D237355720-23022005>I am =
having a=20
problem using the netbsd kernel built from the bouyer-xen2 branch =
(latest as of=20
yesterday) in an unpriviledged domain.&nbsp; I built the netbsd kernel =
using the=20
XEN config and built the sets for the i386 architecture.&nbsp;&nbsp; =
SInce I am=20
running linux in domain 0, I created a partition on my disk (/dev/sda3) =
and=20
formatted it with the ext2 FS.&nbsp; I mounted the partition and then =
extracted=20
the sets I built unto this partition.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D237355720-23022005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D237355720-23022005>After =
unmounting the=20
partition from linux, I then created a domain using the following config =

script:</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D237355720-23022005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D237355720-23022005>kernel =
=3D=20
"/root/xen/netbsd/netbsd-xenU"<BR>memory =3D 48<BR>name =3D =
"netbsd-xen"<BR>nics =3D=20
1<BR>ip =3D "192.168.2.11"<BR>vif =3D =
['mac=3D00:06:AA:F6:BB:B4']<BR>disk =3D=20
[('phy:/dev/sda3,sda1,w')]<BR>root =3D "/dev/sda1"</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D237355720-23022005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D237355720-23022005>The =
first attempt=20
stuck at the line "init: copying out path `/sbin/init' 11" so I =
destroyed it,=20
re-mounted the partition on linux and created the /dev/console character =
device=20
(as suggested in the email today) using the linux mknod command.&nbsp; I =
then=20
unmounted and created the domain again.&nbsp; This time I got past the =
hang and=20
was able to get into single user mode.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D237355720-23022005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D237355720-23022005>I now =
want to run=20
the MAKEDEV script in /dev, add /etc/rc.conf,&nbsp;and other =
initialization=20
tasks&nbsp;but my root file system is mounted as read =
only:</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D237355720-23022005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D237355720-23022005>#=20
mount<BR>root_device on / type ext2fs (read-only, =
local)</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D237355720-23022005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D237355720-23022005>I =
tried using 'mount=20
-u -w /' but get the following errors:</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D237355720-23022005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D237355720-23022005># =
mount -u -w=20
/<BR>mount: Cannot open `/etc/fstab': No such file or =
directory<BR>mount_ext2fs:=20
"root_device" is a relative path.<BR>mount_ext2fs: using "/root_device"=20
instead.<BR>mount_ext2fs: /root_device on /: No such file or=20
directory</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D237355720-23022005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D237355720-23022005>Any =
help on how to=20
change the read-only attribute so I can finish setting up the disk=20
image?</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D237355720-23022005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D237355720-23022005>Thanks =
in=20
advance!</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D237355720-23022005>Dave=20
Thompson</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D237355720-23022005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D237355720-23022005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D237355720-23022005>Here =
is the boot=20
messages:</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D237355720-23022005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D237355720-23022005>Loaded =
initial=20
symtab at 0xc02fa984, strtab at 0xc0318968, # entries 7609<BR>Copyright =
(c)=20
1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, =
2005<BR>&nbsp;&nbsp;&nbsp;=20
The NetBSD Foundation, Inc.&nbsp; All rights reserved.<BR>Copyright (c) =
1982,=20
1986, 1989, 1991, 1993<BR>&nbsp;&nbsp;&nbsp; The Regents of the =
University of=20
California.&nbsp; All rights reserved.</SPAN></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D237355720-23022005>NetBSD =
2.99.16 (XEN)=20
#0: Tue Feb 22 22:35:22 CST =
2005<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
<A=20
href=3D"mailto:root@dually:/root/netbsd/src/sys/arch/xen/compile/obj/XEN"=
>root@dually:/root/netbsd/src/sys/arch/xen/compile/obj/XEN</A><BR>total=20
memory =3D 46796 KB<BR>avail memory =3D 45620 KB<BR>mainbus0 =
(root)<BR>cpu0 at=20
mainbus0: (uniprocessor)<BR>cpu0: Intel Pentium III (686-class), 999.81 =
MHz, id=20
0x68a<BR>cpu0: features=20
383fbff&lt;FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR&gt;<BR>cpu0: =

features 383fbff&lt;PGE,MCA,CMOV,PAT,PSE36,MMX&gt;<BR>cpu0: features=20
383fbff&lt;FXSR,SSE&gt;<BR>cpu0: I-cache 16 KB 32B/line 4-way, D-cache =
16 KB=20
32B/line 4-way<BR>cpu0: L2 cache 256 KB 32B/line 8-way<BR>cpu0: ITLB 32 =
4 KB=20
entries 4-way, 2 4 MB entries fully associative<BR>cpu0: DTLB 64 4 KB =
entries=20
4-way, 8 4 MB entries 4-way<BR>cpu0: 8 page colors<BR>hypervisor0 at=20
mainbus0<BR>xencons0 at hypervisor0: Xen Virtual Console =
Driver<BR>xencons0:=20
console major 143, unit 0<BR>Initialising Xen virtual ethernet frontend=20
driver.<BR>npx0 at hypervisor0: using exception 16<BR>xennet0 at =
hypervisor0:=20
Xen Virtual Network Interface<BR>xennet0: MAC address=20
00:06:aa:f6:bb:b4<BR>IPsec: Initialized Security Association =
Processing.<BR>xbd0=20
at hypervisor0: Xen Virtual Block Device 4188 MB<BR>boot device: =
xbd0<BR>root on=20
xbd0a dumps on xbd0b<BR>mountroot: trying nfs...<BR>mountroot: trying=20
ext2fs...<BR>root file system type: ext2fs<BR>init: copying out path=20
`/sbin/init' 11<BR>/etc/rc.conf is not configured.&nbsp; Multiuser boot=20
aborted.<BR>Enter pathname of shell or RETURN for /bin/sh: =
</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D237355720-23022005></SPAN></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0053_01C519BA.FCEFE9C0--