Hello,
        I think the problem is that you are giving partitions to the systém, 
but there is no "whole disk" device. i.e. you are presenting it with xvda1 and 
xvda2, but there is no xvda. The system is scanning whole disks for partitions 
and then it is trying to mount the whole partition. It cannot find partitions 
with no disk device...
        You have got basically two options:

1. create rhel5guest1b.img and give it to the system as xvda:
        disk = [ 'tap:aio:/var/lib/xen/rhel5guest1b.img,xvda,w' ]
        That means you have to re-partition it in the guest, or do the 
following in Dom0:

        losetup /dev/loop0 /var/lib/xen/rhel5guest1b.img
        fdisk /dev/loop0

        If you need to access its partitions in Dom0, you also need to

        kpartx -a /dev/loop0
        ls /dev/mapper/loop0* # can you see the partitions?

        Then you would need to create a filesystem on the first partition, swap 
on the second, mount it, mount the old image too and copy the whole systém over 
(alternatively you can just install RHEL5 again, using virt-manager or 
virt-install and this image.)


2. Create a "dummy" file rhel5guest1dummy.img, it can be quite small (a few MB 
maybe).
        losetup /dev/loop0 /var/lib/xen/rhel5guest1b.img
        fdisk /dev/loop0 # create two primary partitions, sizes do not matter, 
types part1 - Linux; part2 - Solaris/Linux swap
        kpartx -a /dev/loop0
        ls /dev/mapper/loop0* # can you see the partitions?

        But do not create filesystems and mount them, rather add it to the 
DomU's config!

disk = [ 'tap:aio:/var/lib/xen/rhel5guest1.img,xvda1,w', 
'tap:aio:/var/lib/xen/rhel5guest1.swap,xvda2,w', 
'tap:aio:/var/lib/xen/rhel5guest1dummy.img,xvda,w' ]


        By doing this, you can actually fool the guest! The guests scans whole 
disks on boot, finds xvda - and on it finds two partitions, one of the marked 
as a Linux FS, the other one as swap. But it does not use this disk, it cannot 
create the partition devices from it because there are already xvda1 and xvda2 
which you specified in the config.
        I tested this configuration some time ago when I needed the guest to 
boot from a device without partitions.


Hope this helps,
        Daniel


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joseph McCarty
Sent: Tuesday, May 27, 2008 11:43 PM
To: rhel5 listserv
Subject: [rhelv5-list] Xen filesystem mounting errors

I have configured a Dell Power Edge 2950 with RHEL 5.1 set up for 
virtualization.  Xen version is 3.1

I set up my Xen config with tap:aio storage.  My disk line in my guest config 
is:

disk = [ 'tap:aio:/var/lib/xen/rhel5guest1.img,xvda1,w', 
'tap:aio:/var/lib/xen/rhel5guest1.swap,xvda2,w' ]

Both xvda1 and xvda2 files were set up following xen.og documentation.  
Attempting to boot my first guest failed on "switchroot:mount failed".  Reading 
more documentation and Web posts, it looked like the error was in my initrd 
file.  I built 3 different initrd's, excluding different combination of 
modules.  Here are my results for each different one:

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Kernel image file.
kernel = "/boot/vmlinuz-2.6.18-53.1.19.el5xen"

# Optional ramdisk.
ramdisk = "/boot/initrd-2.6.18-53.1.19.el5xen.img"

............................................

XENBUS: Device with no driver: device/vbd/51713
XENBUS: Device with no driver: device/vbd/51714
XENBUS: Device with no driver: device/vif/0 Write protecting the kernel 
read-only data: 445k Red Hat nash version 5.1.19.6 starting Mounting proc 
filesystem Mounting sysfs filesystem Creating /dev Creating initial device 
nodes Setting up hotplug.
Creating block device nodes.
Loading uhci-hcd.ko module
USB Universal Host Controller Interface driver v3.0 Loading ohci-hcd.ko module 
Loading ehci-hcd.ko module Loading jbd.ko module Loading ext3.ko module Loading 
scsi_mod.ko module SCSI subsystem initialized Loading sd_mod.ko module Loading 
megaraid_sas.ko module
megasas: 00.00.03.10 Wed Mar 28 10:25:52 PST 2007 Loading libata.ko module 
Loading ata_piix.ko module Waiting for driver initialization.
Scanning and configuring dmraid supported devices Creating root device.
Mounting root filesystem.
mount: could not find filesystem '/dev/root'
Setting up other filesystems.
Setting up new root fs
setuproot: moving /dev failed: No such file or directory no fstab.sys, mounting 
internal defaults
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory Switching to new root 
and running init.
unmounting old /dev
unmounting old /proc
unmounting old /sys
switchroot: mount failed: No such file or directory Kernel panic - not syncing: 
Attempted to kill init!

====================================================================

# Kernel image file.
kernel = "/boot/vmlinuz-2.6.18-53.1.19.el5xen"

# Optional ramdisk.
ramdisk = "/boot/initrd-2.6.18-53.1.19.el5xen-no-scsi.img"

