Re: [PATCH] Enable pager by default

2019-10-30 Thread adrian15 adrian15
I agree.

One of the Super Grub2 Disk options consists on showing from its menu the
COPYRIGHT page... the pager variable is set to true so that the output is
paged when the cat command is run.
This usecase might not work anymore if something else than prompting a
message on the interactive screen was used.

El mié., 30 oct. 2019 a las 13:12, Daniel Kiper ()
escribió:

> On Fri, Oct 25, 2019 at 11:02:04AM +0200, Javier Martinez Canillas wrote:
> > Hello Daniel,
> >
> > On 10/24/19 4:50 PM, Daniel Kiper wrote:
> >
> > [snip]
> >
> > >>
> > >> From 7c4da6295ebd3a034d1f7e32099eab33efa465d4 Mon Sep 17 00:00:00 2001
> > >> From: Javier Martinez Canillas 
> > >> Date: Tue, 22 Oct 2019 15:35:12 +0200
> > >> Subject: [PATCH v2] Add a GRUB_COMMAND_FLAG_PAGINATED to request
> paginated
> > >>  output for commands
> > >>
> > >> When user enters into the GRUB shell and tries to use help command,
> lot of
> > >> information is scrolled out of screen and the user doesn't have
> chance to
> > >> read it. Also, there isn't any information about 'set pager=1' at the
> end
> > >> of the help output, to tell the user how scrolling could be enabled.
> > >>
> > >> Since the out for some commands may not fit into a screen, add a new
> flag
> > >> GRUB_COMMAND_FLAG_PAGINATED that can be used when registering
> commands that
> > >> can be used to request the pager to be enabled while executing the
> handler.
> > >>
> > >> Signed-off-by: Javier Martinez Canillas 
> > >
> > > In general I like the idea but I think patch requires some polishing...
> > >
> > > Hmmm... Still thinking about "-p" flag which allows user to choose
> > > between pager on/off. Or something which I proposed in the email to
> > > Michael...
> >
> > I'm OK with any of the other two approaches too. But it seems that
> Vladimir
> > is worried about the added complexity for these.
> >
> > I honestly think that the approach in this patch is the least bad option
> since
> > it doesn't require a special configuration or the user to do anything,
> just
> > execute the command printing a lot of stuff and get paginated output by
> default.
> >
> > Can't think why users would want to execute commands that print a lot of
> messages
> > without the output being paginated, or why they would want to execute a
> command
> > like help in in batch mode. It's only useful in interactive mode.
> >
> > And also the patch is quite trivial, it already uses all the existing
> code for
> > the pager option.
> >
> > But I'll wait for the discussion to settle and a solution to be agreed
> upon,
> > before posting a new patch for this.
>
> After some thinking it seems to me that Valdimir is right and we should
> not over-complicate the solution. Let's print the message on interactive
> screen how to enable paging.
>
> Daniel
>
> ___
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>


-- 
Support free software. Donate to Super Grub Disk. Apoya el software libre.
Dona a Super Grub Disk. https://www.supergrubdisk.org/donate/
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: [PATCH] x86/msr: Fix build with older GCC versions

2019-04-19 Thread adrian15
El 18/04/19 a las 12:29, Daniel Kiper escribió:
> On Sat, Apr 13, 2019 at 12:54:53PM +0200, adrian15 wrote:
>> I confirm this patch applied over 2.04rc1 tag enables me to build grub
>> on my system.
>> Thank you very much!
> 
> May I add "Tested-by: adrian15 " to this patch?
> 
> Daniel
No problem.

adrian15
-- 
Support free software. Donate to Super Grub Disk. Apoya el software
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Super Grub2 Disk 2.04rc1s1 beta 4 released (GRUB 2.04~rc1)

2019-04-14 Thread adrian15
Super Grub2 Disk 2.04rc1s1 beta 4 has been released.
Downloads and more details here:
https://www.supergrubdisk.org/2019/04/14/super-grub2-disk-2-04rc1s1-beta-4-released/

Super Grub2 Disk is a live cd that helps you to boot into most any
Operating System (OS) even if you cannot boot into it by normal means.

At its core it uses GRUB 2.

This last version features GRUB 2.04~rc1 which was recently announced.

  You can test GRUB in many ways, installing it on your system might be
one of them. Probably it's the best one because you hardly use GRUB as
if it was a live cd/usb. But sometimes this is not possible.




  By the means of using Super Grub2 Disk, which it's a live cd/usb you
can easily test it and see if there are some problems on this version
without even touching your hard disk.

  You probably want to use the options:
* Boot manually...
* grub.cfg (GRUB2 configuration files)

to examine how GRUB 2.04~rc1 deals with your current grub.cfg file
compared to your current installed GRUB.




  Disclaimer: Although we use upstream GRUB sources at 2.04~rc1 git tag
as a base for building Super Grub2 Disk this should not be considered as
an official GRUB release. If you ever report a bug based on your Super
Grub2 Disk 2.04rc1s1 beta 4 experience please mention it just in case
the problem
might arise because of different ./configure switches used.

  Note: In order to put Super Grub2 Disk image into a usb device use
'dd' command. Be aware that your usb device will be completely erased.
If you write the destination device where to write Super Grub2 Disk
device you might end up losing your internal hard disk content.

adrian15
-- 
Support free software. Donate to Super Grub Disk. Apoya el software
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: [PATCH] x86/msr: Fix build with older GCC versions

2019-04-13 Thread adrian15
I confirm this patch applied over 2.04rc1 tag enables me to build grub
on my system.
Thank you very much!

adrian15

El 12/04/19 a las 13:59, Daniel Kiper escribió:
> Some older GCC versions produce following error when x86 MSR modules are 
> build:
> 
>   In file included from commands/i386/rdmsr.c:29:0:
>   ../include/grub/i386/rdmsr.h:27:29: error: no previous prototype for 
> ‘grub_msr_read’ [-Werror=missing-prototypes]
>extern inline grub_uint64_t grub_msr_read (grub_uint32_t msr_id)
>^
>   cc1: all warnings being treated as errors
> 
> This is due to incorrect use of extern keyword. So, replace it with
> static keyword.
> 
> Additionally, fix incorrect coding style.
> 
> Reported-by: Eric Snowberg 
> Reported-by: adrian15 
> Signed-off-by: Daniel Kiper 
> ---
>  include/grub/i386/rdmsr.h | 3 ++-
>  include/grub/i386/wrmsr.h | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/include/grub/i386/rdmsr.h b/include/grub/i386/rdmsr.h
> index bddb7..c0a0c717a 100644
> --- a/include/grub/i386/rdmsr.h
> +++ b/include/grub/i386/rdmsr.h
> @@ -24,7 +24,8 @@
>   *   Accessing a reserved or unimplemented MSR address results in a GP#.
>   */
>  
> -extern inline grub_uint64_t grub_msr_read (grub_uint32_t msr_id)
> +static inline grub_uint64_t
> +grub_msr_read (grub_uint32_t msr_id)
>  {
>grub_uint32_t low, high;
>  
> diff --git a/include/grub/i386/wrmsr.h b/include/grub/i386/wrmsr.h
> index e14d7807f..dea60aed1 100644
> --- a/include/grub/i386/wrmsr.h
> +++ b/include/grub/i386/wrmsr.h
> @@ -24,7 +24,8 @@
>   *   Accessing a reserved or unimplemented MSR address results in a GP#.
>   */
>  
> -extern inline void grub_msr_write(grub_uint32_t msr_id, grub_uint64_t 
> msr_value)
> +static inline void
> +grub_msr_write(grub_uint32_t msr_id, grub_uint64_t msr_value)
>  {
>grub_uint32_t low = msr_value, high = msr_value >> 32;
>  
> 

-- 
Support free software. Donate to Super Grub Disk. Apoya el software
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: GRUB 2.04 RC01 does not build on Debian Jessie

2019-04-12 Thread adrian15
El 12/04/19 a las 07:52, Christian Hesse escribió:
> adrian15  on Fri, 2019/04/12 07:37:
>>  --target="i386-pe" \
> 
> No idea if it make a difference, but I guess this should read "i386-pc"?
I am building like this since 2017 and I had no problem.
Is i386-pe no longer an accepted target when using 2.04rc1 ?

Here you can find the different target and platforms that I try to
build:
https://github.com/supergrub/supergrub/blob/grub2.04/grub-build-003-build-all#L83
.

I only reported here the "i386-pe target + pc platform" combination just
to keep things simple.

Everyone of my other target/platform combinations fail at the 'make'
stage too.


adrian15
-- 
Support free software. Donate to Super Grub Disk. Apoya el software
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


GRUB 2.04 RC01 does not build on Debian Jessie

2019-04-11 Thread adrian15
cursive] Error 1
make[1]: Leaving directory
'/home/rescatuxs/gnu/sgd/git/supergrub2/sg2d_grub_builds/hybrid_i386_pc'
Makefile:3332: recipe for target 'all' failed
make: *** [all] Error 2


Any help or tip is appreciated.
I suspect I might be missing some dependencies that were not needed for
2.02 but now are needed for 2.04 but I'm not sure.
So, thank you again.


Note: I know I should probably need to use a more recent distribution
suchs as Debian 9 (stretch) but I think it's better to report the
hipothetic bug here, you know, just in case.

Note: A quick search finds Jesús Diéguez as the one who added those msr
modules on February/March 2019 which their build seems to fail. I CC him
too.

adrian15
-- 
Support free software. Donate to Super Grub Disk. Apoya el software
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Adding spoken lenguages to the menu

2017-05-24 Thread adrian15 adrian15
Hi Pol,

  I think we already do this in Super Grub2 Disk (
https://github.com/supergrub/supergrub ) .

I did not implement the translation system myself so I don't know how
exactly you would apply to a bare GNU/Grub system. Our translation
documentation is here:
https://github.com/supergrub/supergrub/blob/master/TRANSLATION .
As far as I understand GNU/GRUB supports the use of PO files and by using
$"some text" you make that text translatable depending on the $lang
variable value.

Probably the GNU/GRUB documentation has a chapter on menues translation too.


2017-05-23 11:18 GMT+02:00 Pol Destroyerrocket :

> Hi everyone who's taking the time to read this.
>
> First I should say that this is just an idea and I haven't read the whole
> code yet
>
> The idea is to add a option to grub.cfg to select a language (default
> English USA) to change the text displayed on the default menu.
>
> I will start working​ actively on it when summer arrives, because I'm a
> student without any time for projects during the year.
>
> Any kind of help, documentation or advice will be appreciated​!
>
> Thank you for your time!
>
> Pol M.
>
> ___
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
>


-- 
Support free software. Donate to Super Grub Disk. Apoya el software libre.
Dona a Super Grub Disk. http://www.supergrubdisk.org/index.php?pid=10
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: grub-install deleting long UEFI entries bug ?

2017-04-23 Thread adrian15
El 23/04/17 a las 10:45, Andrei Borzenkov escribió:
> 23.04.2017 11:21, adrian15 adrian15 пишет:
>> 2017-04-23 6:36 GMT+02:00 Andrei Borzenkov <arvidj...@gmail.com>:
>>
>>> 23.04.2017 03:54, adrian15 пишет:
>>>> grub-install seems to be deleting long UEFI entries
>>>>
>>>> (*) What the bug is
>>>>
>>>> * Add an UEFI entry with this label (Remove the single quotes):
>>>>  '(Rescapp added) \EFI\ubuntu\MokManager.efi'
>>>>
>>>> Example:
>>>>
>>>> efibootmgr -c \
>>>>  -d /dev/sda \
>>>>  -p 2 \
>>>>  -L '(Rescapp added) \EFI\ubuntu\MokManager.efi' \
>>>>  -l '\EFI\ubuntu\MokManager.efi'
>>>>
>>>> * Run grub-install /dev/sda or maybe just grub-install
>>>>
>>>> I expect the newly added uefi entry to be there.
>>>> What I find is that the entry has been lost or deleted!
>>>>
>>>
>>> What is value of GRUB_DISTRIBUTOR in /etc/default/grub?
>>>
>>
>> After evaluating the bash expression the GRUB_DISTRIBUTOR value is Ubuntu.
>>
> 
> Yes, historically grub did case insensitive substring search. This
> probably is wrong, we should just take everything after boot number
> literally.

I see, like removing what you are about to add I guess.
The problem that I see is that efibootmgr output (even if --verbose
switch) it's not machine readable.

I guess efibootmgr itself would need an specific switch in order to
produce output suitable for scripts. Another option is include some of
the efibootmgr functionality/libraries into grub itself.

Maybe there's something on upstream's efibootmgr. Not a clue about that.
I have only checked Debian stretch's efibootmgr. I might ask about it in
debian-efi mailing list.

> ...
>> 1) First of all this matches all the line:
>>
>> if (!strcasestr (line, efi_distributor))
>> continue;
>>
>> That means that if you add a custom label which matches the efi distributor
>> then it gets removed. I think that's what happened to me. I would prefer
>> something more precise that would check the complete efi file path agains
>> e.g. EFI/vendor/ .
>>
>> 2) Then there's:
>>
>>   if (grub_memcmp (line, "Boot", sizeof ("Boot") - 1) != 0
>>  || line[sizeof ("Boot") - 1] < '0'
>>  || line[sizeof ("Boot") - 1] > '9')
>> continue;
>>
>> which might be wrong because of 0 and 9 and maybe not because of the array
>> indexes.
>>
>> Let's go into details about that.
>>
>> 2.1) Boot First entry
>> BootA000 Second entry
>>
>> Shouldn't the look for A to F hexadecimal letters too?
>>
> 
> Yes. Patches are welcome for both problems. Second one is actually bug
> fix so should be independent.
> 
>> And...

Well, I think just checking 0 to 9 in the first character is a good
compromise.

Some outputs have: BootCurrent . So 'BootC' can be found in e.g.
'BootC001' too. So that would be adding another problem because
'BootCurrent' would be considered as a right entry.

Just checking the first character leaves place for 16^3 = (2^4)^3
= 2 ^ (4 * 3 ) = 2 ^12 =  4096 .

That should be enough for most of the usecases.


>>
>> 2.2) line[sizeof ("Boot") - 1] < '0'
>>
>> Am I doing it right?
>>
>> sizeof ("Boot") = 4
>>
> 
> It is 5.
Ok, yes, sizeof is not length so... it shows what it takes to save it.
So... 4 bytes and the 'finish string byte' so that makes 5.


Well, I have finally decided not to put the full path to efi file and
only the basename of it. That will avoid custom entries being suddenly
removed by grub-install.

Thank you for your feedback.


adrian15
-- 
Support free software. Donate to Super Grub Disk. Apoya el software
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: grub-install deleting long UEFI entries bug ?

2017-04-23 Thread adrian15 adrian15
2017-04-23 6:36 GMT+02:00 Andrei Borzenkov <arvidj...@gmail.com>:

> 23.04.2017 03:54, adrian15 пишет:
> > grub-install seems to be deleting long UEFI entries
> >
> > (*) What the bug is
> >
> > * Add an UEFI entry with this label (Remove the single quotes):
> >  '(Rescapp added) \EFI\ubuntu\MokManager.efi'
> >
> > Example:
> >
> > efibootmgr -c \
> >  -d /dev/sda \
> >  -p 2 \
> >  -L '(Rescapp added) \EFI\ubuntu\MokManager.efi' \
> >  -l '\EFI\ubuntu\MokManager.efi'
> >
> > * Run grub-install /dev/sda or maybe just grub-install
> >
> > I expect the newly added uefi entry to be there.
> > What I find is that the entry has been lost or deleted!
> >
>
> What is value of GRUB_DISTRIBUTOR in /etc/default/grub?
>

After evaluating the bash expression the GRUB_DISTRIBUTOR value is Ubuntu.

> ...
> >
> > Maybe grub-install uses efibootmgr as an auxiliar tool and the problem
> > is in Ubuntu's efibootmgr?
> >
>
> Yes.
>

Yeah, I see it right in the source code. More to come.

>
> > It would be nice if someone could point us on where does grub-install
> > handles the uefi boot entries so that we can take a deeper look into it.
> >
>
> grub-core/osdep/unix/platform.c
>
Thank you.

I've taken a look at: grub-core/osdep/unix/platform.c file (on 2.02-rc2
tag) and I have some comments about it.

There's the function: grub_install_remove_efi_entries_by_distributor which
has some interesting snippets:

1) First of all this matches all the line:

if (!strcasestr (line, efi_distributor))
continue;

That means that if you add a custom label which matches the efi distributor
then it gets removed. I think that's what happened to me. I would prefer
something more precise that would check the complete efi file path agains
e.g. EFI/vendor/ .

2) Then there's:

  if (grub_memcmp (line, "Boot", sizeof ("Boot") - 1) != 0
 || line[sizeof ("Boot") - 1] < '0'
 || line[sizeof ("Boot") - 1] > '9')
continue;

which might be wrong because of 0 and 9 and maybe not because of the array
indexes.

Let's go into details about that.

2.1) Boot First entry
BootA000 Second entry

Shouldn't the look for A to F hexadecimal letters too?

And...

2.2) line[sizeof ("Boot") - 1] < '0'

Am I doing it right?

sizeof ("Boot") = 4

So it's line [4 - 1] and therefore: line [3] .
And as a consequence... line[3] = 't'.

line[3] is always going to be 't' when the first OR condition is not
true...so no need of the third or the fourth condition then.

Or is there  something about indexes or character size (unicode being
16bit?) that I am missing?



Thank you.

adrian15
-- 
Support free software. Donate to Super Grub Disk. Apoya el software libre.
Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/ .
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


grub-install deleting long UEFI entries bug ?

2017-04-22 Thread adrian15
grub-install seems to be deleting long UEFI entries

(*) What the bug is

* Add an UEFI entry with this label (Remove the single quotes):
 '(Rescapp added) \EFI\ubuntu\MokManager.efi'

Example:

efibootmgr -c \
 -d /dev/sda \
 -p 2 \
 -L '(Rescapp added) \EFI\ubuntu\MokManager.efi' \
 -l '\EFI\ubuntu\MokManager.efi'

* Run grub-install /dev/sda or maybe just grub-install

I expect the newly added uefi entry to be there.
What I find is that the entry has been lost or deleted!


(*) Exact version where is found

