From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH OSSTEST v2 11/19] Debian: Fixup UEFI boot order during install Date: Fri, 19 Jun 2015 11:22:26 +0100 Message-ID: <1434709346.28264.88.camel@citrix.com> References: <1434644687.28264.53.camel@citrix.com> <1434644710-28881-11-git-send-email-ian.campbell@citrix.com> <21891.1671.795247.587046@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.1671.795247.587046@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:57 +0100, Ian Jackson wrote: > Ian Campbell writes ("[PATCH OSSTEST v2 11/19] Debian: Fixup UEFI boot order during install"): > > Debian inserts itself before any existing entries, including the PXE > > one, meaning we otherwise cannot remotely regroove the box. Preseed > > some commands to reset the boot order to BootCurrent i.e. how we > > booted (so the PXE entry). > > > > There is still a window between the Debian entry being added (by > > grub-installer.udeb) and us removing it, a failure (e.g. power cycle) > > in that interval would require manual action to fixup. > > This seems a pretty serious bug. Is there a way to avoid it ? Unfortunately not as far as I can tell, it seems to be a major shortcoming of the way UEFI boot order is managed both from the UEFI UI and via the Linux command line tools. FWIW I was inspired by the way XenRT has to do this too (so it is a problem for x86 too). grub-installer happens pretty late in the install, so the gap until the late command which repairs things is short, but not ideal I agree. I think the path to a fix would be something like: efibootmgr to gain an option to add an entry but not add it to the bootloader (or to not put the new entry at the head of the list). grub-install (from main grub package) to then gain an option causing it to pass the new efibootmgr option. grub-installer udeb (i.e. the grub part of debian installer) to gain a presseded way of setting that option when calling grub-install. :-/ Ian.