From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH OSSTEST v2 01/19] Introduce mg-pxe-loader-update Date: Fri, 19 Jun 2015 11:44:43 +0100 Message-ID: <1434710683.28264.96.camel@citrix.com> References: <1434644687.28264.53.camel@citrix.com> <1434644710-28881-1-git-send-email-ian.campbell@citrix.com> <21891.786.559244.493160@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <21891.786.559244.493160@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, 2015-06-18 at 18:42 +0100, Ian Jackson wrote: > Ian Campbell writes ("[PATCH OSSTEST v2 01/19] Introduce mg-pxe-loader-update"): > > The story for PXE booting via UEFI (at least on arm64) is not so > > straightforward as with pxelinux on x86. There seems to no good > > bootloader to launch via UEFI+pxe, in fact all I could find was grub > > (syslinux, and by extension pxelinux.efi, is x86 only). > > > > Add mg-pxe-loader-update modelled on mg-debian-installer-update which > > will download the necessary grub binaries and produce a grub image > > which can be used to pxe boot. > > > > grub lacks the convenient ability to search for config file based on > > (substrings of) the MAC or IP address. So we arrange for the grub.cfg > > in TftpGrubBase to chain load another config file from > > TftpTmpDir/'$net_default_mac' where $net_default_mac is a grub > > variable which is substituted at boot time. > > > > Actually using this requires that bootp/dhcp provide a next-file so > > UEFI knows what to boot (usually this would be pxelinux.0 which we > > can't use here). Locally we have configured this as $name/pxe.img, so > > we can use different loaders. > ... > > + curl -s $pfile >Packages.gz > > + > > + echo >&2 "collecting $grubdeb" > > + pkgfile=`zcat Packages.gz | grep-dctrl -PX $grubdeb -nsFilename | sort -n -r | head -n1` > > + rc=$? > > + set -e > > + if [ $rc -ne 0 ] || [ x$pkgfile = x ]; then fail "$grubdeb package not found"; fi > > + curl -s "$site/$pkgfile" >$grubdeb.deb > > This is indeed _very_ similar to parts of mg-debian-installer-update. > Perhaps some of this should be made common ? You may need to invent a > new file. I'll try and come up with mgi-debian (by analogy with cr-* using cri-*) with some helper routines for fetch packages etc. > I notice that mg-debian-installer-update has `fetch' which uses a > Pragma: to try to avoid proxies. Do we need the same here ? I suppose we do, yes. Ian.