All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: grub2 miscelanea questions (1/2)
  2007-06-09  7:34 grub2 miscelanea questions (1/2) adrian15
@ 2007-06-05 18:26 ` Marco Gerards
  2007-06-07 17:29 ` Robert Millan
  1 sibling, 0 replies; 7+ messages in thread
From: Marco Gerards @ 2007-06-05 18:26 UTC (permalink / raw)
  To: The development of GRUB 2

adrian15 <adrian15@raulete.net> writes:

> 	
> 	Dear grub2 developers, here there are some questions about grub2 that I
> have that would have generated too many little emails.
>
> 1)lst files on a grub2 floppy
> ==============================
>
> 	As I told you in another email, in order to build my grub2 floppy I did
> a soft link from /usr/local/lib/grub/i386-pc to
> /home/adrian/Desktop/gnu/grub2/grub2_2007_05_31 (compiled sources dir)
> and my floppy is full of lst files.
>
> 	Usually in a grub2 floppy there are not any lst file, isn't it?
>
> 2) What are these lst files for, are they useful or are they like the C
> .o files, only needed for compilation purposes?

Most of them are for compilation.

> 3) Why any grub2.cfg file (I suppose it's the substitute for menu.lst)
> is inside the grub2 source code?

What do you mean?

> 4) Why any doc folder is inside the grub2 source code?

There is?  We need documentation...
 	
> 5) grub2 lacks
> ==================
> 5.1) pager
> -------------
>
> When I want to do a big ls the output does not stop screen by screen...
> Is there any hidden pager that I do not know?
> Maybe is not implemented yet?

set pager=1

It just isn't documented :-/

> 5.2) Chainload DEVICES
> ------------------------
>
> How the hell do you boot windows?
> Maybe from a file that has inside it the first 512 bytes from the
> Windows partition?

chainload (hd0,1)+
boot

(depending on the partition it is on, of course)

> 6) Compulsory Argument dilemma
> ================================	
> If I run help I can seen things like this:
> 	
> ls [-f|-l|-s] NAME
>
> and
>
> [ EXPRESSION ]

Yes?

> If [ ] means optional it should also mean optional in the case of the
> test alias [ .!!!

What do you mean?

> 7) set help incomplete
> ========================
> Set help should say that if no argument is set then it shows all the
> environment variables.

Why would it?  Only using set shows all env. variables.

> 8) exported and no exported variables
> =======================================
> Why the set does not show any difference (like a * in the beginning)
> about the exported and no exported variables (with the export command)

It isn't implemented :-)

> 9) help does not complain when no command help is available
> =============================================================
>
> The commands:
> 	help marco_g
> 	help okuji
> 	help dachaac
>
> do not complain at all, and it is not a "hidden pascua egg" from these
> people,... any non-command has the same answer: NONE.

I don't need help, GRUB 2 does ;-)

> I think there should be something like:
>
> Error: This command does not exist.
>
> Or better even: It should prompt all the commands.

How it currently works is looking at the first characters.  For
example try "help l".

> 10) help --all
> =================
> In grub-legacy when typing help some commands were some sort of hidden.
> However if you typed help --all these commands were also shown.
>
> Do we need this functionality in grub2?

Are there hidden commands for which this is important?  In that case,
yes.

> 11) help help
> ===============
> Running help help says:
> Usage: help [PATTERN ...]
> Show a help message.
>
> It should say that if no argument is entered then all the commands are
> shown.
> And it should say: Show a command help described in PATTERN. (Or
> something like this).

Feel free to send in patches.

> 12) ls and -h argument
> ========================
>
> This is not an error but it curious. You can ask for the help of command
> with this:
> command -h
> however
> ls -h
> works in a different way.
>
> I suppose we may have the same problem with '-u' in the future.