2.02~beta2-36ubuntu3.2 (Ubuntu 16.04's grub)

(*) Can be this replicated?

Can anyone replicate this is in upstream's git head?

Maybe is it a well known bug which was already fixed?


(*) Video of the bug

This is a video of the bug: https://www.youtube.com/watch?v=rhAg_ojj3VQ .

At 18 minutes 9 seconds I start to add an uefi entry.

At 21 minutes 3 seconds I run an option so that update-grub and
grub-install is run.

At 22 minutes 31 seconds I find the bug for the first time.

At 27 minutes 37 seconds I start to the debug the problem manually to
discard any of the Rescapp scripts being involved in the problem.

(*) What might be the problem.

I initially thought that the problem was because of '(', ')' or '\'
characters.

After additional tests there seems to be a problem with the length of
the UEFI boot entry.

Maybe grub-install uses efibootmgr as an auxiliar tool and the problem
is in Ubuntu's efibootmgr?

It would be nice if someone could point us on where does grub-install
handles the uefi boot entries so that we can take a deeper look into it.



Thank you!


adrian15
-- 
Support free software. Donate to Super Grub Disk. Apoya el software
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Super Grub2 Disk 2.02s8 released (GRUB 2.02~rc2)

2017-03-18 Thread adrian15
Super Grub2 Disk 2.02s8 has been released.
Downloads and more details here:
http://www.supergrubdisk.org/2017/03/18/super-grub2-disk-2-02s8-released/

Super Grub2 Disk is a live cd that helps you to boot into most any
Operating System (OS) even if you cannot boot into it by normal means.

At its core it uses GRUB 2.

This last version features GRUB 2.02~rc2 which was recently announced.

  You can test GRUB in many ways, installing it on your system might be
one of them. Probably it's the best one because you hardly use GRUB as
if it was a live cd/usb. But sometimes this is not possible.




  By the means of using Super Grub2 Disk, which it's a live cd/usb you
can easily test it and see if there are some problems on this version
without even touching your hard disk.

  You probably want to use the options:
* Boot manually...
* grub.cfg (GRUB2 configuration files)

to examine how GRUB 2.02~rc2 deals with your current grub.cfg file
compared to your current installed GRUB.




  Disclaimer: Although we use upstream GRUB sources at 2.02~rc2 git tag
as a base for building Super Grub2 Disk this should not be considered as
an official GRUB release. If you ever report a bug based on your Super
Grub2 Disk 2.02s8 experience please mention it just in case the problem
might arise because of different ./configure switches used.

  Note: In order to put Super Grub2 Disk image into a usb device use
'dd' command. Be aware that your usb device will be completely erased.
If you write the destination device where to write Super Grub2 Disk
device you might end up losing your internal hard disk content.

adrian15
-- 
Support free software. Donate to Super Grub Disk. Apoya el software
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Super Grub2 Disk 2.02s7 released (GRUB 2.02~rc1)

2017-02-17 Thread adrian15

Super Grub2 Disk 2.02s7 has been released.
Downloads and more details here: 
http://www.supergrubdisk.org/2017/02/17/super-grub2-disk-2-02s7-released/


Super Grub2 Disk is a live cd that helps you to boot into most any 
Operating System (OS) even if you cannot boot into it by normal means.


At its core it uses GRUB 2.

This last version features GRUB 2.02~rc1 which was recently announced.

  You can test GRUB in many ways, installing it on your system might be 
one of them. Probably it's the best one because you hardly use GRUB as 
if it was a live cd/usb. But sometimes this is not possible.





  By the means of using Super Grub2 Disk, which it's a live cd/usb you 
can easily test it and see if there are some problems on this version 
without even touching your hard disk.


  You probably want to use the options:
* Boot manually...
* grub.cfg (GRUB2 configuration files)

to examine how GRUB 2.02~rc1 deals with your current grub.cfg file 
compared to your current installed GRUB.





  Disclaimer: Although we use upstream GRUB sources at 2.02~rc1 git tag 
as a base for building Super Grub2 Disk this should not be considered as 
an official GRUB release. If you ever report a bug based on your Super 
Grub2 Disk 2.02s7 experience please mention it just in case the problem 
might arise because of different ./configure switches used.


  Note: In order to put Super Grub2 Disk image into a usb device use 
'dd' command. Be aware that your usb device will be completely erased.


adrian15
--
Support free software. Donate to Super Grub Disk. Apoya el software 
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Grub module to return partuuid of a device such as (hd0, gpt1) at boot time

2016-08-13 Thread adrian15

What's your use case?

adrian15

El 12/08/16 a las 16:11, Steve Kenton escribió:

As far as I can tell there is no search module that can be used to get
the partuuid at boot time given a grub root device such as (hd0,gtp1). I
think is would be a useful addition since the resulting partuuid could
be passed directly to the kernel as root=PARTUUID=xxx and it does not
seem like it should be hard to do. Am I missing something obvious? And,
before I jump end the deep end of the pool and try to write it, is
anyone else working on something similar?

Not subscribed, please cc me on reply.

Steve Kenton


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel



--
Support free software. Donate to Super Grub Disk. Apoya el software 
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: 2.02~beta3 release

2016-03-11 Thread adrian15

Super Grub2 Disk 2.02s4 which it's based on:

2.02~beta3

is available. More information at:

http://www.supergrubdisk.org/2016/03/11/super-grub2-disk-2-02s4-released/

.

Well, I usually don't make those announcements here but I wanted to let 
you know that I have told my users:


"
If Super Grub2 Disk 2.02s3 let you boot into your OS but Super Grub2 
Disk 2.02s4 does not let you boot into your OS please report it so that 
we can report it back to the grub team which tries to release a Grub 
2.02 stable release.

"

So, yes, hopefully someone will give us some feedback on regressions and 
we can pass it to you so that you can make a better rc1.


Thank you for hard work on Grub.

adrian15

El 28/02/16 a las 15:21, Vladimir 'φ-coder/phcoder' Serbinenko escribió:

Hello, all. I've just released 2.02~beta3. The goal of this release is
to chase bugs so that we can move to 2.02 release. So from now on if you
think that your patch should be included in 2.02 rather than in 2.03,
please add [2.02] to the beginning of your email subject

The tarball is available at
http://alpha.gnu.org/gnu/grub/grub-2.02~beta3.tar.xz
and signature at
http://alpha.gnu.org/gnu/grub/grub-2.02~beta3.tar.xz.sig

Signed with following fingerprint:
  E53D 497F 3FA4 2AD8 C9B4  D1E8 35A9 3B74 E82E 4209

It's also available as a signed tag grub-2.02-beta3 in official git
repository.

If you don't have xz support alternatively you may consider files
http://alpha.gnu.org/gnu/grub/grub-2.02~beta3.tar.xz
and signature at
http://alpha.gnu.org/gnu/grub/grub-2.02~beta3.tar.xz.sig
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel



--
Support free software. Donate to Super Grub Disk. Apoya el software 
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Does grub-mkrescue support UEFI hybrid USB/DVD images?

2015-01-25 Thread adrian15

El 25/01/15 a las 09:03, adrian15 escribió:

El 24/01/15 a las 01:12, adrian15 escribió:

El 22/01/15 a las 22:25, Kris Moore escribió:


Hey all,

We are trying to create hybrid USB/DVD images, and they work just fine
on BIOS. However it doesn't seem to work when creating UEFI.

We are using the following:

# grub-mkrescue -d /usr/local/lib/grub/x86_64-efi -o outfile dir
-- -volid OURLABEL

This image does boot UEFI via DVD, but when copied to a USB stick with
dd it fails to boot with the following:


   Hi,

   I'm going to describe what I use for making a USB/CDROM EFI/x86
hybrid image for building SG2D (An improved Grub2 Disk).

   But my question (after reading other replies to this question) is why
Grub2 should be patched for what he wants ? Is it a non standard EFI
boot maybe?

   Thank you.

   Debian way
   ==


I just wanted to say that recipe does not produce an image that can be
booted from UEFI hard disk.

I had assumed all this time that it worked (I only tested the EFI CDROM
boot) because if you read it here:

https://www.gnu.org/software/grub/manual/html_node/Making-a-GRUB-bootable-CD_002dROM.html#Making-a-GRUB-bootable-CD_002dROM



grub-mkrescue -o grub.iso iso
This produces a file named grub.iso, which then can be burned into a CD
(or a DVD), or written to a USB mass storage device.

So, if I'm not mistaken that's not true when you boot from EFI (Well, I
know that you are fixing it on this thread).

adrian15


(Hopefully I'm not creating new threads when replying)

I had only tested 2.00 version (Where the hard disk is not detected as 
an EFI boot at all). My 2.02 version from GIT (old commit 
bac5d1a64ab4191058a8fd4c05f6b3b339e249e7) gives the same result as the OP:


error: disk `' not found.
Entering rescue mode...
grub rescue

So I'll try the suggested patch and reply to the email which announced 
it so that you can get more than one feedback from it.


I guess that in grub 2.02 you made sure that image produced from 
grub-mkrescue would boot from UEFI hard disk but somehow somewhere a 
regression was introduced.



In any case anyone is wondering I have made my UEFI boot tests thanks to:
kvm -bios /usr/share/ovmf/OVMF.fd -boot c -hda 
super_grub2_disk_hybrid_2.02s1-beta1.iso


adrian15
--
Support free software. Donate to Super Grub Disk. Apoya el software 
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Does grub-mkrescue support UEFI hybrid USB/DVD images?

2015-01-25 Thread adrian15

El 24/01/15 a las 01:12, adrian15 escribió:

El 22/01/15 a las 22:25, Kris Moore escribió:


Hey all,

We are trying to create hybrid USB/DVD images, and they work just fine
on BIOS. However it doesn't seem to work when creating UEFI.

We are using the following:

# grub-mkrescue -d /usr/local/lib/grub/x86_64-efi -o outfile dir
-- -volid OURLABEL

This image does boot UEFI via DVD, but when copied to a USB stick with
dd it fails to boot with the following:


   Hi,

   I'm going to describe what I use for making a USB/CDROM EFI/x86
hybrid image for building SG2D (An improved Grub2 Disk).

   But my question (after reading other replies to this question) is why
Grub2 should be patched for what he wants ? Is it a non standard EFI
boot maybe?

   Thank you.

   Debian way
   ==


I just wanted to say that recipe does not produce an image that can be 
booted from UEFI hard disk.


I had assumed all this time that it worked (I only tested the EFI CDROM 
boot) because if you read it here:


https://www.gnu.org/software/grub/manual/html_node/Making-a-GRUB-bootable-CD_002dROM.html#Making-a-GRUB-bootable-CD_002dROM


grub-mkrescue -o grub.iso iso
This produces a file named grub.iso, which then can be burned into a CD 
(or a DVD), or written to a USB mass storage device.


So, if I'm not mistaken that's not true when you boot from EFI (Well, I 
know that you are fixing it on this thread).


adrian15
--
Support free software. Donate to Super Grub Disk. Apoya el software 
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Does grub-mkrescue support UEFI hybrid USB/DVD images?

2015-01-25 Thread adrian15

El 25/01/15 a las 09:15, adrian15 escribió:

El 25/01/15 a las 09:03, adrian15 escribió:

El 24/01/15 a las 01:12, adrian15 escribió:

El 22/01/15 a las 22:25, Kris Moore escribió:



(Hopefully I'm not creating new threads when replying)

I had only tested 2.00 version (Where the hard disk is not detected as
an EFI boot at all). My 2.02 version from GIT (old commit
bac5d1a64ab4191058a8fd4c05f6b3b339e249e7) gives the same result as the OP:

error: disk `' not found.
Entering rescue mode...
grub rescue

So I'll try the suggested patch and reply to the email which announced
it so that you can get more than one feedback from it.

I guess that in grub 2.02 you made sure that image produced from
grub-mkrescue would boot from UEFI hard disk but somehow somewhere a
regression was introduced.


In any case anyone is wondering I have made my UEFI boot tests thanks to:
kvm -bios /usr/share/ovmf/OVMF.fd -boot c -hda
super_grub2_disk_hybrid_2.02s1-beta1.iso

adrian15


I confirm you that using current GIT head as a base (commit 
dd430afbf874f6212742c079d72b4b9e959e0542) my steps for making 
two-dimensional hybrid disk (Both CDROM / Harddisk and BIOS / EFI) seem 
to work ok.


So I confirm that you have succesfully fixed the problem about grub 
rescue not finding grub device which the OP reported.


I paste here my steps here again (I know the steps can be improved).

How do I build and prepare my system

Make sure no Debian grub package is found in chroot

apt-get remove '.grub.'
Grub2 (efi+pc)) Build and installation

# Make sure we are testing the right revision
mkdir grub_upstream
cd grub_upstream
git clone git://git.savannah.gnu.org/grub.git .
git checkout COMMIT-TO-TEST
# Remove any non git related file - BEGIN
git reset --hard
git clean -f -d
git clean -f -x -d

# Remove any non git related file - END
# Build efi based grub and install it - BEGIN
./autogen.sh  ./configure --enable-grub-mkfont --with-platform=efi  make
# Dont forget to delete any rest of previous installation - BEGIN
sudo rm -rf /usr/local/etc/grub.d/ /usr/local/bin/grub-* 
/usr/local/share/grub/

# Dont forget to delete any rest of previous installation - END
sudo make install
# Build efi based grub and install it - END
make clean # Prepare for next build
./configure --enable-grub-mkfont --with-platform=pc  make # Prepare 
for a i386 build

sudo make install # Install i386 build

Super Grub2 Disk build
--
sudo grub-mkrescue --output=/tmp/test1.iso

--
Support free software. Donate to Super Grub Disk. Apoya el software 
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Does grub-mkrescue support UEFI hybrid USB/DVD images?

2015-01-23 Thread adrian15

El 22/01/15 a las 22:25, Kris Moore escribió:


Hey all,

We are trying to create hybrid USB/DVD images, and they work just fine
on BIOS. However it doesn't seem to work when creating UEFI.

We are using the following:

# grub-mkrescue -d /usr/local/lib/grub/x86_64-efi -o outfile dir
-- -volid OURLABEL

This image does boot UEFI via DVD, but when copied to a USB stick with
dd it fails to boot with the following:


  Hi,

  I'm going to describe what I use for making a USB/CDROM EFI/x86 
hybrid image for building SG2D (An improved Grub2 Disk).


  But my question (after reading other replies to this question) is why 
Grub2 should be patched for what he wants ? Is it a non standard EFI 
boot maybe?


  Thank you.

  Debian way
  ==

Install these two packages:

grub-efi-amd64-bin
grub-pc-bin

Run:

grub-mkrescue -o ./my_grub.iso

  Upstream way (I actually want to ask here if this recipe could be 
improved, but that would be probably need another email thread)

  

Make sure no Debian grub package is found in chroot

apt-get remove '.grub.'
Grub2 (efi+pc)) Build and installation

# Make sure we are testing the right revision
mkdir grub_upstream
cd grub_upstream
git clone git://git.savannah.gnu.org/grub.git .
git checkout COMMIT-TO-TEST
# Remove any non git related file - BEGIN
git reset --hard
git clean -f -d
git clean -f -x -d

# Remove any non git related file - END
# Build efi based grub and install it - BEGIN
./autogen.sh  ./configure --enable-grub-mkfont --with-platform=efi  make
# Dont forget to delete any rest of previous installation - BEGIN
sudo rm -rf /usr/local/etc/grub.d/ /usr/local/bin/grub-* 
/usr/local/share/grub/

# Dont forget to delete any rest of previous installation - END
sudo make install
# Build efi based grub and install it - END
make clean # Prepare for next build
./configure --enable-grub-mkfont --with-platform=pc  make # Prepare 
for a i386 build

sudo make install # Install i386 build

TL;DR: Make sure no Grub Debian package is installed, install grub 
twice, one configured for x86, the other one configured for efi. Then 
grub-mkrescue detects both modules and adds to the final image which by 
default is ISO/USB hybrid.


By the way. I was told how to build the image without doing make install 
(thus not having to remove any Debian Grub package) so I might re-adapt 
this recipe in the future.


grub-mkrescue -o ./my_grub.iso

adrian15
--
Support free software. Donate to Super Grub Disk. Apoya el software 
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Chainloadig from grub2 to isolinux

2014-08-07 Thread adrian15

El 07/08/14 16:52, Beeblebrox escribió:

If you use loopback.cfg as intended it will all work.

loopback.cfg contains the linux/initrd entries relevant to each distro's iso 
(or at least that's what the wiki page shows). That's exactly the problem - 
each iso has different settings for linux/initrd entries, and if you get them 
wrong, it really does not matter what file the entry was placed in.

Also as confirmed by ben, it's apparently not going to work on a number of 
Debian-based iso's. Usually the solution is to include casper in the CD to make 
this happen AFAIK.


  As part of us releasing Rescatux as an isolinux based distro (before 
it was a super grub2 disk (or grub2) based distro) I am supposed to work 
with Debian Live people so that any Debian live cd has a default working 
loopback.cfg file.


  Not sure if I'm going to do it in the next Rescatux stable release 
but definitively is in my TODO list.


  Probably the most intelligent workaround for this problem is doing an 
isolinux.cfg, pxelinux.cfg or syslinux.cfg parser for grub2 in a similar 
way to the menu.lst parser.


  As pxelinux.cfg has now some submenues I'm not sure that would work 
too good. I, personally, don't think it's worth the effort to implement 
such a parser but if you want it so much please implement it.


  I, personally, going to advocate for the loopback.cfg method.

adrian15
--
Support free software. Donate to Super Grub Disk. Apoya el software 
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Trying to build Rescue image for three different target and platform

2014-03-16 Thread adrian15

El 16/03/14 08:04, Andrey Borzenkov escribió:

В Sun, 16 Mar 2014 06:56:46 +0100
adrian15 adrian15...@gmail.com пишет:



To be honest, I do not understand what you are trying to do here.


The same thing as in:

https://forja.cenatic.es/plugins/scmgit/cgi-bin/gitweb.cgi?p=supergrub2/supergrub2.git;a=blob_plain;f=supergrub-meta-mkrescue;hb=22683e2b5fa0d65141c1be1a7487914b1d43f4dd

(which uses Debian packages) but using source code.



Why would you want to build separate ISO for every platform? The whole
point of using grub-mkrescue is to create single ISO image that
supports and can be booted on all platforms.


Because I want to support all the GRUB2 platforms but not having a 
single 60 MB (random size guess) download for that.


The other reason is because a: i386-efi + x86_64_efi + x86_pc hybrid did 
not boot in a x86_64_efi only system. Right now I'm not sure if I built 
it from source or if I made the iso with Debian binaries but, what it's 
sure is that it did not boot at all. It just hung.


So I want a separate ISO for every platform.






8) What's the best way to build and install an hybrid system that
includes both: x86_64_efi and i386 - pc stuff?



Just built and install grub for each platform you want to use;
grub-mkrescue will automatically include every platform it finds.


Any advice for the special where I want to build x86_64_efi + x86_pc
hybrid disk?



Not really. Just build and install both platforms using the same prefix
and run grub-mkrescue that is build to use the same prefix.

Ok.


As mentioned, when building you should distinguish between host (grub
utils) and target (boot time). It is perfectly valid to build utils for
x86 and target for ARM as long as you have suitable cross tools. In
your case all builds should use the same host (which defaults to target
which may be wrong even for x86 case - consider 32 vs. 64 bit).

See INSTALL how to set various options for each environment.

Ok,I'll check that.




I prefer to build every platform in separate directory, there were
issues with incomplete cleanup. If you hit one, please report.


Well, as I don't want to have a separate directory for each build my
question would be:

What is it the official commands for doing a safe cleanup?



I always used make distclean. But IIRC there are some files that are
not removed. Not sure to which extent they affect subsequent builds. I
had problems when re-building on Windows but they should be fixed now.

 From my point of view, make distclean is official and if it does not
work it is a bug that has to be fixed.


make distclean . Written down.








9) A) What's the best way to remove grub configuration files installed
on the system so that I can start from scratch so that already built
target+platform grub binaries or configurations are ignored?



There are no configuration files after make install (if we do not
count /etc/grub.d as configuration).


I meant the ones that someone makes grub-mkrescue to look for the
/usr/local/lib/grub/i386-pc/boot_hybrid.img files which I suppose are
not found in source code but in the system (Gnu/Linux filesystem I mean).



There are no special configuration files. If grub-mkrescue is called
without --directory option, it will enumerate all platforms found
under /usr/local/lib/grub (in your example). Just place additional
platform directory there and grub-mkrescue will pick it up.


So I just need to purge the /usr/local/lib/grub contents so that I can 
start again without the fear of grub-mkrescue picking up an earlier 
built platform (That's what I tried to achieve before with make 
uninstall by the way).


That's exactly what I wanted to know.


Thank you very much!

I do not know when I will be able to try all of this but now it's much 
more clear everything and I'll be able to report GRUB build errors (or 
runtime) more easily for my special use case.


adrian15
--
Support free software. Donate to Super Grub Disk. Apoya el software 
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: How to deal with fatal device seeks?

2014-03-16 Thread adrian15


