fails saving grub configuration
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Grub Customizer |
New
|
Undecided
|
Unassigned |
Bug Description
system is UEFI and Grub Customizer is having trouble working with it - syntax errors:
failed running 'grub-mkconfig -o "/boot/
Generating grub configuration file ...
using custom appearance settings
Found background image: /home/john/
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found Windows Boot Manager on /dev/sda6@
Adding boot menu entry for EFI firmware configuration
error: syntax error.
error: Incorrect command.
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 177
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/
done
more 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.
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
set default=
set next_entry=
save_env next_entry
set boot_once=true
else
set default="Windows UEFI Boot Win 10-Pro Win 7-Pro Win 10-Pro-OLD"
fi
if [ x"${feature_
menuentry_
else
menuentry_
fi
export menuentry_id_option
if [ "${prev_
set 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_
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env reco
rdfail; fi; fi
}
function load_video {
if [ x$feature_
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_
font=unicode
else
insmod part_gpt
insmod ext2
set root='hd0,gpt4'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
t4 --hint-
else
search --no-floppy --fs-uuid --set=root 9548fc0f-
fi
font=
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_
set lang=en_CA
insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
set timeout=-1
else
if [ x$feature_
set timeout_style=menu
set timeout=10
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=10
fi
fi
### END /etc/grub.
### BEGIN /etc/grub.
insmod part_gpt
insmod ext2
set root='hd0,gpt4'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
t4 --hint-
else
search --no-floppy --fs-uuid --set=root 9548fc0f-
fi
insmod png
if background_image /home/john/
set color_normal=
set color_highlight
else
set menu_color_
set menu_color_
if background_color 44,0,30,0; then
clear
fi
fi
### END /etc/grub.
### BEGIN /etc/grub.
menuentry "Ubuntu, with Linux 4.2.3-040203-
u-linux --class gnu --class os $menuentry_
tency-advanced-
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio;
fi
insmod part_gpt
insmod ext2
set root='hd0,gpt4'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
-hint-efi=hd0,gpt4 --hint-
3505
else
search --no-floppy --fs-uuid --set=root 9548fc0f-
f-51b106963505
fi
echo 'Loading Linux 4.2.3-040203-
linux /boot/vmlinuz-
-ff00-4a78-
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.
}
submenu "Advanced options for Ubuntu"{
menuentry "Ubuntu" --class ubuntu --class gnu-linux --class gnu --class os $menu
entry_id_option 'gnulinux-
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
set root='hd0,gpt4'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
i=hd0,gpt4 --hint-
else
search --no-floppy --fs-uuid --set=root 9548fc0f-
963505
fi
linux /boot/vmlinuz-
78-934f-
initrd /boot/initrd.
}
menuentry "Ubuntu, with Linux 4.2.3-040203-
buntu --class gnu-linux --class gnu --class os $menuentry_
2.3-040203-
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio;
fi
insmod part_gpt
insmod ext2
set root='hd0,gpt4'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
-hint-efi=hd0,gpt4 --hint-
3505
else
search --no-floppy --fs-uuid --set=root 9548fc0f-
f-51b106963505
fi
echo 'Loading Linux 4.2.3-040203-
linux /boot/vmlinuz-
-ff00-4a78-
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.
}
function gfxmode {
set gfxpayload="${1}"
if [ "${1}" = "keep" ]; then
set vt_handoff=
else
set vt_handoff=
fi
}
if [ "${recordfail}" != 1 ]; then
if [ -e ${prefix}
if hwmatch ${prefix}
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry "Ubuntu, with Linux 3.19.0-33-generic" --class ubuntu --class gnu-linu
x --class gnu --class os $menuentry_
ed-9548fc0f-
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio;
fi
insmod part_gpt
insmod ext2
set root='hd0,gpt4'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
-hint-efi=hd0,gpt4 --hint-
3505
else
search --no-floppy --fs-uuid --set=root 9548fc0f-
f-51b106963505
fi
echo 'Loading Linux 3.19.0-33-generic ...'
linux /boot/vmlinuz-
4a78-934f-
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.
}
menuentry "Ubuntu, with Linux 3.19.0-33-generic (recovery mode)" --class ubuntu
--class gnu-linux --class gnu --class os $menuentry_
3-generic-
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio;
fi
insmod part_gpt
insmod ext2
set root='hd0,gpt4'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
-hint-efi=hd0,gpt4 --hint-
3505
else
search --no-floppy --fs-uuid --set=root 9548fc0f-
f-51b106963505
fi
echo 'Loading Linux 3.19.0-33-generic ...'
linux /boot/vmlinuz-
4a78-934f-
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.
}
menuentry "Ubuntu, with Linux 3.19.0-15-generic" --class ubuntu --class gnu-linu
x --class gnu --class os $menuentry_
ed-9548fc0f-
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio;
fi
insmod part_gpt
insmod ext2
set root='hd0,gpt4'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
-hint-efi=hd0,gpt4 --hint-
3505
else
search --no-floppy --fs-uuid --set=root 9548fc0f-
f-51b106963505
fi
echo 'Loading Linux 3.19.0-15-generic ...'
linux /boot/vmlinuz-
4a78-934f-
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.
}
menuentry "Ubuntu, with Linux 3.19.0-15-generic (recovery mode)" --class ubuntu
--class gnu-linux --class gnu --class os $menuentry_
5-generic-
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio;
fi
insmod part_gpt
insmod ext2
set root='hd0,gpt4'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
-hint-efi=hd0,gpt4 --hint-
3505
else
search --no-floppy --fs-uuid --set=root 9548fc0f-
f-51b106963505
fi
echo 'Loading Linux 3.19.0-15-generic ...'
linux /boot/vmlinuz-
4a78-934f-
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.
}
menuentry "Windows Boot UEFI loader" {
search --fs-uuid --no-floppy --set=root 0C63-0F71
chainloader (${root}
}
menuentry "Windows UEFI bootmgfw.efi" {
search --fs-uuid --no-floppy --set=root 0C63-0F71
chainloader (${root}
}
menuentry "EFI/ubuntu/
search --fs-uuid --no-floppy --set=root 0C63-0F71
chainloader (${root}
}
}
### END /etc/grub.
### BEGIN /etc/grub.
### END /etc/grub.
### BEGIN /etc/grub.
menuentry "Windows UEFI Boot Win 10-Pro Win 7-Pro Win 10-Pro-OLD" {
search --fs-uuid --no-floppy --set=root 0C63-0F71
chainloader (${root}
}
### END /etc/grub.
### BEGIN /etc/grub.
menuentry 'Windows Boot Manager (on /dev/sda6)' --class windows --class os $menu
entry_id_option 'osprober-
insmod part_gpt
insmod fat
set root='hd0,gpt6'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
i=hd0,gpt6 --hint-
else
search --no-floppy --fs-uuid --set=root 2CD8-BC11
fi
chainloader /efi/Microsoft/
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
set timeout=10
fi
### END /etc/grub.
### BEGIN /etc/grub.
menuentry 'System setup' $menuentry_
fwsetup
}
### END /etc/grub.
### BEGIN /etc/grub.
# 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.
### BEGIN /etc/grub.
if [ -f ${config_
source ${config_
elif [ -z "${config_
source $prefix/custom.cfg;
fi
### END /etc/grub.
You have script code inside of the submenu "Advanced options for Ubuntu".
A similar bug (with instructions how to fix) exists here: https:/ /bugs.launchpad .net/grub- customizer/ +bug/1505494