grub-customizer fails to create a cfg

Bug #2018426 reported by Glenn Zickert
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Grub Customizer
New
Undecided
Unassigned

Bug Description

My computer does not support UEFI Firmware. I get an error when grub-customizer tries to create a menue entry for the UEFI Firmware Settings. The error messages are below:

Adding boot menu entry for UEFI Firmware Settings ...
error: ../grub-core/script/lexer.c:352:syntax error.
error: ../grub-core/script/lexer.c:352:Incorrect command.
error: ../grub-core/script/lexer.c:352:syntax error.
Syntax error at line 266
Syntax errors are detected in generated GRUB config file.

I removed all old kernels and the UEFI Firmware Settings prior to saving. I acknowledge the error. When I mv /boot/grub2/grub.cfg.new to /boot/grub2/grub.cfg it works perfectly.

Revision history for this message
Daniel Richter (danielrichter2007) wrote :

Please attach the /boot/grub2/grub.cfg.new (or the grub.cfg when you moved the grub.cfg.new). It says that there's something wrong at line 266 of this file. I need to see it.

Revision history for this message
Glenn Zickert (gzickert) wrote :

I have attached the grub.cfg.new per your request.

Revision history for this message
Daniel Richter (danielrichter2007) wrote :

It's because of the uefi-firmware script. the menuentries were enclosed by an if statement. But after removing the menuentries, the if statement is empty. This leads to the error. You can activate View -> "[x] show placeholders", and then remove the "script code" entry of "uefi-firmware". That should fix your problem.

Revision history for this message
Glenn Zickert (gzickert) wrote : Re: [Bug 2018426] Re: grub-customizer fails to create a cfg

I followed your instructions and uefi-fimware entry is moved to the
right column labeled "Removed items". Clicking the save button
generates the same error message and a grub.cfg.new file.

------ Original Message ------
From "Daniel Richter" <email address hidden>
To <email address hidden>
Date 5/6/2023 3:41:08 PM
Subject [Bug 2018426] Re: grub-customizer fails to create a cfg

>It's because of the uefi-firmware script. the menuentries were enclosed
>by an if statement. But after removing the menuentries, the if statement
>is empty. This leads to the error. You can activate View -> "[x] show
>placeholders", and then remove the "script code" entry of "uefi-
>firmware". That should fix your problem.
>
>--
>You received this bug notification because you are subscribed to the bug
>report.
>https://bugs.launchpad.net/bugs/2018426
>
>Title:
> grub-customizer fails to create a cfg
>
>Status in Grub Customizer:
> New
>
>Bug description:
> My computer does not support UEFI Firmware. I get an error when grub-
> customizer tries to create a menue entry for the UEFI Firmware
> Settings. The error messages are below:
>
> Adding boot menu entry for UEFI Firmware Settings ...
> error: ../grub-core/script/lexer.c:352:syntax error.
> error: ../grub-core/script/lexer.c:352:Incorrect command.
> error: ../grub-core/script/lexer.c:352:syntax error.
> Syntax error at line 266
> Syntax errors are detected in generated GRUB config file.
>
> I removed all old kernels and the UEFI Firmware Settings prior to
> saving. I acknowledge the error. When I mv /boot/grub2/grub.cfg.new
> to /boot/grub2/grub.cfg it works perfectly.
>
>To manage notifications about this bug go to:
>https://bugs.launchpad.net/grub-customizer/+bug/2018426/+subscriptions
>

Revision history for this message
Glenn Zickert (gzickert) wrote : Re[2]: [Bug 2018426] Re: grub-customizer fails to create a cfg

------ Original Message ------
From "Glenn Zickert" <email address hidden>
To "Bug 2018426" <email address hidden>
Date 5/6/2023 4:34:27 PM
Subject Re: [Bug 2018426] Re: grub-customizer fails to create a cfg

>I followed your instructions and uefi-fimware entry is moved to the right column labeled "Removed items". Clicking the save button generates the same error message and a grub.cfg.new file.
>
>
>------ Original Message ------
>From "Daniel Richter" <email address hidden>
>To <email address hidden>
>Date 5/6/2023 3:41:08 PM
>Subject [Bug 2018426] Re: grub-customizer fails to create a cfg
>
>>It's because of the uefi-firmware script. the menuentries were enclosed
>>by an if statement. But after removing the menuentries, the if statement
>>is empty. This leads to the error. You can activate View -> "[x] show
>>placeholders", and then remove the "script code" entry of "uefi-
>>firmware". That should fix your problem.
>>
>>--
>>You received this bug notification because you are subscribed to the bug
>>report.
>>https://bugs.launchpad.net/bugs/2018426
>>
>>Title:
>> grub-customizer fails to create a cfg
>>
>>Status in Grub Customizer:
>> New
>>
>>Bug description:
>> My computer does not support UEFI Firmware. I get an error when grub-
>> customizer tries to create a menue entry for the UEFI Firmware
>> Settings. The error messages are below:
>>
>> Adding boot menu entry for UEFI Firmware Settings ...
>> error: ../grub-core/script/lexer.c:352:syntax error.
>> error: ../grub-core/script/lexer.c:352:Incorrect command.
>> error: ../grub-core/script/lexer.c:352:syntax error.
>> Syntax error at line 266
>> Syntax errors are detected in generated GRUB config file.
>>
>> I removed all old kernels and the UEFI Firmware Settings prior to
>> saving. I acknowledge the error. When I mv /boot/grub2/grub.cfg.new
>> to /boot/grub2/grub.cfg it works perfectly.
>>
>>To manage notifications about this bug go to:
>>https://bugs.launchpad.net/grub-customizer/+bug/2018426/+subscriptions
>>

Revision history for this message
Glenn Zickert (gzickert) wrote :

I added the view/details and found 2 placeholders for uefi-firmware
which I also removed. Saving resulted in an error-free cfg. You
should modify the program to remove these when the uefi-firmware is
removed from the menu. Thanks for your help in this issue.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.