Skip to contentSkip to conversation

Two SoC ideas

DISCUSSION Wei Shen 9 participants 19 messages Mar 23, 2007 – Apr 10, 2007 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Wei Shen

author
#1 lore raw

Hi,
I have two ideas and wonder whether they are welcome as SoC projects.

1) Simple file editing

I think it is useful to add file edit function to Grub. Thus, if a config file which is required to boot the OS successfully is mistakenly written, we can still correct it in Grub and need not to reboot from the floppy or cdrom just for the correcting.
I know it would greately increase the complexity of Grub to support a writable file system. However, if file writing does not change the block number of a file, things are much simpler. Since most config files are small (occupying only one block), I think the solution will work.

2) *addr* option for module command

Add nn option: "*addr* = *value*" to the module command. If the *addr*option is specified, Grub will load the module to address *value* instead of the default address.

Regards,

Wei Shen

#2 lore raw

Chen:

In grub command line, you can edit the configre (even mistaken), so maybe it will not be worth to add an edit in grub.

An option to set the start address for grub to load multiboot module is great. This option will make kernel guys (who use multiboot modules) to initiate the kernel more easy. I remember a branch of grub for L4 kernel supports this option, maybe it can be a reference if you are interested in.

Best regards.

Coly

Quoted 29 lines · 在 2007-03-23五的 23:46 +0800,Wei Shen写道:

Hi,

I have two ideas and wonder whether they are welcome as SoC projects.

1) Simple file editing
I think it is useful to add file edit function to Grub. Thus, if a config file which is required to boot the OS successfully is mistakenly written, we can still correct it in Grub and need not to reboot from the floppy or cdrom just for the correcting.

I know it would greately increase the complexity of Grub to support a writable file system. However, if file writing does not change the block number of a file, things are much simpler. Since most config files are small (occupying only one block), I think the solution will work.

2) addr option for module command

Add nn option: "addr = value" to the module command. If the addr option is specified, Grub will load the module to address value instead of the default address.

Regards,

Wei Shen
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

author
#3 lore raw

Thanks for your advice.

Quoted 5 lines · colyli

Chen:

In grub command line, you can edit the configre (even mistaken), so maybe it will not be worth to add an edit in grub.

I do not mean the configure of Grub menu list, but the config files of the OS, like *boot.ini* of Windows and *inittab* of Linux.

An option to set the start address for grub to load multiboot module is

Quoted 4 lines

great. This option will make kernel guys (who use multiboot modules) to initiate the kernel more easy. I remember a branch of grub for L4 kernel supports this option, maybe it can be a reference if you are interested in.

I know this approach, however, instead of an option, they add a new command *modaddr*. A limitation is that all modules after the "*modaddr* *value*" will be loaded in succession to a overriding address below address *value*.

Best regards.

Quoted 36 lines

Coly

Quoted 29 lines · 在 2007-03-23五的 23:46 +0800,Wei Shen写道:

Hi,

I have two ideas and wonder whether they are welcome as SoC projects.

1) Simple file editing
I think it is useful to add file edit function to Grub. Thus, if a config file which is required to boot the OS successfully is mistakenly written, we can still correct it in Grub and need not to reboot from the floppy or cdrom just for the correcting.

I know it would greately increase the complexity of Grub to support a writable file system. However, if file writing does not change the block number of a file, things are much simpler. Since most config files are small (occupying only one block), I think the solution will work.

2) addr option for module command

Add nn option: "addr = value" to the module command. If the addr option is specified, Grub will load the module to address value instead of the default address.

Regards,

Wei Shen
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

#4 lore raw

Chen:

For the first idea, it is clear to me. I have no comment on it. For the second idea, I need more information. Can you explain more for the limition of "modaddr value" command, and how can the limition to be broken out by the "addr = value" option ?

Thanks.

Coly

Quoted 77 lines · 在 2007-03-24六的 01:30 +0800,Wei Shen写道:

Thanks for your advice.

On 3/24/07, colyli <[email protected]> wrote:
Chen:

In grub command line, you can edit the configre (even mistaken), so
maybe it will not be worth to add an edit in grub.

I do not mean the configure of Grub menu list, but the config files of the OS, like boot.ini of Windows and inittab of Linux.

An option to set the start address for grub to load multiboot module is
great. This option will make kernel guys (who use multiboot modules) to
initiate the kernel more easy. I remember a branch of grub for L4 kernel
supports this option, maybe it can be a reference if you are interested
in.

