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] Xen domU cannot boot via PV-GRUB

To: "Fajar A. Nugraha" <list@xxxxxxxxx>
Subject: Re: [Xen-users] Xen domU cannot boot via PV-GRUB
From: GNUbie <gnubie@xxxxxxxxx>
Date: Fri, 14 Jan 2011 16:44:27 +0800
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 14 Jan 2011 00:48:46 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=oCke9PUzI38KtYQqCN+9zgaVuyZc8GHyomV82o5BW+s=; b=ev2z8SXLg0L0NNULRVDScI8iMV43+NgAZCMZ/2DB5l0zdT6iq+qk4lWx6UF7QlXAHD VZAHBbFiAEprZ26BIltvfptO5zn3no9eqZN01Bd+uTEpiN/F8ehCq6Sc3Ytx5ms2JTx2 dsoChuLtu8y+4uhtGnp/utL+Wi1hfo4BFwyQk=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=i71S1YEDdIspY2nDh719d2FSbCaR2WCjGSL5Gw+4MDp8rOoXd2sTON7WXQpGopkv7t uG59p27+p6tQ8+QXiNIJYQwVq7rz8eK75BMVgxw/A1QuwY5cqgfM7x+Bhs1jNxMqlFAZ aoz6O4t/6SVTqfbblXmFiLfPAJ56gTr+9abf4=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AANLkTimrzCXyyYYHYVLT3q9u_9xEpJc1N3ozUwPuxuG-@xxxxxxxxxxxxxx>
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/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <AANLkTinCYYnfeux+uQUX-51mN4di4vMfD5ibdBE-LBm+@xxxxxxxxxxxxxx> <AANLkTikx1vs8gbX-TGARiWQeYgh7A57OWK3BRX-de978@xxxxxxxxxxxxxx> <AANLkTi=kG2Ms2dBV1RCggLGAMWE-dR0uihpzYnRCukxa@xxxxxxxxxxxxxx> <AANLkTikACkH3q6Zt-RcSp2iW2tqRUaYxSeV49J7pcBQb@xxxxxxxxxxxxxx> <AANLkTi=R3kGV9y=h=76XjSXsSSiroLP-m5+7VUd23WaC@xxxxxxxxxxxxxx> <AANLkTikn8f8kAPXnuzBSoqnonYReBcURt2iQHONM0=ew@xxxxxxxxxxxxxx> <AANLkTim977na2TdOE140QPFfYPzYu2P5Rqu5921Ywf+z@xxxxxxxxxxxxxx> <AANLkTimrzCXyyYYHYVLT3q9u_9xEpJc1N3ozUwPuxuG-@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Hello Fajar,

On Fri, Jan 14, 2011 at 3:47 PM, Fajar A. Nugraha <list@xxxxxxxxx> wrote:
>
> Let me make this reaaaaaaly simple. You were able to captrure boot
> log. That's good.
> Your previous boot log shows these
>
> [    0.071713] XENBUS: Device with no driver: device/vbd/2050
> [    0.071718] XENBUS: Device with no driver: device/vbd/2064
> [    0.071722] XENBUS: Device with no driver: device/vbd/2051
>
> whish should roughly mean you have three block devices on that domU.
> Do you know what they are? If not, you need to find out (whether from
> domU config file, some kind of Amazon EC2 config page, ask Amazon
> support, whatever).

Maybe that 3 block devices were from its original domU where
previously (from where this domU came from), it comes with the
following partitions:

/dev/xvda1 => /
/dev/xvda2 => /media/ephemeral0
/dev/xvda3 => SWAP

> You got the following block IDs (you can derive these from 256*major
> number + minor number):
> sda -> 2048
> sda2 -> 2050
> sda3 -> 2051
> sdb -> 2064
>
> so you do NOT have anything mapped as sda or xvda.
> You NEED to know how you currently have it mapped.
> You NEED to know what those three block devices that you currently have are.
> You NEED to map your current boot device to sda/xvda/hda/whatever
> (since you have partitions on it)

When you say "boot device", are you referring to the whole / or just
the /boot? As I mentioned on my previous message that the /dev/xvda1
or /dev/xvda contains the entire / filesystem including the /boot.

Below is the output of the "fdisk -l" command from a working (old) domU:

# fdisk -l

Disk /dev/xvda1: 10.5 GB, 10485761024 bytes
255 heads, 63 sectors/track, 1274 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/xvda1 doesn't contain a valid partition table

Disk /dev/xvda2: 160.1 GB, 160104972288 bytes
255 heads, 63 sectors/track, 19464 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/xvda2 doesn't contain a valid partition table

Disk /dev/xvda3: 939 MB, 939524096 bytes
255 heads, 63 sectors/track, 114 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/xvda3 doesn't contain a valid partition table

> Perhaps you forgot to build partition support (CONFIG_MSDOS_PARTITION=y)?

# grep -i dos config-2.6.34.7-56.40.i686
# DOS/FAT/NT Filesystems
CONFIG_MSDOS_FS=m
CONFIG_MSDOS_PARTITION=y

> In any case:
> - find out EXACTLY what your config is like
> - map disks the way you want it (e.g map first disk as xvda, NOT
> xvda1). Ask Amazon support if you don't know how.
> - make sure the necessary kernel support is builtin (partition
> support, xen frontend block driver, etc.). If you don't know about
> these things simply start with your distro's default kernel.

I'm using the Amazon Linux AMI 32bit distro which is based on
RedHat/CentOS and I am using the stock kernel of the said
distribution.

By the way, below is the init script inside my initrd image:

- - - < s n i p > - - -
#!/bin/nash

mount -t proc /proc /proc
setquiet
echo Mounting proc filesystem
echo Mounting sysfs filesystem
mount -t sysfs /sys /sys
echo Creating /dev
mount -o mode=0755 -t tmpfs /dev /dev
mkdir /dev/pts
mount -t devpts -o gid=5,mode=620 /dev/pts /dev/pts
mkdir /dev/shm
mkdir /dev/mapper
echo Creating initial device nodes
mknod /dev/null c 1 3
mknod /dev/zero c 1 5
mknod /dev/urandom c 1 9
mknod /dev/systty c 4 0
mknod /dev/tty c 5 0
mknod /dev/console c 5 1
mknod /dev/ptmx c 5 2
mknod /dev/rtc c 10 135
mknod /dev/tty0 c 4 0
mknod /dev/tty1 c 4 1
mknod /dev/tty2 c 4 2
mknod /dev/tty3 c 4 3
mknod /dev/tty4 c 4 4
mknod /dev/tty5 c 4 5
mknod /dev/tty6 c 4 6
mknod /dev/tty7 c 4 7
mknod /dev/tty8 c 4 8
mknod /dev/tty9 c 4 9
mknod /dev/tty10 c 4 10
mknod /dev/tty11 c 4 11
mknod /dev/tty12 c 4 12
mknod /dev/ttyS0 c 4 64
mknod /dev/ttyS1 c 4 65
mknod /dev/ttyS2 c 4 66
mknod /dev/ttyS3 c 4 67
echo Setting up hotplug.
hotplug
echo Creating block device nodes.
mkblkdevs
echo "Loading mbcache.ko module"
insmod /lib/mbcache.ko
echo "Loading jbd.ko module"
insmod /lib/jbd.ko
echo "Loading ext3.ko module"
insmod /lib/ext3.ko
echo "Loading xen-blkfront.ko module"
insmod /lib/xen-blkfront.ko
echo "Loading xen-blkfront.ko module"
insmod /lib/xen-blkfront.ko
echo "Loading dm-mod.ko module"
insmod /lib/dm-mod.ko
echo "Loading dm-log.ko module"
insmod /lib/dm-log.ko
echo "Loading dm-region-hash.ko module"
insmod /lib/dm-region-hash.ko
echo "Loading dm-mirror.ko module"
insmod /lib/dm-mirror.ko
echo "Loading dm-zero.ko module"
insmod /lib/dm-zero.ko
echo "Loading dm-snapshot.ko module"
insmod /lib/dm-snapshot.ko
echo "Loading dm-region-hash.ko module"
insmod /lib/dm-region-hash.ko
echo "Loading xen-blkfront.ko module"
insmod /lib/xen-blkfront.ko
echo "Loading xen-netfront.ko module"
insmod /lib/xen-netfront.ko
echo "Loading xen-netfront.ko module"
insmod /lib/xen-netfront.ko
mkblkdevs
echo Scanning and configuring dmraid supported devices
resume /dev/xvda3
echo Creating root device.
mkrootdev -t ext3 -o defaults,noatime,ro /dev/xvda1
echo Mounting root filesystem.
mount /sysroot
echo Setting up other filesystems.
setuproot
echo Switching to new root and running init.
switchroot
- - - < s n i p > - - -

Below is the list of the modules inside the initrd's lib directory:

# ls -l lib/
total 388
-rw------- 1 root root  11140 Jan 14 16:32 dm-log.ko
-rw------- 1 root root  16948 Jan 14 16:32 dm-mirror.ko
-rw------- 1 root root  69876 Jan 14 16:32 dm-mod.ko
-rw------- 1 root root  11280 Jan 14 16:32 dm-region-hash.ko
-rw------- 1 root root  35332 Jan 14 16:32 dm-snapshot.ko
-rw------- 1 root root   2796 Jan 14 16:32 dm-zero.ko
-rw------- 1 root root 129192 Jan 14 16:32 ext3.ko
drwx------ 2 root root   1024 Jan 14 16:32 firmware
-rw------- 1 root root  60528 Jan 14 16:32 jbd.ko
-rw------- 1 root root   8676 Jan 14 16:32 mbcache.ko
-rw------- 1 root root  16696 Jan 14 16:32 xen-blkfront.ko
-rw------- 1 root root  20348 Jan 14 16:32 xen-netfront.ko

Does it mean that I have to rebuild the initrd and change/correct all
the xvd* existence to sd*?

Thank you.

Regards,

GNUbie

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