From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LlOGN-0005vg-9t for mharc-grub-devel@gnu.org; Sun, 22 Mar 2009 10:02:55 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LlOGL-0005uU-1U for grub-devel@gnu.org; Sun, 22 Mar 2009 10:02:53 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LlOGK-0005tz-E9 for grub-devel@gnu.org; Sun, 22 Mar 2009 10:02:52 -0400 Received: from [199.232.76.173] (port=54510 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LlOGJ-0005tr-UQ for grub-devel@gnu.org; Sun, 22 Mar 2009 10:02:52 -0400 Received: from mail.nexedi.com ([91.121.25.85]:35860 helo=nexedi.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LlOGJ-0006b1-Cp for grub-devel@gnu.org; Sun, 22 Mar 2009 10:02:51 -0400 Received: from [10.8.0.46] (unknown [10.8.0.46]) by nexedi.com (Postfix) with ESMTP id 1AE323D9F4 for ; Sun, 22 Mar 2009 15:02:49 +0100 (CET) From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Sun, 22 Mar 2009 23:02:41 +0900 User-Agent: KMail/1.9.10 References: <49A50DA2.20604@netsyncro.com> <200903222211.03080.okuji@enbug.org> <49C63BE9.2070405@gmail.com> In-Reply-To: <49C63BE9.2070405@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200903222302.41617.okuji@enbug.org> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: Migrating to GRUB 2 in Debian (Re: Interesting GSoC project ideas for 09) 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: Sun, 22 Mar 2009 14:02:53 -0000 On Sunday 22 March 2009 22:23:53 phcoder wrote: > Yoshinori K. Okuji wrote: > > On Sunday 22 March 2009 19:48:36 phcoder wrote: > >> Hello, I agree that non-sector aligned writes should be handled > >> correctly. However I disagree with removing of the magic number. I > >> personally would prefer if this file would have magic number and > >> checksum. AFAIK currently grub2 doesn't write to FS except in > >> load_env/save_env so a bug in code calling the hook could easily be > >> present. And I don't want grub2 to corrupt the filesystem because of any > >> such mistakes > > > > For magic, alright. But I am not certain about the necessity of checksum. > > > > Bean's code re-reads blocks so as to ensure that blocklists are identical > > to what a given filesystem driver reads. So the probability of accidental > > writes has been reduced very much already. It is hard for me to imagine > > the benefit of adding more overhead. With this condition, if a checksum > > is invalid, the cause must be either of these: > > > > - that GRUB has a bug in a filesystem driver, so this has read wrong > > sectors - that the content of grubenv has already been corrupted (e.g. > > because the user modified it mistakenly) > > > > In the latter case, there is no problem in GRUB overwriting the data, so > > we don't have to care. In the former, this means that GRUB cannot read > > the filesystem correctly anyway, so the user cannot boot any OS reliably. > > It is rather surprising that the user has successfully installed GRUB. > > This assumption doesn't hold true if developping new FS using grub-emu. > Perhaps a configure parameter to disable all writes would be a good idea? I think you can just avoid invoking save_env. Regards, Okuji