Ehm, I am not sure.  You mean `-h' is short for help and we should
remove it?

--
Marco




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gcs doubt #1
       [not found] <200706051834.l55IY56F003249@correoredir01.dinaserver.com>
@ 2007-06-06 18:04 ` adrian15
  2007-06-06 18:04 ` test -e patch adrian15
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: adrian15 @ 2007-06-06 18:04 UTC (permalink / raw)
  To: grub-devel

>>> If you can provide a patch for sourcecode to improve or add comments
>>> in a sane way, I am willing to commit those patches.  Just please
>>> don't make the mistake to add useless comments.
>> An useful comment is one that:
>> 	-Describes a function algorithm
>> 	-Describes what a function does (as a black box)
>> 	-Boot of them ?
> 
> Yes, but I oppose to adding obvious comments.  But patches will be
> reviewed, so you will learn fast enough what we want :-).

You had to choose one of the three options :).
Well... it doesn't matter. I've understood that I have to send patches
and learn by trial-error.

adrian15




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: test -e patch
       [not found] <200706051834.l55IY56F003249@correoredir01.dinaserver.com>
  2007-06-06 18:04 ` gcs doubt #1 adrian15
@ 2007-06-06 18:04 ` adrian15
  2007-06-06 18:04 ` grub2 miscelanea questions (1/2) adrian15
  2007-06-06 18:04 ` grub2 miscelanea questions (2/2) adrian15
  3 siblings, 0 replies; 7+ messages in thread
From: adrian15 @ 2007-06-06 18:04 UTC (permalink / raw)
  To: grub-devel

>>> adrian15 <adrian15@raulete.net> writes:
>>>
>>>>> Attached you will find the patch adding test -e support for grub2.
>> Do you mean you also have the '-e' option ?
> 
> I mean I have everything that is possible.  That includes `-e', but
> also all other features.
Ok.
> 
>>>>> +static void
>>>>> +test_file_exists (const char *key)
>>> Why not filename?
>> test_filename_exists
>> or
>> filename
> 
> I mean instead of key.

You are right. It was a not clean copy-paste from search command.

adrian15




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: grub2 miscelanea questions (1/2)
       [not found] <200706051834.l55IY56F003249@correoredir01.dinaserver.com>
  2007-06-06 18:04 ` gcs doubt #1 adrian15
  2007-06-06 18:04 ` test -e patch adrian15
@ 2007-06-06 18:04 ` adrian15
  2007-06-06 18:04 ` grub2 miscelanea questions (2/2) adrian15
  3 siblings, 0 replies; 7+ messages in thread
From: adrian15 @ 2007-06-06 18:04 UTC (permalink / raw)
  To: grub-devel

>> 3) Why any grub2.cfg file (I suppose it's the substitute for menu.lst)
>> is inside the grub2 source code?
> 
> What do you mean?

Usually a program should include examples on how to use their files and
document examples and so on... why isn't there any grub2.cfg ?

>> 4) Why any doc folder is inside the grub2 source code?
> 
> There is?  We need documentation...
:) I might work on this too... but as an unofficial documentation. I do
not like the rigid official documentations.
>  	
>> 5) grub2 lacks
>> ==================
>> 5.1) pager
>> -------------
>>
>> When I want to do a big ls the output does not stop screen by screen...
>> Is there any hidden pager that I do not know?
>> Maybe is not implemented yet?
> 
> set pager=1
> 
> It just isn't documented :-/

We should be able to prompt with help command (help variables perhaps?)
these kind of tricks or pseudocommands.

> 
>> 5.2) Chainload DEVICES
>> ------------------------
>>
>> How the hell do you boot windows?
>> Maybe from a file that has inside it the first 512 bytes from the
>> Windows partition?
> 
> chainload (hd0,1)+
> boot

I've checked that this works:
chainloader (hd0,1)+1
boot

>> 6) Compulsory Argument dilemma
>> ================================	
>> If I run help I can seen things like this:
>> 	
>> ls [-f|-l|-s] NAME
>>
>> and
>>
>> [ EXPRESSION ]
> 
> Yes?
> 
>> If [ ] means optional it should also mean optional in the case of the
>> test alias [ .!!!
> 
> What do you mean?

The [] has not a single meaning in this program.
	If it's written after a command in the help description it means: Optional.
	If it's used as a program it means that it runs the test command.

It might be confusing for some users I suppose.

Why did not use to new bash syntax? $((variable))

> 
>> 7) set help incomplete
>> ========================
>> Set help should say that if no argument is set then it shows all the
>> environment variables.
> 
> Why would it?  Only using set shows all env. variables.
Because it is a hidden feature.
If you do not how grub does work and type "help set"
it shows "Set an environment variable".

The user is unable to know that "Only using set shows all env.
variables" because it isn't written anywhere.

