You are not logged in.
Pages: 1
Hi, I was trying to enable hibernation on my laptop and after I added the resume kernel parameter, I tried to run grub-mkconfig like normal when I change kernel parameters, and it said something about an error on line 188. Previously, I attampted to use grub-customizer to add a submenu for memtest86+ and the UEFI Firmware Settings entries so they weren't in the main list. It gave me the same error, but I never really paid any attention to it, and assumed that memtest86+ just couldn't be put in a submenu. Now I'm getting that error using grub-mkconfig and I can't ignore it.
grub-mkconfig output
greembow in ~ % > sudo grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/stylish/theme.txt
Found linux image: /boot/vmlinuz-linux-surface
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux-surface.img
Found fallback initrd image(s) in /boot: intel-ucode.img initramfs-linux-surface-fallback.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 ...
Found memtest86+ EFI image: /boot/memtest86+/memtest.efi
/usr/bin/grub-probe: warning: unknown device type nvme0n1.
Adding boot menu entry for UEFI Firmware Settings ...
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 188
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 attachedcontents of /etc/default/grub:
# GRUB boot loader configuration
GRUB_DEFAULT="0"
GRUB_TIMEOUT="5"
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="resume=UUID=16087100-1090-4ce8-beab-29e9ec156657 loglevel=3"
GRUB_CMDLINE_LINUX=""
# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"
# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK="y"
# Set to 'countdown' or 'hidden' to change timeout behavior,
# press ESC key to display menu.
GRUB_TIMEOUT_STYLE="menu"
# Uncomment to use basic console
GRUB_TERMINAL_INPUT="console"
# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT="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 `videoinfo'
GRUB_GFXMODE="3840x2160,auto"
# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX="keep"
# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID="true"
# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY="true"
# Uncomment and set to the desired menu colors. Used by normal and wallpaper
# modes only. Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"
# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
GRUB_THEME="/usr/share/grub/themes/stylish/theme.txt"
# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"
# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT="true"
# Uncomment to disable submenus in boot menu
#GRUB_DISABLE_SUBMENU="y"
# Probing for other operating systems is disabled for security reasons. Read
# documentation on GRUB_DISABLE_OS_PROBER, if still want to enable this
# functionality install os-prober and uncomment to detect and include other
# operating systems.
#GRUB_DISABLE_OS_PROBER="false"contents of /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root b9549161-95f2-47de-a863-c97513774fe7
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=3840x2160,auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_input console
terminal_output gfxterm
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root b9549161-95f2-47de-a863-c97513774fe7
insmod gfxmenu
loadfont ($root)/usr/share/grub/themes/stylish/dejavu_sans_12.pf2
loadfont ($root)/usr/share/grub/themes/stylish/dejavu_sans_14.pf2
loadfont ($root)/usr/share/grub/themes/stylish/dejavu_sans_16.pf2
loadfont ($root)/usr/share/grub/themes/stylish/dejavu_sans_24.pf2
loadfont ($root)/usr/share/grub/themes/stylish/dejavu_sans_32.pf2
loadfont ($root)/usr/share/grub/themes/stylish/dejavu_sans_48.pf2
loadfont ($root)/usr/share/grub/themes/stylish/terminus-12.pf2
loadfont ($root)/usr/share/grub/themes/stylish/terminus-14.pf2
loadfont ($root)/usr/share/grub/themes/stylish/terminus-16.pf2
loadfont ($root)/usr/share/grub/themes/stylish/terminus-18.pf2
insmod jpeg
insmod png
set theme=($root)/usr/share/grub/themes/stylish/theme.txt
export theme
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-b9549161-95f2-47de-a863-c97513774fe7' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root b9549161-95f2-47de-a863-c97513774fe7
echo 'Loading Linux linux-surface ...'
linux /boot/vmlinuz-linux-surface root=UUID=b9549161-95f2-47de-a863-c97513774fe7 rw loglevel=3
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux-surface.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-b9549161-95f2-47de-a863-c97513774fe7' {
menuentry 'Arch Linux, with Linux linux-surface' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-surface-advanced-b9549161-95f2-47de-a863-c97513774fe7' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root b9549161-95f2-47de-a863-c97513774fe7
echo 'Loading Linux linux-surface ...'
linux /boot/vmlinuz-linux-surface root=UUID=b9549161-95f2-47de-a863-c97513774fe7 rw loglevel=3
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux-surface.img
}
menuentry 'Arch Linux, with Linux linux-surface (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-surface-fallback-b9549161-95f2-47de-a863-c97513774fe7' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root b9549161-95f2-47de-a863-c97513774fe7
echo 'Loading Linux linux-surface ...'
linux /boot/vmlinuz-linux-surface root=UUID=b9549161-95f2-47de-a863-c97513774fe7 rw loglevel=3
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux-surface-fallback.img
}
menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-b9549161-95f2-47de-a863-c97513774fe7' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root b9549161-95f2-47de-a863-c97513774fe7
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=b9549161-95f2-47de-a863-c97513774fe7 rw loglevel=3
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux.img
}
menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-b9549161-95f2-47de-a863-c97513774fe7' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root b9549161-95f2-47de-a863-c97513774fe7
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=b9549161-95f2-47de-a863-c97513774fe7 rw loglevel=3
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux-fallback.img
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
if [ "$grub_platform" = "efi" ]; then
fwsetup --is-supported
if [ "$?" = 0 ]; then
menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
fwsetup
}
fi
fi
### END /etc/grub.d/30_uefi-firmware ###
### BEGIN /etc/grub.d/35_fwupd ###
### END /etc/grub.d/35_fwupd ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###
### BEGIN /etc/grub.d/60_memtest86+-efi ###
if [ "${grub_platform}" == "efi" ]; then
menuentry "Memory Tester (memtest86+)" --class memtest86 --class gnu --class tool {
if loadfont unicode ; then
set gfxmode=1024x768,800x600,auto
set gfxpayload=800x600,1024x768
terminal_output gfxterm
fi
search --fs-uuid --no-floppy --set=root b9549161-95f2-47de-a863-c97513774fe7
linux /boot/memtest86+/memtest.efi
}
fi
### END /etc/grub.d/60_memtest86+-efi ###contents of /boot/grub/grub.cfg.new
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root b9549161-95f2-47de-a863-c97513774fe7
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=3840x2160,auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_input console
terminal_output gfxterm
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root b9549161-95f2-47de-a863-c97513774fe7
insmod gfxmenu
loadfont ($root)/usr/share/grub/themes/stylish/dejavu_sans_12.pf2
loadfont ($root)/usr/share/grub/themes/stylish/dejavu_sans_14.pf2
loadfont ($root)/usr/share/grub/themes/stylish/dejavu_sans_16.pf2
loadfont ($root)/usr/share/grub/themes/stylish/dejavu_sans_24.pf2
loadfont ($root)/usr/share/grub/themes/stylish/dejavu_sans_32.pf2
loadfont ($root)/usr/share/grub/themes/stylish/dejavu_sans_48.pf2
loadfont ($root)/usr/share/grub/themes/stylish/terminus-12.pf2
loadfont ($root)/usr/share/grub/themes/stylish/terminus-14.pf2
loadfont ($root)/usr/share/grub/themes/stylish/terminus-16.pf2
loadfont ($root)/usr/share/grub/themes/stylish/terminus-18.pf2
insmod jpeg
insmod png
set theme=($root)/usr/share/grub/themes/stylish/theme.txt
export theme
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/01_grub-customizer_menu_color_helper ###
### END /etc/grub.d/01_grub-customizer_menu_color_helper ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-b9549161-95f2-47de-a863-c97513774fe7' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root b9549161-95f2-47de-a863-c97513774fe7
echo 'Loading Linux linux-surface ...'
linux /boot/vmlinuz-linux-surface root=UUID=b9549161-95f2-47de-a863-c97513774fe7 rw resume=UUID=16087100-1090-4ce8-beab-29e9ec156657 loglevel=3
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux-surface.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-b9549161-95f2-47de-a863-c97513774fe7' {
menuentry 'Arch Linux, with Linux linux-surface' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-surface-advanced-b9549161-95f2-47de-a863-c97513774fe7' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root b9549161-95f2-47de-a863-c97513774fe7
echo 'Loading Linux linux-surface ...'
linux /boot/vmlinuz-linux-surface root=UUID=b9549161-95f2-47de-a863-c97513774fe7 rw resume=UUID=16087100-1090-4ce8-beab-29e9ec156657 loglevel=3
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux-surface.img
}
menuentry 'Arch Linux, with Linux linux-surface (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-surface-fallback-b9549161-95f2-47de-a863-c97513774fe7' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root b9549161-95f2-47de-a863-c97513774fe7
echo 'Loading Linux linux-surface ...'
linux /boot/vmlinuz-linux-surface root=UUID=b9549161-95f2-47de-a863-c97513774fe7 rw resume=UUID=16087100-1090-4ce8-beab-29e9ec156657 loglevel=3
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux-surface-fallback.img
}
menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-b9549161-95f2-47de-a863-c97513774fe7' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root b9549161-95f2-47de-a863-c97513774fe7
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=b9549161-95f2-47de-a863-c97513774fe7 rw resume=UUID=16087100-1090-4ce8-beab-29e9ec156657 loglevel=3
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux.img
}
menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-b9549161-95f2-47de-a863-c97513774fe7' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root b9549161-95f2-47de-a863-c97513774fe7
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=b9549161-95f2-47de-a863-c97513774fe7 rw resume=UUID=16087100-1090-4ce8-beab-29e9ec156657 loglevel=3
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux-fallback.img
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/31_uefi-firmware_proxy ###
if [ "$grub_platform" = "efi" ]; then
fwsetup --is-supported
if [ "$?" = 0 ]; then
fi
fi
### END /etc/grub.d/31_uefi-firmware_proxy ###
### BEGIN /etc/grub.d/35_fwupd ###
### END /etc/grub.d/35_fwupd ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###
### BEGIN /etc/grub.d/60_memtest86+-efi_proxy ###
if [ "${grub_platform}" == "efi" ]; then
fi
### END /etc/grub.d/60_memtest86+-efi_proxy ###
### BEGIN /etc/grub.d/61_uefi-firmware_proxy ###
menuentry "UEFI Firmware Settings" $menuentry_id_option 'uefi-firmware' {
fwsetup
}
### END /etc/grub.d/61_uefi-firmware_proxy ###
### BEGIN /etc/grub.d/62_memtest86+-efi_proxy ###
menuentry "Memory Tester (memtest86+)" --class memtest86 --class gnu --class tool {
if loadfont unicode ; then
set gfxmode=1024x768,800x600,auto
set gfxpayload=800x600,1024x768
terminal_output gfxterm
fi
search --fs-uuid --no-floppy --set=root b9549161-95f2-47de-a863-c97513774fe7
linux /boot/memtest86+/memtest.efi
}
### END /etc/grub.d/62_memtest86+-efi_proxy ###The only thing I can tell is that on line 188 in /boot/grub/grub.cfg.new, is that the UEFI Firmware Settings entry has been moved to a submenu when compared to the current file, like I described at the start of the post.
Other than that, I have no idea.
Last edited by greembow (2023-03-07 20:48:12)
Offline
Did you remove grub-customizer? It set's up a config file that gets parsed by grub-mkconfig but is invalid with current grub versions
Offline
Just did and that fixed it. Thank you!
Offline
Pages: 1