* Scripting - write to HD support?
@ 2006-10-06 17:18 Markus Laire
2006-10-06 18:43 ` Marco Gerards
0 siblings, 1 reply; 5+ messages in thread
From: Markus Laire @ 2006-10-06 17:18 UTC (permalink / raw)
To: grub-devel
On 10/5/06, Marco Gerards <mgerards@xs4all.nl> 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.
Full support for writing to filesystems is likely far too much to ask.
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.
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.
--
Markus Laire
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Scripting - write to HD support?
2006-10-06 17:18 Scripting - write to HD support? Markus Laire
@ 2006-10-06 18:43 ` Marco Gerards
2006-10-06 19:13 ` Hollis Blanchard
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Marco Gerards @ 2006-10-06 18:43 UTC (permalink / raw)
To: The development of GRUB 2
"Markus Laire" <malaire@gmail.com> writes:
> On 10/5/06, Marco Gerards <mgerards@xs4all.nl> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Scripting - write to HD support?
2006-10-06 18:43 ` Marco Gerards
@ 2006-10-06 19:13 ` Hollis Blanchard
2006-10-07 9:36 ` Markus Laire
2006-10-07 9:48 ` Markus Laire
2 siblings, 0 replies; 5+ messages in thread
From: Hollis Blanchard @ 2006-10-06 19:13 UTC (permalink / raw)
To: The development of GRUB 2
On Fri, 2006-10-06 at 20:43 +0200, Marco Gerards wrote:
> "Markus Laire" <malaire@gmail.com> writes:
>
> > On 10/5/06, Marco Gerards <mgerards@xs4all.nl> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Scripting - write to HD support?
2006-10-06 18:43 ` Marco Gerards
2006-10-06 19:13 ` Hollis Blanchard
@ 2006-10-07 9:36 ` Markus Laire
2006-10-07 9:48 ` Markus Laire
2 siblings, 0 replies; 5+ messages in thread
From: Markus Laire @ 2006-10-07 9:36 UTC (permalink / raw)
To: The development of GRUB 2
On 10/6/06, Marco Gerards <mgerards@xs4all.nl> wrote:
> 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.
Ability to edit the grub-menus and then save the result to HD from
within grub would be nice.
This could be done by creating the menus based on the saved data, and
then giving the ability to change that data.
Also the ability to edit the actual scripts which generate the menus
(and to save that result) would be nice.
--
Markus Laire
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Scripting - write to HD support?
2006-10-06 18:43 ` Marco Gerards
2006-10-06 19:13 ` Hollis Blanchard
2006-10-07 9:36 ` Markus Laire
@ 2006-10-07 9:48 ` Markus Laire
2 siblings, 0 replies; 5+ messages in thread
From: Markus Laire @ 2006-10-07 9:48 UTC (permalink / raw)
To: The development of GRUB 2
On 10/6/06, Marco Gerards <mgerards@xs4all.nl> wrote:
> > 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.
Maybe you misunderstood me a bit.
I didn't mean that grub would need to know which partition has this
"special" status. Instead grub would give a general read/write access
to any partition as a single block of data, and user would then use
the partition he wants.
e.g.
# Read 1024 bytes from partition (hd0,3) starting at position 0
data = read (hd0,3), 0, 1024;
# Write new data to that same position
write (hd0,3), 0, newdata;
--
Markus Laire
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-10-07 9:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-06 17:18 Scripting - write to HD support? Markus Laire
2006-10-06 18:43 ` Marco Gerards
2006-10-06 19:13 ` Hollis Blanchard
2006-10-07 9:36 ` Markus Laire
2006-10-07 9:48 ` Markus Laire
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.