I'm getting the same problem
( FATAL: int13_cdrom: function 42. Can't use 64bits lba )

with hd0, hd1, hd2, hd3, and worse:

* hd2,msdos5

ls (hd2,msdos5)/

Is this a bug?

adrian15

El 16/03/14 06:26, adrian15 escribió:

   I use a for loop for detecting Operating systems like this one:

for dev in (*); do

   echo $dev

done

but it hangs !!!

So some clues:

* Using 2.02~beta2-7 from Debian Unstable.
* The disk is an hybrid one (x86_64_efi + i386_pc).
* The error only happens when using Virtualbox in a non-EFI setup.

So some questions:

* Is it a bug that a non seekable device like (cd,apple4) or (cd,gpt1)
is available in non-EFI mode?
* Is it perhaps a Virtualbox bug?
* I cannot catch these fatal error as if they were exceptions inside a
try-catch. Or can I?

I will probably improve my searchindevices functions so that it also
filters these (cdsomething) devices as a workaround.

Thank you.


These are the minimal tests:

--- Using Qemu as EFI gives no problem:

echo (*)
(fd0) ... (cd) ... (cd,apple2),... (cd,gpt2)
ls (cd,apple4)/
error: unknown filesystem.
ls (cd,gpt1)/
error: unknown filesystem.

--- Using Virtualbox as BIOS (Ex. 1) (Problem):

echo (*)
(fd0) ... (cd) ... (cd,apple2),... (cd,gpt2)
ls (cd,apple4)/
FATAL: int13_cdrom: function 42. Can't use 64bits lba

--- Using Virtualbox as BIOS (Ex. 2) (No problem):

echo (*)
(fd0) ... (cd) ... (cd,apple2),... (cd,gpt2)
ls (cd,gpt4)/
error: unknown filesystem.

--- Using Virtualbox as BIOS (Ex. 3) (Problem):

echo (*)
(fd0) ... (cd) ... (cd,apple2),... (cd,gpt2)
ls (cd,gpt1)/
FATAL: int13_cdrom: function 42. Can't use 64bits lba


adrian15


--
Support free software. Donate to Super Grub Disk. Apoya el software 
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: How to deal with fatal device seeks?

2014-03-16 Thread adrian15

El 16/03/14 17:43, Andrey Borzenkov escribió:

В Sun, 16 Mar 2014 17:05:53 +0100
adrian15 adrian15...@gmail.com пишет:



I'm getting the same problem
( FATAL: int13_cdrom: function 42. Can't use 64bits lba )



This message does not exist in grub sources, so it likely comes from
firmware. 64 bit LBA would mean size over 2TB. So the first question -
what size of disks do you have?


SATA 0: 200 GB (Windows 7)
SATA 1: 1 GB (Rescatux USB. E.g. Grub mkrescue disk)
SATA 2: 20 GB (SteamOS E.g. Debian)




with hd0, hd1, hd2, hd3, and worse:

* hd2,msdos5

ls (hd2,msdos5)/

Is this a bug?



Hard to tell. Do you actually have working filesystem(s) on these
partitions? The message itself simply means that grub attempts to read
very high offset. I wonder if it can be somehow byte order related.


From GRUB point of view:

* (hd2,msdos1) is Gnu/Linux root filesystem
* (hd2,msdos2) No such partition
* (hd2,msdos3) No such partition
* (hd2,msdos4) No such partition
* (hd2,msdos5) FATAL: int13_cdrom: function 42. Can't use 64bits lba

From GNU/Linux point of view:

Disk /dev/sdc: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders, total 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00068a9f

   Device Boot  Start End  Blocks   Id  System
/dev/sdc1   *20484013670320067328   83  Linux
/dev/sdc24013875041940991  9011215  Extended
/dev/sdc54013875241940991  901120   82  Linux swap / Solaris


If I try:

ls (hd2,msdos5)/

from a 2.00-15 system mkrescue image (Super Grub2 Disk 2.00s1-beta6) I get:

error: unknown filesystem.

So, it's ok, because it is not a fatal error.
It would seem that somewhere between 2.00-15 and 2.02~beta2-7 (Debian 
version) the bug arises.


Or maybe the error was before because grub did actually to arise a FATAL 
error and it didn't.



Thank you for any indication on how to make more tests.

adrian15
--
Support free software. Donate to Super Grub Disk. Apoya el software 
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: How to deal with fatal device seeks?

2014-03-16 Thread adrian15

El 16/03/14 18:16, adrian15 escribió:

If I try:

ls (hd2,msdos5)/

from a 2.00-15 system mkrescue image (Super Grub2 Disk 2.00s1-beta6) I get:

error: unknown filesystem.

So, it's ok, because it is not a fatal error.
It would seem that somewhere between 2.00-15 and 2.02~beta2-7 (Debian
version) the bug arises.

Or maybe the error was before because grub did actually to arise a FATAL
error and it didn't.


2.00-22 does not have the error.

So it narrows the search between 2.00-22 and 2.02~beta2-7.

adrian15


Thank you for any indication on how to make more tests.

adrian15


--
Support free software. Donate to Super Grub Disk. Apoya el software 
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: How to deal with fatal device seeks?

2014-03-16 Thread adrian15
I have digged the git log for partition related commits just in case you 
might think that they have something to do with my problem


(From 2.00 release to current head on master branch).

I have tried to filter them. So I have removed the ones related with 
strange table partitions or emulation code.


Here there are the commits:

http://git.savannah.gnu.org/cgit/grub.git/commit/?id=e88f0420b90c2565637962754cc26fa8a4ed9256
http://git.savannah.gnu.org/cgit/grub.git/commit/?id=4bad23a15fc129218f611f51dcb268c246b207f1
http://git.savannah.gnu.org/cgit/grub.git/commit/?id=25fc51a87929262c1cc132bc29cc083ce98f0e0e
http://git.savannah.gnu.org/cgit/grub.git/commit/?id=df6da5a52dc2ec424203c0f8001903435b177fa8
http://git.savannah.gnu.org/cgit/grub.git/commit/?id=b7b78edb1ca05f30dd07ebed4bcb3d5a39aa5358
http://git.savannah.gnu.org/cgit/grub.git/commit/?id=258f43b7d7bf4b03799b6cd3004b5372e082d01b
http://git.savannah.gnu.org/cgit/grub.git/commit/?id=86d08fdb18b0142c1ce1b95db1aae989502956c5


Just hope that you, that deal with GRUB source code every day, can find 
what might be the faulty commit so that I can test that the special 
commit source code and reproduce it (or not to reproduce it).


Thank you for any idea!

adrian15

El 16/03/14 19:05, adrian15 escribió:

El 16/03/14 18:16, adrian15 escribió:

If I try:

ls (hd2,msdos5)/

from a 2.00-15 system mkrescue image (Super Grub2 Disk 2.00s1-beta6) I
get:

error: unknown filesystem.

So, it's ok, because it is not a fatal error.
It would seem that somewhere between 2.00-15 and 2.02~beta2-7 (Debian
version) the bug arises.

Or maybe the error was before because grub did actually to arise a FATAL
error and it didn't.


2.00-22 does not have the error.

So it narrows the search between 2.00-22 and 2.02~beta2-7.

adrian15


Thank you for any indication on how to make more tests.

adrian15




--
Support free software. Donate to Super Grub Disk. Apoya el software 
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


How one is supposed to write kind-of-library cfg files?

2014-03-15 Thread adrian15

( Using 2.02~beta2-7 from Debian Unstable  )

  I have tried to write some cfg files to kind of organise them as 
libraries but it does not work as expected.


  It seems as the sourced cfg files are being interpreted.


  Here below you will find the overall idea in an theoric example.
Attached you will find an actual code (although you are missing some 
pieces from Super Grub2 Disk).



When selecting the Boot manually... submenu (not when trying to run 
one of their options) I am getting these errors:


BEGIN

error: syntax error
error: Incorrect command.
error: syntax error
error: Incorrect command.
error: syntax error
error: syntax error
error: Incorrect command.
error: syntax error
error: can't find command `searchindevice'
FATAL: int13_cdrom: function 42. Can't use 64bits lba

END

searchindevice is a function which it's sourced in main.cfg so it should 
be detected ok.


But anyways... the run_option function is being interpreted while I do 
not want it !!!


I have also tried to replace source command by extract_entries_source. I 
get different output but the same problem, the sourced file is being 
interpreted (I mean it is being run).


Thank you.


### caller.cfg

function process_option {

  set option_cfg=${1}
  source ${option_cfg}
  menuentry ${option_title} {
source ${option_cfg}
run_option
  }

}

process_option ${prefix}/called.cfg
process_option ${prefix}/option2.cfg

### called.cfg

set option_title=My title



function run_option {

  function aux_lib {

  }

  function aux_lib2 {

  }

  aux_lib
  aux_lib2

  do_interesting_stuff

}


adrian15
--
Support free software. Donate to Super Grub Disk. Apoya el software 
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/
# Super Grub Disk Main Configuration file
# Copyright (C) 2009  Adrian Gibanel Lopez.
#
# Super Grub Disk is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Super Grub Disk is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB.  If not, see http://www.gnu.org/licenses/.

# Configure gfxterm, but allow it to be disabled by holding shift during boot.
# gfxterm is required to display non-ASCII translations.
loadfont $prefix/unifont.pf2
if keystatus --shift; then
  disable_gfxterm=true
  # export disable_gfxterm is needed so that the setting will persist even after
  # a configfile /boot/grub/main.cfg (which is what language_select.cfg does 
after
  # you select a new language)
  export disable_gfxterm

  # The following strings are intentionally not made translateable.
  echo It has been detected that the shift key was held down. Because of this 
SG2D
  echo will use VGA text mode rather than gfxterm. This will cause display 
problems
  echo when using some non-English translations.
  echo
  echo Press escape to continue to the main menu
  sleep --interruptible 
fi

if [ $disable_gfxterm != true ]; then
  insmod all_video
  gfxmode=640x480
  if terminal_output --append gfxterm; \
  then \
  terminal_output --remove console; \
  fi
fi

# Export the variables so that they persist when loading a new menu.
export menu_color_normal
export menu_color_highlight
export menu_color_background
export bwcolor

function set_sgd_colors {
  if [ $bwcolor = yes ]; then
menu_color_normal=white/black
menu_color_highlight=black/white
menu_color_background=black/white
  else
menu_color_normal=white/brown
menu_color_highlight=white/blue
menu_color_background=yellow/cyan
  fi
}

set_sgd_colors

# Set secondary_locale_dir to the directory containing SG2D specific mo files.
# This makes grub aware of translations for SG2D specific strings.
secondary_locale_dir=${prefix}/sgd_locale/

insmod part_acorn
insmod part_amiga
insmod part_apple
insmod part_bsd
insmod part_gpt
insmod part_msdos
insmod part_sun
insmod part_sunpc

# Prepare environment variables, needed mostly for update_paths()
export prefix_device prefix_path prefix_uuid
regexp -s prefix_device '^\((.*)\)/' $prefix
regexp -s prefix_path '^\(.*\)/(.*)$' $prefix
probe --fs-uuid --set=prefix_uuid $prefix_device

# Define a function for updating paths when device names change.
# search.mod is required for update-paths, and must be loaded before device
# names change because $prefix will be invalid.
insmod search

function update_paths {
  search --fs-uuid --set=prefix_device $prefix_uuid
  prefix=($prefix_device)/$prefix_path
}

function process_option {

  set option_cfg=$1
  source ${option_cfg}
  menuentry ${option_title} {
source ${option_cfg

Re: How one is supposed to write kind-of-library cfg files?

2014-03-15 Thread adrian15

El 16/03/14 04:49, adrian15 escribió:

( Using 2.02~beta2-7 from Debian Unstable  )

   I have tried to write some cfg files to kind of organise them as
libraries but it does not work as expected.

   It seems as the sourced cfg files are being interpreted.


I have managed to write a minimal working example. It would seem that 
the problem is having a function inside another function.



Is it perhaps not officially supported?

The problem happens when one selects: This is a submenu... .

error: syntax error
error: Incorrect command.
error: syntax error
...
can't find command thisisanunknowncommand
...
error: syntax error



Thank you.

### caller.cfg

function process_option {

  set option_cfg=$1
  source ${option_cfg}
  menuentry ${option_title} {
source ${option_cfg}
run_option
  }

}

menuentry $Languages... {
  configfile ${prefix}/language_select.cfg
}

submenu $This is a submenu... {

  process_option ${prefix}/called.cfg

}

menuentry $Everything {
  configfile ${prefix}/everything.cfg
}

 called.cfg

set option_title=$The called option

function run_option {

function freebsd_ufs_variants {
set device=$1
set fstype=$2
set uuid=$3

	menuentry ${finaloption_tab_str}FreeBSD ($fstype $device) (Default 
boot loader) $device $uuid {

set root=$2

kfreebsd /boot/loader
}
}

  thisisanunknowncommand
  menuentry menuinsideoption {
source ${prefix}/topbootmenu.cfg
set root=(hd0,0)
chainloader +1
  }

}



adrian15
--
Support free software. Donate to Super Grub Disk. Apoya el software 
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


How to deal with fatal device seeks?

2014-03-15 Thread adrian15

  I use a for loop for detecting Operating systems like this one:

for dev in (*); do

  echo $dev

done

but it hangs !!!

So some clues:

* Using 2.02~beta2-7 from Debian Unstable.
* The disk is an hybrid one (x86_64_efi + i386_pc).
* The error only happens when using Virtualbox in a non-EFI setup.

So some questions:

* Is it a bug that a non seekable device like (cd,apple4) or (cd,gpt1) 
is available in non-EFI mode?

* Is it perhaps a Virtualbox bug?
* I cannot catch these fatal error as if they were exceptions inside a 
try-catch. Or can I?


I will probably improve my searchindevices functions so that it also 
filters these (cdsomething) devices as a workaround.


Thank you.


These are the minimal tests:

--- Using Qemu as EFI gives no problem:

echo (*)
(fd0) ... (cd) ... (cd,apple2),... (cd,gpt2)
ls (cd,apple4)/
error: unknown filesystem.
ls (cd,gpt1)/
error: unknown filesystem.

--- Using Virtualbox as BIOS (Ex. 1) (Problem):

echo (*)
(fd0) ... (cd) ... (cd,apple2),... (cd,gpt2)
ls (cd,apple4)/
FATAL: int13_cdrom: function 42. Can't use 64bits lba

--- Using Virtualbox as BIOS (Ex. 2) (No problem):

echo (*)
(fd0) ... (cd) ... (cd,apple2),... (cd,gpt2)
ls (cd,gpt4)/
error: unknown filesystem.

--- Using Virtualbox as BIOS (Ex. 3) (Problem):

echo (*)
(fd0) ... (cd) ... (cd,apple2),... (cd,gpt2)
ls (cd,gpt1)/
FATAL: int13_cdrom: function 42. Can't use 64bits lba


adrian15
--
Support free software. Donate to Super Grub Disk. Apoya el software 
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Trying to build Rescue image for three different target and platform

2014-03-15 Thread adrian15



El 13/03/14 06:51, Andrey Borzenkov escribió:

В Sun, 09 Mar 2014 17:14:04 +0100
adrian15 adrian15...@gmail.com пишет:


Basically what I want to do is to use grub-mkrescue to generate a grub2
rescue disk with some custom files (The Super Grub2 Disk stuff).

However I want to build different files depending on target+platform
combination.

My four combinations are:

  * (Hybrid) x86_64+efi and i386+pc
  * i386 - pc
  * x86_64 - efi
  * i386 - efi


3) x86_64_efi build is working. Basically what I run in the src dir is:

sudo rm -rf /usr/local/share/grub
sudo rm -rf /usr/local/lib/grub
make clean
make distclean
bash linguas.sh
bash autogen.sh
./configure --target=i386 --with-platform=efi  make  sudo make
uninstall
make clean
make distclean
./configure --target=i386 --with-platform=pc  make  sudo make
uninstall
make clean
make distclean
./configure --target=x86_64 --with-platform=efi  make  sudo make
uninstall
make clean
make distclean
make clean
make distclean
bash linguas.sh
bash autogen.sh
./configure --target=x86_64 --with-platform=efi  make  sudo make
install



To be honest, I do not understand what you are trying to do here.


The same thing as in:

https://forja.cenatic.es/plugins/scmgit/cgi-bin/gitweb.cgi?p=supergrub2/supergrub2.git;a=blob_plain;f=supergrub-meta-mkrescue;hb=22683e2b5fa0d65141c1be1a7487914b1d43f4dd

(which uses Debian packages) but using source code.




6) When I build i386 - pc I get this error:

xorriso : FAILURE : Given path does not exist on disk: -boot_image
system_area='/usr/local/lib/grub/i386-pc/boot_hybrid.img'

Why is it failing to create /usr/local/lib/grub/i386-pc/boot_hybrid.img
file?



This file should be built and installed on 386-pc platform. If not
either there is a bug, or you are doing something wrong. It is hard to
tell, you are doing so many steps ...


I see.


8) What's the best way to build and install an hybrid system that
includes both: x86_64_efi and i386 - pc stuff?



Just built and install grub for each platform you want to use;
grub-mkrescue will automatically include every platform it finds.


Any advice for the special where I want to build x86_64_efi + x86_pc 
hybrid disk?





Current code is:

./configure --target=i386 --with-platform=pc  make  sudo make install
make clean
make distclean
./configure --target=x86_64 --with-platform=efi  make  sudo make
install



It is better to explicitly force host platform with --host= to make
sure user space is always the same. Otherwise it should be fine.


Ok, I'll check that.



I prefer to build every platform in separate directory, there were
issues with incomplete cleanup. If you hit one, please report.


Well, as I don't want to have a separate directory for each build my 
question would be:


What is it the official commands for doing a safe cleanup?





9) A) What's the best way to remove grub configuration files installed
on the system so that I can start from scratch so that already built
target+platform grub binaries or configurations are ignored?



There are no configuration files after make install (if we do not
count /etc/grub.d as configuration).


I meant the ones that someone makes grub-mkrescue to look for the 
/usr/local/lib/grub/i386-pc/boot_hybrid.img files which I suppose are 
not found in source code but in the system (Gnu/Linux filesystem I mean).


Hope it's a bit more clear what I mean.

Thank you.

adrian15
--
Support free software. Donate to Super Grub Disk. Apoya el software 
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Trying to build Rescue image for three different target and platform

2014-03-09 Thread adrian15
Basically what I want to do is to use grub-mkrescue to generate a grub2 
rescue disk with some custom files (The Super Grub2 Disk stuff).


However I want to build different files depending on target+platform 
combination.


My four combinations are:

* (Hybrid) x86_64+efi and i386+pc
* i386 - pc
* x86_64 - efi
* i386 - efi

More about this setup.

1) As an initial setup I work with a Debian Unstable Sid Chroot amd64 as 
described in:

http://www.supergrubdisk.org/wiki/Super_Grub2_Disk_Sid_Chroot#Introduction
2) I use Debian's Grub2 source code so that I do not have to deal 
manually with dependencies. That's explained here: 
http://www.supergrubdisk.org/wiki/Super_Grub2_Disk_Sid_Chroot_Grub2_Build_And_Installation 
(just before Hybrid build section).


3) x86_64_efi build is working. Basically what I run in the src dir is:

  sudo rm -rf /usr/local/share/grub
  sudo rm -rf /usr/local/lib/grub
  make clean
  make distclean
  bash linguas.sh
  bash autogen.sh
  ./configure --target=i386 --with-platform=efi  make  sudo make 
uninstall

  make clean
  make distclean
  ./configure --target=i386 --with-platform=pc  make  sudo make 
uninstall

  make clean
  make distclean
  ./configure --target=x86_64 --with-platform=efi  make  sudo make 
uninstall

  make clean
  make distclean
  make clean
  make distclean
  bash linguas.sh
  bash autogen.sh
  ./configure --target=x86_64 --with-platform=efi  make  sudo make 
install


And what I do for generating the file image is:

grub-mkrescue --output=super_grub2_disk_x86_64_efi_2.00s1-beta6.iso 
$(mktemp -d)


4) i386_pc build is not working. Basically what I run in the src dir is:

  sudo rm -rf /usr/local/share/grub
  sudo rm -rf /usr/local/lib/grub
  make clean
  make distclean
  bash linguas.sh
  bash autogen.sh
  ./configure --target=i386 --with-platform=efi  make  sudo make 
uninstall

  make clean
  make distclean
  ./configure --target=i386 --with-platform=pc  make  sudo make 
uninstall

  make clean
  make distclean
  ./configure --target=x86_64 --with-platform=efi  make  sudo make 
uninstall

  make clean
  make distclean
  make clean
  make distclean
  bash linguas.sh
  bash autogen.sh
  ./configure --target=i386 --with-platform=pc  make  sudo make install


And what I do for generating the file image is:

grub-mkrescue --output=super_grub2_disk_i386_pc_2.00s1-beta6.iso 
$(mktemp -d)


5) I attach the current helper scripts that I use.

