From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Vh28S-0007hM-P8 for mharc-grub-devel@gnu.org; Thu, 14 Nov 2013 13:59:24 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35801) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vh28I-0007g9-Lm for grub-devel@gnu.org; Thu, 14 Nov 2013 13:59:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vh289-0001ix-Ta for grub-devel@gnu.org; Thu, 14 Nov 2013 13:59:14 -0500 Received: from mail-wg0-x232.google.com ([2a00:1450:400c:c00::232]:52308) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vh289-0001if-J0 for grub-devel@gnu.org; Thu, 14 Nov 2013 13:59:05 -0500 Received: by mail-wg0-f50.google.com with SMTP id k14so2511236wgh.5 for ; Thu, 14 Nov 2013 10:59:04 -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=4EPGqOLLoW8fBSAgKZWaL6JQD7Tcxzo1flEVhPeTyMw=; b=w0qXX8GNmRXsndKoE6uMAk/oPPVkXAqDVQaOnSlYflcXWUsNPHxZxpXLblIBeaQLnm lRsHZkDyr2tN1S02748OyEXiUQTGePO8sUvtyK70d6iWD1V3ADybusi+xxSCE7N7FazZ 6OpljfL7Hu3q38Vsd9AYXv6fkCmcDIuYpvAx2y2n3LvuRDngnV++zMd0BgBNUjOy6yPX OkFiD3daA7FtRxRLgzyVKRso8x5h3zjHzqjP1KQEnUUj9T6pVg3ddBC4WEHSGdQiS3OX 7bugR0tEDCxSOLD9tWxFQ5he9CiNFPeZdjrZ/HNlmbzecVEYNKEBPc2YgbkRVygBdd5o y2qw== X-Received: by 10.194.11.38 with SMTP id n6mr3453843wjb.25.1384455544631; Thu, 14 Nov 2013 10:59:04 -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 44sm2240142eek.5.2013.11.14.10.59.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 14 Nov 2013 10:59:03 -0800 (PST) Message-ID: <52851D77.6060203@gmail.com> Date: Thu, 14 Nov 2013 19:59:03 +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> <52851D28.1090905@gmail.com> In-Reply-To: <52851D28.1090905@gmail.com> X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="----enig2XFXMGVVSUHSMCLISKPHS" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c00::232 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:59:23 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2XFXMGVVSUHSMCLISKPHS Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 14.11.2013 19:57, Vladimir '=CF=86-coder/phcoder' Serbinenko wrote: > On 14.11.2013 19:48, M A Young wrote: >> On Thu, 14 Nov 2013, Vladimir '=CF=86-coder/phcoder' Serbinenko wrote:= >> >>> 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 wro= te: >>>>> >>>>>> On 13.11.2013 20:06, M A Young wrote: >>>>>>> It doesn't seem to understand sub-partitions. I can get it to wor= k 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 ge= t >>>>> 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 g= et >>>>> 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, cons= t >>> 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) >> >> 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" >> >> but unfortunately it doesn't help as the boot process sticks at the sa= me >> point. I notice this section is in state 6 which apparently is "closed= ". >> I wonder if the kernel expecting something else. > Possible. I'd try this (on top of previous patch): Sorry, too tired. I meant: diff --git a/grub-core/disk/xen/xendisk.c b/grub-core/disk/xen/xendisk.c index c449848..9b71d3a 100644 --- a/grub-core/disk/xen/xendisk.c +++ b/grub-core/disk/xen/xendisk.c @@ -449,5 +449,10 @@ grub_xendisk_fini (void) grub_xen_free_shared_page (virtdisks[i].shared_page); grub_xen_event_channel_op (EVTCHNOP_close, &close_op); + + /* Prepare for handoff. */ + grub_snprintf (fdir, sizeof (fdir), "%s/state", + virtdisks[i].frontend_dir); + grub_xenstore_write_file (fdir, "0", 1); } } ------enig2XFXMGVVSUHSMCLISKPHS 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/ iF4EAREKAAYFAlKFHXcACgkQmBXlbbo5nOu1BgD/UWiPcsq7gBD00Ad+RUZhRxPe G3EM7kzHViQNbrqZfacA/2+tii65S7dhj/PNSsZ5KWlh7FG76CTUtbIxc/vIZlLo =QjqR -----END PGP SIGNATURE----- ------enig2XFXMGVVSUHSMCLISKPHS--