Bug after editing 40_custom
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Grub Customizer |
New
|
Undecided
|
Unassigned |
Bug Description
Everything worked fine, until I created and edited the 40_custom file.
I wanted to add Android-x86 Lineage to Grub, which is not possible through os-prober.
After refreshing Grub-customizer to take into consideration the content of 40_custom, 40_custom disappeared (it can't be found in the "backup" file in grub.d, the only 40_custom in this backup folder is an untouched version, without what I've added.) and it produced a Grub-customizer error.
Content of 40_custom:
#!/bin/sh
exec tail -n +3 $0
# 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.
menuentry "LINEAGEx" {
set root='(hd0,17)'
linux /android-
initrd /android-
Output error from Grub-customizer:
Failed running "grub-mkconfig -o" /boot/grub/
Sourcing file "/etc/default/grub"
Sourcing file "/etc/default/
Création du fichier de configuration GRUB...
Thème trouvé (...)
Image Linux trouvée:
Image mémoire initiale trouvée: /boot/initrd.
(...)
erreur:syntax error.
erreur:Incorrect command.
erreur:syntax error.
Erreur de syntaxe à la ligne 124
Des erreurs de syntaxe sont détectées dans le fichier de configuration GRUB. (....)
Grub.new content =>
#
# 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=
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 recordfail; 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_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
else
search --no-floppy --fs-uuid --set=root 871d1117-
fi
font=
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_
set lang=fr_FR
insmod gettext
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
else
search --no-floppy --fs-uuid --set=root b0182798-
fi
insmod gfxmenu
loadfont ($root)
loadfont ($root)
loadfont ($root)
loadfont ($root)
loadfont ($root)
insmod png
set theme=(
export theme
if [ "${recordfail}" = 1 ] ; then
set timeout=30
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
play 480 440 1
### END /etc/grub.
### BEGIN /etc/grub.
set menu_color_
set menu_color_
### END /etc/grub.
### BEGIN /etc/grub.
menuentry "LINEAGEx" { set root='(hd0,7)' linux /android-
}
### END /etc/grub.
### BEGIN /etc/grub.
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 "Peppermint GNU/Linux" --class ubuntu --class gnu-linux --class gnu --class os $menuentry_
recordfail
savedefault
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
else
search --no-floppy --fs-uuid --set=root b0182798-
fi
linux /vmlinuz-
initrd /initrd.
}
submenu "Options avancées pour Peppermint GNU/Linux"{
menuentry "Peppermint GNU/Linux, avec Linux 4.15.0-101-generic" --class ubuntu --class gnu-linux --class gnu --class os $menuentry_
recordfail
savedefault
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
else
search --no-floppy --fs-uuid --set=root b0182798-
fi
echo 'Chargement de Linux 4.15.0-
linux /vmlinuz-
echo 'Chargement du disque mémoire initial…'
initrd /initrd.
}
menuentry "Peppermint GNU/Linux, with Linux 4.15.0-101-generic (recovery mode)" --class ubuntu --class gnu-linux --class gnu --class os $menuentry_
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
else
search --no-floppy --fs-uuid --set=root b0182798-
fi
echo 'Chargement de Linux 4.15.0-
linux /vmlinuz-
echo 'Chargement du disque mémoire initial…'
initrd /initrd.
}
}
### 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.
menuentry "LINEAGEx" { set root='(hd0,7)' linux /android-
}
### END /etc/grub.
### BEGIN /etc/grub.
### END /etc/grub.
### BEGIN /etc/grub.
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
set timeout=10
fi
menuentry "Windows Recovery Environment (sur /dev/sda6)" --class windows --class os $menuentry_
savedefault
insmod part_msdos
insmod fat
set root='hd0,msdos6'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
else
search --no-floppy --fs-uuid --set=root 3965-EAB6
fi
parttool ${root} hidden-
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.
### BEGIN /etc/grub.
menuentry "LINEAGEx" { set root='(hd0,7)' linux /android-
}
### END /etc/grub.
### BEGIN /etc/grub.
### END /etc/grub.
### BEGIN /etc/grub.
menuentry "Windows Recovery Environment (sur /dev/sda6)" --class windows --class os $menuentry_
savedefault
insmod part_msdos
insmod fat
set root='hd0,msdos6'
if [ x$feature_
search --no-floppy --fs-uuid --set=root --hint-
else
search --no-floppy --fs-uuid --set=root 3965-EAB6
fi
parttool ${root} hidden-
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.
### BEGIN /etc/grub.
### END /etc/grub.
### BEGIN /etc/grub.
### END /etc/grub.
### BEGIN /etc/grub.
if [ -f ${config_
source ${config_
elif [ -z "${config_
source $prefix/custom.cfg;
fi
### END /etc/grub.
description: | updated |
description: | updated |
tags: | added: grub |
tags: | added: boot |
tags: | removed: grub |
tags: | added: grub |
no longer affects: | grub |