From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1cbvU1-0008Ei-JW for mharc-grub-devel@gnu.org; Thu, 09 Feb 2017 15:38:25 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <93sam@debian.org>) id 1cbvTz-0008Ec-HT for grub-devel@gnu.org; Thu, 09 Feb 2017 15:38:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <93sam@debian.org>) id 1cbvTw-00043m-Eb for grub-devel@gnu.org; Thu, 09 Feb 2017 15:38:23 -0500 Received: from cheddar.halon.org.uk ([93.93.131.118]:39607) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <93sam@debian.org>) id 1cbvTw-0003tg-7i for grub-devel@gnu.org; Thu, 09 Feb 2017 15:38:20 -0500 Received: from bsmtp by cheddar.halon.org.uk with local-bsmtp (Exim 4.84_2) (envelope-from <93sam@debian.org>) id 1cbvTl-0007ZQ-Ri; Thu, 09 Feb 2017 20:38:09 +0000 Received: from steve by tack.mossbank.org.uk with local (Exim 4.84_2) (envelope-from <93sam@debian.org>) id 1cbvSp-0003LH-O4; Thu, 09 Feb 2017 20:37:11 +0000 Date: Thu, 9 Feb 2017 20:37:11 +0000 From: Steve McIntyre <93sam@debian.org> To: Andrei Borzenkov Cc: The development of GNU GRUB Subject: Re: [PATCH] Make grub-install check for errors from efibootmgr Message-ID: <20170209203705.GY12912@einval.com> References: <1485803091-13678-1-git-send-email-93sam@debian.org> <86064712-98a6-0d06-4c53-b7889c3c3d26@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86064712-98a6-0d06-4c53-b7889c3c3d26@gmail.com> X-attached: none User-Agent: Mutt/1.5.23 (2014-03-12) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 93.93.131.118 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Feb 2017 20:38:24 -0000 On Thu, Feb 09, 2017 at 09:52:40PM +0300, Andrei Borzenkov wrote: >30.01.2017 22:04, Steve McIntyre пишет: >> Code is currently ignoring errors from efibootmgr, giving users >> clearly bogus output like: >> >> Setting up grub-efi-amd64 (2.02~beta3-4) ... >> Installing for x86_64-efi platform. >> Could not delete variable: No space left on device >> Could not prepare Boot variable: No space left on device >> Installation finished. No error reported. >> >> and then potentially unbootable systems. If efibootmgr fails, >> grub-install should know that and report it! > >This looks more or less cosmetic to me. First, errors are displayed to >user so it is not that user is not aware. Maybe, maybe not - if this occurs in the middle of a set of package installations or upgrades on a system, text like this will get lost. >Second, efibootmgr is more or less optional. This is convenient but >by far not the only one possibility to use newly installed >grub. If you're running on a UEFI system, this is anything *but* optional. >Third, even successful execution of efibootmgr does not mean it will >actually boot grub - there are enough systems out there that will >simply ditch grub entry and replace it with hard coded Windows one. That's not an excuse for not catching errors on systems that *are* working. >So I'm fine with changing "no error reported" to "efibootmgr invocation >failed; check your firmware settings" or similar, but I am not sure we >need to abort grub-install in this case. What exact problem do you solve >by aborting? You pick up an error correctly, and report it upwards so that other programs calling grub-install can reliably check for errors, and maybe deal with those errors. I don't see why it's a problem to actually handle errors properly? In Debian we're seeing quite a few people reporting problems in this area. It would be better to catch and handle errors better here. See https://bugs.debian.org/852513 for an example. -- Steve McIntyre, Cambridge, UK. steve@einval.com You raise the blade, you make the change... You re-arrange me 'til I'm sane...