supergrub-mkrescue : This is a very simple wrapper around: 
grub-mkrescue. You do not need to take care about it.


supergrub-meta-mkrescue : This is what I have explained above. This 
script assumes that you have setup your grub2 source code in:

/home/adrian/gnu/sgd/debian_grub2/grub2-2.00
and that supergrub-mkrescue script is found in the same folder as 
supergrub-meta-mkrescue.


Currently supergrub-meta-mkrescue has been modified so that it ends 
(Check the return 0 ; line) after building:


* x86_64_efi
and
* i386 - pc
.

6) When I build i386 - pc I get this error:

xorriso : FAILURE : Given path does not exist on disk: -boot_image 
system_area='/usr/local/lib/grub/i386-pc/boot_hybrid.img'


Why is it failing to create /usr/local/lib/grub/i386-pc/boot_hybrid.img 
file?


7) Is it useful that I insist on building an i386+efi release? Any 
machine system that uses it? Some old Mac-something hardware perhaps?


8) What's the best way to build and install an hybrid system that 
includes both: x86_64_efi and i386 - pc stuff?


Current code is:

  ./configure --target=i386 --with-platform=pc  make  sudo make install
  make clean
  make distclean
  ./configure --target=x86_64 --with-platform=efi  make  sudo make 
install


9) A) What's the best way to remove grub configuration files installed 
on the system so that I can start from scratch so that already built 
target+platform grub binaries or configurations are ignored?


B) That's what I try to do in clean_every_build function in 
supergrub-meta-mkrescue script but I do not think its an efficient way 
of doing it.


C) You know I would like to remove the rm -rf /usr/local/share/grub and 
rm -rf /usr/local/lib/grub lines (too weird) and just use the:


./configure ; make ; make uninstall part.

D) Which I do not know if could be re-written as:

./configure ; make uninstall

(Notice that there is not a make step).

Does removing the make default target call (make) breaks make 
uninstall functionality?


10) As a summary I basically want to build and install from upstream 
source code and then make one rescue disk for each one of these four 
combinations. (And make theses rescue diks in a row)


* (Hybrid) x86_64+efi and i386+pc
* i386 - pc
* x86_64 - efi
* i386 - efi

So... any help on this build automation process?

Thank you very much!


adrian15
--
Support free software. Donate to Super Grub Disk. Apoya el software 
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/donate/
#!/bin/bash -e
usage() {
cat EOF

  $0 -o=output.iso

Re: Some ideas about new features of grub

2009-08-23 Thread adrian15

Robert Millan escribió:

On Thu, Jul 02, 2009 at 04:48:56PM +0800, Bean wrote:

LUA integration.
LUA is quite powerful, it's more suitable to do complicated task than
sh script. For example, we can use it to detect os at runtime,
implement simple commands, or draw the graphic menu.


I feel similarly about LUA as I do about writable filesystems.  In fact I'm
considering a configure flag so that it's only enabled only when user
requests it.

But I know both Marco and Pavel feel strongly about this.  Please can you
comment?



I am against a configure flag (if configure is the one from configure, 
make, make install) but a configure flag (as something specified in 
grub.cfg) is ok.


adrian15
--
Support free software. Donate to Super Grub Disk. Apoya el software 
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/index.php?pid=10




___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: Grub2 LUA API?

2009-08-23 Thread adrian15

Bean escribió:

Hi,

You can use grub.enum_device, which pass the uuid to the callback
function, then you can store the device-uuid mapping in a table.

Thank you. I will check your advice.


If you're looking for source code, check out script/lua/grub_lib.c

I would have prefered documentation but source code is ok.

I will, of course, report back with more improvements/doubts on this 
subject.


Thank you again.

adrian15
--
Support free software. Donate to Super Grub Disk. Apoya el software 
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/index.php?pid=10




___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


os-detect lua space fix

2009-08-22 Thread adrian15
Here you a have a patch that fixes the error that osdetect.lua script 
had with spaces around the equals sign.


Now it does not complain when assigning the variable.

adrian15
--
Support free software. Donate to Super Grub Disk. Apoya el software 
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/index.php?pid=10
diff -urN original/osdetect.lua equals_space_fixed/osdetect.lua
--- original/osdetect.lua   2009-08-15 18:59:48.0 +0200
+++ equals_space_fixed/osdetect.lua 2009-08-22 17:33:52.0 +0200
@@ -156,7 +156,7 @@
local initrd
 
title = Linux  .. kernels[i]
-   source = set root =  .. device ..
+   source = set root= .. device ..
  \nlinux /boot/ .. kernelnames[i] ..
   root=UUID= ..   ro
 
___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


os-detect lua uuid fix

2009-08-22 Thread adrian15

Here you a have a patch that fixes the error that osdetect.lua script
had uuid not being set.

Now the linux kernel does not complain about not finding root device.

The only problem that this patch has is that is made with grub shell in 
mind instead of lua.


I suppose that we can do the same thing but getting the uuid values from 
lua script itself. If I am able to do so I will also send a patch for it.


adrian15
--
Support free software. Donate to Super Grub Disk. Apoya el software
libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/index.php?pid=10

diff -urN original/osdetect.lua uuid_fix/osdetect.lua
--- original/osdetect.lua   2009-08-22 17:42:43.0 +0200
+++ uuid_fix/osdetect.lua   2009-08-22 18:23:12.0 +0200
@@ -156,9 +156,11 @@
local initrd
 
title = Linux  .. kernels[i]
+   uuid_setup = search --set=sgd_linux_kernel -f /boot/ .. 
kernelnames[i] .. \n
+   uuid_set = probe -u ($sgd_linux_kernel) --set=sgd_root_uuid .. \n
source = set root= .. device ..
  \nlinux /boot/ .. kernelnames[i] ..
-  root=UUID= ..   ro
+  root=UUID= .. $sgd_root_uuid ..   ro
 
if grub.file_exist (root .. boot/initrd- ..
kernels[i] .. .img) then
@@ -171,7 +173,7 @@
  initrd = 
end
 
-   grub.add_menu (source .. initrd, title)
+   grub.add_menu (uuid_setup .. uuid_set .. source .. initrd, title)
grub.add_menu (source ..  single .. initrd,
   title ..  (single-user mode))
   end
___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Osprober lua script problems when setting root

2009-08-20 Thread adrian15 adrian15
Hi Grub-devel,

 I have built a custom grub2-based cdrom (I am using grub2 from
debian unstable) that uses osdetect.lua which I have fetched from
phcoder git two or  three days ago.
I have an Ubuntu 9.04 installation in my Virtualbox test machine.
After running the AUTO MAGIC BOOT which actually sources
$prefix/osdetect.lua I get an entry called:
Linux 2.6.28-11-generic.

Its content is:
set root = hd0,1
linux /boot/vmlinuz-2.6.28-11-generic root=UUID= ro
initrd /boot/initrd.img-2.6.28-11-generic

When booting the entry I get:  error: not an assignment.

The first bug is that error message seems not meaningful to me.
The second bug is that it seems that the set root line should not have
spaces around the equals sign.
So it should have produced: set root=hd0,1.

Or is it maybe that Debian's grub2 is not updated enough to allow
spaces around the equals sign and svn version it is?

Thank you for you attention.

phcoder, whenever the bug is fixed can you please send me a download
url for the updated file? Thank you.

adrian15
-- 
Support free software. Donate to Super Grub Disk. Apoya el software
libre. Dona a Super Grub Disk.
http://www.supergrubdisk.org/index.php?pid=10


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Are you going to Debconf9?

2009-07-12 Thread adrian15 adrian15
Hi,

I am adrian15 from Super Grub Disk. I have been quite for a while.
I was asking myself if some of you are going to Debconf.

I won't mind meeting some of you and learning about grub2 (I am a bit
outdated) and maybe try to code some lines.

Or just meet someone like _x86, marco_g or nyu face to face.

http://debconf9.debconf.org/index.xhtml.en

Debian Conference is the annual Debian developers meeting, an event
filled with coding parties, discussions and workshops - all of them
highly technical in nature. It will be held in Cáceres, Extremadura,
Spain, from July 23 to 30, 2009.

Thank you.

adrian15
-- 
Support free software. Donate to Super Grub Disk. Apoya el software
libre. Dona a Super Grub Disk.
http://www.supergrubdisk.org/index.php?pid=10


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: HOWTO needed: how to add my own module to making list?

2007-11-15 Thread adrian15

Oleg Strikov wrote:


Thank you for your attention, but ive got ruby already :(
ruby --version
ruby 1.8.6 (2007-03-13 patchlevel 0) [i486-linux]


That's what I thought myself when I first programmed in grub2 and it was 
true but grub2 development tools did not use ruby.


If you type ruby does it says command not found or not ?

You might need to create a link name ruby to the ruby1.8 executable 
found probably at /bin folder.


adrian15


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: echo gives internal error with \n

2007-08-03 Thread adrian15

Marco Gerards escribió:

adrian15 [EMAIL PROTECTED] writes:


  I've activated the echo command (also the pause command) which it is
equivalent to the echo command... and have done some tests:


The problem is in the parser.

I see.

Two conclusions from these tests:

1) When you use \n in string that does not begin with  then it gives an
internal error. I do not see anything special on echo.c so I suppose
it's the fault of the parser, however I have not studied the parser
yet... so marco_g what's your opinnion?


True, Bean sent in a patch to fix this.

:) I knew this already.



2) The -e option is not implemented. :) I've checked the code and it is
not. However I doubt if it's going to work... I ask myself if the grub
string always appears at the beginning of the line.


Do you want to implement this? ;-)

This should not be hard to do.


Implementation is easy but what's difficult for me is the design decision.

Here there are three possible scenarios:

1a) When grub is showed it does begin in the last character position
(not in a new line).
This might imply rewriting the end of the programs so that they end
with something similar to: grub_printf(\n);
1b) Same than 1a but the execution of the last grub_printf(\n); is
automatically run from the program than runs one command after another
one. (I do not know the name in grub2.) depending on a new special flag
of the program.

2) The echo command with a -e option sets a variable which is checked
each time the grub line is going to be written. Depending on the
variable grub_printf(\ngrub); or grub_printf(grub); is run.

At what implementation were you thinking to issue this problem?




pause is equivalent to echo command but if you want to check what I am
saying check my other email that contains a patch for having both echo
and pause commands.


Well... I think you do not need to check my patch... the idea is that
pause command is the echo command plus a pause. Something like:

pause.sh:

echo $@ ; read
exit

So the pause command can have all the echo command power.

I also might work in the read command although I have to think more
about it.


adrian15



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: Acer arcade instantOn and grub

2007-08-02 Thread adrian15

[EMAIL PROTECTED] escribió:

when laptop is new (read when you haven't overridden window's bootloader), 
pressing the normal power on button causes a normal boot sequence, but pressing the 
arcade button causes a different boot sequence.

A different boot sequence.


i don't really want to restore windows boot loader,

When you said before a different boot sequence did you mean that it
restores the windows boot loader or that it loads it from nowhere
instead of reading the disk... or what?


so: is there a way to replicate this job with grub or grub2?

I do not know.



for any further info please ask.


Is this information stored somehow?  So how can the bootloader
determine what is done?  In that case you can use scripting in GRUB 2
to make use of this information.  It can't be done yet, but surely
GRUB 2 can be modified to use this.

--
Marco

thanks for you answer, marco

follows a more deep description of the system

the original system uses a modified grub 0.93 chainloaded by ntldr.
the modifications of grub are released, but i can't replicate them on grub 0.97.

When you talk about this original system... this has nothing to do with
the arcade button, isn't it ?

Or is this code supposed to activate a fallback option (not the default
option but default+1 option) ?

Can you send a patch (differences from grub 0.93 and grub 0.93-modified)
so that I can try to apply to my own fork of grub 0.97?

Thank you.

adrian15



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


multidistro grub2 idea

2007-07-22 Thread adrian15

THE PROBLEM
=

The problem about boot loaders in a multi distribution environment is
the grub configurations being overlapped.
Imagined this partition layout:
part 1: windows
part 2: ubuntu
part 3: debian

If you install first windows, then ubuntu and then debian is great
possible that debian makes its menu.lst be the default one.
It can also have the correct lines for booting ubuntu or it might have
not them.
I suppose that there is more complication when you run the update-grub
command when a kernel has been updated.

THE DISCUSSION


When there are multiple distros I've been regularly astonished of the
ones that advice of copy-and-paste lines from other menu.lst and add it
to your current one. And they are people that not even use
copy-and-paste and advice to add the lines by hand.
I think the problem is here is that no one knows that a command called
configfile exists.
In my computer I have 4 menu.lst and I have not used the configfile
approach. I have installed grub in the distros' partition and  also in
the mbr which is associated with a grub installed on a /boot partition.

Disk /dev/sda: 137.4 GB, 137437871104 bytes
255 heads, 63 sectors/track, 16709 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End  Blocks   Id  System
/dev/sda1   *  1127510241406c  W95 FAT32 (LBA)
/dev/sda2   12761287   96390   83  Linux(/BOOT)
/dev/sda3   1288371919535040   83  Linux   (DEBIAN)
/dev/sda4   3720   16709   1043421755  Extended
/dev/sda5   3720   1514791795378+  83  Linux   (/HOME)
/dev/sda6  15148   16166 8185086   83  Linux   (FEDORA)
/dev/sda7  16167   16198  257008+  82  Linux swap / Solaris
/dev/sda8  16199   16709 4104576   83  Linux(TEST DISTROS)


THE SOLUTION
=

I think that if grub2 is going to have scripting and so many new
features we should take advantage of them and change the way computers
do boot.

#1) All Linux installers should set or reuse a ext2 partition next to
the windows one as a /boot one where grub2 is installed.

#2) /boot/grub/

will have a new folder called:

/boot/grub/menu/

which will be filled with .cfg files from the different distros that
are installed in a computer.

As an example ubuntu installed on /dev/sda2 should have a
ubuntu-sda2.cfg file in there.

#3) grub2 should include tools to deal with this .cfg files from the
linux environment.

#4) /boot/grub/grub2.cfg will be used for determining which of the .cfg
files inside /boot/grub/menu is the default one and which it is the
timeout for it.
(If only one .cfg file is found then timeout is 0).

#5) The problems that happened when a distro had been patched for doing
one thing or another one will not exist. Why? Because distros can take
advantage of the modules in order to add its own enhacements to grub2.

#6) /boot/grub/grub2.cfg security should be enhanced.

What are your thoughts about this idea?

adrian15



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: GRUB 2 documentation

2007-07-01 Thread adrian15

Khaled Hosny escribió:

I'd like to work on this, any idea where to begin? should I start with
grub legacy documentation and update/remove/add information to match
that of grub2 or should I start from scratch?



In my opinnion there are three ways to elaborate documentation.
1) From grub2 developer point of view.
2) From grub2 architecture.
3) From a grub2 user.


As long as scripting is not well defined I think you can begin with the
grub2 architecture. I think knowing yourself the grub2 architecture can
make things easier when elaborating documentation from a grub2 user
point of view.

I mean one of the first thing a grub2 documentation from a grub2 user
point of view should have is an introduction on how does grub2 work overall.

adrian15



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: Grub2 request

2007-06-25 Thread adrian15

Amin Azez escribió:

Grub allows press any key to continue on multiple consoles.
It would be nice if the text could be specified per-console.

I know some serial port based 2 line lcd screens that would want smaller text.

Different get-key drivers would be good, these lcd screens have to poll to read 
keypresses.

They have 4 keys, up, down esc and enter; enough to navigate a grub menu.

If this sounds good, I'm willing to write the lcd specific code.

Sam


Does anyone know if grub2 is designed so that it has different outputs
and different behaviour on these different outputs?

adrian15



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: status update for grub 2 developments?

2007-06-25 Thread adrian15

Bean escribió:

Well, if people want to work on scripting or networking they should
talk to me.  I have lots of code on my hd that is incomplete or just
not cleaned up.  It would be a waste of time if it were rewritten.
And please poke me a lot to get me to work... ;)


I'm interested in scripting. What could I do to help you ?


As long as you may re-read Marco_g source code you can try to fix a bug
that I have found I suppose in the parser.

If you type any command with a \ character not being inside  
characters it gives an grub internal error.

echo \n -- OK
echo \n fff -- GRUB INTERNAL ERROR

adrian15



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: status update for grub 2 developments?

2007-06-19 Thread adrian15

Vesa Jääskeläinen escribió:

Joomla's tracker is a bit more what I was thinking about. It handles
tasks quite nicely. Has task dependency support.


	I think that gforge has also tasks. I just do not find right now any 
gforge site with a task site.


adrian15


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: status update for grub 2 developments?

2007-06-18 Thread adrian15

Vesa Jääskeläinen escribió:

Hi all!

I think it would be wise to keep some kind of status updates from time
to time so we can keep track on what people are doing (related to grub
2). If we continue with current situation we are long in 2010's before
we have next release.
You're too optimistic. :) I was thinking about 2015. Anyway,... I will 
work hard this summer in grub2 because it needs it.

I think it would also be important to coordinate more different
activities within grub 2.

Ok.

In example graphical menu has been issue for
several years now :).

I am sorry not being an expert on this area.
 Therefore I would propose that we would setup a

group of people that would concentrate on specific issues related to
implmentation (like a work group or something).

I also think groups are a good thing.
 I do not see it as a

requirement that this group of people would implement the feature
(though that would be good), but most importantly to draft out how
features should work. When there is a spec written how feature should
work then it would be much easier to implement that feature and then it
would match ideology of other relevant developers (eg. to get patch
accepted).

I also like the specs idea.

I would see that at least following working groups should be formed. Of
course we could tackle design issue at a time and then move to other issues.

- Graphical menu (needs API spec, configuration file specs, guidelines
for implementation, information how to integrate with scripting)

I might collaborate on the how to integrate with scripting part.


- Network support (needs API spec, driver architecture, protocol stacks,
file system support)

No idea about this subject.


Perhaps some others too... (please add)


I am going to work in grub-disk. A collection of grub2.cfg files or 
maybe more that will define useful collection of command such as Search 
linux kernel, linux initrd and load them. Something similar to Super 
Grub Disk.



Anyway. First of all I would like to hear if you are developing
something above or something else, reply this e-mail and tell us about
it, there is no reason that work should be duplicated.


My current todo:
# Current development
* pause command
* map, mapboot and usbshift commands
# Short term development
* grub-disk scripts
* grub2 scripts testing
* grub legacy commands porting
# Long term development
* install and setup commands for grub2

If you want more details please visit: http://grub.enbug.org/AdrianGibanel


Ideas are welcome where to store this information are also welcome :).
We would need to track requirements for features on component level.
More automated the better.


Can we use the bugs system maybe?
A friend of mine uses trac ( http://trac.edgewall.org/ ) and he likes it 
a lot. I do not know if it fits our needs.


adrian15


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


echo gives internal error with \n

2007-06-17 Thread adrian15

  I've activated the echo command (also the pause command) which it is
equivalent to the echo command... and have done some tests:

grub pause fjfjl
fjfjl
grub pause fjfjl
fjfjl
grub pause -n \n
error: Internal error

grub pause \n
error: Internal error

grub pause -n \n
\n
grub pause -e \n

grub echo fasf
fasf
grub


Two conclusions from these tests:

1) When you use \n in string that does not begin with  then it gives an
internal error. I do not see anything special on echo.c so I suppose
it's the fault of the parser, however I have not studied the parser
yet... so marco_g what's your opinnion?

2) The -e option is not implemented. :) I've checked the code and it is
not. However I doubt if it's going to work... I ask myself if the grub
string always appears at the beginning of the line.

pause is equivalent to echo command but if you want to check what I am
saying check my other email that contains a patch for having both echo
and pause commands.

adrian15




___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


pause and echo patch

2007-06-17 Thread adrian15

I attach the proposal of patch and I comment some doubts that I have.


diff -urN grub2_2007_05_31_original/commands/echo.c 
grub2_2007_05_31_pause/commands/echo.c
--- grub2_2007_05_31_original/commands/echo.c   2007-06-11 11:53:26.0 
+0200
+++ grub2_2007_05_31_pause/commands/echo.c  2007-06-17 04:25:26.0 
+0200
@@ -110,16 +110,35 @@
   return 0;
 }
 
