Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved] [Testing - Trixie] Grub Syntax error

- - ALL UNSTABLE / TESTING THREADS SHOULD BE POSTED HERE - -
This sub-forum is the dedicated area for the ongoing Unstable/Testing releases of Debian. Advanced, or Experienced User support only. Use the software, give, and take advice with caution.
Post Reply
Message
Author
amin11
Posts: 19
Joined: 2023-03-25 09:04
Has thanked: 4 times

[Solved] [Testing - Trixie] Grub Syntax error

#1 Post by amin11 »

I can't upgrade GRUB.
Update-grub2 also gives the same error.
How do I find a file where the error exists?
How can I test the syntax of files individually?
I think the problem is UEFI.

error:

Code: Select all

hasan@debian:~$ sudo apt upgrade 
[sudo] password for hasan: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up grub-efi-amd64 (2.12-2~deb13u1) ...
Installing for x86_64-efi platform.
Installation finished. No error reported.
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-6.6.15-amd64
Found initrd image: /boot/initrd.img-6.6.15-amd64
Found linux image: /boot/vmlinuz-6.6.13-amd64
Found initrd image: /boot/initrd.img-6.6.13-amd64
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 237
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
dpkg: error processing package grub-efi-amd64 (--configure):
 installed grub-efi-amd64 package post-installation script subprocess returned e
rror exit status 1
Processing triggers for shim-signed:amd64 (1.40+15.7-1) ...
Errors were encountered while processing:
 grub-efi-amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

My /etc/grub.d/ folder contains the following files

Code: Select all

hasan@debian:~$ ls /etc/grub.d/
00_header        25_bli                  35_fwupd   proxifiedScripts
05_debian_theme  26_windows_proxy        40_custom  README
10_linux         30_os-prober            41_custom
20_linux_xen     31_uefi-firmware_proxy  backup
21_memtest86+    32_windows_proxy        bin
My /etc/default/grub

Code: Select all

hasan@debian:~$ cat /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT="0"
GRUB_TIMEOUT="10"
GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX=""

# Uncomment this to run os-prober to search for and add other OS
# installations to the grub boot menu
#GRUB_DISABLE_OS_PROBER=false

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal
#GRUB_TERMINAL="console"

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE="640x480"

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID="true"

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
Last edited by amin11 on 2024-04-09 11:30, edited 5 times in total.

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1420
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 80 times
Been thanked: 191 times

Re: [Testing - Trixie] Grub Syntax error

#2 Post by steve_v »

Those whatever_proxy scripts are not part of a standard grub install, and this is almost certainly yet another mess made by Grub Customizer.
Grub Customizer is trash (and worse, it's Ubuntu trash), get rid of it, clean up it's mess, and reinstall GRUB. Also see here WRT the backup files is supposedly makes before it screws up your system.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

Post Reply