I know this approach, however, instead of an option, they add a new command modaddr. A limitation is that all modules after the "modaddr value" will be loaded in succession to a overriding address below address value.

Best regards.

Coly

在 2007-03-23五的 23:46 +0800,Wei Shen写道:
> Hi,
>
> I have two ideas and wonder whether they are welcome as SoC projects.
>
> 1) Simple file editing
> I think it is useful to add file edit function to Grub. Thus, if a
> config file which is required to boot the OS successfully is > mistakenly written, we can still correct it in Grub and need not to
> reboot from the floppy or cdrom just for the correcting. >
> I know it would greately increase the complexity of Grub to support a
> writable file system. However, if file writing does not change the
> block number of a file, things are much simpler. Since most config
> files are small (occupying only one block), I think the solution will
> work.
>
> 2) addr option for module command
>
> Add nn option: "addr = value" to the module command. If the addr
> option is specified, Grub will load the module to address value
> instead of the default address.
>
> Regards,
>
> Wei Shen
> _______________________________________________
> Grub-devel mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/grub-devel

_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

#5 lore raw
In reply to Wei Shen
Quoted 4 lines · Wei Shen

2) addr option for module command Add nn option: "addr = value" to
the module command. If the addr option is specified, Grub will load the module to address value instead of the default address.

Why?

-Hollis

#6 lore raw

LVM as root device

grub2+LVM+XEN issues

----8<------------

devel:/boot/grub# cat /boot/grub/device.map
(hd0)   /dev/hda
devel:/boot/grub# grub-probe --device-map=/boot/grub/device.map
/boot/grub -t device
/dev/dm-9
devel:/boot/grub# grub-probe --device-map=/boot/grub/device.map
/boot/grub -t drive
cannot find a GRUB drive for /dev/dm-9.
-----8<-----------
must be (devel-devel-root)

Into the code i see that
grub_guess_root_device works well and have LVM related code in grub_util_biosdisk_get_grub_dev i dont see LVM code

Questions:
LVM must use grub_util_biosdisk_get_grub_dev to determine the grub device? grub_util_biosdisk_get_grub_dev support LVM devices?
someone can help me to fix this? Jerome?

#7 lore raw

Re: LVM as root device

Quoted 5 lines · Juan Pedro Paredes

grub2+LVM+XEN issues

----8<------------

devel:/boot/grub# cat /boot/grub/device.map
(hd0)   /dev/hda

Shouldn't this be /dev/dm-9 in your case?

Quoted 8 lines
devel:/boot/grub# grub-probe --device-map=/boot/grub/device.map
/boot/grub -t device
/dev/dm-9
devel:/boot/grub# grub-probe --device-map=/boot/grub/device.map
/boot/grub -t drive
cannot find a GRUB drive for /dev/dm-9.
-----8<-----------
must be (devel-devel-root)

Okuji

#8 lore raw

Re: LVM as root device

In reply to Juan Pedro Paredes

This may be a bigger problem. Trying CVS, it apears that LVM as the root device (where grub files are held ../boot is) does not currently work. Looking more into it now.

Quoted 32 lines · Juan Pedro Paredes

grub2+LVM+XEN issues

----8<------------

devel:/boot/grub# cat /boot/grub/device.map
(hd0)   /dev/hda
devel:/boot/grub# grub-probe --device-map=/boot/grub/device.map
/boot/grub -t device
/dev/dm-9
devel:/boot/grub# grub-probe --device-map=/boot/grub/device.map
/boot/grub -t drive
cannot find a GRUB drive for /dev/dm-9.
-----8<-----------
must be (devel-devel-root)

Into the code i see that
grub_guess_root_device works well and have LVM related code in grub_util_biosdisk_get_grub_dev i dont see LVM code

Questions:
LVM must use grub_util_biosdisk_get_grub_dev to determine the grub device? grub_util_biosdisk_get_grub_dev support LVM devices?
someone can help me to fix this? Jerome?

_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

#9 lore raw
In reply to Wei Shen
Quoted 10 lines · Wei Shen

1) Simple file editing

