From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Vh27C-00071x-5a for mharc-grub-devel@gnu.org; Thu, 14 Nov 2013 13:58:06 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vh272-00070x-CM for grub-devel@gnu.org; Thu, 14 Nov 2013 13:58:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vh26t-0001DL-VD for grub-devel@gnu.org; Thu, 14 Nov 2013 13:57:56 -0500 Received: from mail-we0-x236.google.com ([2a00:1450:400c:c03::236]:42535) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vh26t-0001D3-KM for grub-devel@gnu.org; Thu, 14 Nov 2013 13:57:47 -0500 Received: by mail-we0-f182.google.com with SMTP id q59so420173wes.13 for ; Thu, 14 Nov 2013 10:57:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=6JNX07i7VgThDudidvPpjO1PiBK2CsMnGIurjK4pzqI=; b=o/Vhsjyzfo4SFShmZl7PTWa9F8BcjnfSXT1mTvunQBrUEuNa64f0/GJNhEElBz0Cp+ XGjjhzs1AkctARoEDHmq/2uEljiC4XQxdqcfN044d3cQYOTUSDIM/+LUBw8EXus5yeyU 8LJQnrsOCNzz6G53yIbxldfAvi+YzfJvrCllfuGQKsK4CDwxl0fy4NMdYU16DvlP+d/n DtekLRN0zZIvRsWTQmmKDUUohDhzrU6R8oaIGV9B3VOZvhTpaOdsKIQSFKULQuHaVjNE CKjSANBgIp409EfOsDoGlRhhYYUpakRSLLlwHoo5L2o6OrtBDpIkcY3nHBHotf9he6h+ c83g== X-Received: by 10.194.63.228 with SMTP id j4mr3504618wjs.34.1384455466696; Thu, 14 Nov 2013 10:57:46 -0800 (PST) Received: from [192.168.1.16] (31-249.1-85.cust.bluewin.ch. [85.1.249.31]) by mx.google.com with ESMTPSA id j46sm2200537eew.18.2013.11.14.10.57.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 14 Nov 2013 10:57:45 -0800 (PST) Message-ID: <52851D28.1090905@gmail.com> Date: Thu, 14 Nov 2013 19:57:44 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131005 Icedove/17.0.9 MIME-Version: 1.0 To: M A Young Subject: Re: [Xen-devel] pvgrub2 is merged References: <527EA084.6000706@gmail.com> <20131110084753.540b0107@opensuse.site> <5283DD8F.5080103@gmail.com> <52850918.1040406@gmail.com> In-Reply-To: X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="----enig2KGSJALPVITAIBSLEJEDM" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c03::236 Cc: The development of GNU GRUB , "xen-devel@lists.xen.org" X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Nov 2013 18:58:05 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2KGSJALPVITAIBSLEJEDM Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 14.11.2013 19:48, M A Young wrote: > On Thu, 14 Nov 2013, Vladimir '=CF=86-coder/phcoder' Serbinenko wrote: >=20 >> On 14.11.2013 18:03, M A Young wrote: >>> >>> >>> On Thu, 14 Nov 2013, M A Young wrote: >>> >>>> On Wed, 13 Nov 2013, Vladimir '=CF=86-coder/phcoder' Serbinenko wrot= e: >>>> >>>>> On 13.11.2013 20:06, M A Young wrote: >>>>>> It doesn't seem to understand sub-partitions. I can get it to work= if >>>>>> the boot files are in /dev/xvda but not in /dev/xvda1 . >>>>>> >>>>> insmod part_msdos >>>>> insmod part_gpt >>>> >>>> Right, if I add those to the embedded grub.cfg file I get to the >>>> standard grub menu and the boot starts. However the boot doesn't get= >>>> very far - it loads the kernel and the initrd file and starts the >>>> kernel but the kernel doesn't see the virtual disks so it doesn't ge= t >>>> very far. >>> >>> Using xenstore-ls from the dom0 on the guest when the boot stops the >>> local/domain/2/device/vbd/51712 section looks like >>> backend =3D "/local/domain/0/backend/vbd/2/51712" >>> backend-id =3D "0" >>> state =3D "6\000" >>> virtual-device =3D "51712" >>> device-type =3D "disk" >>> ring-ref =3D "\000" >>> event-channel =3D "\000" >>> protocol =3D "x86_64-abi\000" >>> >>> As nothing else has null character endings I suspend that is wrong. >>> >> Good catch. Could you test following: >> diff --git a/grub-core/kern/xen/init.c b/grub-core/kern/xen/init.c >> index 3bfd99f..ab74543 100644 >> --- a/grub-core/kern/xen/init.c >> +++ b/grub-core/kern/xen/init.c >> @@ -256,11 +256,10 @@ grub_xenstore_write_file (const char *dir, const= >> void *buf, grub_size_t len) >> >> grub_memset (&msg, 0, sizeof (msg)); >> msg.type =3D XS_WRITE; >> - msg.len =3D dirlen + len + 1; >> + msg.len =3D dirlen + len; >> grub_xen_store_send (&msg, sizeof (msg)); >> grub_xen_store_send (dir, dirlen); >> grub_xen_store_send (buf, len); >> - grub_xen_store_send ("", 1); >> grub_xen_store_recv (&msg, sizeof (msg)); >> resp =3D grub_malloc (msg.len + 1); >> if (!resp) >=20 > The section is tidied up, ie. > backend =3D "/local/domain/0/backend/vbd/4/51712" > backend-id =3D "0" > state =3D "6" > virtual-device =3D "51712" > device-type =3D "disk" > ring-ref =3D "" > event-channel =3D "" > protocol =3D "x86_64-abi" >=20 > but unfortunately it doesn't help as the boot process sticks at the sam= e > point. I notice this section is in state 6 which apparently is "closed"= =2E > I wonder if the kernel expecting something else. Possible. I'd try this (on top of previous patch): diff --git a/grub-core/disk/xen/xendisk.c b/grub-core/disk/xen/xendisk.c index c449848..829da3d 100644 --- a/grub-core/disk/xen/xendisk.c +++ b/grub-core/disk/xen/xendisk.c @@ -449,5 +449,8 @@ grub_xendisk_fini (void) grub_xen_free_shared_page (virtdisks[i].shared_page); =20 grub_xen_event_channel_op (EVTCHNOP_close, &close_op); + + /* Prepare for handoff. */ + grub_xenstore_write_file (fdir, "0", 1); } } >=20 > Michael Young ------enig2KGSJALPVITAIBSLEJEDM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iF4EAREKAAYFAlKFHSgACgkQmBXlbbo5nOvxigEAoG/I99xYMIY3h/4HRYgn+2gG 34W2I4gU8aCkI3os3/EA/1EAKq50kkoPtnDOk5/liLPbFCO7uhZ54ZebDsPOHQuw =NPfl -----END PGP SIGNATURE----- ------enig2KGSJALPVITAIBSLEJEDM--