Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NNvEg-0000Ft-77 for mharc-grub-devel@gnu.org; Thu, 24 Dec 2009 16:28:42 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NNvEe-0000CN-Ab for grub-devel@gnu.org; Thu, 24 Dec 2009 16:28:40 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NNvEZ-0008TG-5h for grub-devel@gnu.org; Thu, 24 Dec 2009 16:28:39 -0500 Received: from [199.232.76.173] (port=32960 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NNvEZ-0008T5-24 for grub-devel@gnu.org; Thu, 24 Dec 2009 16:28:35 -0500 Received: from xvm-190-8.ghst.net ([217.70.190.8]:58168 helo=aybabtu.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NNvEY-00033R-LP for grub-devel@gnu.org; Thu, 24 Dec 2009 16:28:34 -0500 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtp (Exim 4.69) (envelope-from ) id 1NNvEX-0008U8-6t; Thu, 24 Dec 2009 22:28:33 +0100 Received: from rmh by thorin with local (Exim 4.69) (envelope-from ) id 1NNvEW-0003G6-FJ; Thu, 24 Dec 2009 22:28:32 +0100 Date: Thu, 24 Dec 2009 22:28:32 +0100 From: Robert Millan To: The development of GNU GRUB Message-ID: <20091224212832.GL12122@thorin> References: <2009-12-13T20-58-44@devnull.michael-prokop.at> <20091214115621.GH5847@riva.ucam.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091214115621.GH5847@riva.ucam.org> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: Michael Prokop Subject: Re: execution of update-grub in chroots might fail X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 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, 24 Dec 2009 21:28:40 -0000 On Mon, Dec 14, 2009 at 11:56:21AM +0000, Colin Watson wrote: > The simplest fix is to add '&& [ -e /boot/grub/grub.cfg ]' to the test > in memtest86+; Uhm should we make this check part of update-grub? Or even part of grub-mkconfig? > that is, if the configuration file hasn't been generated > already, it shouldn't be updated. (This check is in the memtest86+ > postinst in Ubuntu.) This accounts for the OpenVZ problem as well as for > other reasons why GRUB might not actually be being used as a boot > loader. > > You're right that it is suboptimal that every package has to implement > the check itself. My instinct is that the semantics of update-grub ought > to change slightly, so that it really is an *update* - that is, it > shouldn't by default generate a configuration file if there isn't one > already. It could have a --force option (or better name?) for > convenience, for use by the grub2 packaging itself, and for use by the > installer. Anything much more complex than that smells of > overengineering to me. > > Note, though, that care would need to be taken to ensure that > grub-installer is changed in step; it's important to minimise the > chances of consequential installer brokenness. There's little urgency on > this so we could afford the time for a proper transition. For example, > update-grub could accept but ignore the new option for a while; then, > after the relevant version of grub2 has moved to testing, grub-installer > could be updated to use it; then, at some later point, the default > semantics of update-grub could change. > > If that's too complicated, we could just add an --if-exists option or > something that does what memtest86+ and other similar packages need. > There are very few packages in this boat, so it may not be worth very > much effort to deal with them. > > Robert, Felix, what do you think? I think it's fine to make this update conditional. My only concern is that external packages have a mechanism to add their stuff into grub.cfg (this was one of the key motivations for initial grub-mkconfig design). -- Robert Millan "Be the change you want to see in the world" -- Gandhi