I think it is useful to add file edit function to Grub. Thus, if a config file which is required to boot the OS successfully is mistakenly written, we can still correct it in Grub and need not to reboot from the floppy or cdrom just for the correcting.
I know it would greately increase the complexity of Grub to support a writable file system. However, if file writing does not change the block number of a file, things are much simpler. Since most config files are small (occupying only one block), I think the solution will work.

If you don't change the file size, it would work mostly. And this is exactly how "savedefault" works in GRUB Legacy.

But I am a bit pessimistic with this approach. For example, ZFS computes a checksum for every block, and embeds the information into a parent node. This means that, when GRUB modifies any bit of data, GRUB must recompute a checksum and write it to somewhere appropriate. Otherwise, a filesystem would be corrupted.

Theoretically speaking, nothing prevents GRUB from doing that. But this illustrates that GRUB must deal with writing very carefully, and the semantics depends on each filesystem. I do not know if a kind of volume manager, such as LVM, performs this kind of check, but if it does, we need to support it as well.

So this work is not as trivial as at the first glance, although we need it for "savedefault" definitely.

Quoted 5 lines

2) *addr* option for module command

Add nn option: "*addr* = *value*" to the module command. If the *addr*option is specified, Grub will load the module to address *value* instead of the default address.

We discussed this in bug-grub a long time ago. If you are interested, please look at the archive, and search by "modaddr".

In summary, I do not like this, because it is a non-standard extension to Multiboot Specification. If you depend on this feature, your users would be restricted to using GRUB, and they would not be able to use any other Multiboot-compliant boot loaders. This is against the spirit of the Multiboot Specification, which addresses portability problems in boot protocols.

So this must be accomplished as a part of Multiboot Specification. Otherwise, I do not want to accept it.

Thanks,
Okuji

#10 lore raw

Okuji:

Why the modaddr can not be accepted by multiboot specification ? By default, grub loads the multiboot modules right after multiboot kernel. Some microkernel want to keep the multiboot module images in memory, if a driver crashed it can be reloaded from the image.
On x86 platform, this scheme will consume much DMA memory. So a command like modaddr is very useful to save memory in DMA area. I dont know whether other platforms use Grub, but x86 is the most popular one.

Best regards.

Coly

Quoted 56 lines · 在 2007-03-24六的 23:57 +0100,Yoshinori K. Okuji写道:
Quoted 10 lines · Wei Shen

1) Simple file editing

I think it is useful to add file edit function to Grub. Thus, if a config file which is required to boot the OS successfully is mistakenly written, we can still correct it in Grub and need not to reboot from the floppy or cdrom just for the correcting.
I know it would greately increase the complexity of Grub to support a writable file system. However, if file writing does not change the block number of a file, things are much simpler. Since most config files are small (occupying only one block), I think the solution will work.

If you don't change the file size, it would work mostly. And this is exactly how "savedefault" works in GRUB Legacy.

But I am a bit pessimistic with this approach. For example, ZFS computes a checksum for every block, and embeds the information into a parent node. This means that, when GRUB modifies any bit of data, GRUB must recompute a checksum and write it to somewhere appropriate. Otherwise, a filesystem would be corrupted.

Theoretically speaking, nothing prevents GRUB from doing that. But this illustrates that GRUB must deal with writing very carefully, and the semantics depends on each filesystem. I do not know if a kind of volume manager, such as LVM, performs this kind of check, but if it does, we need to support it as well.

So this work is not as trivial as at the first glance, although we need it for "savedefault" definitely.

Quoted 5 lines

2) *addr* option for module command

Add nn option: "*addr* = *value*" to the module command. If the *addr*option is specified, Grub will load the module to address *value* instead of the default address.

We discussed this in bug-grub a long time ago. If you are interested, please look at the archive, and search by "modaddr".

In summary, I do not like this, because it is a non-standard extension to Multiboot Specification. If you depend on this feature, your users would be restricted to using GRUB, and they would not be able to use any other Multiboot-compliant boot loaders. This is against the spirit of the Multiboot Specification, which addresses portability problems in boot protocols.

So this must be accomplished as a part of Multiboot Specification. Otherwise, I do not want to accept it.

Thanks,
Okuji

_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

#11 lore raw
Quoted 1 line · coly

Why the modaddr can not be accepted by multiboot specification ?

I didn't say that it is not accepted for Multiboot Specification. I said, it is not accpetable to add a GRUB-specific extension to Multiboot. They are very different. As I said, first, the feature must be defined in Multiboot Specification. Then, we can support it in GRUB.