+static grub_err_t

+grub_cmd_pause (struct grub_arg_list *state __attribute__ ((unused)),
+ int argc, char **args)
+
+{
+
+  char key;
+  if (argc!=0) 
+grub_cmd_echo(state,argc,args);

Here there is the trick for not duplicating code!

+  key = grub_getkey ();
+  
+  return 0;

+}
+
 
 GRUB_MOD_INIT(echo)
 {
+
+  (void) mod;  /* To stop warning. */
+  grub_register_command (pause, grub_cmd_pause, GRUB_COMMAND_FLAG_BOTH,
+pause [-e|-n] [MESSAGE], Pause and optionally show a 
message with echo command., options);
   (void) mod;  /* To stop warning. */
   grub_register_command (echo, grub_cmd_echo, GRUB_COMMAND_FLAG_BOTH,
-echo [-e|-n] FILE, Display a line of text.,
+echo [-e|-n] \STRING\, Display a line of text.,
 options);
 }
 
 GRUB_MOD_FINI(echo)

 {
   grub_unregister_command (echo);
+  grub_unregister_command (pause);
 }

I do not understand very well what's a module.
For instance should I have loaded the echo and pause commands in a
different module?


diff -urN grub2_2007_05_31_original/conf/common.rmk 
grub2_2007_05_31_pause/conf/common.rmk
--- grub2_2007_05_31_original/conf/common.rmk   2007-06-11 11:53:27.0 
+0200
+++ grub2_2007_05_31_pause/conf/common.rmk  2007-06-17 04:18:07.0 
+0200
@@ -168,7 +168,7 @@
 pkgdata_MODULES += hello.mod boot.mod terminal.mod ls.mod  \
cmp.mod cat.mod help.mod font.mod search.mod\
loopback.mod configfile.mod \
-   terminfo.mod test.mod blocklist.mod
+   terminfo.mod test.mod blocklist.mod echo.mod
 
 # For hello.mod.

 hello_mod_SOURCES = hello/hello.c


So if I needed to edit this rmk in order to have one more module I
should replicate the lines where it is read echo.mod and put pause.mod,
but I should not change the lines with echo.c to pause.c because both
commands are in the same file...

Am I right?


adrian15


diff -urN grub2_2007_05_31_original/commands/echo.c grub2_2007_05_31_pause/commands/echo.c
--- grub2_2007_05_31_original/commands/echo.c	2007-06-11 11:53:26.0 +0200
+++ grub2_2007_05_31_pause/commands/echo.c	2007-06-17 04:25:26.0 +0200
@@ -110,16 +110,35 @@
   return 0;
 }
 
+static grub_err_t
+grub_cmd_pause (struct grub_arg_list *state __attribute__ ((unused)),
+	  int argc, char **args)
+
+{
+
+  char key;
+  if (argc!=0) 
+grub_cmd_echo(state,argc,args);
+  key = grub_getkey ();
+  
+  return 0;
+}
+
 
 GRUB_MOD_INIT(echo)
 {
+
+  (void) mod;			/* To stop warning. */
+  grub_register_command (pause, grub_cmd_pause, GRUB_COMMAND_FLAG_BOTH,
+			 pause [-e|-n] [MESSAGE], Pause and optionally show a message with echo command., options);
   (void) mod;			/* To stop warning. */
   grub_register_command (echo, grub_cmd_echo, GRUB_COMMAND_FLAG_BOTH,
-			 echo [-e|-n] FILE, Display a line of text.,
+			 echo [-e|-n] \STRING\, Display a line of text.,
 			 options);
 }
 
 GRUB_MOD_FINI(echo)
 {
   grub_unregister_command (echo);
+  grub_unregister_command (pause);
 }

diff -urN grub2_2007_05_31_original/conf/common.rmk grub2_2007_05_31_pause/conf/common.rmk
--- grub2_2007_05_31_original/conf/common.rmk	2007-06-11 11:53:27.0 +0200
+++ grub2_2007_05_31_pause/conf/common.rmk	2007-06-17 04:18:07.0 +0200
@@ -168,7 +168,7 @@
 pkgdata_MODULES += hello.mod boot.mod terminal.mod ls.mod	\
 	cmp.mod cat.mod help.mod font.mod search.mod		\
 	loopback.mod configfile.mod\
-	terminfo.mod test.mod blocklist.mod
+	terminfo.mod test.mod blocklist.mod echo.mod
 
 # For hello.mod.
 hello_mod_SOURCES = hello/hello.c

___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


map command draft #2

2007-06-17 Thread adrian15
)


Is it important that I also copy-paste the rmk files modifications or not?

adrian15


diff -urN grub2_2007_05_31_original/commands/i386/pc/map.c grub2_2007_05_31_map/commands/i386/pc/map.c
--- grub2_2007_05_31_original/commands/i386/pc/map.c	1970-01-01 01:00:00.0 +0100
+++ grub2_2007_05_31_map/commands/i386/pc/map.c	2007-06-17 05:56:15.0 +0200
@@ -0,0 +1,107 @@
+/* map.c - Define drives map array  */
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 2005  Free Software Foundation, Inc.
+ *
+ *  GRUB is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with GRUB; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include grub/normal.h
+#include grub/dl.h
+#include grub/arg.h
+#include grub/disk.h
+#include grub/term.h
+#include grub/misc.h
+#include grub/device.h
+#include grub/file.h
+
+/* The size of the drive map.  */
+#define DRIVE_MAP_SIZE		16
+/* The BIOS drive map.  */
+static unsigned short bios_drive_map[DRIVE_MAP_SIZE + 1];
+
+int real_map_func (unsigned long to, unsigned long from) {
+int i;
+  /* Search for an empty slot in BIOS_DRIVE_MAP.  */
+  for (i = 0; i  DRIVE_MAP_SIZE; i++)
+{
+  /* Perhaps the user wants to override the map.  */
+  if ((bios_drive_map[i]  0xff) == from)
+	break;
+  
+  if (! bios_drive_map[i])
+	break;
+}
+
+  if (i == DRIVE_MAP_SIZE)
+{
+  return GRUB_ERR_OUT_OF_RANGE;
+}
+
+  if (to == from)
+/* If TO is equal to FROM, delete the entry.  */
+grub_memmove ((char *) bios_drive_map[i], (char *) bios_drive_map[i + 1],
+		  sizeof (unsigned short) * (DRIVE_MAP_SIZE - i));
+  else
+bios_drive_map[i] = from | (to  8);
+  
+  return 0;
+
+
+}
+
+
+
+static grub_err_t
+grub_cmd_map (struct grub_arg_list *state __attribute__ ((unused)),
+	   int argc, char **args)
+{
+  grub_disk_t map_disk_to,map_disk_from;
+
+/* TODO: Check map arguments from grub2 engine */  
+  if (argc != 2)
+return grub_error (GRUB_ERR_BAD_ARGUMENT, Two devices required);
+  map_disk_to = grub_disk_open (grub_file_get_device_name(args[0]));
+  if (! map_disk_to)
+return grub_error (GRUB_ERR_UNKNOWN_DEVICE, Unknown TO disk);
+/* This was a marco_g suggestion but it does not make sense to me.
+  if (grub_strcmp(map_disk_to-name,biosdisk))
+return grub_error (GRUB_ERR_UNKNOWN_DEVICE, TO disk is not a bios disk.);
+*/
+  map_disk_from = grub_disk_open (grub_file_get_device_name(args[1]));
+  if (! map_disk_from)
+return grub_error (GRUB_ERR_UNKNOWN_DEVICE, Unknown FROM disk);
+/* This was a marco_g suggestion but it does not make sense to me.
+  if (grub_strcmp(map_disk_from-name,biosdisk))
+return grub_error (GRUB_ERR_UNKNOWN_DEVICE, FROM disk is not a bios disk.);
+*/
+
+
+  return (real_map_func(map_disk_to-id,map_disk_from-id));
+  
+}
+
+
+GRUB_MOD_INIT(map)
+{
+  (void)mod;			/* To stop warning. */
+  grub_register_command (map, grub_cmd_map, GRUB_COMMAND_FLAG_BOTH,
+			 map TODEVICE FROMDEVICE, Map a drive to another, 0);
+}
+
+GRUB_MOD_FINI(map)
+{
+  grub_unregister_command (map);
+}

diff -urN grub2_2007_05_31_original/conf/i386-pc.rmk grub2_2007_05_31_map/conf/i386-pc.rmk
--- grub2_2007_05_31_original/conf/i386-pc.rmk	2007-06-11 11:53:27.0 +0200
+++ grub2_2007_05_31_map/conf/i386-pc.rmk	2007-06-14 12:38:00.0 +0200
@@ -1,5 +1,7 @@
 # -*- makefile -*-
 
+
+
 COMMON_ASFLAGS = -nostdinc -fno-builtin -m32
 COMMON_CFLAGS = -fno-builtin -mrtd -mregparm=3 -m32
 COMMON_LDFLAGS = -m32 -nostdlib
@@ -121,7 +123,7 @@
 pkgdata_MODULES = _chain.mod _linux.mod linux.mod normal.mod \
 	_multiboot.mod chain.mod multiboot.mod reboot.mod halt.mod	\
 	vbe.mod vbetest.mod vbeinfo.mod video.mod gfxterm.mod \
-	videotest.mod play.mod bitmap.mod tga.mod cpuid.mod
+	videotest.mod map.mod play.mod bitmap.mod tga.mod cpuid.mod
 
 # For _chain.mod.
 _chain_mod_SOURCES = loader/i386/pc/chainloader.c
@@ -195,6 +197,11 @@
 vbetest_mod_CFLAGS = $(COMMON_CFLAGS)
 vbetest_mod_LDFLAGS = $(COMMON_LDFLAGS)
 
+# For map.mod.
+map_mod_SOURCES = commands/i386/pc/map.c
+map_mod_CFLAGS = $(COMMON_CFLAGS)
+map_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
 # For play.mod.
 play_mod_SOURCES = commands/i386/pc/play.c
 play_mod_CFLAGS = $(COMMON_CFLAGS)

___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Detection of boot devices by a linux kernel

2007-06-15 Thread adrian15


First question:
=

Once a Kernel has booted can request the bios the different boot
devices and try to open them with a bios-disk driver or whatever the
name is?


Current problems:


I do not know what's the live cd / non-live cd installer algorithm for
detecting which grub device corresponds to which linux device.
There's a man in hardwareguys.com which gets some strange results. He
installing Linux in his 4th drive and as long as it is detected as
/dev/sdg then the linux assign it: hd6 . :)

http://forums.hardwareguys.com/ikonboard.cgi?act=ST;f=21;t=5731;#top

Probable solution:
=
If the answer for the first question is that NO here there is my
solution to problem.

We should make a command that iterates all the hard disks boot devices
and looks for the uuid from the hard disks. Once it has done so it saves
the result into a variable.

Then we can boot a kernel and pass this variable as a parametrer.

Example:
==

grub set
prefix=(cd)/boot/grub/
root=(cd)
grub detectboot -s biosdevices
grub set
root=(cd)
biosdevices=hd0|ffkei|hd1|ereok|hd2|er455
grub linux /boot/knoppix-6.0-kernel root=/dev/ram 
grubdevices=$biosdevices
grub initrd /boot/knoppix-6.0-initrd
grub boot

Then thanks to the grubdevices=hd0|ffkei|hd1|ereok|hd2|er455 string
found in /proc/cmdline the knoppix boot scripts can check the uuid for
each detected hard disk and generate a valid devices.map file.

Any comments on this?


adrian15



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Grub2 mainstream test floppies

2007-06-15 Thread adrian15

Now I am quite busy with pause and map commands but I do not want to
forget the grub2-disk creation (Something similar to Super Grub Disk).
grub2-disk will have some menues that explain how grub2 syntax does
work and will have some useful options such as searching an already
installed grub2.cfg and loading it, search and load vmlinuz* and
initrd*, activate partitions and so on.
(You can check Super Grub Disk http://geocities.com/supergrubdisk/ if
you want to.)

The first draft for grub2-disk is one more folder in grub2 source code
which it is called disk. This folder has an script for generating the
grub2-disk and some subfolders that contain specific grub2.cfg files (or
maybe only one grub2.cfg file).

I think we could convert the grub2-disk into a mainstream test floppy.
I myself found a lot of bugs on grub legacy because no one had tested
all the possible options on a cdrom. I think grub2 developers could
write down some grub2.cfg files into the disk folder.

This options will be used for testing new features that should be
tested by many people.
The idea is:
- Prompt if the text has been tested ok already or not.
- Prompt a text explanation
- Prompt what the possible results may be
- Prompt what information may be needed if the test fails and 
where
(mail) has to be sent.
- Run the test.



So... The grub2-disk will have a development menu which will have the
tests.


The idea is each week run the grub2-disk-creation script and upload the
correspondent generated floppy image to the grub ftp server so that
anyone that it is interested can test it without the need of knowing:
how to get data from the cvs, how to compile it, how to generate a
floppy and how to put the commands on a .cfg file.

Any comments about this?

adrian15



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: how to add a new command

2007-06-15 Thread adrian15

Alex Roman escribió:

On 12/06/07, adrian15 [EMAIL PROTECTED] wrote:
Once I write a new command like map.c or pause.c how am I 
supposed to

add it to the standard grub?
Should I write the makefiles manually?! or should I use some 
of the .sh

files at the grub2 source code root folder?


I've been editing the .rmk files in conf/ which should cause the .mk
files to get updated (at least that's my understanding of it, so far).

Make sure the command is placed in the right Makefile... I had the
problem where I was including the command in both grub-emu and
grub/i386-pc and grub-emu didn't link due to undefined symbols
(because those didn't exist in grub-emu).


Cheers!



I've finally edit conf/i386-pc.rmk, copy-pasted the play.c code and
find/replace with map.c.


Then I run make:
make prompts this:


[EMAIL PROTECTED]:~/Desktop/gnu/grub2/grub2_2007_05_31_map$ make
if test x = x; then \
  touch conf/i386-pc.mk; \
else \
   ./genmk.rb  conf/i386-pc.rmk  conf/i386-pc.mk; \
fi
make: No se hace nada para `all'.

If you check: i386-pc.mk then there is no reference to:
/map.c

If I delete i386-pc.mk and run make again:

[EMAIL PROTECTED]:~/Desktop/gnu/grub2/grub2_2007_05_31_map$ make
Makefile:111: conf/i386-pc.mk: No existe el fichero o el directorio
if test x = x; then \
  touch conf/i386-pc.mk; \
else \
   ./genmk.rb  conf/i386-pc.rmk  conf/i386-pc.mk; \
fi
make: No se hace nada para `all'.

and a empty i386-pc.mk file is created.


I check genmk.rb and it is not an executable file.






___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


spanish grub wiki

2007-06-15 Thread adrian15
Can anyone with proper permissions edit PáginaInicial and put a link to 
FrontPage page ?


Thank you.

adrian15


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Variables help inside a command help

2007-06-12 Thread adrian15

If you check the man pages of some linux commands you will see that
there is a place where it talks about ENVIRONMENT VARIABLES or something
similar where it describes some variables than can modify the way a
command works.

As long as we can register the options help like this:

{label, 'l', 0, search devices by a filesystem label, 0, 0},
{set, 's', GRUB_ARG_OPTION_OPTIONAL, set a variable to the first
device found, VAR, ARG_TYPE_STRING},

why shouldn't we do a similar thing for variables?

I think a command should be able to register a:
variable name
- to set or not a value for this variable
- to put a description for the variable


so that when querying a command help this variable help also shows.

And when querying help variable we see all the commands help about
this variable.

Let's see an example.

cat
defines this variable pager help:
1: Stops at each screen. 0: Do not stop.

randomcolourcat
defines this variable pager help:
1: Stops at each screen. 0: Do not stop.

find
defines this variable pager help:
1: Stops at each screen. 0: Do not stop.


So if you type help cat apart from you see right now you see also:
1: Stops at each screen. 0: Do not stop.

And if you type help variable pager you should see:
cat: 1: Stops at each screen. 0: Do not stop.
randomcolourcat: 1: Stops at each screen. 0: Do not stop.
find: 1: Stops at each screen. 0: Do not stop.


It's a stupid example but that's I mean.

adrian15



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Pager does work from a menu?

2007-06-12 Thread adrian15

This code from: normal/command.c

  /* Enable the pager if the environment pager is set to 1.  */
  if (interactive)
pager = grub_env_get (pager);
  else
pager = 0;
  if (pager  (! grub_strcmp (pager, 1)))
grub_set_more (1);

Can anyone confirm my suspictions that even the pager variable set to 1
there is NO stop on the screen when running a grub option that has the
cat command inside it with a big file?

I am suspecting because in grub legacy there was the same stupid
behaviour which I fixed of course.

I also do not like the way that pager is run. I mean, putting a getkey
inside the

void
grub_putcode (grub_uint32_t code)

function from: kern/term.c

it seems to me a bit childish although I do not know so far a better
solution.



adrian15



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Checking parametres that are not inside an option

2007-06-12 Thread adrian15

If you take a look at search.c you can see that the -s parametrer is
checked outside the command thanks to the ARG_TYPE_STRING constant.

{set, 's', GRUB_ARG_OPTION_OPTIONAL, set a variable to the first
device found, VAR, ARG_TYPE_STRING}


If I want not to check if an argument command that it IS NOT inside an
option is something (a disk, i.e.) or not... how do I do it?

I mean I want something like:

map (hd0) (hd1)

to be checked outside the command without using:

map -disk1 (hd0) -disk2 (hd1)
and the correspondent option definition at map.c

how do I do it ?

adrian15



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


How to call a command from another one

2007-06-12 Thread adrian15

Hi,

I want to implement the pause command so that it is the same thing as
the echo command with all of its options and also that it stops.

My first approach which I could not compile because I do not how to add
a new command to grub2 is the following one:


  char key;
  if (argc!=0)
grub_cmd_echo(state,argc,args);
  key = grub_getkey ();

  return 0;



So my question is if it's an orthodox way of calling another command, if
I should call it in another way or if I should not call it in any way.

adrian15



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: How to call a command from another one

2007-06-12 Thread adrian15

Robert Millan escribió:

On Tue, Jun 12, 2007 at 01:57:11PM +0200, adrian15 wrote:

Hi,

I want to implement the pause command so that it is the same thing as
the echo command with all of its options and also that it stops.

I don't know how to call other commands, but in this case, maybe grub_printf()
will be good enough?


I agree with you but...

I think it would be a good idea to have a pause message that has the 
same options as the echo command because the echo command has some nice 
options and because I like to reuse code.


adrian15


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: Pager does work from a menu?

2007-06-12 Thread adrian15

Robert Millan escribió:

On Tue, Jun 12, 2007 at 01:57:42PM +0200, adrian15 wrote:

This code from: normal/command.c

  /* Enable the pager if the environment pager is set to 1.  */
  if (interactive)
pager = grub_env_get (pager);
  else
pager = 0;
  if (pager  (! grub_strcmp (pager, 1)))
grub_set_more (1);

Can anyone confirm my suspictions that even the pager variable set to 1
there is NO stop on the screen when running a grub option that has the
cat command inside it with a big file?


Can you ellaborate?  From the code you pasted, I just see that when
interactive is set to 0, this has the same effect as pager being set to
the 0 string.


That's what I mean. I think that interactive for grub2 means being in 
the grub2 shell (not in a menu). If you are in a menu (non interactive) 
then there is no stop between pages.


But you know I am a bit lazy. I should at last try to do a grub.cfg and 
test it on my test floppy and see if I am right or not.



I am suspecting because in grub legacy there was the same stupid
behaviour which I fixed of course.

I also do not like the way that pager is run. I mean, putting a getkey
inside the

void
grub_putcode (grub_uint32_t code)

function from: kern/term.c

it seems to me a bit childish although I do not know so far a better
solution.


Please try to tear down that language!  stupid and childish are in general
not very appropiate words for a development list.

Written down. Sorry, I'll try to use more formal synonims next time.


I suppose you're referring to:

  grub_printf (--MORE--);
  grub_setcolorstate (GRUB_TERM_COLOR_STANDARD);

  key = grub_getkey ();

What do you find wrong in this code?  AFAICS, the message is printed and then
we use grub_getkey to block untill a key is pressed.  Sounds like normal
pager-ish behaviour to me..


The code is ok. What I do not find ok is that the screen pause happens 
in a function which works it is to put a character on the screen.
I do not quite understand why a function that only has to print a 
character on the screen has also to deal with the screen by screen stop 
problem.


In my opinion this screen by screen stop problem should be solved in 
another part of the source code but so far I do not know where.


adrian15


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


help, configfile, pager and

2007-06-10 Thread adrian15

Here is a patch for some of the problems that I found in my miscelanea
mails.

More to come. :)

adrian15



diff -urN grub2_2007_05_31_original/ChangeLog
grub2_2007_05_31_small_fixes/ChangeLog
--- grub2_2007_05_31_original/ChangeLog 2007-05-20 11:10:05.0 +0200
+++ grub2_2007_05_31_small_fixes/ChangeLog  2007-06-10 18:48:40.0
+0200
@@ -1,3 +1,10 @@
+2007-06-21  adrian15  [EMAIL PROTECTED]
+   * kern/main.c: Pager variable is now set to 0 by default.
+   * commands/help.c: Help command help shows that with no pattern
+   all the commands are shown.
+   * commands/configfile.c: Configfile command help tells the user that
+   that it runs the config file with another context.
+
  2007-05-20  Robert Millan  [EMAIL PROTECTED]

* util/update-grub_lib.in: New file.
diff -urN grub2_2007_05_31_original/commands/configfile.c
grub2_2007_05_31_small_fixes/commands/configfile.c
--- grub2_2007_05_31_original/commands/configfile.c 2006-06-04
17:56:54.0 +0200
+++ grub2_2007_05_31_small_fixes/commands/configfile.c  2007-06-10
18:36:19.0 +0200
@@ -60,7 +60,7 @@
(void) mod;   /* To stop warning. */
grub_register_command (configfile, grub_cmd_configfile,
  GRUB_COMMAND_FLAG_BOTH, configfile FILE,
-Load another config file., 0);
+Load another config file with a new context., 0);
grub_register_command (source, grub_cmd_source,
  GRUB_COMMAND_FLAG_BOTH, source FILE,
  Load another config file without changing
context.,
diff -urN grub2_2007_05_31_original/commands/help.c
grub2_2007_05_31_small_fixes/commands/help.c
--- grub2_2007_05_31_original/commands/help.c   2005-11-13
16:47:08.0 +0100
+++ grub2_2007_05_31_small_fixes/commands/help.c2007-06-10
18:20:03.0 +0200
@@ -98,7 +98,7 @@
  {
(void)mod;  /* To stop warning. */
grub_register_command (help, grub_cmd_help, 
GRUB_COMMAND_FLAG_CMDLINE,

-help [PATTERN ...], Show a help message., 0);
+help [PATTERN ...], Show a command help. No pattern 
shows all
available commands., 0);
  }

  GRUB_MOD_FINI(help)
