Failed saving grub configuration
I have recently set up MX18 and Ubuntu MATE on a second disk on my pc (The first disk is windows 10). I have configured the machine to normally boot straight into windows and only to display the grub menu for the 2 linux systems only when I interrupt the boot sequence to get the bios (ie the grub was installed on sdb only)
I tried to change the order of the grub entries by putting memtest to the end and got "Failed saving grub configuration" message saying:
failed running 'grub-mkconfig -o " /boot/grub/
...
Syntax errors are detected in generated GRUB config file
I am afraid I'm a newbie and don't know how to check for sytax errors, but have attached the content of of grub.cfg.new file as instructed
#
# 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="0"
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 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='hd1,gpt6'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
else
search --no-floppy --fs-uuid --set=root 1afb0e21-
fi
font=
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
fi
### END /etc/grub.
### BEGIN /etc/grub.
insmod part_gpt
insmod ext2
set root='hd1,gpt6'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
else
search --no-floppy --fs-uuid --set=root 1afb0e21-
fi
insmod png
if background_image /usr/share/
set color_normal=
set color_highlight
else
set menu_color_
set menu_color_
fi
### END /etc/grub.
### BEGIN /etc/grub.
function gfxmode {
set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'MX 18.3 Continuum' --class mx --class gnu-linux --class gnu --class os $menuentry_
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
set root='hd1,gpt6'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
else
search --no-floppy --fs-uuid --set=root 1afb0e21-
fi
echo 'Loading Linux 4.19.0-5-amd64 ...'
linux /boot/vmlinuz-
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.
}
submenu 'Advanced options for MX 18.3 Continuum' $menuentry_
menuentry 'MX 18.3 Continuum, with Linux 4.19.0-5-amd64' --class mx --class gnu-linux --class gnu --class os $menuentry_
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
set root='hd1,gpt6'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
else
search --no-floppy --fs-uuid --set=root 1afb0e21-
fi
echo 'Loading Linux 4.19.0-5-amd64 ...'
linux /boot/vmlinuz-
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.
}
menuentry 'MX 18.3 Continuum, with Linux 4.19.0-5-amd64 (systemd)' --class mx --class gnu-linux --class gnu --class os $menuentry_
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
set root='hd1,gpt6'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
else
search --no-floppy --fs-uuid --set=root 1afb0e21-
fi
echo 'Loading Linux 4.19.0-5-amd64 ...'
linux /boot/vmlinuz-
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.
}
}
### END /etc/grub.
### BEGIN /etc/grub.
### END /etc/grub.
### BEGIN /etc/grub.
menuentry "Ubuntu 18.04.2 LTS (18.04) (on /dev/sdb5)" --class ubuntu --class gnu-linux --class gnu --class os $menuentry_
insmod part_gpt
insmod ext2
set root='hd1,gpt5'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
else
search --no-floppy --fs-uuid --set=root 8237c9f7-
fi
linux /boot/vmlinuz-
initrd /boot/initrd.
}
### END /etc/grub.
### BEGIN /etc/grub.
if [ "${grub_platform}" == "pc" ]; then
fi
### END /etc/grub.
### BEGIN /etc/grub.
submenu "Advanced options for Ubuntu 18.04.2 LTS (18.04) (on /dev/sdb5)"{
menuentry "Ubuntu (on /dev/sdb5)" --class gnu-linux --class gnu --class os $menuentry_
insmod part_gpt
insmod ext2
set root='hd1,gpt5'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
else
search --no-floppy --fs-uuid --set=root 8237c9f7-
fi
linux /boot/vmlinuz-
initrd /boot/initrd.
}
menuentry "Ubuntu, with Linux 4.18.0-25-generic (on /dev/sdb5)" --class gnu-linux --class gnu --class os $menuentry_
insmod part_gpt
insmod ext2
set root='hd1,gpt5'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
else
search --no-floppy --fs-uuid --set=root 8237c9f7-
fi
linux /boot/vmlinuz-
initrd /boot/initrd.
}
menuentry "Ubuntu, with Linux 4.18.0-25-generic (recovery mode) (on /dev/sdb5)" --class gnu-linux --class gnu --class os $menuentry_
insmod part_gpt
insmod ext2
set root='hd1,gpt5'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
else
search --no-floppy --fs-uuid --set=root 8237c9f7-
fi
linux /boot/vmlinuz-
initrd /boot/initrd.
}
menuentry "Ubuntu, with Linux 4.18.0-15-generic (on /dev/sdb5)" --class gnu-linux --class gnu --class os $menuentry_
insmod part_gpt
insmod ext2
set root='hd1,gpt5'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
else
search --no-floppy --fs-uuid --set=root 8237c9f7-
fi
linux /boot/vmlinuz-
initrd /boot/initrd.
}
menuentry "Ubuntu, with Linux 4.18.0-15-generic (recovery mode) (on /dev/sdb5)" --class gnu-linux --class gnu --class os $menuentry_
insmod part_gpt
insmod ext2
set root='hd1,gpt5'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
else
search --no-floppy --fs-uuid --set=root 8237c9f7-
fi
linux /boot/vmlinuz-
initrd /boot/initrd.
}
}
### END /etc/grub.
### BEGIN /etc/grub.
menuentry "Memory test (memtest86+)" {
insmod part_gpt
insmod ext2
set root='hd1,gpt6'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
else
search --no-floppy --fs-uuid --set=root 1afb0e21-
fi
linux16 /boot/memtest86
}
### END /etc/grub.
### BEGIN /etc/grub.
### 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.
Please can you advise?
Many thanks,
Tony
Question information
- Language:
- English Edit question
- Status:
- Expired
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: