From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MbUD5-0005W7-7K for mharc-grub-devel@gnu.org; Thu, 13 Aug 2009 02:54:51 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MbUD3-0005Vk-Cb for grub-devel@gnu.org; Thu, 13 Aug 2009 02:54:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MbUCx-0005VY-Qf for grub-devel@gnu.org; Thu, 13 Aug 2009 02:54:48 -0400 Received: from [199.232.76.173] (port=56362 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbUCx-0005VV-MA for grub-devel@gnu.org; Thu, 13 Aug 2009 02:54:43 -0400 Received: from mx20.gnu.org ([199.232.41.8]:11432) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MbUCx-0001N4-2U for grub-devel@gnu.org; Thu, 13 Aug 2009 02:54:43 -0400 Received: from c60.cesmail.net ([216.154.195.49]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MbUCw-0003iC-F9 for grub-devel@gnu.org; Thu, 13 Aug 2009 02:54:42 -0400 Received: from unknown (HELO smtprelay2.cesmail.net) ([192.168.1.112]) by c60.cesmail.net with ESMTP; 13 Aug 2009 02:54:41 -0400 Received: from [192.168.1.151] (c-69-141-194-35.hsd1.pa.comcast.net [69.141.194.35]) by smtprelay2.cesmail.net (Postfix) with ESMTPSA id E40E234C6D for ; Thu, 13 Aug 2009 03:08:23 -0400 (EDT) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: <20090812152508.GZ11691@riva.ucam.org> References: <20090812152508.GZ11691@riva.ucam.org> Content-Type: text/plain Date: Thu, 13 Aug 2009 02:54:29 -0400 Message-Id: <1250146469.2352.46.camel@ct> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 (2.26.3-1.fc11) Content-Transfer-Encoding: 7bit X-Detected-Operating-System: by mx20.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Subject: Re: grub.cfg and core.img getting out of sync X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Aug 2009 06:54:49 -0000 On Wed, 2009-08-12 at 16:25 +0100, Colin Watson wrote: > I'm having persistent problems with grub.cfg and core.img getting out of > sync. The usual pattern is: > > * Some shiny new feature appears in core.img > * We extend grub-mkconfig to use it > * User runs update-grub but not grub-install (historically a perfectly > sane thing to do, and indeed basically standard practice) > * grub either falls over at boot or does something odd The assumption is that grub.cfg should be able to deal with it. That's why it sets root before searching. > This just bit me again today, and if it bites me it's going to bite the > users of the packages I upload too. By our today's standards, it's a bug, so it should be reported in a detailed way. > Is there any way we can do better? One thing I was thinking of is that > Ubuntu's carried a patch to GRUB Legacy for some time that stores the > package version at the point when grub-install was last run in > /boot/grub/installed-version. If we did something like that, then > grub-mkconfig could carry a bit of conditional code that says "only use > this feature if the installed version of GRUB is at least ". > grub-mkconfig would end up carrying a bit of bloat, but at least the > bloat is in /usr, and I'm assuming that at this point things are stable > enough that we won't be talking about *too* many changes. > > What do people think about this general approach? There is already a version hardcoded into the uncompressed part of core.img. See kern/i386/pc/startup.S. Unfortunately, there is no policy when the version should be updated. But I'm fine with a separate file in /boot/grub if we decide that the existing version in core.img cannot be used for that and we cannot keep grub.cfg backward compatible. -- Regards, Pavel Roskin