diff -urN grub2_2007_05_31_original/kern/main.c
grub2_2007_05_31_small_fixes/kern/main.c
--- grub2_2007_05_31_original/kern/main.c   2006-04-25 22:08:31.0
+0200
+++ grub2_2007_05_31_small_fixes/kern/main.c2007-06-10
18:12:53.0 +0200
@@ -127,6 +127,9 @@
grub_machine_set_prefix ();
grub_set_root_dev ();

+  /* Set pager and other unimportant variables */
+  grub_env_set (pager, 0);
+
/* Load the normal mode module.  */
grub_load_normal_mode ();



diff -urN grub2_2007_05_31_original/ChangeLog grub2_2007_05_31_small_fixes/ChangeLog
--- grub2_2007_05_31_original/ChangeLog	2007-05-20 11:10:05.0 +0200
+++ grub2_2007_05_31_small_fixes/ChangeLog	2007-06-10 18:48:40.0 +0200
@@ -1,3 +1,10 @@
+2007-06-21  adrian15  [EMAIL PROTECTED]
+	* kern/main.c: Pager variable is now set to 0 by default.
+	* commands/help.c: Help command help shows that with no pattern
+	all the commands are shown.
+	* commands/configfile.c: Configfile command help tells the user that
+	that it runs the config file with another context.
+
 2007-05-20  Robert Millan  [EMAIL PROTECTED]
 
 	* util/update-grub_lib.in: New file.
diff -urN grub2_2007_05_31_original/commands/configfile.c grub2_2007_05_31_small_fixes/commands/configfile.c
--- grub2_2007_05_31_original/commands/configfile.c	2006-06-04 17:56:54.0 +0200
+++ grub2_2007_05_31_small_fixes/commands/configfile.c	2007-06-10 18:36:19.0 +0200
@@ -60,7 +60,7 @@
   (void) mod;   /* To stop warning. */
   grub_register_command (configfile, grub_cmd_configfile,
 GRUB_COMMAND_FLAG_BOTH, configfile FILE,
-Load another config file., 0);
+Load another config file with a new context., 0);
   grub_register_command (source, grub_cmd_source,
 GRUB_COMMAND_FLAG_BOTH, source FILE,
 Load another config file without changing context.,
diff -urN grub2_2007_05_31_original/commands/help.c grub2_2007_05_31_small_fixes/commands/help.c
--- grub2_2007_05_31_original/commands/help.c	2005-11-13 16:47:08.0 +0100
+++ grub2_2007_05_31_small_fixes/commands/help.c	2007-06-10 18:20:03.0 +0200
@@ -98,7 +98,7 @@
 {
   (void)mod;			/* To stop warning. */
   grub_register_command (help, grub_cmd_help, GRUB_COMMAND_FLAG_CMDLINE,
-			 help [PATTERN ...], Show a help message., 0);
+			 help [PATTERN ...], Show a command help. No pattern shows all available commands., 0);
 }
 
 GRUB_MOD_FINI(help)
diff -urN grub2_2007_05_31_original/kern/main.c grub2_2007_05_31_small_fixes/kern/main.c
--- grub2_2007_05_31_original/kern/main.c	2006-04-25 22:08:31.0 +0200

Re: grub-mkrescue: Make GRUB rescue image

2007-06-08 Thread adrian15

Robert Millan escribió:

I'm attaching a small utility to generate a floppy or cdrom (based on floppy
emulation) rescue image, that takes all the hassle of generating the image and
doesn't need root permissions.

If nobody objects, I'd like to put this in CVS.


The rescue disk can recover a grub2 installation with something similar 
to the grub legacys' root and setup commands ?


Or is it a disk that where you only see

grub rescue 

?
adrian15


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: pager (Re: grub2 miscelanea questions (1/2))

2007-06-08 Thread adrian15

Marco Gerards escribió:

set pager=1

How about setting it to 0 by default, so it shows up when you list the
variables.  Currently it just doesn't exist.


That's a good idea.
Where is the place (file) for setting default variables values?

adrian15


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


map command for grub2 draft

2007-06-07 Thread adrian15

I want to implement the map command for grub2 as long as it is an
interesting thing for stupid windows oses and because it's the clue for
making an usbshift equivalent command (See Super Grub Disk usbshift
command for more details).


1st) Where to save an array?
=

If I mimic the grub legacy map command I need to save an array with the
map definitions.

static unsigned short bios_drive_map[DRIVE_MAP_SIZE + 1];

So that each time I call something like:
map (hd0) (hd1)
it modifies this vector.

Any example on where should I define this vector so that I can use it
from each command ?

2nd) boot_func and actual mapping


If you look at grub legacy boot command


case KERNEL_TYPE_CHAINLOADER:
  /* Chainloader */

  /* Check if we should set the int13 handler.  */
  if (bios_drive_map[0] != 0)
{
  int i;

  /* Search for SAVED_DRIVE.  */
  for (i = 0; i  DRIVE_MAP_SIZE; i++)
{
  if (! bios_drive_map[i])
break;
  else if ((bios_drive_map[i]  0xFF) == saved_drive)
{
  /* Exchage SAVED_DRIVE with the mapped drive.  */
  saved_drive = (bios_drive_map[i]  8)  0xFF;
  break;
}
}

  /* Set the handler. This is somewhat dangerous.  */
  set_int13_handler (bios_drive_map);
}

  gateA20 (0);
  boot_drive = saved_drive;
  chain_stage1 (0, BOOTSEC_LOCATION, boot_part_addr);
  break;




you will see that among other things it detects if you want to do a
chainloader boot. If you do a chainloader boot it checks the
bios_drive_map array,... run some BIOS calls so that there's an actual
map and then it finally boots.

When I told marco_g that I want to modificy grub2's boot command he
became scared because the boot command was arquitecture specific (or
maybe not, I actually did not understood what he meant) and as long as I
understood I was not meant to modify it.

how should I implement this then?



adrian15



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


grub2 miscelanea questions #2

2007-06-07 Thread adrian15

1) search command file not found:
=
If you search for an inexistant file like:
search -f /boot/grub/und-video
it complains:
error: no such device

Shouldn't it be:
error: no such file /boot/grub/und-video

I mean it has to talk about files not devices and it has also to prompt
the file you have searched for... or maybe not, I do not know.

I ask marco_g if I am going to be able to use this command inside an if
statement.

if `search -f /boot/grub/grub2.cfg` then

2) chainload a device


It seems that if I run:
chainloader (hd0)+1
boot
It boots my hard disk installed bootloader.

However chainloader help only prompts:
chainloader [-f] FILE
I think the help should be:
chainloader [-f] FILE|DEVICE

3) DEVICE vs DEVICENAME


If you check the loopback command help you will see that you can use a
DEVICENAME as an argument. Should we choose DEVICE or DEVICENAME when
talking about a DEVICE ?


4) About linux command


I do not like the linux command too much. What happens with bsd and
other kernels that are not multiboot?

why don't we have something as:

kernel --type linux whatever
kernel --type bsd whateverelse

?


Or maybe is better to have a bsd command or bsd will become at last a
multiboot os?


5) windows command
===
Can we add a windows command that does:
chainloader (hd0,0)+1
boot

A question for marco_g... which it is the best way so that a command can
call other commands?

Using grub_cmd_name where name is the name of the command or can I write
a grub.cfg file on the fly and then send it to some cfg interpreter
function?


6) boot command boots also boot loaders
=
If we can use chainloader for preparing to boot another boot loader...
then boot help should read:

Boot an operating system or another boot loader.

instead of:

Boot an operating system.


adrian15



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: gcs doubt #1

2007-06-06 Thread adrian15

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



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: test -e patch

2007-06-06 Thread adrian15

adrian15 [EMAIL PROTECTED] 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



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: grub2 miscelanea questions (1/2)

2007-06-06 Thread adrian15

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



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: grub2 miscelanea questions (2/2)

2007-06-06 Thread adrian15

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:

exitexit from GRUB

Should it not prompt ?

exitexit 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



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Grub Loading Linux? kernel

2007-06-06 Thread adrian15

When you boot Grub... it prompts something like:

Grub loading kernel

then you see:

Welcome to GRUB.

and then you see the prompt.

Let's see an irc conversation of the future.

noob Hey My Grub loads the linux kernel but then nothing happens.
master noob, if Grub loads the linux kernel then if it does not boot
it's usually a linux kernel problem not a grub one.
noob What should I do then?
master Go to #linux channel and ask there please.

The problem here is that user has seen in the screen:

Grub loading kernel
and he has thought that Grub was loading actually his linux kernel what
it isn't true at all.

So... why don't we prompt something like:

Grub loading...
or
Grub loading itself

?


adrian15



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: test -e patch

2007-06-05 Thread adrian15

adrian15 [EMAIL PROTECTED] writes:


 Attached you will find the patch adding test -e support for grub2.

 This is my first patch. I have compiled it without no errors.


Urgh... I thought/hoped I told you I had a test.c rewrite sitting on
my harddisk?  Or did I tell Robert to poke me until next weekend so I
will work on it?  It includes everything you expect from test.c,
expect the cleanup and testing.  ;-) 


Do you mean you also have the '-e' option ?



Please have a look at the wiki.  It has quite some information about
GRUB 2.

Whenever possible I'll download some info from the wiki.


 Should I write Test if a file exists instead of test if a file
 exists or FILE exists?


FILE


FILE
or
FILE exists ?

Or have you coded it yourself too?


 How the hell should I treat grub errors. Maybe the test_file_exists has
 to return a static grub_err_t and then from grub_cmd_test I should call
 it like this: return (test_file_exists (args[0])) so that the error
 propagates ?


Right.  Otherwise the error will be lost.


Ok. I will try that every function propagates errors.




 What are the error polices ?


Returning the err_t that grub_error returns when possible.

Ok.

 One question. Should we put the test-e function into a separate file or
 not ?


No, the problem is that the design of test.c (which is just a
placeholder) is wrong.  It needs a proper parser for the arguments and
a way to deal with this...


Ok. We will wait for your code.


 The question is if the user will see the -e, -f or other options when
 querying the test command help or not ?


They should.  But I am not sure if the final version will support
this.  Especially because of the nested syntax of the test arguments.


Do you mean the -e options support
or
do you mean the -e options showing at help test support ?


 +static void
 +test_file_exists (const char *key)


Why not filename?


test_filename_exists
or
filename

