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
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"