WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] FC3 domU using Xen 3.0

To: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Subject: Re: [Xen-users] FC3 domU using Xen 3.0
From: AndreGround <andreground@xxxxxxxxx>
Date: Tue, 16 Jan 2007 15:05:03 +0100
Cc: henning_sprang@xxxxxx, Roger Lucas <roger@xxxxxxxxxxxxx>, xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 16 Jan 2007 06:04:50 -0800
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=AK/Qy43ckCH87cq8BtbBtLmsBBLZv7TYUwjVje6uACHJGBc9b2mxutN4hM+BYmATinBeRJ4hsjkwVtne9ymewi5drmQzjRuaLwFmmVf5PHoHR4Y+SJaSqTaMOVQVefcP7nayENpZL06YUI54PzPbBt2HCa1jIQHVDtgW7IX5qAU=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070116135743.GB5039@xxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <e75c25020701150115s1001730fxdd59d4f65161c1c1@xxxxxxxxxxxxxx> <5bb00b3f0701151114p6af9c3bfr63d1befa84be7e9@xxxxxxxxxxxxxx> <20070115192348.GG8625@xxxxxxxxxx> <011901c738e1$aee133e0$7f01a8c0@wolverine> <e75c25020701151236l57e9bb4bwd599af251e69dae@xxxxxxxxxxxxxx> <e75c25020701160315u3bcdc264o4e2bf4f10f11abe4@xxxxxxxxxxxxxx> <20070116135743.GB5039@xxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Thanks! Here here my updates :)

On Tue, Jan 16, 2007 at 12:15:40PM +0100, AndreGround wrote:
> Hi,
> I've made some other tests, including using "xvd" instead of "sda" devices
> but without success.

There is no functional difference between xvd & sda - its merely a difference
in the way the devices are named in the guest - the underlying protocol always
remains the same.

Ok

> Here's what I always get under my PAE-FC6 when I try to start a FC3 DomU:
> exec of init (/sbin/init) failed!!!: No such file or directory
> Kernel panic - not syncing: Attempted to kill init!

Ok, so that's basically indicitive of being unable to successfully access
the root filesystem. This is dependant on a couple of things - first the
'root' device name as specified to the kernel, second, the name of the
device as listed in the Xen config file, and finally, the contents
of the init script int the inird. All three have to match or bad things
will happen.


I see

> Here's my config file for Xen:
> kernel ="/boot/vmlinuz-2.6.18-1.2869.fc6xen"
> ramdisk = "/boot/initrd-2.6.18-1.2869.fc6xenU.img"
> memory = 256
> name = "mail"
> #vif = ['mac=aa:00:00:00:00:01']
> disk =
> ['file:/xen/mail/fedora.img,sda1,w','file:/xen/mail/swap1.img,sda2,w']
> root = "/dev/sda1 ro"

I'm not sure whether this is related or not, but our general recommendation
is to match disk images through as disk devices, not disk partitions, and
then create partitions within the guest if needed. eg Usual practice would
be

disk = ['file:/xen/mail/fedora.img,sda,w','file:/xen/mail/swap1.img,sdb,w']
root = '/dev/sda ro'

And then inside the guest, partition /dev/sda as needed


I've some test systems running fine with this configuration
(/dev/sda1). I'll consider your tip for next times :)

> [root@hulk initrd]# cat init
> #!/bin/nash

[snip]

> mkblkdevs
> resume /dev/sda2
> echo Creating root device.
> mkrootdev -t ext3 -o defaults,ro /dev/sda1

This would then change to /dev/sda  - unless you'd created partitions within
it.


I already have partitions created on that virtual block device.

> echo Mounting root filesystem.
> mount /sysroot
> echo Setting up other filesystems.
> setuproot
> echo Switching to new root and running init.
> switchroot
> [root@hulk initrd]#
>
> Here's my DomU fstab:
> # This file is edited by fstab-sync - see 'man fstab-sync' for details
> /dev/sda1              /                       ext3    defaults        1 1
> none                    /dev/pts                devpts  gid=5,mode=620  0 0
> none                    /dev/shm                tmpfs   defaults        0 0
> none                    /proc                   proc    defaults        0 0
> none                    /sys                    sysfs   defaults        0 0
> /dev/sda2               swap                    swap    defaults        0 0

I don't think this is used at this early point in the boot - its probably
the mkrootdev bit that's failing.


Yes, I think it must be related to mkrootdev too

> no fstab.sys, mounting internal defaults
> Switching to new root and running init.
> unmounting old /dev
> unmounting old /proc
> unmounting old /sys
> exec of init (/sbin/init) failed!!!: No such file or directory
> Kernel panic - not syncing: Attempted to kill init!
> [root@hulk initrd]#

Oh, you don't mention it, but I assume the /xen/mail/fedora.img disk file
does actaully contain a filesystem with /sbin/init there ?


Yes :)

Regards,
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=|


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users