?


  {
 +


You accidently introduced a whiteline.


No whitelines after an initial {. I write down it.


 +  if (state[0].set)
 +test_file_exists (args[0]);
 +  else
 +  {


This means that this check is run for any other expression.  This is
quite error sensitive.


In my code the only implemented option is '-e'. When there will be more
I could add more nested if with the other options, or maybe better we
will enjoy your improved code.


adrian15



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: test -e patch

2007-06-03 Thread adrian15

On Wed, Jun 06, 2007 at 01:42:48AM +0200, adrian15 wrote:

Attached you will find the patch adding test -e support for grub2.

This is my first patch. I have compiled it without no errors.

However as long as the grub2.tar.gz that Marco gave me did not have any
documentation about how to create a floppy (or at least I did not manage
to find it)


This should work:

  cat boot.img core.img | dd of=foo.img seek=0 conv=notrunc

I would like to have a floppy with the fs on it. See my other mail about
my floppy creation adventure.



static const struct grub_arg_option options[] =

 {
   {file, 'e', 0, test if a file exists, 0, 0},
   {0, 0, 0, 0, 0, 0}
 };

Is this correct? What's that last line for? Is it compulsory ?


It's common practice for arrays to make them null-terminated to be able to
determine their limits without making assumptions about their size.  Doing it
with structs is akin to null-terminating a char array.

Ok. I understand then.



{
grub_file_t file;

 file = grub_file_open (key);


What happens if file is a device node, or a directory?  Does grub_file_open
work with these?

I have not tried a device node, but with a directory it fails.


 Perhaps grub_file_stat would make more sense

You might be right but why then you (grub2 developers) have developed
the search command with the help of grub_file_open ??

Should the search command be reimplemented with grub_file_stat ?


What are the error polices ?

IMHO, an error would be if existance of the file cannot be determined.  I don't
think non-existance should be considered an error too.  However, existing code
in the test plugin already does this, which puzzles me.

We will have to wait for marco_g for telling us how it works, then.



GRUB_MOD_INIT(test)
{
 (void)mod; /* To stop warning. */
 grub_register_command ([, grub_cmd_test, GRUB_COMMAND_FLAG_CMDLINE,
 [ EXPRESSION ], Evaluate an expression, 0);
 grub_register_command (test, grub_cmd_test, GRUB_COMMAND_FLAG_CMDLINE,
 test EXPRESSION, Evaluate an expression, 0);
}

I understand this register commands. I suppose this information is read
from the help command or it isn't ?


Yes.  Also with test --help.


Or maybe it also reads from:
static const struct grub_arg_option options ?


That too.


The question is if the user will see the -e, -f or other options when
querying the test command help or not ?


Yes, based on options[].  But you should really test that and not blindly
believe me :-)

I've checked that it does not read from struct grub_arg_option options ,
strange thing.


+static const struct grub_arg_option options[] =
+  {
+{file, 'e', 0, Test if a file exists, 0, 0},


Do we want a long option here?  bash/coreutils don't have any.


I do not want a long option :)

adrian15



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: test -e patch

2007-06-03 Thread adrian15

GRUB_MOD_INIT(test)
{
  (void)mod;/* To stop warning. */
  grub_register_command ([, grub_cmd_test, GRUB_COMMAND_FLAG_CMDLINE,
 [ EXPRESSION ], Evaluate an expression, 0);
  grub_register_command (test, grub_cmd_test, GRUB_COMMAND_FLAG_CMDLINE,
 test EXPRESSION, Evaluate an expression, 0);
}


I understand this register commands. I suppose this information is read
from the help command or it isn't ?

Or maybe it also reads from:
static const struct grub_arg_option options ?


I've found it.

It reads from the register command and ALSO from options IF you tell it
to do so with:

  (void)mod;/* To stop warning. */
  grub_register_command ([, grub_cmd_test, GRUB_COMMAND_FLAG_CMDLINE,
 [ EXPRESSION ], Evaluate an expression, options);
  grub_register_command (test, grub_cmd_test, GRUB_COMMAND_FLAG_CMDLINE,
 test EXPRESSION, Evaluate an expression, options);


adrian15



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


how to build a grub2 floppy with fs adventure

2007-06-02 Thread adrian15

You can advice me to run easier commands.
Here is my experience.

I do not want to install grub2 in my production environment so I plan to
install into a floppy. The cat and dd way of install grub ( cat boot.img
core.img | dd of=foo.img seek=0 conv=notrunc  ) does not convince me
because I want to be able to read a filesystem from my grub2, i.e., the
floppy filesystem.

I've finally decided myself to use grub-install command from the
compiled sources directory ( In my system it is:
/home/adrian/Desktop/gnu/grub2/grub2_2007_05_31


1st problem: no core.img
==
The first problem is that no core.img is available once you run 'make'.
So I build one core.img like this:

./grub-mkimage -d ./ -o core.img

Once I have the come.img, I try to use grub-install, I finally found
this to work:


./grub-install --root-directory=/media/floppy --modules=*.mod
--grub-setup=./grub-setup --grub-mkimage=./grub-mkimage
--grub-mkdevicemap=./grub-mkdevicemap --grub-probe=./grub-probe /dev/fd0

where the /media/floppy is the place where I mount my floppy and, of
course, the floppy has to be mounted!!! (I think the grub-legacy's
grub-install did mount whatever was needed automatically although I am
not very sure about that.)


2nd problem: grub-probe and partmap module
=
Then the grub-probe command complained about a partmap module not being
found so I decided to comment these lines from ./grub-install :


# Then the partition map module.
#partmap_module=`$grub_probe --target=partmap --device-map=${device_map}
${grubdir}`
#if test x$partmap_module = x -a x$modules = x; then
#echo Auto-detection of a partition map module failed. 12
#echo Please specify the module with the option \`--modules'
explicitly. 12
#exit 1
#fi


3rd problem: grub-install did complain about not finding:
/usr/local/lib/grub/i386-pc
===
so I created it as a link to
/home/adrian/Desktop/gnu/grub2/grub2_2007_05_31 (compiled sources dir)



4th problem:
=
 In order to fix the  /usr/local/lib/grub/i386-pc problem I invented
myself another option for grub-install called --pkglibdir so that I
could specify the directory myself.

However I think that other grub-install subprograms such as grub-probe
or grub-mkimage also tried to find that /usr/local/lib/grub/i386-pc
folder which it is annoying.

This is why I did the link trick.

It works!
=

Finally I unmounted the floppy and tried to run it from qemu... it worked!



adrian15



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


test -e #1 test

2007-06-02 Thread adrian15

What a mail subjet :)

Here you are:

Running from a floppy that has grub2 installed in it inside qemu:

grub test /boot/grub/und-pc.lst
 /boot/grub/und-pc.lst
grub test /boot/grub/
error: File does not exists.
grub test /boot/grub
error: File does not exists.
grub test -e /boot/grub/und-pc.lst
error: Unknown argument '-e'
grub help test
Usage: test EXPRESSION
Evaluate an expression

-h, --help  display this help and exit
-u, --usage display the usage of this command and 
exit


My question is: Why help search works as expected ?

What was wrong with my options?

adrian15



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


test -e patch

2007-06-01 Thread adrian15

Attached you will find the patch adding test -e support for grub2.

This is my first patch. I have compiled it without no errors.

However as long as the grub2.tar.gz that Marco gave me did not have any
documentation about how to create a floppy (or at least I did not manage
to find it) I have not tested it.

Could you please test it?

I have applied the GNU Coding Standards Style on the patch although the
copy-pasted code that you will find in the mail body has not the GCS
applied.

Here there are some doubts:

static const struct grub_arg_option options[] =

  {
{file, 'e', 0, test if a file exists, 0, 0},
{0, 0, 0, 0, 0, 0}
  };


Is this correct? What's that last line for? Is it compulsory ?

Should I write Test if a file exists instead of test if a file
exists or FILE exists?



static void
test_file_exists (const char *key)


Do you prefer another name like: file_exists_test ?


{
grub_file_t file;

  file = grub_file_open (key);
  if (file)
{
  grub_printf ( %s, key);

Should I prompt the existent file or not?
Should I prompt %s exists maybe ?
Should I prompt an \n also?

  grub_file_close (file);
  grub_errno = GRUB_ERR_NONE;
}
  else
{
  grub_error (GRUB_ERR_FILE_NOT_FOUND, File does not exists.);


How the hell should I treat grub errors. Maybe the test_file_exists has
to return a static grub_err_t and then from grub_cmd_test I should call
it like this: return (test_file_exists (args[0])) so that the error
propagates ?

What are the error polices ?


}
}


static grub_err_t
grub_cmd_test (struct grub_arg_list *state __attribute__ ((unused)), int argc,
   char **args)

{

  char *eq;
  char *eqis;

  if (state[0].set)


I suppose this refers to the first line of static const struct
grub_arg_option options and thus as -e is the first option and if its
set we should run the correspondent function.


One question. Should we put the test-e function into a separate file or
not ?


test_file_exists (args[0]);
  else
  {
/* XXX: No fancy expression evaluation yet.  */
  
if (argc == 0)

  return 0;
  
eq = grub_strdup (args[0]);

eqis = grub_strchr (eq, '=');
if (! eqis)
  return 0;

*eqis = '\0';
eqis++;
/* Check an expression in the form `A=B'.  */
if (grub_strcmp (eq, eqis))
  grub_error (GRUB_ERR_TEST_FAILURE, false);
grub_free (eq);
  }
  
  return grub_errno;



}



GRUB_MOD_INIT(test)
{
  (void)mod;/* To stop warning. */
  grub_register_command ([, grub_cmd_test, GRUB_COMMAND_FLAG_CMDLINE,
 [ EXPRESSION ], Evaluate an expression, 0);
  grub_register_command (test, grub_cmd_test, GRUB_COMMAND_FLAG_CMDLINE,
 test EXPRESSION, Evaluate an expression, 0);
}


I understand this register commands. I suppose this information is read
from the help command or it isn't ?

Or maybe it also reads from:
static const struct grub_arg_option options ?

The question is if the user will see the -e, -f or other options when
querying the test command help or not ?





GRUB_MOD_FINI(test)
{
  grub_unregister_command ([);
  grub_unregister_command (test);
}


That's all for my first compiled patch.
I hope that Marco_g is happy :).
But you know Marco_g I will continue my non-sense grub legacy
development too. ;)

adrian15

diff -urN grub2_2007_05_31_original/commands/test.c grub2_2007_05_31/commands/test.c
--- grub2_2007_05_31_original/commands/test.c	2005-11-13 16:47:08.0 +0100
+++ grub2_2007_05_31/commands/test.c	2007-06-01 12:13:11.0 +0200
@@ -24,32 +24,64 @@
 #include grub/misc.h
 #include grub/mm.h
 #include grub/env.h
+#include grub/file.h
+
+static const struct grub_arg_option options[] =
+  {
+{file, 'e', 0, Test if a file exists, 0, 0},
+{0, 0, 0, 0, 0, 0}
+  };
+
+static void
+test_file_exists (const char *key)
+{
+  grub_file_t file;
+
+  file = grub_file_open (key);
+  if (file)
+{
+  grub_printf ( %s, key);
+  grub_file_close (file);
+  grub_errno = GRUB_ERR_NONE;
+}
+  else
+{
+  grub_error (GRUB_ERR_FILE_NOT_FOUND, File does not exists.);
+}
+}
+
 
 static grub_err_t
 grub_cmd_test (struct grub_arg_list *state __attribute__ ((unused)), int argc,
 	   char **args)
 
 {
+
   char *eq;
   char *eqis;
 
-  /* XXX: No fancy expression evaluation yet.  */
+  if (state[0].set)
+test_file_exists (args[0]);
+  else
+  {
+/* XXX: No fancy expression evaluation yet.  */
   
-  if (argc == 0)
-return 0;
+if (argc == 0)
+  return 0;
+  
+eq = grub_strdup (args[0]);
+eqis = grub_strchr (eq, '=');
+if (! eqis)
+  return 0;
+
+*eqis = '\0';
+eqis++;
+/* Check an expression in the form `A=B'.  */
+if (grub_strcmp (eq, eqis))
+  grub_error (GRUB_ERR_TEST_FAILURE, false);
+grub_free (eq);
+  }
   
-  eq = grub_strdup (args[0]);
-  eqis = grub_strchr (eq, '=');
-  if (! eqis

gcs doubt #1

2007-06-01 Thread adrian15

In the GNU Coding Standards they say in:

5.2 Commenting Your Work

Please put a comment on each function saying what the function does,
what sorts of arguments it gets, and what the possible values of
arguments mean and are used for.


Is it ok that the search.c and test.c (commands/ folder) do not have any
of these comments at all?

You do not comment them at all?
You comment them in another place?
Maybe it's ok with the help description that it is set when you register
a command?
Maybe this is a bug and should be fixed?

adrian15



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: My Summer of Code Project

2007-04-21 Thread adrian15

Hello list,

My name is Alex Roman and I have been selected as a Summer of Code
student for the GRUB2 project. I will be adding CD-ROM booting functionality to
GRUB2.

Welcome! Cdrom booting funcionality for grub2 is a good piece of news.

The first stage of the project will attempt to use BIOS calls
to achieve this functionality (which is, of course, dependent on the
BIOS's capabilities, standards compliance, etc.).

Ok. That's how it works in Grub legacy I suppose.
 The second stage

will involve writing a complete ATA/ATAPI driver which would bypass
the BIOS completely, thus allowing it to work on virtually any system
out there.

I suppose that it is going to be difficult. I give you my encouragement!


Unfortunately I only have access to ATAPI CD-ROM drives, so I won't be
able to work on SCSI and/or USB,

I don't have either.
 however I will try to separate the

system to load the boot image from the driver itself as much as
possible so that future driver developments for SCSI and USB will just
be sort of drop-in replacements.

So, just thought I'd talk a bit about what I'll be doing...

Comunication is a good thing.


Thank you for your attention and time. I'm sure I'll have lots of
questions in the months to come. :)

If this happens, it's a good sign of grub2 development health.

adrian15


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: Google Summer of Code 2007

2007-03-19 Thread adrian15

I agree, but we could give proposals for implementing features that
work towards this goal a higher priority than those that
don't. E.g. giving CDROM support and the fancy menu interface a higher
priority, because that are two things GRUB Legacy already has (in most
major distributions at least). And certainly without the fancy menu
the major distributions aren't going to switch to GRUB2.

Jeroen Dekkers


I vote for grub2 cdrom support.

I suppose that you have designed grub2 the best way possible but Grub 
legacy wasn't.


These two years that I've been working with grub cdroms I've found two 
or three problems from the fact that grub cdrom was not tested fully.
For example when an error happened the cur_part_offset variable had to 
be reset so that the cdrom was read ok and it wasn't reset.


Moreover I think that if we want grub2 to be a great software it should 
be tested in a earlier stage of development on all the devices where it 
can it boot from.


adrian15


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


uuid support on grub2 status

2007-03-07 Thread adrian15

Hi,

I am intereested on reading uuid from ext2 partitions. I've been 
searching on grub2 source code and I suppose it is very similar to the 
fs-label function (or whatever it is), maybe only a transformation from 
binary UUID to ascii UUID is the only complicated thing to add.


But before implementing anything...

Has anyone worked on uuid support for ext2 on grub2?

adrian15


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


grub2 sci-fi, the usb problem and the solution

2007-01-23 Thread adrian15

Science fiction part...


It is the 28th February 2009 and grub2 is stable enough and used on all
main linux distributions, as always Debian Stable uses grub legacy.

The MDP* success has made that no one uses cdrom anymore and floppies
are a museum piece. adrian15 decides not working any more on Super Grub
Disk (Based on Grub Legacy) but working on a thing called Super Grub2
Disk. Marco_Gerards reads him on the irc and says: You have been very
late on making your decision :)

So adrian15 tries to install this brand new thing: grub2 in a MDP (Read
a current USB drive)... and when he tries to implement the Boot Linux
option.** he sees that he can see the first hard disk partitions as the
second hard disk partitions. (He sees hd1 where usually it is hd0).
Trying to boot its first hard disk (not the usb one) makes an error
about a not found partition!

And then he remembers... yes... that's it. The BIOS sets the pendrive
as the first hard drive so grub2 sees it as hd0, and the first hard disk
is set as the second hard disk. Shit! I had the same problem with grub
legacy and they had not fixed it!!! What the hell have Marco Gerards,
Okuji and the other guys doing all these 2 long years? Ah, yes,
scripting, Hurd and Xen support!

Back to the reality...
==

Scenario: Every distro installer has decided that when booting a Linux
kernel root command should be run before the kernel and initrd commands,
that it means that gives problem when booting grub from a usb drive.

You boot grub from a usb drive, BIOS sets the usb drive as hd0.
You try to boot your linux distro in hda2 like this:
grub configfile (hd1,1)/boot/grub/menu.lst
and after the timeout an error issues:
(hd0,1) partition does not exists.

Oh, yes, the usb pendrive only has one partition.

My solution for grub legacy is more or less (I need some advice if you
do not mind) this one:

1) Add a preprocessor if somewhere to see if we're going to build a
normal grub or a usb rescue grub.

# if defined(USB_RESCUE)
static const char *preset_menu = usbshift\n;
# endif

I think that activates the preset menu or kind of.

Then usbshift command checks if grub is running from hd0,
if it is true it should do the following thing with map commands.

Before:
usb1 disk1 disk2 disk3 disk4 disk5
hd0  hd1   hd2   hd3   hd4   hd5
After:
disk1 disk2 disk3 disk4 disk5 usb1
hd0   hd1   hd2   hd3   hd4   hd5

then it should boot hd5 (last phisical hard disk) with these commands:
rootnoverify (hd5)
chainloader +1
boot

Now Boot Linux works perfectly.

Thoughts
==

As long as I know grub2 depends on BIOS naming for deciding which hard
diks is the first one or the second one or... so you have the same
problem as I do with usb drives (pretented to be rescue usb drives) that
have grub2 installed.

You know that you can also have installed grub2 on a usb drive for
installing there a linux distro. (I mean this distro should work only
when hd0=usb drive.)

If you want to install a Linux distro in a usb pendrive you have to use
the normal grub.

If you want to install a Linux distro in a usb pendrive and being able
to use if as a rescue grub you have to use the normal grub patched so
that lets you run manually the usbshift command.



adrian15


*: Movable Data Pieces are these digital camera memory sticks that exist
 right now but with 1024 times its current storage. You insert it into
your pendrive (All the new pendrives have MDP slots) and you can read it
in any computer with usb support as a hard disk. Now the last Spanish
films (Spanish film industry has won the Hollywood industry.) are sold
in read-only MDPs. MDP are also very popular in portable media devices
like iphones.

**: Boot Linux option: Shows you the partitions on all your hard disk
where /boot/grub/grub2.cfg or /grub/grub2.cfg is found and tries to load
it when you select the desired partition. (SGD currently has a
equivalent option that works with menu.lst or grub.conf)



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: disk vs partition numbering

2006-12-13 Thread adrian15

On Saturday 09 December 2006 01:17, Hollis Blanchard wrote:

 On Tue, 2006-12-05 at 20:46 +0100, Yoshinori K. Okuji wrote:
As you know very well, GRUB Legacy follows the former. I decided to change it 
to the latter in GRUB 2, as I don't have to care about compatibilities with 
GRUB Legacy so much, and I learned that theoretical beauty is often just a 
masturbation when coming to the user interfaces with experience.


 But which is more important in a long run: easy for existing users
to migrate to GRUB 2, or easy for new comers to adapt GRUB 2? How difficult 
is it that existing users know GRUB now follows the same rule as others? How 
difficult is it that beginners study a rule different from others, so not 
intuitive at all?


If Gnu/Linux it is as good as it seems the most of the people that are 
going to begin to use grub2 would be the ones that come from migrating 
from Windows.


For them their first hard disk (Who is going to have a zero-hard disk in 
the real world. It has no sense) is C:, but you could name it 1.
And when they partition their hard disk they suppose that the first cut 
it is the 1 not the 0.


I advise to use the hard disk from 1 and partition from 1 convention on 
grub2.


About your arguments... mine are: Grub2 users are not unix OS or its 
sysadmins but Windows ones. Grub2 should address to this kind of users 
in my opinnion.


Nevertheless sysadmins will learn (reading the manual) how to make grub 
work but normal users will complain because if it is not straightforward 
it is not worthy.



adrian15


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


for statements allowed outside menuentries?

2006-12-11 Thread adrian15

This is a question for Marco Gerards I suppose.

I was asking myself if in grub2 code I was allowed to do:

for (part in partitions) {

  menuentry($part) {
whatever($part.grub_string);
}

}

or if it was all restricted to for inside menuentries like:

  menuentry() {
for (hd in harddisks) {
whatever hd
}
}

adrian15


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: Scripting (IMPORTANT!)

2006-10-06 Thread adrian15

Hi,
- root: The active disk/partition (rw, global)
- prefix: The pathname used to load grub.cfg and the modules (rw, global)
- platform: Set to the platform, eg. EFI, IEEE1275, PCBIOS, etc. (ro, global)
- processor: Processor architecture GRUB was compiled for, eg. PPC, x86 (ro, 
global).
- debug: Print debugging messages for certain parts of the code, or
  all messages when set to all.  (rw, global?)
- pager: When set to `1', wait for a key when the bottom of the screen was 
reached.


Marco, my problems comes when I want to load with configfile and source 
many files from a grub2 cdrom. I just want to make sure that I am 
loading from the cdrom but not from another place.


Currently I use something like this in SGD:

configfile $(grub_device)/my_folder/myfile.lst

$(grub_device) is a variable that stores (cd), (fd0) or (hd0) depending 
from which place has SGD booted.


Let's suppose that you can change grub2's root variable with the ROOTC 
command (I do not know which it is the legacy's root equivalent in 
grub2, I will name it ROOTC in order to distinguish it from the variable).
Let's see an example. You boot from a cd. root is (cd). Then you select 
a menu that loads a configfile file from the hard disk. So root is 
changed to (hd0,0). Ok...


If there is an error and want to come back to my menues... How can I 
change the root variable back so that something as:


configfile ${root}/my_folder/myfile.lst

works as expected (loading a file from the cdrom not from the hard disk).

CONCLUSION: I would add a grub_device or first_boot_device variable.


function funcname { code }

 if command ; then commands fi
 for x in (*) ; do commands ; done

A question arises to me... Do we have to type this commands in a single 
line or can we write them in multiple lines?




Arguments can be passed to functions.  In the function body they can
be accessed as in bash ($1, $2, etc).


I do not know why this should be useful... but would $0 return the name 
of the function?



== Idea: Exporting functions to be full featured commands that can be
tab completed, documented, etc.  This way functions can be
implemented by scripts instead of C code.
Yes, please. If I need a more complex search command, I will need to 
implement it as a function and thus I will use it in a lot of scripts 
and exporting it would be a good idea.




Menu entries

== Discussion: Perhaps I will change the #1 into $1, although this is
not really a variable.
This is interesting. If I was myself coding I will choose the #1 syntax. 
However I suppose that people will get used to the $1 and will 
understand better the $1 syntax. I think it is better the $1 syntax.


However, let's see a problematic example.

function boot_linux_part_menu_gen {

begins loop that sets i = 1...x
@ Partition $i $i { linux /vmlinuz root=/dev/hda#{1} }
ends loop that sets i = 1...x

}

Sorry... Let's use the another syntax...

function boot_linux_part_menu_gen {

begins loop that sets i = 1...x
@ Partition $i $i { linux /vmlinuz root=/dev/hda${1} }
ends loop that sets i = 1...x

}

VOILA... ${1} refers to the boot_linux_part_menu_gen function first 
argument or to the Partition mennu first argument ?


My final vote is for the #{1} syntax for the sake of simplicity.


Iterating over files:
for x in (hd0,3)/foo/* ; do commands ; done


I think we need an start variable and a max variable for generating 
menus from big folders.


I do not know which it is the number of files of /etc folder in linux 
folders but I think it is very big.


The idea is with a start=0 show 20 files (like search engines) in a menu 
and the last entry calls the same menu generator function with the:

start=20 show 20 files argument so that we can see the next 20 files.

This will remove memory-eating problems I think.


foreach x in files ; do commands ; done


I would improve this like this:

foreach x in files ($folder) ; do commands ; done
From: Johan Rydberg 
What about a 'prompt' variable?


I think that fits into the cd and pwd discussion that M. Gerards wanted 
to start.


In my opinnion there should be a pwd variable for each of the scopes of 
grub.


By the way...

I configfile one.cfg
From one.cfg I source two.cfg.
Then from two.cfg I configfile three.cfg.
Then from the three.cfg the hipotetical exit command is run do we return 
to the middle of one.cfg execution or not ?


A question... Will I be able to use relative paths (./, ../path/)at last?

adrian15


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


grub2 file browser draft

2006-10-04 Thread adrian15
Marco Gerards you asked me the other day about scripting. If there was 
something missing or any other thing that he could do.


This draft about a grub2 file draft can help him thinking about how 
powerful is his scripting or not.



The user sees inside a menu:
Floppy1
Floppy2
HardDisk1
HardDisk2

He selects HardDisk1. He sees another menu:
View
Save as Argument 1
Save as Argument 2
Setup Grub Here
This is Grub Root (Only if the hard disk/device has no partitions)
He selects View. He sees another menu:
hda1
hda2
hda3
hda4
hda5
He selects hda1. He sees another menu:
View
Save as Argument 1
Save as Argument 2
Setup Grub Here
This is Grub Root (Only if partition filesystem is grub readable)
He selects View. He sees another menu:
/boot
/etc
/var
He selects /etc. He sees another menu:
View
Save as Argument 1
Save as Argument 2
He selects View. He sees another menu:
fstab
config1
config2
He select fstab. He sees another menu:
View
Save as Argument 1
Save as Argument 2
Let's say he returns to previous menu where he is seeing /etc folder.
He select my_index.html. He sees another menu:
	View inside a web browser (GRUB2 will have a module with basic html 
reading I suppose)

View
Save as Argument 1
Save as Argument 2

So Marco Gerards
Do you think that this can be done with your grub scripting? Or the 
grub2 scripting needs more hacking?


adrian15


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: grub2+qemu El Torito boot

2006-07-31 Thread adrian15

Hi,

I've written a script that might be interesting to those who would like to
test GRUB2 in qemu without any use of root privileges.

I am one of this. Thank you.


This is a two-stage approach that uses GRUB Legacy to load GRUB2 from a CD
image, which GRUB2 then uses as a hard drive (whole device, no partition
table). This is effectively native El Torito, except that GRUB Legacy handles
the initial boot.

It's a pity that GRUB2 does not handle ElTorito itself yet.

Oh, and I wasn't able to get this to work with GRUB 1.94: I'm using a cvs
pull that is a few hours old, since 1.94 seems to go into rescue mode no
matter what I do.

It's pity because i only have grub 1.94 at hand. I will try it nevertheless.

adrian15



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


test -e command for grub2

2006-06-13 Thread adrian15

I attach then new test.c for grub2. (I worked from Grub 1.94 version).

It only implements the test -e feature.
I haven't been able to check it. ./configure says something about a LZO
version.

1) Why cat uses the file = grub_gzfile_open (args[0], 1); sentence to
check if a file can be opened or not? Is it cat supposed to cat also
gzipped files?

Is it better for me to use grub_gzfile_open on my test command?

2) I've done this:

static const struct grub_arg_option options[] =
   {
 {file, 'e', 0, test if a file exists, 0, 0},
 {0, 0, 0, 0, 0, 0}
   };

copying-pasting from search.c but I do not understand it too much... if
this is repeated in test.c and search.c the compiler should complain...
isn't it ?

3) And you're free to tell to only attach patchs instead of the full 
file... and you're free to tell me an url for a gnu c syntax or 
convention as far as I do not know if the gnu project has any. And, of 
course, tell me if it compiles or not.


adrian15

P.S.: I am going to update from Knoppix 4 to Knoppix 5 soon and I think 
I won't hae the lzo problem.
/* test.c -- The test command..  */
/*
 *  GRUB  --  GRand Unified Bootloader
 *  Copyright (C) 2005  Free Software Foundation, Inc.
 *
 *  GRUB is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with GRUB; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include grub/normal.h
#include grub/dl.h
#include grub/arg.h
#include grub/misc.h
#include grub/mm.h
#include grub/env.h


static void
test_file_exists (const char *key, const char *var)
{
	char *p;

	grub_file_t file;

  file = grub_file_open (key);
  if (file)
	{
	  grub_printf ( %s, key);
	  grub_file_close (file);
	  grub_errno = GRUB_ERR_NONE;
	  return 0;
	}
  else
	{
	  grub_error (GRUB_ERR_FILE_NOT_FOUND, File does not exists.);
	}
}


static const struct grub_arg_option options[] =
  {
{file, 'e', 0, test if a file exists, 0, 0},
{0, 0, 0, 0, 0, 0}
  };

static grub_err_t
grub_cmd_test (struct grub_arg_list *state, int argc, char **args)
{
  const char *var = 0;
  
  if (argc == 0)
return grub_error (GRUB_ERR_INVALID_COMMAND, no argument specified);

  if (state[0].set)
test_file_exists (args[0], var);

  return grub_errno;
}


GRUB_MOD_INIT(test)
{
  (void)mod;			/* To stop warning. */
  grub_register_command ([, grub_cmd_test, GRUB_COMMAND_FLAG_CMDLINE,
			 [ EXPRESSION ], Evaluate an expression, 0);
  grub_register_command (test, grub_cmd_test, GRUB_COMMAND_FLAG_CMDLINE,
			 test EXPRESSION, Evaluate an expression, 0);
}

GRUB_MOD_FINI(test)
{
  grub_unregister_command ([);
  grub_unregister_command (test);
}

___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: Changing the default OS

2006-05-02 Thread adrian15
It's very interesting why people ask questions about GRUB Legacy here again 
and again, although I have written Do not use this list for GRUB Legacy in 
everywhere.


Okuji


Is it so difficult to rename mailing-lists ?

Rename bug-grub to grub
Rename grub-devel to grub2 or grubbeta and you will see how there are 
some changes.


adrian15


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: SOC - SGD based on grub2 - Menu and scripting status

2006-04-28 Thread adrian15

5) I need to define something (In my grub legacy fork is a menu.lst)
that lets me choose the harddisk-partition which I want to work
on. Can I make it easily?



You mean as a variable?  That's possible.


I will explain this point in more detail if you don't mind. Here goes 
copy-pasted

1) the first the lst for hard disks and then
2)the second one the sh that makes the lst for partitions.
3) An lst for making easier to call the selection of partitions from 
inside a function or whatever.

4) An example of how this menues/selectors are called. (lst)

I'm not asking you to develop a command for giving me this lst on the 
fly adapted to the user pc. You know what I was telling before: If the 
users hard disk has only three partitions make an array with only three 
values which are the partitions.


I'm asking you to think about new features that scripting should have so 
that the developing of this command is far easy.


OFFTOPIC NOTE: I am working on grub legacy call and back commands so 
that what you see below actually works. I think this night it will work 
ok but who knows.


adrian15


hard.disk.lst:
==

title $(choose_title)
pause
title NATURAL   LINUX-IDE LINUX-SCSI GNU/GRUB
pause
title 1.hda   sdahd0
set out_device=hd0
set out_hd=hd0
set out_lide_hd=hda
set out_lscsi_hd=sda
back

title 2.hdb   sdbhd1
set out_device=hd1
set out_hd=hd1
set out_lide_hd=hdb
set out_lscsi_hd=sdb
back

title 3.hdc   sdchd2
set out_device=hd2
set out_hd=hd2
set out_lide_hd=hdc
set out_lscsi_hd=sdc
back

title 4.hdd   sddhd3
set out_device=hd3
set out_hd=hd3
set out_lide_hd=hdd
set out_lscsi_hd=sdd
back

generate_part_lst.sh:
==

SDG_PARTITIONS_LIST=0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17;



cat  EOF

title \$(choose_title)
pause
title NATURAL   LINUX-IDE   LINUX-SCSI  GNU/GRUBGNU/HURD
pause
EOF


for n_partition in $SDG_PARTITIONS_LIST; do

ln_partition=$[$n_partition + 1];


cat  EOF


title ${ln_partition}	\$(out_lide_hd)${ln_partition} 
\$(out_lscsi_hd)${ln_partition}	(\$(out_hd),${n_partition}) 
\$(out_hurd_hd)s${ln_partition}

set out_device=(\$(out_hd),${n_partition})
set out_part=(\$(out_hd),${n_partition})
set out_lide_part=\$(out_lide_hd)${ln_partition}
set out_lscsi_part=\$(out_lscsi_hd)${ln_partition}
set out_hurd_part=\$(out_hurd_hd)s${ln_partition}

EOF

done

partition.lst:
===
default 0
timeout 0
title  Choose hard disk and partition
call $(grub_device)/boot/grub/choose/hard_disk.lst
call $(grub_device)/boot/grub/choose/part.lst
back

test.lst:
===
title THIS IS A TEST FOR CALLING hard disk
set choose_title=TEST FOR CHOOSING HARD DISK TITLE
call $(grub_device)/boot/grub/choose/hard_disk.lst
title THIS IS A TEST FOR CALLING part.lst
set choose_title=TEST FOR CHOOSING PART ONLY TITLE
call $(grub_device)/boot/grub/choose/part.lst
title THIS IS A TEST FOR CALLING partition (Both hard disk and partition)
set choose_title=TEST FOR CHOOSING PART AND HD TITLE
call $(grub_device)/boot/grub/choose/partition.lst

This is the begginnings of the generated part.lst and you know it is 9 
times bigger:

===
title $(choose_title)
pause
title NATURAL   LINUX-IDE   LINUX-SCSI  GNU/GRUBGNU/HURD
pause


title 1 $(out_lide_hd)1 $(out_lscsi_hd)1($(out_hd),0)   $(out_hurd_hd)s1
set out_device=($(out_hd),0)
set out_part=($(out_hd),0)
set out_lide_part=$(out_lide_hd)1
set out_lscsi_part=$(out_lscsi_hd)1
set out_hurd_part=$(out_hurd_hd)s1



title 2 $(out_lide_hd)2 $(out_lscsi_hd)2($(out_hd),1)   $(out_hurd_hd)s2
set out_device=($(out_hd),1)
set out_part=($(out_hd),1)
set out_lide_part=$(out_lide_hd)2
set out_lscsi_part=$(out_lscsi_hd)2
set out_hurd_part=$(out_hurd_hd)s2


adrian15


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: SOC - SGD based on grub2 - Menu and scripting status

2006-04-28 Thread adrian15

On Monday 24 April 2006 20:36, Marco Gerards wrote:


Will this mean Adrian can use it for menu entries as well?  I think
that is what he wants to do.



In my idea, yes. I can say anything before implementing. ;)

Okuji


Yes... The thing that when meaning translation I was thinking about SGD, 
which is kind of a GUI for Grub so... I did not think about Grub 
messages but to menu entries as Marco suggested.


However you're right Grub messages could also be translated.

Currently I have SGD (only menu entries) translated to various languages 
with a three-level structure... one for algorithm... one for kind of 
universal language and one for the actual languages. It's implemented 
with bash variables and uses sed and other unix tools and it is not 
perfect...


I know there was this gettext thing and in the first place I didn't get 
to work it with bash (I think I needed to recompile it) so I discarded 
the idea.


Maybe I will take a look at gettext again for SG2D.

adrian15


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: Parted/GRUB joint-venture

2006-04-24 Thread adrian15

Hello,

  I am the representative of GNU Parted and am also interested in the
development of GRUB2 (I've been lurking on this list for some months).
  James from the GNU SoC team wrote me:
EOQ
There is a project suggestion relating to GRUB which relates to
libparted.  Please get in touch with the maintainers of GRUB (e.g.
Yoshinori K. Okuji) to discuss that project and ensure it has the best
chance of getting good guidance and is successful.   The project
doesn't have to end up in just GRUB or just Parted, it's just that I'm
looking to make sure that the idea works well and flourishes.
EOQ


I do not know if okuji has talked to you directly.
Have you seen this?

http://www.gnu.org/software/grub/grub-soc.html
Parted integration
Integrate GNU Parted's library (libparted) with GRUB so that we can make 
use of the full power of the Parted's functionality at boot time.


Parted supports creation, deletion, resizing of partitions and 
filesystems. These features are extremely useful when you get troubled 
or have a complicated boot environment. Because libparted uses some 
external libraries, you will have to think how to make things run on the 
GRUB's environment, where you cannot use POSIX or Unix system calls.


This should be implemented as an optional dynamic module by using the 
module loading feature in GRUB 2.


adrian15


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


SOC - SGD based on grub2 - Menu and scripting status

2006-04-24 Thread adrian15

I've reading the G'SOC document:

http://www.gnu.org/software/grub/grub-soc.html

and I've been tented to add a new proposal for grub2.

As you all should have guessed it would a Super Grub Disk ( 
http://adrian15.raulete.net/grub/ ) but not based on grub legacy but grub2.


	If I want the project to be feasible I need that the grub2 api relative 
to menues and scriptings is fixed. That means that the name of the 
commands and its behavior don't change since I begin the project to the 
end of it.


So here are some questions that have arised...

1) Marco Gerards: Do you think that commands/functions/variables related 
to menues files are going to change a lot?
But I don't mean RIGHT NOW. I mean in the beginnings of SOC... which I 
don't know... let's see... 23th May. (in one month time).


	If these commands are available where should I get a list of them and 
their behaviour?


2) Do you like the Super Grub2 CD name... or should it be Grub2 CD or 
Grub CD and that's all? Grub Rescue CD perhaps?


3) What features would you like to see apart from the ones that are 
already implemented in Super Grub Disk ( 
http://adrian15.raulete.net/grub/tiki-index.php?page=En )?


4) What is the best way for dealing with languages and translations when 
developing?


5) I need to define something (In my grub legacy fork is a menu.lst) 
that lets me choose the harddisk-partition which I want to work on. Can 
I make it easily?


Can Grub2 api write me in an array or a similar the partitions that can 
read in a given hard disk? So that if there are 3 partitions they are 
saved into an array of size 3?


adrian15


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: proposals for grub2 (i think 3rd email)

2006-04-20 Thread adrian15

adrian15 [EMAIL PROTECTED] writes:



2) Being able to mount tar.gz files.

Why?

This was a real need with my stupid implementation of Grub Legacy on
Super Grub Disk that made me having a lot of different little lst files
(till 8000 files) and thus made it impossible to save it into a floppy.
(You know 8000 files occuppy more space than these 8000 files in a
single tar and if it is gz is smaller)

Due to the script nature of lst? files of grub2 I think there won't be
need of such a feature. At least I won't need it.

Maybe other people will need it but let's not insist on this proposal then.

3) Being able to mount loopback devices.

This is possible already.

GREAT!

4) Mapping partitions directly to Grub partitions. Is it possible ?

Huh?

I know that Grub does not take in account partitions as a single entity
but rather devices that can have or not its partitions.

I am not very sure but I suppose that there are some ocassions where it
is useful to treat partitions as a single entity such as from inside the
grub shell inside a linux shell using the device command (which could be
renamed to partition) and trying to access to a partition that could be:

* A partition from these new things called: Logical Volume Manager (LVM)

* A partition that has being dded to a file and thus don't need to be
a hard disk image. (I'm talking about a file because you say that you
can loopback!)

That's all for the reply! But there's an idea left.



The other day I was talking with a friend about the development of Super
Grub Disk and specifically on the part of Grub Legacy Source Code.

He told me that we could manage to build a c function so that it creates
on the fly a menu on which you could choose all the hard disks and then
all the partitions of the hard disks but not fixed ones (Let's say from
1st to 20th partitions) but real ones... if you have 3 partitions you
only see 3 partitions... if you have 4 partitions you only see 4 partitions.

Would there some kind of function/menu that let the user select its own
partitions detected by grub on grub2?

adrian15



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: Automatic backup with grub

2005-11-02 Thread adrian15
 On Thursday 27 Oct 2005 17:03, E Leibovich wrote:
  As I'm planning to use it as a recovery console I
  prefer loading linux won't be dependable of loading
  windows, but that it'll be loaded on its on each week
  or each 10 boots. It seems to me that grub requires a
  very small patch in order to make partitionX loaded 10
  times and then to go back to default - am I correct?
 
 No, you can use GRUB Legacy's savedefault command. See:
 http://www.gnu.org/software/grub/manual/grub.html#Booting-once_002donly
 That way requires 10 menu entries for booting Windows.

Hi! What have you done at the end?
Have you tried my solution (http://lists.gnu.org/archive/html/bug-
grub/2005-10/msg00049.html ) or do you prefer the savedefault one (the one 
above here) because you do not depend on windows xp?


adrian15



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: Scripting support (PATCH)

2005-11-02 Thread adrian15
  I think also. Because theese modifications are lost after boot they 
 are generally modified only to boot one time an OS with specifical 
 parameters and you don't need scripts for this.
 
 Right.  The only reason I see for editing the script in general is to
 edit some menu generation routine.  But that is a very rare case I
 think.  If it turns out not to be a rare case, we can provide this
 feature later on.

I'm not quite sure if this discussion will affect my next development of 
GSD based on grub2 but I'll tell you my opinnion:

Grub2 config files should be interpreted as if you were running a bash 
script. (I actually don't know if it corresponds to approach #1 or #2 or if 
it hasn't any relation with it)

The thing is that for developing GSD easily I will need some menu 
generation routines... althought... now that I think it better...
I can made these routines from normal bash scripts.

In conclusion, I'm quite confused but try to help further GSD development.

adrian15

Grub Super Disk (GSD) : http://adrian15.raulete.net/grub/



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: [GRUB1] Accessibility: Add beep support

2005-11-02 Thread adrian15
 Hi,
 
 I know that no new feature are added to grub1, but this really small
 feature (it can be just implemented as echo ^G) would be _much_ useful
 for blind people. Please see details on
 https://savannah.gnu.org/bugs/?func=detailitemitem_id=14661
 I proposed a patch adding an echo command:
 https://savannah.gnu.org/bugs/download.php?item_id=14661item_file_id=30
 77
 Could this be commited?
 
 Regards,
 Samuel

Hi Samuel, if you happen to build a grub cdrom with this feature in it 
please send it to me or tell me an url to it.

I think that the beep thing should be easily OFF or ON.
Why don't you make a beep ON OFF command.


My idea for GSD would be default entry (in 5 seconds) activates beep and 
not default entry do not activates it. (Useful in Offices where there are a 
lot of people)


Then I could assign each GSD option a sound or something. Well, I'm not 
quite sure. Do you think GSD is useful for a blind person?

adrian15

GSD is found at http://adrian15.raulete.net/grub/




___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: Fun abusing grub...

2005-10-18 Thread adrian15
 
 Greetings,
 
 I didn't try to break any records, but I did try to make a good
 reference machine for each of these operating systems and
 get real experience about handling real devices.
 
 Enclosed, read the touching tale of my attempts at installing 9
 different operating systems under Grub.
 
 --Chris


Hi Chris I am doing a thing called Grub Super Disk and I am very interested 
on seeing your grub.conf file or menu.lst, the one from Fedora /boot,
it might give me some hints on how to improve Grub Super Disk.

Can you please send it by email or upload it somewhere... or just paste it 
in an email?


adrian15



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


gsd proposal : dd

2005-10-18 Thread adrian15
Let's suppose that MBR has this structure:

Boot Code: 466 bytes
Partition table: 66 bytes

Let's do the following with Linux:

dd if=/dev/zero of=./blank.img count=1 bs=466
dd if=./blank.img of=/dev/hda

I think that this two commands will make a thing similar to
fdisk /mbr
that's to say give a blank mbr.

Supposing that this is equivalent to fdisk /mbr let's build a
grub disk
with the following extra file: blank.img stored int /boot/grub/ folder.

My first instict, my first thought was to do:

install p /boot/grub/blank.img INTO (hd0)

(Sorry, I don't remember the correct syntax right now, but I suppose you 
get the point)

The problem is that when I read install command documentation it says that 
Grub before embedding stage1 into the MBR checks if it's a right 
Grub stage1 image.

So... I suppose I cannot embedd this image into the MBR.

So some questions arise right now:

 1)  When Grub embeds an stage1  image into the MBR does it copy it into 
the 1st 466 bytes or not? And... why its size is 512 bytes instead of 466 
bytes as in my scheme?

2) Can I make a fake blank.img which is approved as a good grub stage1 by 
grub itself?

3) (THIS IS THE PROPOSAL) Will Grub 2 include a dd command... so that you 
can dd some images as a blank mbr or a mbr backup ?


Thank you for your questions in advance.

Ah,... I've made a Grub Super Disk version totally translated into 
English... check version 0.8.9 in floppy or cdrom here:

http://adrian15.raulete.net/ficheros/gsd_0.89.iso
http://adrian15.raulete.net/ficheros/gsd_0.89_en.img


adrian15



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


gsd grub2 option proposal

2005-08-30 Thread adrian15
Well, 

Here I am subscribed to devel grub mailing list.

I supposed that my former email
(grub2 grub super disk proposals, remember?)
 you have decided that is good idea to implement commands called:

grub_title
echo

and some other ideas.

I wanted to talk about user interaction.
User Interaction is very important on Grub Super Disk.

I need the user to choose some options some variables.

Just below a option line there has to be a
command which is neither title
neither option.

Once every option is read (till next title or till end of file)
the options are presented (in a menu):

2nd hard disk
3rd hard disk
4th hard disk

and once one of them is selected the lines which are
below the selected option and the next one are
executed.

In my example when we choose 2nd hard disk
the line:

swapped_hd_value=(hd1)
is executed.


So I am going to write you a hipotetical grub2 menu.lst
grub2.cfg you call it now?
with the option idea and you tell me
if you have already developed something similar
or if you're planning to do it.


# Default values of swapped disks and devices to boot

swapped_hd=2nd hard disk
swapped_hd_value=(hd1)
boot_dev=(fd0)

# grub_title is the variable for showing the grub title (in place of free 
mem and grub version)
grub_title=Swap 1st hard disk with $swapped_hd and boot $boot_dev

title Select Swapped hard disk
option 2nd hard disk
swapped_hd=2nd hard disk
swapped_hd_value=(hd1)
option 3rd hard disk
swapped_hd=3rd hard disk
swapped_hd_value=(hd2)
option 4th hard disk
swapped_hd_value=(hd3)
swapped_hd=4th hard disk

title Select device to boot
option 1st partition 2nd hard disk
boot_dev=(hd1,0)
option floppy
boot_dev=(fd0)
option cdrom
boot_dev=(cd)

title Go!
map (hd0) $swap_hd_value
map $swap_hd_value (hd0)
rootnoverify $boot_dev
boot




That's all folks!

adrian15



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel