grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting - write to HD support?


From: Marco Gerards
Subject: Re: Scripting - write to HD support?
Date: Fri, 06 Oct 2006 20:43:45 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

"Markus Laire" <address@hidden> writes:

> On 10/5/06, Marco Gerards <address@hidden> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]