bug-grub
[Top][All Lists]
Advanced

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

Doubts with Improvements on GNU GRUB Legacy.


From: adrian15
Subject: Doubts with Improvements on GNU GRUB Legacy.
Date: Fri, 09 Dec 2005 10:53:58 +0100

I have some ideas on how to improve GNU GRUB Legacy but I have also some 
doubts:

1) 

I don't know if I've fully understood Grub source code but I've seen that 
there's a current partition and a current
hard disk variables (the place where Grub or menu.lst is being runned) and 
another boot partition and boot hard disk
variables that stores the place which is going to be boot.

So my first idea was:

Use the variables for booting hard disk and booting partitions to store 
partitions to activate, hide or unhide.
And use special activatep, hidep and unhidep commands that activate, hide 
or unhide these partitions that are save 
in the booting partitions.

So... that an user can choose hard disk, then choose the partition and then 
Activate it. 

Why is this useful for me?

Not having to determine in an only command which is the hard disk and which 
is the partition may save me
a lot of different menu.lst files in Super Grub Disk.

1Q1) Do you think is quite straight-forward to do these modifications?

2) My second idea is created 3 more variables.

My first question is:

2Q1) Can I add 3 more char variables to Grub or do they eat a lot of space? 
I want to implement them in the same way as
the variable that stores config_file.

These three variables are char variables and have some associated commands:

set, del and add.

set 1 (hd0,
gives variable1 to content (hd0,

del 2
deletes contents from variable2

add 1 9
adds 9 to variable1 so that variable1 reads: (hd0,9)


3) My third idea is to add the special and useful run command.

run accepts two arguments.

3Q1) Another question is can I make a Grub command that admits variable 
number of arguments... in other words...
a command that can be called as:
COMMAND ARG1
or as
COMMAND ARG1 ARG2
or even as
COMMAND ARG1 ARG2 ARG3
?

I continue. Run accepts two arguments (Supposing 3Q1 answer is no).
The first one is a valid Grub command such as configfile, chainloader, 
activate,...)
The second one is a strange number such as 102 or 12 or even 123 or even 
10203.


What does this number means?

This number helps me doing a basic parsing of variables...
When reading calling the grub command... the second argument (the number) 
is parsed as the following:

1 is substitued by variable1 contents
2 is      "        variable2    "
3 is      "        variable3    "

and

0 is substitued by an space.

So that you concatenate variables if you don't put a 0 between 1 and 2... 
and you can have them
as different arguments if you put the 0.


I've seen that Tim Deegan (See the findconfig command patch 
http://savannah.gnu.org/bugs/?func=detailitem&item_id=15114#options )
when using a command function inside another command makes some special 
declarations
------------
 /* Prototypes for allowing straightfoward calling of builtins functions
    inside other functions.  */
--------------
inside builtins.c

I suppose that I should do the same thing with all the commands that admits 
more than one argument.

3Q2) Should I add these prototypes?
3Q3) Do you think this run command is feasible (makeable, doable ) ? Would 
it eat a lot memory ?


4) Finally I have a lot of idea for new commands... windows command (boot 
windows)... findconfig 
(different from Tim Deegan's one... do not try to load the configfile)
.. and a lot of commands based on the compulsively use of for and whiles.

So... as you can see my main concern is about memory space because I've 
read something about memory constraints...
but I'm not really quite sure if memory matters so much.

Sorry for having written so long message and thank you for your attention.

adrian15





reply via email to

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