..................................................

XENBUS: Device with no driver: device/vbd/51713
XENBUS: Device with no driver: device/vbd/51714
XENBUS: Device with no driver: device/vif/0 Write protecting the kernel 
read-only data: 445k Red Hat nash version 5.1.19.6 starting Mounting proc 
filesystem Mounting sysfs filesystem Creating /dev Creating initial device 
nodes Setting up hotplug.
Creating block device nodes.
Loading xenblk.ko module
Registering block device major 202
Loading uhci-hcd.ko module
USB Universal Host Controller Interface driver v3.0 Loading ohci-hcd.ko module 
Loading ehci-hcd.ko module Loading jbd.ko module Loading ext3.ko module Loading 
scsi_mod.ko module SCSI subsystem initialized Loading megaraid_sas.ko module
megasas: 00.00.03.10 Wed Mar 28 10:25:52 PST 2007 Loading xennet.ko module
netfront: Initialising virtual ethernet driver.
netfront: device eth0 has flipping receive path.
Waiting for driver initialization.
Scanning and configuring dmraid supported devices Creating root device.
Mounting root filesystem.
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
Setting up other filesystems.
Setting up new root fs
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!

=================================================================

# Kernel image file.
kernel = "/boot/vmlinuz-2.6.18-53.1.19.el5xen"

# Optional ramdisk.
ramdisk = "/boot/initrd-2.6.18-53.1.19.el5xen-no-scsi-no-raid-no-lvm.img"

...........................................

XENBUS: Device with no driver: device/vbd/51713
XENBUS: Device with no driver: device/vbd/51714
XENBUS: Device with no driver: device/vif/0 Write protecting the kernel 
read-only data: 445k Red Hat nash version 5.1.19.6 starting Mounting proc 
filesystem Mounting sysfs filesystem Creating /dev Creating initial device 
nodes Setting up hotplug.
Creating block device nodes.
Loading xenblk.ko module
Registering block device major 202
Loading uhci-hcd.ko module
USB Universal Host Controller Interface driver v3.0 Loading ohci-hcd.ko module 
Loading ehci-hcd.ko module Loading jbd.ko module Loading ext3.ko module Loading 
scsi_mod.ko module SCSI subsystem initialized Loading megaraid_sas.ko module
megasas: 00.00.03.10 Wed Mar 28 10:25:52 PST 2007 Loading xennet.ko module
netfront: Initialising virtual ethernet driver.
netfront: device eth0 has flipping receive path.
Waiting for driver initialization.
Scanning and configuring dmraid supported devices Creating root device.
Mounting root filesystem.
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
Setting up other filesystems.
Setting up new root fs
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!

=============================================================

# Kernel image file.
kernel = "/boot/vmlinuz-2.6.18-53.1.19.el5xen"

# Optional ramdisk.
ramdisk = "/boot/initrd-2.6.18-53.1.19.el5xen-dell.img"
# mkinitrd -v -f --with=sd_mod --with=scsi_mod --with=megaraid_mm 
--with=megaraid_sas --with=megaraid_mbox initrd-2.6.16.29-xen.img 2.6.16.29-xen

......................................

XENBUS: Device with no driver: device/vbd/51713
XENBUS: Device with no driver: device/vbd/51714
XENBUS: Device with no driver: device/vif/0 Write protecting the kernel 
read-only data: 445k Red Hat nash version 5.1.19.6 starting Mounting proc 
filesystem Mounting sysfs filesystem Creating /dev Creating initial device 
nodes Setting up hotplug.
Creating block device nodes.
Loading uhci-hcd.ko module
USB Universal Host Controller Interface driver v3.0 Loading ohci-hcd.ko module 
Loading ehci-hcd.ko module Loading jbd.ko module Loading ext3.ko module Loading 
scsi_mod.ko module SCSI subsystem initialized Loading sd_mod.ko module Loading 
megaraid_sas.ko module
megasas: 00.00.03.10 Wed Mar 28 10:25:52 PST 2007 Loading libata.ko module 
Loading ata_piix.ko module Loading megaraid_mm.ko module megaraid cmm: 2.20.2.7 
(Release Date: Sun Jul 16 00:01:03 EST 2006) Loading megaraid_mbox.ko module
megaraid: 2.20.5.1 (Release Date: Thu Nov 16 15:32:35 EST 2006) Waiting for 
driver initialization.
Scanning and configuring dmraid supported devices Creating root device.
Mounting root filesystem.
mount: could not find filesystem '/dev/root'
Setting up other filesystems.
Setting up new root fs
setuproot: moving /dev failed: No such file or directory no fstab.sys, mounting 
internal defaults
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory Switching to new root 
and running init.
unmounting old /dev
unmounting old /proc
unmounting old /sys
switchroot: mount failed: No such file or directory Kernel panic - not syncing: 
Attempted to kill init!
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

So near and yet so far.  Any suggestions?  Is initrd the culprit, or perhaps 
something else?


Joseph McCarty
System Administrator
Sonoma County Office of Education

_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list



_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to