From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LlNSL-0005qW-TY for mharc-grub-devel@gnu.org; Sun, 22 Mar 2009 09:11:13 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LlNSJ-0005po-UG for grub-devel@gnu.org; Sun, 22 Mar 2009 09:11:11 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LlNSJ-0005pY-Cy for grub-devel@gnu.org; Sun, 22 Mar 2009 09:11:11 -0400 Received: from [199.232.76.173] (port=51526 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LlNSJ-0005pT-88 for grub-devel@gnu.org; Sun, 22 Mar 2009 09:11:11 -0400 Received: from mail.nexedi.com ([91.121.25.85]:51077 helo=nexedi.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LlNSI-0001zM-Tl for grub-devel@gnu.org; Sun, 22 Mar 2009 09:11:11 -0400 Received: from [10.8.0.46] (unknown [10.8.0.46]) by nexedi.com (Postfix) with ESMTP id CA9C03D9F4 for ; Sun, 22 Mar 2009 14:11:08 +0100 (CET) From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Sun, 22 Mar 2009 22:11:02 +0900 User-Agent: KMail/1.9.10 References: <49A50DA2.20604@netsyncro.com> <200903221601.36503.okuji@enbug.org> <49C61784.6020602@gmail.com> In-Reply-To: <49C61784.6020602@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200903222211.03080.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 13:11:12 -0000 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. Regards, Okuji