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

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.

> 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.

> 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

> [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.

> 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.

> 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 ?

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