From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Vh4hg-0001TL-PD for mharc-grub-devel@gnu.org; Thu, 14 Nov 2013 16:43:56 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41250) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vh4hZ-0001Ln-Ts for grub-devel@gnu.org; Thu, 14 Nov 2013 16:43:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vh4hS-00013I-Aj for grub-devel@gnu.org; Thu, 14 Nov 2013 16:43:49 -0500 Received: from mail-wi0-x230.google.com ([2a00:1450:400c:c05::230]:43428) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vh4hS-000135-0e for grub-devel@gnu.org; Thu, 14 Nov 2013 16:43:42 -0500 Received: by mail-wi0-f176.google.com with SMTP id f4so118033wiw.15 for ; Thu, 14 Nov 2013 13:43:41 -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=7NHkeSC6aS1R71jZxT7HkOtEUsftaUq9tPcSCUacu8M=; b=zyyTXO0Sy0hsSLsynJ0sOpeG4pmAfb/Yr4rggxGgq+E8OATI0LCgtCp5v0bEHda9TO coQq/Jwyf3w9sKBKko7jv9g9t/JbiC5Uorbr44003pc4XYzheq8M0TIFgOS8lSP2OhmC 6/VXa+moTBr5W+7xJhpCY5HQHLlKj+GefL1iScv5LyHW/KgsRL8ncejUCnoMGNSGJlK/ esKDrHp8rEsuLiyiaXUGBPm5H6tX1bRId9+oBZ1PjTGwPVnPsM7gE2FHDWTJX4wIqCn1 xIZiW68K88gCgloz/a0FADivHMOML/zFakRZwCXX+OlxvPFTj1vs/hRtQGk68FFZmydG L5IQ== X-Received: by 10.180.189.68 with SMTP id gg4mr4796181wic.46.1384465421129; Thu, 14 Nov 2013 13:43:41 -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 w6sm3426158eeo.12.2013.11.14.13.43.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 14 Nov 2013 13:43:40 -0800 (PST) Message-ID: <5285440B.2040301@gmail.com> Date: Thu, 14 Nov 2013 22:43:39 +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> <52851D77.6060203@gmail.com> In-Reply-To: X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="----enig2XDQOTWSWLANKMRPJDTEG" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::230 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 21:43:55 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2XDQOTWSWLANKMRPJDTEG Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 14.11.2013 22:11, M A Young wrote: > On Thu, 14 Nov 2013, Vladimir '=CF=86-coder/phcoder' Serbinenko wrote: >=20 >> 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 wrot= e: >>>> >>>>> 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 w= rote: >>>>>>> >>>>>>>> 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= >>>>>>> get >>>>>>> very far. >>>>>> >>>>>> Using xenstore-ls from the dom0 on the guest when the boot stops t= he >>>>>> 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= =2E >>>>>> >>>>> 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, co= nst >>>>> 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 >>>> same >>>> 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= =2Ec >> 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); >> } >> } >=20 > That doesn't work. However, according to the documentation state 0 is > unknown, and the vif interface (while grub is running) is in state 1 > (initializing) so I thought I would try it, and if you replace "0" with= > "1" in the above patch then the kernel does boot. >=20 Thanks. http://git.savannah.gnu.org/cgit/grub.git/commit/?id=3Dc7995256e410c5272e= 2be2f94faf62d3c9d57b61 and http://git.savannah.gnu.org/cgit/grub.git/commit/?id=3De1aa5b662088cea329= fc968af7c819784b6da068 > Michael Young ------enig2XDQOTWSWLANKMRPJDTEG 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/ iF4EAREKAAYFAlKFRAsACgkQmBXlbbo5nOvmjQD/Qr10QET1qVmCpwcLNC9OSlDU YEVf0Cua/hTm1bcWVWsA/RUUcSH8dum+4n8FahGudJj2nKTc35LGAlseM/fjcU57 =PDQo -----END PGP SIGNATURE----- ------enig2XDQOTWSWLANKMRPJDTEG--