Okuji

#12 lore raw
In reply to Yoshinori K. Okuji
Quoted 5 lines · Yoshinori K. Okuji

Theoretically speaking, nothing prevents GRUB from doing that. But this illustrates that GRUB must deal with writing very carefully, and the semantics depends on each filesystem. I do not know if a kind of volume manager, such as LVM, performs this kind of check, but if it does, we need to support it as well.

Software RAID mirrors may also be a problem.

James.

author
#13 lore raw
In reply to a message not in the archive

Hi,

Since it seems that few people like my ideas, I have not apply for them as SoC projects.

If you think they are helpful. I will still try working on them.

Regards,

Wei

Quoted 24 lines · Wei Shen

Hi,
I have two ideas and wonder whether they are welcome as SoC projects.

1) Simple file editing

I think it is useful to add file edit function to Grub. Thus, if an OS config file which is required to boot the OS successfully is mistakenly written, we can still correct it in Grub and need not to reboot from the floppy or cdrom just for the correcting.
I know it would greately increase the complexity of Grub to support a writable file system. However, if file writing does not change the block counts of a file, things are much simpler. Since most config files are small (occupying only one block), I think the solution will work.

2) *addr* option for module command

Add nn option: "*addr* = *value*" to the module command. If the *addr*option is specified, Grub will load the module to address *value* instead of the default address.

Regards,

Wei Shen

#14 lore raw

oh, Shen:

You hack for your self, not for others. If you enjoy it, just do it. If you want your job to be used widely, try to find better ideas. Do not give up anyway :-)

Coly

2007/3/28, Wei Shen <[email protected]>:

Quoted 46 lines

Hi,

Since it seems that few people like my ideas, I have not apply for them as SoC projects.

If you think they are helpful. I will still try working on them.

Regards,

Wei

Quoted 8 lines · Wei Shen

Hi,
I have two ideas and wonder whether they are welcome as SoC projects.

1) Simple file editing

I think it is useful to add file edit function to Grub. Thus, if an OS

config file which is required to boot the OS successfully is mistakenly written, we can still correct it in Grub and need not to reboot from the floppy or cdrom just for the correcting.

Quoted 1 line

I know it would greately increase the complexity of Grub to support a

writable file system. However, if file writing does not change the block counts of a file, things are much simpler. Since most config files are small (occupying only one block), I think the solution will work.

Quoted 4 lines

2) addr option for module command

Add nn option: "addr = value" to the module command. If the addr option is

specified, Grub will load the module to address value instead of the default address.

Quoted 4 lines

Regards,

Wei Shen

_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

author
#15 lore raw

Your are absolutely right. But I am not an expert on Grub.

I think the most important that Google SoC gives a student is not money, but a opportunity to participate and obtain help.

Quoted 66 lines · coly

oh, Shen:

You hack for your self, not for others. If you enjoy it, just do it. If you want your job to be used widely, try to find better ideas. Do not give up anyway :-)

Coly

2007/3/28, Wei Shen <[email protected]>:

Quoted 3 lines

Hi,

Since it seems that few people like my ideas, I have not apply for them

as

Quoted 17 lines

SoC projects.

If you think they are helpful. I will still try working on them.

Regards,

Wei

Quoted 7 lines · Wei Shen

Hi,
I have two ideas and wonder whether they are welcome as SoC projects.

1) Simple file editing

Quoted 7 lines
Quoted 1 line

I think it is useful to add file edit function to Grub. Thus, if an OS

config file which is required to boot the OS successfully is mistakenly written, we can still correct it in Grub and need not to reboot from the floppy or cdrom just for the correcting.

Quoted 1 line

I know it would greately increase the complexity of Grub to support a

writable file system. However, if file writing does not change the block counts of a file, things are much simpler. Since most config files are

small

Quoted 5 lines

(occupying only one block), I think the solution will work.

Quoted 4 lines

2) addr option for module command

Add nn option: "addr = value" to the module command. If the addr

option is

Quoted 1 line

specified, Grub will load the module to address value instead of the

default

Quoted 4 lines

address.

Quoted 3 lines

Regards,

Quoted 9 lines
Quoted 1 line

Wei Shen

_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

#16 lore raw
Quoted 1 line · Wei Shen

Your are absolutely right. But I am not an expert on Grub.

Note that nobody is an expert from the beginning.

Quoted 2 lines

I think the most important that Google SoC gives a student is not money, but a opportunity to participate and obtain help.

IMHO, SoC has two significant effects.

One of them is definitely money. Money is not a good motivation in software development, but money can allocate your time.

The other is advertisement. Even if people do not go to a museum usually, some of them might feel that they want to go, when a special exhibition is planned. SoC has the same effect. Even if people do not look at free software development usually, some of them might feel that they want to participate, when this kind of event is planned.

Besides these, however, I see no difference between mentees in SoC and other contributors. After all, our project is Free Software. You are always free to take part in our development, whenever you would feel to do so. Help? Yes, we do, as much as we can practically, regardless of whether you are paid or not.

I don't know if Jeroen is planning to take some money or not, but I myself did not take any cent of money from last year's SoC. So, from my point of view, there was no real difference between a mentee and another contributor. So I have helped all contributors equally.

Briefly, your contribution is welcome, no matter whatever you do with SoC.

Okuji

author
#17 lore raw

Dear Yoshinori K. Okuji,

You misunderstood me.

A beginer is always afraid of possible coldness, afraid of troubling others, and fears his opinions are too naive.

He needs courage to propose own ideas. SoC gives an opportunity and more importantly an excuse, and so he tells himself: I have reasons to "disturb" my mentor and the community, because he is my mentor and they decided to accept my project (though, we all know the holding organization and mentors get no personal benefits).

I believe there will still be many students to apply for SoC, even if Google does not offer their maney.

Of course, Google has its own commercial interests. But, it is not of my care.

Thanks,

Wei

Quoted 51 lines · Yoshinori K. Okuji
Quoted 1 line · Wei Shen

Your are absolutely right. But I am not an expert on Grub.

Note that nobody is an expert from the beginning.

Quoted 2 lines

I think the most important that Google SoC gives a student is not money, but a opportunity to participate and obtain help.

IMHO, SoC has two significant effects.

One of them is definitely money. Money is not a good motivation in software
development, but money can allocate your time.

The other is advertisement. Even if people do not go to a museum usually, some
of them might feel that they want to go, when a special exhibition is planned. SoC has the same effect. Even if people do not look at free software
development usually, some of them might feel that they want to participate,
when this kind of event is planned.

Besides these, however, I see no difference between mentees in SoC and other
contributors. After all, our project is Free Software. You are always free to
take part in our development, whenever you would feel to do so. Help? Yes, we
do, as much as we can practically, regardless of whether you are paid or not.

I don't know if Jeroen is planning to take some money or not, but I myself did
not take any cent of money from last year's SoC. So, from my point of view,
there was no real difference between a mentee and another contributor. So I
have helped all contributors equally.

Briefly, your contribution is welcome, no matter whatever you do with SoC.

Okuji

_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

#18 lore raw
Quoted 2 lines · Wei Shen

A beginer is always afraid of possible coldness, afraid of troubling others, and fears his opinions are too naive.

Not so always. If you are right, why do so many people participate in Free Software projects? Certainly, when I joined GRUB, my knowledge about bootstrap was quite poor, yet I didn't hesitate to contribute.

I can understand your feeling, but you lose many opportunities of gaining new experience, as long as you are scared. Well, it might not be a bad thing, after all, it is your freedom how you feel. But I personally feel sad if you don't contibute, only because you imagine that we might be cold.

Okuji

#19 lore raw
In reply to Wei Shen

"Wei Shen" <[email protected]> writes:

Hi,

Quoted 2 lines

A beginer is always afraid of possible coldness, afraid of troubling others, and fears his opinions are too naive.

Don't worry about that. People don't always have the time when replying to an email on the mailinglist or so. It's normal and don't worry about that.

The best thing to learn is by doing something stupid. Just come with a stupid idea, ugly code, etc. People will tell you what's wrong with it. Don't be afraid for things like this, you will learn from this.

Quoted 11 lines

He needs courage to propose own ideas. SoC gives an opportunity and more importantly an excuse, and so he tells himself: I have reasons to "disturb" my mentor and the community, because he is my mentor and they decided to accept my project (though, we all know the holding organization and mentors get no personal benefits).

I believe there will still be many students to apply for SoC, even if Google does not offer their maney.

Of course, Google has its own commercial interests. But, it is not of my care.

In that case there is no single reason not to contribute. :-)

--
Marco