>> 9) help does not complain when no command help is available
>> =============================================================
> How it currently works is looking at the first characters.  For
> example try "help l".

I know... but if the first characters do not match with any command
beginning I think an error should be prompted. Don't you think so?

> 
>> 10) help --all
>> =================
>> Do we need this functionality in grub2?
> 
> Are there hidden commands for which this is important?  In that case,
> yes.

The hipotetical dd command. :)
> 
>> 12) ls and -h argument
>> ========================
>>
>> This is not an error but it curious. You can ask for the help of command
>> with this:
>> command -h
>> however
>> ls -h
>> works in a different way.
>>
>> I suppose we may have the same problem with '-u' in the future.
> 
> Ehm, I am not sure.  You mean `-h' is short for help and we should
> remove it?

I mean that if an user gets used to use the "-h" option for getting grub
commands help then when using ls, he will be confused a little.

adrian15




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: grub2 miscelanea questions (2/2)
       [not found] <200706051834.l55IY56F003249@correoredir01.dinaserver.com>
                   ` (2 preceding siblings ...)
  2007-06-06 18:04 ` grub2 miscelanea questions (1/2) adrian15
@ 2007-06-06 18:04 ` adrian15
  3 siblings, 0 replies; 7+ messages in thread
From: adrian15 @ 2007-06-06 18:04 UTC (permalink / raw)
  To: grub-devel

>> 19) rescue and exit failure on qemu
>> ==============================
>> I think that booting from my computer does not give this error.
>> If I boot from QEMU and type:
>>
>> grub> rescue
>> and then :
>> grub rescue> exit
>>
>> it says: FATAL: INT18: BOOT FAILURE
> 
> Weird.  Can you debug this?

I've checked this again.
If I do this booting from my pc I get the grub2 floppy booting again.
If I do this from qemu the FATAL: INT18: BOOT FAILURE appears again.
I would bet that it is a qemu bios's lack of the 18 interruption.
>> 20) grub rescue help
>> ========================
>>
>> help : Types the commands and a minimal explanation: OK
>> help any_command : Types the commands and a minimal explanation: NOT OK
>> help not_a_command : Types the commands and a minimal explanation: NOT OK
> 
> huh?

You boot grub2 and you see
grub>
you type rescue and you see
grub rescue>
and now what it is funny that if you type the help command, an space,
and whatever you want to write it always shows all the commands help.

It may confuse some users as "Grub is not working".

> 
>> 21) grub rescue exit help
>> ===========================
>> When you are in grub rescue mode and you type help the exit line it's
>> the following one:
>>
>> exit	exit from GRUB
>>
>> Should it not prompt ?
>>
>> exit	exit from GRUB rescue
> 
> The exit command terminates GRUB and continues the boot process, IIRC.
You are right. Exit from GRUB is right, then.

> 
>> 22) copyright message missing
>> ================================
>> Why isn't there (when Grub is running) any message about the GRUB
>> Copyright and the GPL license and that you should have received and this
>> and that?
> 
> Why should there be such message?
This comes from GPL 2:

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

     Gnomovision version 69, Copyright (C) year  name of author
     Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type
`show w'.
     This is free software, and you are welcome to redistribute it
     under certain conditions; type `show c' for details.

>> Maybe we should implement an 'about' command and run it when booting :) ?
> Perhaps, but I don't see the added value.
See above about the GPL.
> 
>> 23) set read only variables
>> ==============================
>> unset prefix lets me "delete" the prefix variable.
>> unset root does not let me the "root" variable.
>>
>> I remember that bash has an option to set read only variables.
>> Maybe the root variable is a read only variable?
> 
> You can easily modify the code.  But I do not like making such
> variables read-only.

I did not want to make any variable read only. I only wanted to make you
know that the "root" variable was actually a read only variable because
there is no way to delete (unset) it. It always comes to live again.

Is it a normal thing?

adrian15




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: grub2 miscelanea questions (1/2)
  2007-06-09  7:34 grub2 miscelanea questions (1/2) adrian15
  2007-06-05 18:26 ` Marco Gerards
@ 2007-06-07 17:29 ` Robert Millan
  1 sibling, 0 replies; 7+ messages in thread
From: Robert Millan @ 2007-06-07 17:29 UTC (permalink / raw)
  To: The development of GRUB 2

