Skip to content

Instantly share code, notes, and snippets.

@gerardorochin
Last active March 5, 2024 04:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gerardorochin/8028591 to your computer and use it in GitHub Desktop.
Save gerardorochin/8028591 to your computer and use it in GitHub Desktop.
Fix error generated on the install GRUB on Arch Linux: Syntax errors are detected in generated GRUB config file.
# try:
grub-mkconfig -o /boot/grub/grub.cfg
# output error:
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux-ck
Found initrd image: /boot/initramfs-linux-ck.img
Found Windows 8 (loader) on /dev/sda1
error: out of memory.
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 159
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.done
# fix:
edit the file /etc/grub/defaults and append line: GRUB_DISABLE_SUBMENU=y
# and retry:
grub-mkconfig -o /boot/grub/grub.cfg
done
@worblehat
Copy link

Thank you, this really made my day!

I just had to edit /etc/default/grub istead of /etc/grub/defaults.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment