While downloading or installing applications through terminal in Ubuntu 18.04, I found errors as the following:
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.15.0-101-generic
Found initrd image: /boot/initrd.img-4.15.0-101-generic
Found linux image: /boot/vmlinuz-4.15.0-22-generic
Found initrd image: /boot/initrd.img-4.15.0-22-generic
Found linux image: /boot/vmlinuz-4.15.0-101-generic
Found initrd image: /boot/initrd.img-4.15.0-101-generic
Found linux image: /boot/vmlinuz-4.15.0-22-generic
Found initrd image: /boot/initrd.img-4.15.0-22-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
/etc/grub.d/50_custom.save: 1: /etc/grub.d/50_custom.save: menuentry: not found
insmod: ERROR: could not load module part_gpt: No such file or directory
/etc/grub.d/50_custom.save: 4: /etc/grub.d/50_custom.save: search: not found
/etc/grub.d/50_custom.save: 5: /etc/grub.d/50_custom.save: linux: not found
/etc/grub.d/50_custom.save: 6: /etc/grub.d/50_custom.save: initrd: not found
/etc/grub.d/50_custom.save: 7: /etc/grub.d/50_custom.save: }#!/bin/sh: not found
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 282
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.
How can i correct this?
/etc/grub.d/50_custom.save
contains. Related question: How can I repair grub? – Melebius Nov 09 '20 at 09:50