You are not logged in.
Hello Masters.
Recently i installed Grub Customizer in my arch machine. But it messes with the grub by creating lot of duplicate entries. I am using Arch and Windows 11 as dual boot.
I read a lot of articles, asked from chatgpt and New Bing. but nothing works for me.
I also tried efibootmgr to delete entries. but it was so confusing. That`s why i skipped it.
I also tried grub customizer to delete it. but it also fails.
Someone told me to edit 40_custom file. but i have no idea to do so.
Help me to fix this issue.
Thanks in advance
Last edited by pradeepthedemon (2023-04-02 14:22:39)
Men are mortal. So are ideas. An idea needs propagation as much as a plant needs watering. Otherwise, both will wither and die.-- Dr Bhim Rao Ambetkar
Offline
Don't use grub-customizer it is broken with current versions of GRUB, removing it and running grub-mkconfig -o /boot/grub/grub.cfg should restore the previous state of matters. Also in order to get more elaborate on what you are actually talking about, maybe post yur /boot/grub/grub.cfg
Offline
First of all thanks for helping me.
Here is the contents of the file you mentioned.
#
# 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
}
set menu_color_normal=light-blue/black
set menu_color_highlight=light-cyan/blue
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_gpt
insmod lvm
insmod ext2
set root='lvmid/2XN8kH-8OFE-rI0G-RJcp-o45D-34aj-aYx2ym/1VbuKP-ZsgQ-f7CH-Nv2f-PzEH-4z8v-lNFhhj'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='lvmid/2XN8kH-8OFE-rI0G-RJcp-o45D-34aj-aYx2ym/1VbuKP-ZsgQ-f7CH-Nv2f-PzEH-4z8v-lNFhhj' 3243e513-b20b-455a-beb6-146d880313e4
else
search --no-floppy --fs-uuid --set=root 3243e513-b20b-455a-beb6-146d880313e4
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
fi
terminal_input console
terminal_output gfxterm
insmod part_gpt
insmod lvm
insmod ext2
set root='lvmid/2XN8kH-8OFE-rI0G-RJcp-o45D-34aj-aYx2ym/1VbuKP-ZsgQ-f7CH-Nv2f-PzEH-4z8v-lNFhhj'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='lvmid/2XN8kH-8OFE-rI0G-RJcp-o45D-34aj-aYx2ym/1VbuKP-ZsgQ-f7CH-Nv2f-PzEH-4z8v-lNFhhj' 3243e513-b20b-455a-beb6-146d880313e4
else
search --no-floppy --fs-uuid --set=root 3243e513-b20b-455a-beb6-146d880313e4
fi
insmod gfxmenu
loadfont ($root)/usr/share/grub/themes/monterey-grub-theme/Poppins-14.pf2
loadfont ($root)/usr/share/grub/themes/monterey-grub-theme/Poppins-16.pf2
loadfont ($root)/usr/share/grub/themes/monterey-grub-theme/Poppins-18.pf2
loadfont ($root)/usr/share/grub/themes/monterey-grub-theme/Poppins-20.pf2
loadfont ($root)/usr/share/grub/themes/monterey-grub-theme/Poppins-48.pf2
loadfont ($root)/usr/share/grub/themes/monterey-grub-theme/terminus-12.pf2
loadfont ($root)/usr/share/grub/themes/monterey-grub-theme/terminus-14.pf2
loadfont ($root)/usr/share/grub/themes/monterey-grub-theme/terminus-16.pf2
insmod jpeg
insmod png
set theme=($root)/usr/share/grub/themes/monterey-grub-theme/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_proxy ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-3243e513-b20b-455a-beb6-146d880313e4' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod lvm
insmod ext2
set root='lvmid/2XN8kH-8OFE-rI0G-RJcp-o45D-34aj-aYx2ym/1VbuKP-ZsgQ-f7CH-Nv2f-PzEH-4z8v-lNFhhj'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='lvmid/2XN8kH-8OFE-rI0G-RJcp-o45D-34aj-aYx2ym/1VbuKP-ZsgQ-f7CH-Nv2f-PzEH-4z8v-lNFhhj' 3243e513-b20b-455a-beb6-146d880313e4
else
search --no-floppy --fs-uuid --set=root 3243e513-b20b-455a-beb6-146d880313e4
fi
echo 'Loading Linux linux-lts ...'
linux /boot/vmlinuz-linux-lts root=/dev/mapper/vg0-lv_root rw loglevel=3 quiet
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux-lts.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-3243e513-b20b-455a-beb6-146d880313e4' {
menuentry 'Arch Linux, with Linux linux-lts' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-lts-advanced-3243e513-b20b-455a-beb6-146d880313e4' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod lvm
insmod ext2
set root='lvmid/2XN8kH-8OFE-rI0G-RJcp-o45D-34aj-aYx2ym/1VbuKP-ZsgQ-f7CH-Nv2f-PzEH-4z8v-lNFhhj'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='lvmid/2XN8kH-8OFE-rI0G-RJcp-o45D-34aj-aYx2ym/1VbuKP-ZsgQ-f7CH-Nv2f-PzEH-4z8v-lNFhhj' 3243e513-b20b-455a-beb6-146d880313e4
else
search --no-floppy --fs-uuid --set=root 3243e513-b20b-455a-beb6-146d880313e4
fi
echo 'Loading Linux linux-lts ...'
linux /boot/vmlinuz-linux-lts root=/dev/mapper/vg0-lv_root rw loglevel=3 quiet
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux-lts.img
}
menuentry 'Arch Linux, with Linux linux-lts (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-lts-fallback-3243e513-b20b-455a-beb6-146d880313e4' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod lvm
insmod ext2
set root='lvmid/2XN8kH-8OFE-rI0G-RJcp-o45D-34aj-aYx2ym/1VbuKP-ZsgQ-f7CH-Nv2f-PzEH-4z8v-lNFhhj'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='lvmid/2XN8kH-8OFE-rI0G-RJcp-o45D-34aj-aYx2ym/1VbuKP-ZsgQ-f7CH-Nv2f-PzEH-4z8v-lNFhhj' 3243e513-b20b-455a-beb6-146d880313e4
else
search --no-floppy --fs-uuid --set=root 3243e513-b20b-455a-beb6-146d880313e4
fi
echo 'Loading Linux linux-lts ...'
linux /boot/vmlinuz-linux-lts root=/dev/mapper/vg0-lv_root rw loglevel=3 quiet
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux-lts-fallback.img
}
}
### END /etc/grub.d/10_linux_proxy ###
### BEGIN /etc/grub.d/40_custom_proxy ###
# 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 "Windows 11" --class windows --class os $menuentry_id_option 'osprober-efi-C884-D373' {
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root C884-D373
chainloader /efi/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/40_custom_proxy ###
### BEGIN /etc/grub.d/41_linux_proxy ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-3243e513-b20b-455a-beb6-146d880313e4' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod lvm
insmod ext2
set root='lvmid/2XN8kH-8OFE-rI0G-RJcp-o45D-34aj-aYx2ym/1VbuKP-ZsgQ-f7CH-Nv2f-PzEH-4z8v-lNFhhj'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='lvmid/2XN8kH-8OFE-rI0G-RJcp-o45D-34aj-aYx2ym/1VbuKP-ZsgQ-f7CH-Nv2f-PzEH-4z8v-lNFhhj' 3243e513-b20b-455a-beb6-146d880313e4
else
search --no-floppy --fs-uuid --set=root 3243e513-b20b-455a-beb6-146d880313e4
fi
echo 'Loading Linux linux-lts ...'
linux /boot/vmlinuz-linux-lts root=/dev/mapper/vg0-lv_root rw loglevel=3 quiet
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux-lts.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-3243e513-b20b-455a-beb6-146d880313e4' {
menuentry 'Arch Linux, with Linux linux-lts' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-lts-advanced-3243e513-b20b-455a-beb6-146d880313e4' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod lvm
insmod ext2
set root='lvmid/2XN8kH-8OFE-rI0G-RJcp-o45D-34aj-aYx2ym/1VbuKP-ZsgQ-f7CH-Nv2f-PzEH-4z8v-lNFhhj'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='lvmid/2XN8kH-8OFE-rI0G-RJcp-o45D-34aj-aYx2ym/1VbuKP-ZsgQ-f7CH-Nv2f-PzEH-4z8v-lNFhhj' 3243e513-b20b-455a-beb6-146d880313e4
else
search --no-floppy --fs-uuid --set=root 3243e513-b20b-455a-beb6-146d880313e4
fi
echo 'Loading Linux linux-lts ...'
linux /boot/vmlinuz-linux-lts root=/dev/mapper/vg0-lv_root rw loglevel=3 quiet
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux-lts.img
}
menuentry 'Arch Linux, with Linux linux-lts (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-lts-fallback-3243e513-b20b-455a-beb6-146d880313e4' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod lvm
insmod ext2
set root='lvmid/2XN8kH-8OFE-rI0G-RJcp-o45D-34aj-aYx2ym/1VbuKP-ZsgQ-f7CH-Nv2f-PzEH-4z8v-lNFhhj'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='lvmid/2XN8kH-8OFE-rI0G-RJcp-o45D-34aj-aYx2ym/1VbuKP-ZsgQ-f7CH-Nv2f-PzEH-4z8v-lNFhhj' 3243e513-b20b-455a-beb6-146d880313e4
else
search --no-floppy --fs-uuid --set=root 3243e513-b20b-455a-beb6-146d880313e4
fi
echo 'Loading Linux linux-lts ...'
linux /boot/vmlinuz-linux-lts root=/dev/mapper/vg0-lv_root rw loglevel=3 quiet
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux-lts-fallback.img
}
}
### END /etc/grub.d/41_linux_proxy ###
### BEGIN /etc/grub.d/42_linux_xen ###
### END /etc/grub.d/42_linux_xen ###
### BEGIN /etc/grub.d/43_os-prober_proxy ###
menuentry 'Windows Boot Manager (on /dev/nvme0n1p1)' --class windows --class os $menuentry_id_option 'osprober-efi-C884-D373' {
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root C884-D373
chainloader /efi/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/43_os-prober_proxy ###
### BEGIN /etc/grub.d/44_uefi-firmware_proxy ###
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/44_uefi-firmware_proxy ###
### BEGIN /etc/grub.d/45_fwupd ###
### END /etc/grub.d/45_fwupd ###
### BEGIN /etc/grub.d/46_custom_proxy ###
# 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 "Windows 11" --class windows --class os $menuentry_id_option 'osprober-efi-C884-D373' {
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root C884-D373
chainloader /efi/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/46_custom_proxy ###
### BEGIN /etc/grub.d/47_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/47_custom ###
### BEGIN /etc/grub.d/48_os-prober_proxy ###
menuentry 'Windows Boot Manager (on /dev/nvme0n1p1)' --class windows --class os $menuentry_id_option 'osprober-efi-C884-D373' {
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root C884-D373
chainloader /efi/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/48_os-prober_proxy ###
### BEGIN /etc/grub.d/49_uefi-firmware_proxy ###
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/49_uefi-firmware_proxy ###Last edited by V1del (2023-03-30 18:04:35)
Men are mortal. So are ideas. An idea needs propagation as much as a plant needs watering. Otherwise, both will wither and die.-- Dr Bhim Rao Ambetkar
Offline
Grub Customizer adds a file to help you restore your system if you want to remove it: /etc/grub.d/backup/RESTORE_INSTRUCTIONS
I have seen it mentioned that a step should be added to the notes instructing to mark the files executable: https://askubuntu.com/a/1440489
Another way would be to just toss the whole directory and start fresh.
pacman -R grub-customizer
mv /etc/grub.d /etc/grub.d.bak
pacman -S grub
grub-mkconfig -o /boot/grub/grub.cfgTest that all is well, and when you are ready go ahead and delete /etc/grub.d.bak.
Offline
Grub Customizer adds a file to help you restore your system if you want to remove it: /etc/grub.d/backup/RESTORE_INSTRUCTIONS
I have seen it mentioned that a step should be added to the notes instructing to mark the files executable: https://askubuntu.com/a/1440489
Another way would be to just toss the whole directory and start fresh.
pacman -R grub-customizer mv /etc/grub.d /etc/grub.d.bak pacman -S grub grub-mkconfig -o /boot/grub/grub.cfgTest that all is well, and when you are ready go ahead and delete /etc/grub.d.bak.
Thanks for suggestion and sorry for late reply.
we done it.
its working now...
As per my experience with this issue. I have to add few things here.
Remove Grub-Customizer
sudo pacman -Rnsc grub-customizer
Backup of grub.d directory
cp /etc/grub.d /etc/grub.d.bak
Remove Grub
sudo pacman -R grub
Delete grub.d directory(If exists)
sudo mr -rf grub.d
Re-install Grub
sudo pacman -S grub
Mount EFI directory
mount /dev/sdaX /boot/EFI (Where sdaX is the primary disk)
Install Grub at Master boot record
grub-install --target=x86_64-efi ---bootloader-id=grub_uefi --recheck
Generate Grub file.
grub-mkconfig -o /boot/grub/grub.cfg
Last edited by pradeepthedemon (2023-04-03 04:05:08)
Men are mortal. So are ideas. An idea needs propagation as much as a plant needs watering. Otherwise, both will wither and die.-- Dr Bhim Rao Ambetkar
Offline
Please remember to mark your thread [SOLVED] (edit the title of your first post).
Offline