From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1GVuYN-0001Gt-3E for mharc-grub-devel@gnu.org; Fri, 06 Oct 2006 14:36:11 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GVuYM-0001EK-AP for grub-devel@gnu.org; Fri, 06 Oct 2006 14:36:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GVuYL-0001BL-Ad for grub-devel@gnu.org; Fri, 06 Oct 2006 14:36:09 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GVuYL-0001Aj-5s for grub-devel@gnu.org; Fri, 06 Oct 2006 14:36:09 -0400 Received: from [194.109.24.34] (helo=smtp-vbr14.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GVufG-0006eY-Qx for grub-devel@gnu.org; Fri, 06 Oct 2006 14:43:19 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr14.xs4all.nl (8.13.8/8.13.8) with ESMTP id k96IZX8g098762 for ; Fri, 6 Oct 2006 20:35:46 +0200 (CEST) (envelope-from mgerards@xs4all.nl) From: Marco Gerards To: The development of GRUB 2 References: <67d53e40610061018k71d83bcw5f45f770e36aac87@mail.gmail.com> Mail-Copies-To: mgerards@xs4all.nl Date: Fri, 06 Oct 2006 20:43:45 +0200 In-Reply-To: <67d53e40610061018k71d83bcw5f45f770e36aac87@mail.gmail.com> (Markus Laire's message of "Fri, 6 Oct 2006 20:18:38 +0300") Message-ID: <87fye11dzy.fsf@xs4all.nl> User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner Subject: Re: Scripting - write to HD support? 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: Fri, 06 Oct 2006 18:36:10 -0000 "Markus Laire" writes: > On 10/5/06, Marco Gerards wrote: >> I'm looking forwards to your ideas, questions, suggestions, criticism >> and bug reports. :-) > > Will there be any support for writing data to HD? Even a simple > support for writing some data to HD would allow quite a lot of ideas > to be implemented in grub which would be impossible with read-only > access. The disk support in GRUB 2 supports writing to disk. However, it is not used. > Full support for writing to filesystems is likely far too much to ask. Right. > But what about a possibility to create a certain file in advance (e.g. > /boot/grub/mydata filled with e.g. 1MB of zeroes) and then an ability > to write to that file without changing the size of the file. Writing zero's reliable. For example, filesystem implementations might change this into a sparse file. Another problem could be reiserfs, which stores metadata and data in the same sectors, IIRC. So instead of using zero's, we could of course use ones. For reiserfs we would have to look how big the file has to be to make sure metadata won't share this sector. But still, it is something we have to be extremely careful with. And a more important question is: Why do you want this, do you have specific uses for such feature in mind? I can think of things like fallback, etc. > Alternative idea would be to create a partition (without any > filesystem) specifically for saving some data from grub, and then grub > would just give a read/write access to that partition as a single > block of data. I don't like this, it will make it hard or impossible to install GRUB on certain systems. -- Marco