Page 1 of 1

Mint 19 - grub-pc - syntax error

Posted: Wed Feb 17, 2021 7:35 am
by pisior
An installation or uninstallation of any software (new software or updates) ends up with grub-pc syntax error and grub recovery. Everything works well, even newly installed programs, system boots up well too, despite of the error.
How can I get rid of this error?
Details:
Mint 19 Tara 64bit, Linux 4.15.0-20-generic x86_64

Example - uninstalling rhythmbox:

Code: Select all

Removing rhythmbox-plugins (3.4.2-4ubuntu1) ...
Removing rhythmbox-plugin-tray-icon (2016.11.23.2) ...
Removing rhythmbox (3.4.2-4ubuntu1) ...
Setting up grub-pc (2.02-2ubuntu8.21) ...
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50_linuxmint.cfg'
Generating GRUB config file
Found Linux image: /boot/vmlinuz-4.15.0-20-generic
Found initrd image: /boot/initrd.img-4.15.0-20-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 on /dev/sdb1
error: syntax error.
error: Incorrect command.
error: syntax error.
syntax error in line 145
Some syntax errors were found in the generated GRUB configuration file
Please make sure the files / etc / default / grub and /etc/grub.d/*
there are no errors, or fill an error report with the file /boot/grub/grub.cfg.new.
dpkg: error processing package grub-pc (--configure):
 installed grub-pc package post-installation script subprocess returned error exit status 1
Setting up friendly-recovery (0.2.38ubuntu1.2) ...
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50_linuxmint.cfg'
Generating GRUB config file
Found Linux image: /boot/vmlinuz-4.15.0-20-generic
Found initrd image: /boot/initrd.img-4.15.0-20-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 on /dev/sdb1
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error in line 145
Some syntax errors were found in the generated GRUB configuration file
Please make sure the files / etc / default / grub and /etc/grub.d/*
there are no errors, or fill an error report with the file /boot/grub/grub.cfg.new.
dpkg: error processing package friendly-recovery (--configure):
 installed friendly-recovery package post-installation script subprocess returned error exit status 1
Processing triggers for desktop-file-utils (0.23+linuxmint5) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Errors were encountered while processing:
 grub-pc
 friendly-recovery
Setting up grub-pc (2.02-2ubuntu8.21) ...
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50_linuxmint.cfg'
Generating GRUB config file
Found Linux image: /boot/vmlinuz-4.15.0-20-generic
Found initrd image: /boot/initrd.img-4.15.0-20-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 on /dev/sdb1
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error in line 145
Some syntax errors were found in the generated GRUB configuration file
Please make sure the files / etc / default / grub and /etc/grub.d/*
there are no errors, or fill an error report with the file /boot/grub/grub.cfg.new.
dpkg: error processing package grub-pc (--configure):
 installed grub-pc package post-installation script subprocess returned error exit status 1
Setting up friendly-recovery (0.2.38ubuntu1.2) ...
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50_linuxmint.cfg'
Generating GRUB config file
Found Linux image: /boot/vmlinuz-4.15.0-20-generic
Found initrd image: /boot/initrd.img-4.15.0-20-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 on /dev/sdb1
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error in line 145
Some syntax errors were found in the generated GRUB configuration file
Please make sure the files / etc / default / grub and /etc/grub.d/*
there are no errors, or fill an error report with the file /boot/grub/grub.cfg.new.
dpkg: error processing package friendly-recovery (--configure):
 installed friendly-recovery package post-installation script subprocess returned error exit status 1
Thank you for help.