grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: Andy Smith <andy@strugglers.net>
To: jgross@suse.com
Cc: grub-devel@gnu.org
Subject: grub PVHv2 booting patch series - no block devices available in guest
Date: Tue, 23 Jan 2018 07:18:33 +0000	[thread overview]
Message-ID: <20180123071833.GW29360@bitfolk.com> (raw)

Hi Juergen,

I am trying out your grub PVHv2 guest support patch series as found
at <https://lists.gnu.org/archive/html/grub-devel/2017-11/msg00054.html>

I have a Xen 4.10.0 host on which I've cloned
https://git.savannah.gnu.org/git/grub.git and applied your patch
series.

When the guest is booted as type = "pvh" and using the generated pvh
grub image as kernel, it does boot grub which does successfully find
/boot/grub/grub.cfg within the guest. The selected kernel and
initramfs are read and it does boot that but there do not appear to
be any block devices so it ultimately fails to find root filesystem.

Doing PVHv2 direct kernel boot does seem to boot normally.

It also works under PV with pvgrub image or direct kernel boot.

Here is guest config file which results in a boot with no block
devices:

name       = "debtest1"
type       = "pvh"
memory     = 2048
vcpus      = 2
vif        = [ "mac=00:16:5e:00:02:39, ip=192.168.82.225, vifname=v-debtest1" ]
kernel     = "/opt/grub/lib/pvhgrub.bin"
disk       = [ "phy:/dev/vg0/domu_debtest1_xvda,xvda,w",
               "phy:/dev/vg0/domu_debtest1_xvdb,xvdb,w" ]

It ends up dumped at busybox prompt since there is no root
filesystem. cat /proc/partitions at that time shows no block devices
at all.

Here is guest config file which boots okay as PVHv2 guest:

name       = "debtest1"
type       = "pvh"
memory     = 2048
vcpus      = 2
vif        = [ "mac=00:16:5e:00:02:39, ip=192.168.82.225, vifname=v-debtest1" ]
# kernel and initramfs manually extracted from out of guest
kernel     = "/var/tmp/vmlinuz-4.13.0-31-generic"
ramdisk    = "/var/tmp/initrd.img-4.13.0-31-generic"
cmdline    = "root=/dev/xvda1 ro console=hvc0"
disk       = [ "phy:/dev/vg0/domu_debtest1_xvda,xvda,w",
               "phy:/dev/vg0/domu_debtest1_xvdb,xvdb,w" ]

And previous situation of being booted as PV guest also is fine:

name       = "debtest1"
memory     = 2048
vcpus      = 2
vif        = [ "mac=00:16:5e:00:02:39, ip=192.168.82.225, vifname=v-debtest1" ]
kernel     = "/opt/grub/lib/grub-x86_64-xen.bin"
disk       = [ "phy:/dev/vg0/domu_debtest1_xvda,xvda,w",
               "phy:/dev/vg0/domu_debtest1_xvdb,xvdb,w" ]

Build process for my /opt/grub/lib/pvhgrub.bin:

./autogen.sh && \
sudo tar -C /opt/grub/share/memdisk -cvf /opt/grub/share/memdisk.tar grub.cfg && \
./configure --prefix=/opt/grub --with-platform=xenpvh && \
make && \
sudo make install && \
sudo /opt/grub/bin/grub-mkimage \
    -O i386-xenpvh \
    -c /opt/grub/etc/grub-bootstrap.cfg \
    -m /opt/grub/share/memdisk.tar \
    -o /opt/grub/lib/pvhgrub.bin \
    -p /boot/grub \
    -v /opt/grub/lib/grub/i386-xenpvh/*.mod

/opt/grub/share/memdisk/grub.cfg just looks for /boot/grub/grub.cfg
in guest and uses that. This part is working as it does display the
menu, allow selection of the boot entry and then boots it.

Any ideas what is wrong there?

Thanks,
Andy


             reply	other threads:[~2018-01-23  7:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-23  7:18 Andy Smith [this message]
2018-01-23  7:28 ` grub PVHv2 booting patch series - no block devices available in guest Juergen Gross
2018-01-23  7:44   ` Andy Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180123071833.GW29360@bitfolk.com \
    --to=andy@strugglers.net \
    --cc=grub-devel@gnu.org \
    --cc=jgross@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).