On Sat, Jun 09, 2007 at 09:34:55AM +0200, adrian15 wrote:
> 6) Compulsory Argument dilemma
> ================================	
> If I run help I can seen things like this:
> 	
> ls [-f|-l|-s] NAME
> 
> and
> 
> [ EXPRESSION ]
> 
> 
> If [ ] means optional it should also mean optional in the case of the
> test alias [ .!!!

Yes, this is inconsistent, but both bracket sets come from very stablished
usage (the [ command at least is ancient).  Also, this inconsistency is not
specific to GRUB, and cannot be fixed without adding another (IMHO worse)
inconsistency, which is not being analogous to the GNU command-line
environment.

-- 
Robert Millan

My spam trap is honeypot@aybabtu.com.  Note: this address is only intended
for spam harvesters.  Writing to it will get you added to my black list.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* grub2 miscelanea questions (1/2)
@ 2007-06-09  7:34 adrian15
  2007-06-05 18:26 ` Marco Gerards
  2007-06-07 17:29 ` Robert Millan
  0 siblings, 2 replies; 7+ messages in thread
From: adrian15 @ 2007-06-09  7:34 UTC (permalink / raw)
  To: grub-devel

	
	Dear grub2 developers, here there are some questions about grub2 that I
have that would have generated too many little emails.

1)lst files on a grub2 floppy
==============================

	As I told you in another email, in order to build my grub2 floppy I did
a soft link from /usr/local/lib/grub/i386-pc to
/home/adrian/Desktop/gnu/grub2/grub2_2007_05_31 (compiled sources dir)
and my floppy is full of lst files.

	Usually in a grub2 floppy there are not any lst file, isn't it?

2) What are these lst files for, are they useful or are they like the C
.o files, only needed for compilation purposes?

3) Why any grub2.cfg file (I suppose it's the substitute for menu.lst)
is inside the grub2 source code?

4) Why any doc folder is inside the grub2 source code?
	
5) grub2 lacks
==================
5.1) pager
-------------

When I want to do a big ls the output does not stop screen by screen...
Is there any hidden pager that I do not know?
Maybe is not implemented yet?

5.2) Chainload DEVICES
------------------------

How the hell do you boot windows?
Maybe from a file that has inside it the first 512 bytes from the
Windows partition?

6) Compulsory Argument dilemma
================================	
If I run help I can seen things like this:
	
ls [-f|-l|-s] NAME

and

[ EXPRESSION ]


If [ ] means optional it should also mean optional in the case of the
test alias [ .!!!


7) set help incomplete
========================
Set help should say that if no argument is set then it shows all the
environment variables.

8) exported and no exported variables
=======================================
Why the set does not show any difference (like a * in the beginning)
about the exported and no exported variables (with the export command)

9) help does not complain when no command help is available
=============================================================

The commands:
	help marco_g
	help okuji
	help dachaac


do not complain at all, and it is not a "hidden pascua egg" from these
people,... any non-command has the same answer: NONE.

I think there should be something like:

Error: This command does not exist.

Or better even: It should prompt all the commands.

10) help --all
=================
In grub-legacy when typing help some commands were some sort of hidden.
However if you typed help --all these commands were also shown.

Do we need this functionality in grub2?

11) help help
===============
Running help help says:
Usage: help [PATTERN ...]
Show a help message.

It should say that if no argument is entered then all the commands are
shown.
And it should say: Show a command help described in PATTERN. (Or
something like this).

12) ls and -h argument
========================

This is not an error but it curious. You can ask for the help of command
with this:
command -h
however
ls -h
works in a different way.

I suppose we may have the same problem with '-u' in the future.

13) videotest
================
This is a test command and it will not be available when grub2 is out
there. Isn't it ? :)



Continues on grub2 miscelanea questions (2/2)



adrian15




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-06-07 17:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <200706051834.l55IY56F003249@correoredir01.dinaserver.com>
2007-06-06 18:04 ` gcs doubt #1 adrian15
2007-06-06 18:04 ` test -e patch adrian15
2007-06-06 18:04 ` grub2 miscelanea questions (1/2) adrian15
2007-06-06 18:04 ` grub2 miscelanea questions (2/2) adrian15
2007-06-09  7:34 grub2 miscelanea questions (1/2) adrian15
2007-06-05 18:26 ` Marco Gerards
2007-06-07 17:29 ` Robert Millan

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.