And I can’t even run update-grub anymore as I am getting issues:
Generating grub configuration file ...
Found background: /usr/share/endeavouros/splash.png
Found linux image: /boot/vmlinuz-linux-xanmod
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux-xanmod.img
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot: intel-ucode.img initramfs-linux-fallback.img
Found linux image: /boot/vmlinuz-linux-xanmod
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux-xanmod.img
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot: intel-ucode.img initramfs-linux-fallback.img
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 ...
Adding boot menu entry for UEFI Firmware Settings ...
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 213
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
I think those are carriage returns–I would suppose those would not be in the final version of the file.
The actual error might be caused by the end of the “if” statement, with nothing written for the “then” of it. I’m not sure about that, just it doesn’t look right (it seems like something is supposed to be on that empty line).
This person ran into the same issue, on the same line: Sudo grub-mkconfig -o /boot/grub/grub.cfg does not work They were also using Grub-customizer. It was line 277 in their case, but I checked and it’s the same fi that’s throwing the error.
if [ "$grub_platform" = "efi" ]; then
fwsetup --is-supported
if [ "$?" = 0 ]; then
fi
fi
I think the best thing to do would be to file a bug report as they mentioned in the note you posted.
As for getting Grub straightened out, try removing Grub-customizer for now and see if you can at least get through an update-grub so you have a good config file to boot off of.
I didn’t realise you needed something inside an if statement.
Ok I will do this thanks
That actually seemed to have solved my issue. But how does removing grub-customizer fix it though? I mean I thought it writes to some file or something and me removing it also removes the file?
Maybe you don’t, I’m not sure; I was only trying to come up with a theory why it is failing on that line, which is only a fi.
Grub is meant to honor files stored in /etc/grub.d/. Grub-customizer works by adding in some configs into that directory to achieve whatever it is you are trying to do. That file it is crashing on (/etc/grub.d/49_uefi-firmware_proxy), I don’t even have that file on my system.
It seems that when you uninstall it, thankfully it takes down the extra configs it has set up.
It’s like saying to someone who has cut himself with a knife: Don’t use a knife!
Most of the issues I have seen with Grub Customizer are user-related.
They tend to uninstall the program without restoring /etc/grub.d to the the state prior to using the software not being aware of the changes that have been made to the grub files.
That folder gets actually backed up by Grub Customizer itself
I am not saying that I like it or use it. It is not a question of like or dislike.
I am just saying that this piece of software seems to have got a bad reputation mostly because those who use it don’t know or don’t care to know how it works and how it modifies the Grub environment.
When they are left with a broken Grub after they have used and uninstalled the program they tend to blame the tool. It’s easier that way