[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Scripting - write to HD support?
From: |
Hollis Blanchard |
Subject: |
Re: Scripting - write to HD support? |
Date: |
Fri, 06 Oct 2006 14:13:05 -0500 |
On Fri, 2006-10-06 at 20:43 +0200, Marco Gerards wrote:
> "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.
I agree this would be a great feature.
> 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.
Yeah, we should focus on enabling some specific features.
> > 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.
I like this; it's nice and simple. It's also similar to the situation
with Open Firmware and NVRAM. This approach could extend to NVRAM on
other systems as well...
Systems without a free partition just wouldn't be able to take advantage
of the feature.
-Hollis