From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1edsqz-000263-JV for mharc-grub-devel@gnu.org; Tue, 23 Jan 2018 02:18:45 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46577) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edsqw-00025P-Tz for grub-devel@gnu.org; Tue, 23 Jan 2018 02:18:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edsqv-0004CZ-Qy for grub-devel@gnu.org; Tue, 23 Jan 2018 02:18:42 -0500 Received: from mail.bitfolk.com ([2001:ba8:1f1:f019::25]:52245) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1edsqv-00048x-Gy for grub-devel@gnu.org; Tue, 23 Jan 2018 02:18:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=bitfolk.com; s=alpha; h=Content-Type:MIME-Version:Message-ID:Subject:Cc:To:From:Date; bh=i3RGVBL7kYgZhMbt6+Zd499VS4wCMyXxWhjuBYVglCQ=; b=kEPH/DMr0cV1dnN8uqW2eo5VbS0VhnaWPhAVXE5vXvbRKQe9df4gP4g6dvtmI0BI9COTodgT0Ia6Y64Cxk423US8NV9MvJw7lLXL6s1cVOiY81ToTy0dPVkMYj9NDA3aNB7hdLlVNvfpVir3aXxaYQ23V7vyU9WGAXWPIGqvXL1u35ALhGj0kNHYEu9DDPJbDvR/CcuUImKCh9ywFdpcK+PfsU6LZof5tQpbGDVmBA2HlDmlkAcMjIs7q4FCxyEnAX2YVx27s6WZszh44cRn7T0bUDbBPplYKFlmuQLpHXnVH41tboD/oH4wlIJOp/lBKQbi4bMJVVdhRX+fFzxFNA==; Received: from andy by mail.bitfolk.com with local (Exim 4.84_2) (envelope-from ) id 1edsqn-0007hS-8k; Tue, 23 Jan 2018 07:18:33 +0000 Date: Tue, 23 Jan 2018 07:18:33 +0000 From: Andy Smith To: jgross@suse.com Cc: grub-devel@gnu.org Subject: grub PVHv2 booting patch series - no block devices available in guest Message-ID: <20180123071833.GW29360@bitfolk.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline OpenPGP: id=BF15490B; url=http://strugglers.net/~andy/pubkey.asc X-URL: http://strugglers.net/wiki/User:Andy User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: andy@strugglers.net X-SA-Exim-Scanned: No (on mail.bitfolk.com); SAEximRunCond expanded to false X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:ba8:1f1:f019::25 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2018 07:18:44 -0000 Hi Juergen, I am trying out your grub PVHv2 guest support patch series as found at 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