help-grub
[Top][All Lists]
Advanced

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

Re: little problem with grub2.cfg and if cmd


From: Andrey Borzenkov
Subject: Re: little problem with grub2.cfg and if cmd
Date: Tue, 21 May 2013 06:41:15 +0400

В Mon, 20 May 2013 16:25:20 -0500
Dany Flores <address@hidden> пишет:

> First I using the vanilla version of grub2, and to edit the grub.cfg I used 
> vim,
> so is not a error for that.
> 
>    The other test that I did, was to type this lines in the grub console.
> 
> set CQTEST=3
> if [ ${CQTESS} = 3 ]; then
>    ls
> fi
>  
>     And they show me the same error. 
> 
>    More info:
> 
>    My server is a hp with a UEFI bios and I use SLES11SP2, everything works 
> except the if command.
> 

Is module "test" loaded (check with lsmod)? If not - does the above work
after "insmod test"?

> 
> 
> 
> > From: address@hidden
> > Date: Sat, 18 May 2013 02:04:21 +0000
> > Subject: Re: little problem with grub2.cfg and if cmd
> > To: address@hidden
> > CC: address@hidden
> > 
> > In the future please don't send html email to help-grub (or almost any
> > other technical mailing list).
> > 
> > On Fri, May 17, 2013 at 10:38 PM, Dany Flores <address@hidden> wrote:
> >> Hi All
> >>
> >> This is the problem that I have, using grub 2.0 I have some problem with
> >> the if command, this is part of my grub.cfg
> >>
> >> set CQTEST=3
> >> if [ ${CQTESS} = 3 ]; then
> >> set GRUB_DEFAULT=2
> >> else
> >> set GRUB_DEFAULT=0
> >> fi
> > 
> > While you are changing the wrong variable ($GRUB_DEFAULT is the
> > variable used in /etc/default/grub, in the grub.cfg the variable is
> > simply $default), I don't see how the code above, as plain text, would
> > give the error message you received (at least not with grub upstream
> > grub 2.00). The fact that in your original email different lines had
> > different font sizes for no reason that I could tell makes me
> > suspicious that you may be using a word processor like Open Office to
> > edit your grub.cfg, if that's the case you should not do that. Using a
> > word processor (as opposed to a text editor) to edit configuration
> > files can lead to odd errors, among other things important things like
> > quotation marks (" ") are often replaced with smart quotes and if
> > you're really unlucky you may even get formatting garbage in your
> > configuration file. Always use text editors for editing configuration
> > files.
> > 
> >>
> >> Is very simple, but when boot the server, show me an error, error: can't
> >> find command `['.
> >>
> >> I need to do something or load another module or if not possible to do
> >> something like my example
> >>
> > 
> > Modules are automatically loaded as needed (except when running Fedora
> > and possibly other distros modified grub in a secure boot environment,
> > in which case insmod is disabled entirely) so you should not need to
> > load modules explicitly for any command. If you are not editing your
> > grub.cfg with a word processor please include the complete grub.cfg
> > you're having issues with as well as the output of "grub-install
> > --version" in a reply.
> > 
> > -- 
> > Jordan Uggla (Jordan_U on irc.freenode.net)                                 
> >           
> _______________________________________________
> Help-grub mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-grub




reply via email to

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