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/
Home Products Support Community News


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 10:59:19 +0800
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 13 Jan 2011 19:01:22 -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; bh=0MGFS0SJwPiO53snOhWXOz4fWddm0CXruGzhbpnw7Cc=; b=UhftnlFRvRqlfxVya37dpV4B2Gf2/TUGxdU+3+iarsJG3XO49SZS2Efo/O4LewIhlC 6Eg8yVHrM53RjZr5BS/I+uqtaYf1k1/7lnWbjuGhIoZitr020DbtReHUOQofdkv6FmKJ sNQ0tVDTj7i2IqavMKTRCzy9u7FQxtvY0vwAc=
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; b=hRmCNvU+Lw8wSeWKkY+XVM6LeQRsbxb+C9YwYBlCRa/BvP/9LY8kAci4FuGBQDfV/O lNxugq7LM/w3YTDmj0nbyWvJwHNF/D9cmDccQRbLa2NP1zhh37o05xkN54VtCTRLhWuj 5S7xdDZoFMLahZzZwGSrXWKKdUs459IZq+EkE=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AANLkTikACkH3q6Zt-RcSp2iW2tqRUaYxSeV49J7pcBQb@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>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Hello Fajar,

On Fri, Jan 14, 2011 at 10:17 AM, Fajar A. Nugraha <list@xxxxxxxxx> wrote:
> That's not what I asked.
> The key point is you need to have correct root. If you actually create
> the filesystem with "mkfs.ext3 -L /" or run "e2label ...", then the
> label should be there, and you don't need to worry (on grub.conf
> anyway) whether it's hda2, sda2, or xvda2.

When I format the new volume for this new domU, I added that -L /
option for the sda2 and /boot for the sda1.

> On the other hand, if you create the image from scratch, and did NOT
> create the label manually, and transfer the files using
> rsync/tar/whatever, you will not have the label.

Then, I transferred the files using the dump and restore utilities to
a mounted directory (e.g. /mnt) where:

/mnt => /dev/sda2
/mnt/boot => /dev/sda1

> again, I didn't ask that, and it's not relevant really.
> I asked
>>> What does your domU config
>>> file looks like?

Honestly, I don't know because I don't manage the dom0. But based on
the documentation, it expects sd* mapping.

> I also asked
>>> What does "fdisk -l /path/to/your/disk-image" look like

Right now, the volume is in my other domU's /dev/sdk:

# fdisk -l /dev/sdk

Disk /dev/sdk: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 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: 0x9f08f669

   Device Boot      Start         End      Blocks   Id  System
/dev/sdk1               1          17      136521   83  Linux
/dev/sdk2              18         261     1959930   83  Linux

> I didn't ask how it was on the original dom0. I asked what your
> current image has right now.
> If you simply copy the image then the partition might be the same, but
> in that case you've made an obvious mistake: your "/" was on xvda1.
> Passing "root=/dev/sda2" is simply silly.
> It's useless to go into details right now without knowing what your
> current image looks like.

Based on the above output for the fdisk command, sdk1 contains the
files and directories for the /boot partition while the sdk2 contains
the rest of the files and directories of the entire / partition. With
this, my /etc/fstab for the new domU has been configured like this:

LABEL=/boot /boot       ext3    defaults            1   2
LABEL=/     /           ext3    defaults            1   1
tmpfs       /dev/shm    tmpfs   defaults            0   0
devpts      /dev/pts    devpts  gid=5,mode=620      0   0
sysfs       /sys        sysfs   defaults            0   0
proc        /proc       proc    defaults            0   0
none        /proc/xen   xenfs   defaults            0   0

And I also tried changing the first 2 lines with:

/dev/sda1   /boot       ext3    defaults            1   2
/dev/sda2   /           ext3    defaults            1   1

Anyway, I just did a grep to this new domU and below were the output:

- - - < s n i p > - - -
# pwd

# grep -i xvd */*
Binary file boot/initrd- matches
Binary file boot/vmlinuz- matches
etc/fstab:#/dev/xvda1  /boot       ext3    defaults            1   2
etc/fstab:#/dev/xvda2  /           ext3    defaults            1   1
Binary file lib/liblvm2app.so.2.2 matches
Binary file lib/liblvm2cmd.so.2.02 matches
sbin/ec2udev:  if echo "$1"|grep -qE 'xvd[a-z][0-9]?' ; then
sbin/ec2udev:    echo "$1" | sed -e 's/xvd/sd/'
Binary file sbin/lvchange matches
Binary file sbin/lvconvert matches
Binary file sbin/lvcreate matches
Binary file sbin/lvdisplay matches
Binary file sbin/lvextend matches
Binary file sbin/lvm matches
Binary file sbin/lvmchange matches
Binary file sbin/lvmdiskscan matches
Binary file sbin/lvmsadc matches
Binary file sbin/lvmsar matches
Binary file sbin/lvm.static matches
Binary file sbin/lvreduce matches
Binary file sbin/lvremove matches
Binary file sbin/lvrename matches
Binary file sbin/lvresize matches
Binary file sbin/lvs matches
Binary file sbin/lvscan matches
sbin/mkinitrd:                            [[ ${dep} =~ ^/dev/xvd.+ ]]
&& continue
sbin/mkinitrd:                        [[ ${dep} =~ ^/dev/xvd.+ ]] && continue
sbin/mkinitrd:                    [[ ${dep} =~ ^/dev/xvd.+ ]] && continue
Binary file sbin/pvchange matches
Binary file sbin/pvck matches
Binary file sbin/pvcreate matches
Binary file sbin/pvdisplay matches
Binary file sbin/pvmove matches
Binary file sbin/pvremove matches
Binary file sbin/pvresize matches
Binary file sbin/pvs matches
Binary file sbin/pvscan matches
Binary file sbin/vgcfgbackup matches
Binary file sbin/vgcfgrestore matches
Binary file sbin/vgchange matches
Binary file sbin/vgck matches
Binary file sbin/vgconvert matches
Binary file sbin/vgcreate matches
Binary file sbin/vgdisplay matches
Binary file sbin/vgexport matches
Binary file sbin/vgextend matches
Binary file sbin/vgimport matches
Binary file sbin/vgmerge matches
Binary file sbin/vgmknodes matches
Binary file sbin/vgreduce matches
Binary file sbin/vgremove matches
Binary file sbin/vgrename matches
Binary file sbin/vgs matches
Binary file sbin/vgscan matches
Binary file sbin/vgsplit matches

# grep -i xvd */*/*
Binary file boot/boot/initrd- matches
Binary file boot/boot/vmlinuz- matches
grep: dev/mapper/control: Invalid argument
grep: etc/alternatives/mta: No such file or directory
grep: etc/alternatives/mta-mailq: No such file or directory
grep: etc/alternatives/mta-mailqman: No such file or directory
grep: etc/alternatives/mta-newaliases: No such file or directory
grep: etc/alternatives/mta-pam: No such file or directory
grep: etc/alternatives/mta-rmail: No such file or directory
grep: etc/alternatives/mta-rsmtp: No such file or directory
grep: etc/alternatives/mta-runq: No such file or directory
grep: etc/alternatives/mta-sendmail: No such file or directory
etc/blkid/blkid.tab:<device DEVNO="0xca01" TIME="1287132238.551661"
etc/blkid/blkid.tab:<device DEVNO="0xca02" TIME="1287132238.570084"
LABEL="swap" UUID="97ea8a42-fea2-4015-979c-15ff965990ac"
etc/blkid/blkid.tab.old:<device DEVNO="0xca01"
TIME="1287025097.904622" UUID="66c6f5a3-b64e-4bdf-bb32-9c7cf6a6c431"
etc/blkid/blkid.tab.old:<device DEVNO="0xca02"
TIME="1286881135.564786" LABEL="swap2"
etc/makedev.d/02linux-2.6.x:b $STORAGE             202   0  1 256 xvd%c%|%d a 16
grep: etc/pam.d/smtp: No such file or directory
etc/sysconfig/sysstat.ioconf:202:xvd:*:0:a:16:*:16:Xen Virtual Disk
etc/sysconfig/sysstat.ioconf-orig:202:xvd:*:0:a:16:p:16:Xen Virtual Block Device
grep: usr/bin/mailq: No such file or directory
grep: usr/bin/newaliases: No such file or directory
Binary file usr/bin/php matches
Binary file usr/bin/php-cgi matches
grep: usr/bin/pydoc: No such file or directory
grep: usr/bin/pydoc2: No such file or directory
grep: usr/bin/rmail: No such file or directory
grep: usr/bin/rsmtp: No such file or directory
grep: usr/bin/runq: No such file or directory
Binary file usr/lib/libbdevid.so. matches
var/mail/root: /dev/xvda1            9.7G  963M  8.2G  11% /
var/mail/root: /dev/xvda1            9.7G  963M  8.2G  11% /
var/mail/root: /dev/xvda1            9.7G  995M  8.2G  11% /
- - - < s n i p > - - -

Thank you once again.



Xen-users mailing list