Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KDS6O-0002Wl-Vb for mharc-grub-devel@gnu.org; Mon, 30 Jun 2008 18:44:04 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KDS6N-0002Wg-GX for grub-devel@gnu.org; Mon, 30 Jun 2008 18:44:03 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KDS6M-0002WU-0S for grub-devel@gnu.org; Mon, 30 Jun 2008 18:44:03 -0400 Received: from [199.232.76.173] (port=41983 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KDS6L-0002WR-RV for grub-devel@gnu.org; Mon, 30 Jun 2008 18:44:01 -0400 Received: from c60.cesmail.net ([216.154.195.49]:18716) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1KDS6L-0003ye-Nz for grub-devel@gnu.org; Mon, 30 Jun 2008 18:44:02 -0400 Received: from unknown (HELO relay.cesmail.net) ([192.168.1.81]) by c60.cesmail.net with ESMTP; 30 Jun 2008 18:44:00 -0400 Received: from [192.168.0.21] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by relay.cesmail.net (Postfix) with ESMTP id C235A618F22 for ; Mon, 30 Jun 2008 18:43:59 -0400 (EDT) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: References: <1214601899.9513.58.camel@dv> Content-Type: text/plain Date: Mon, 30 Jun 2008 18:43:59 -0400 Message-Id: <1214865839.2423.11.camel@dv> Mime-Version: 1.0 X-Mailer: Evolution 2.22.2 (2.22.2-2.fc9) Content-Transfer-Encoding: 7bit X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [RFC PATCH] Sector 2 of non-embedded core.img: write early or patch later? 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: Mon, 30 Jun 2008 22:44:03 -0000 On Sat, 2008-06-28 at 12:58 +0800, Bean wrote: > On Sat, Jun 28, 2008 at 5:24 AM, Pavel Roskin wrote: > > I tend to prefer the later ("write early") approach, but I'd like to see > > some feedback before I commit it. > > Hi, > > The problem of write early is that it changes the target image before > verification is made, so if verification fails, the change remains. > This is generally not a good practice, we should not touch core.img if > it can't be embedded successfully. OK, that's a good argument. Actually, if grub-install is used, core.img would have been rewritten already. Anyway, core.img is a file we want to touch as little as possible, considering that it can already be used. I'm applying the "patch-later" patch with some simplifications and warning fixes. -- Regards, Pavel Roskin