<SOLVED> Quik, easy, reliable way to edit grub menu?
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
<SOLVED> Quik, easy, reliable way to edit grub menu?
Is there a quick, easy, and reliable way to edit the grub menu? I need to remove, disable, or rename the last item which is to launch Windows 7 in recovery mode. I need to make sure that my wife doesn't accidentally make this selection. Delete or disable would be best. Her hands shake a lot so that even renaming the selection could still permit a disasterous accident.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Quik, easy, reliable way to edit grub menu?
If you don't get a better answer (like update-grub with option to omit an OS would be nice..?), you can as root (sudo) editLinny wrote: ⤴Wed Jun 16, 2021 3:23 pm Is there a quick, easy, and reliable way to edit the grub menu? I need to remove, disable, or rename the last item which is to launch Windows 7 in recovery mode. I need to make sure that my wife doesn't accidentally make this selection. Delete or disable would be best. Her hands shake a lot so that even renaming the selection could still permit a disasterous accident.
/boot/grub/grub.cfg
and find that windows entry.Each entry look like:
Code: Select all
menuentry 'What you see in the grub menu' a bunch of stuff {
... about 5 to 20 lines more stuff
}
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Your data and OS are backed up....right?
Re: Quik, easy, reliable way to edit grub menu?
Can you post yourLinny wrote: ⤴Wed Jun 16, 2021 3:23 pm Is there a quick, easy, and reliable way to edit the grub menu? I need to remove, disable, or rename the last item which is to launch Windows 7 in recovery mode. I need to make sure that my wife doesn't accidentally make this selection. Delete or disable would be best. Her hands shake a lot so that even renaming the selection could still permit a disasterous accident.
/boot/grub/grub.cfg
?Re: Quik, easy, reliable way to edit grub menu?
Can do, but it may be a couple of hours or so. My wife's sick and I'm in the middle of some housework.
Re: Quik, easy, reliable way to edit grub menu?
Wishing all the best and for a speedy recovery.
When this happens:
and this happens:My wife's sick
one gains new perspective and appreciation--just sayinI'm in the middle of some housework
Everything in life was difficult before it became easy.
Re: Quik, easy, reliable way to edit grub menu?
Thankyou for your well wish. Here is my grub.cfg. Drag and drop didn't work. I keep getting the message "Invalid file extension", so here's the text:
#
# 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 ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
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
}
insmod part_msdos
insmod ext2
set root='hd0,msdos9'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos9 --hint-efi=hd0,msdos9 --hint-baremetal=ahci0,msdos9 b7008ffe-883b-4947-bafd-a2eafa8ba7f8
else
search --no-floppy --fs-uuid --set=root b7008ffe-883b-4947-bafd-a2eafa8ba7f8
fi
if loadfont /boot/grub/fonts/UbuntuMono16.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='hd0,msdos9'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos9 --hint-efi=hd0,msdos9 --hint-baremetal=ahci0,msdos9 b7008ffe-883b-4947-bafd-a2eafa8ba7f8
else
search --no-floppy --fs-uuid --set=root b7008ffe-883b-4947-bafd-a2eafa8ba7f8
fi
insmod gfxmenu
insmod png
set theme=($root)/boot/grub/themes/linuxmint/theme.txt
export theme
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
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
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'LMDE 4 Debbie' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-b7008ffe-883b-4947-bafd-a2eafa8ba7f8' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos9'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos9 --hint-efi=hd0,msdos9 --hint-baremetal=ahci0,msdos9 b7008ffe-883b-4947-bafd-a2eafa8ba7f8
else
search --no-floppy --fs-uuid --set=root b7008ffe-883b-4947-bafd-a2eafa8ba7f8
fi
echo 'Loading Linux 4.19.0-16-amd64 ...'
linux /boot/vmlinuz-4.19.0-16-amd64 root=UUID=b7008ffe-883b-4947-bafd-a2eafa8ba7f8 ro quiet splash
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.19.0-16-amd64
}
submenu 'Advanced options for LMDE 4 Debbie' $menuentry_id_option 'gnulinux-advanced-b7008ffe-883b-4947-bafd-a2eafa8ba7f8' {
menuentry 'LMDE 4 Debbie, with Linux 4.19.0-16-amd64' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19.0-16-amd64-advanced-b7008ffe-883b-4947-bafd-a2eafa8ba7f8' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos9'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos9 --hint-efi=hd0,msdos9 --hint-baremetal=ahci0,msdos9 b7008ffe-883b-4947-bafd-a2eafa8ba7f8
else
search --no-floppy --fs-uuid --set=root b7008ffe-883b-4947-bafd-a2eafa8ba7f8
fi
echo 'Loading Linux 4.19.0-16-amd64 ...'
linux /boot/vmlinuz-4.19.0-16-amd64 root=UUID=b7008ffe-883b-4947-bafd-a2eafa8ba7f8 ro quiet splash
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.19.0-16-amd64
}
menuentry 'LMDE 4 Debbie, with Linux 4.19.0-16-amd64 (recovery mode)' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19.0-16-amd64-recovery-b7008ffe-883b-4947-bafd-a2eafa8ba7f8' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos9'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos9 --hint-efi=hd0,msdos9 --hint-baremetal=ahci0,msdos9 b7008ffe-883b-4947-bafd-a2eafa8ba7f8
else
search --no-floppy --fs-uuid --set=root b7008ffe-883b-4947-bafd-a2eafa8ba7f8
fi
echo 'Loading Linux 4.19.0-16-amd64 ...'
linux /boot/vmlinuz-4.19.0-16-amd64 root=UUID=b7008ffe-883b-4947-bafd-a2eafa8ba7f8 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.19.0-16-amd64
}
menuentry 'LMDE 4 Debbie, with Linux 4.19.0-8-amd64' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19.0-8-amd64-advanced-b7008ffe-883b-4947-bafd-a2eafa8ba7f8' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos9'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos9 --hint-efi=hd0,msdos9 --hint-baremetal=ahci0,msdos9 b7008ffe-883b-4947-bafd-a2eafa8ba7f8
else
search --no-floppy --fs-uuid --set=root b7008ffe-883b-4947-bafd-a2eafa8ba7f8
fi
echo 'Loading Linux 4.19.0-8-amd64 ...'
linux /boot/vmlinuz-4.19.0-8-amd64 root=UUID=b7008ffe-883b-4947-bafd-a2eafa8ba7f8 ro quiet splash
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.19.0-8-amd64
}
menuentry 'LMDE 4 Debbie, with Linux 4.19.0-8-amd64 (recovery mode)' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19.0-8-amd64-recovery-b7008ffe-883b-4947-bafd-a2eafa8ba7f8' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos9'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos9 --hint-efi=hd0,msdos9 --hint-baremetal=ahci0,msdos9 b7008ffe-883b-4947-bafd-a2eafa8ba7f8
else
search --no-floppy --fs-uuid --set=root b7008ffe-883b-4947-bafd-a2eafa8ba7f8
fi
echo 'Loading Linux 4.19.0-8-amd64 ...'
linux /boot/vmlinuz-4.19.0-8-amd64 root=UUID=b7008ffe-883b-4947-bafd-a2eafa8ba7f8 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.19.0-8-amd64
}
}
### 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 ###
menuentry 'Windows 7 (on /dev/sda2)' --class windows --class os $menuentry_id_option 'osprober-chain-CC70378A703779F2' {
insmod part_msdos
insmod ntfs
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 CC70378A703779F2
else
search --no-floppy --fs-uuid --set=root CC70378A703779F2
fi
parttool ${root} hidden-
chainloader +1
}
menuentry 'Windows 7 (on /dev/sda3)' --class windows --class os $menuentry_id_option 'osprober-chain-AC7C4EC27C4E86D4' {
insmod part_msdos
insmod ntfs
set root='hd0,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 AC7C4EC27C4E86D4
else
search --no-floppy --fs-uuid --set=root AC7C4EC27C4E86D4
fi
parttool ${root} hidden-
chainloader +1
}
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###
### 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 ###
#
# 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 ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
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
}
insmod part_msdos
insmod ext2
set root='hd0,msdos9'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos9 --hint-efi=hd0,msdos9 --hint-baremetal=ahci0,msdos9 b7008ffe-883b-4947-bafd-a2eafa8ba7f8
else
search --no-floppy --fs-uuid --set=root b7008ffe-883b-4947-bafd-a2eafa8ba7f8
fi
if loadfont /boot/grub/fonts/UbuntuMono16.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='hd0,msdos9'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos9 --hint-efi=hd0,msdos9 --hint-baremetal=ahci0,msdos9 b7008ffe-883b-4947-bafd-a2eafa8ba7f8
else
search --no-floppy --fs-uuid --set=root b7008ffe-883b-4947-bafd-a2eafa8ba7f8
fi
insmod gfxmenu
insmod png
set theme=($root)/boot/grub/themes/linuxmint/theme.txt
export theme
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
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
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'LMDE 4 Debbie' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-b7008ffe-883b-4947-bafd-a2eafa8ba7f8' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos9'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos9 --hint-efi=hd0,msdos9 --hint-baremetal=ahci0,msdos9 b7008ffe-883b-4947-bafd-a2eafa8ba7f8
else
search --no-floppy --fs-uuid --set=root b7008ffe-883b-4947-bafd-a2eafa8ba7f8
fi
echo 'Loading Linux 4.19.0-16-amd64 ...'
linux /boot/vmlinuz-4.19.0-16-amd64 root=UUID=b7008ffe-883b-4947-bafd-a2eafa8ba7f8 ro quiet splash
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.19.0-16-amd64
}
submenu 'Advanced options for LMDE 4 Debbie' $menuentry_id_option 'gnulinux-advanced-b7008ffe-883b-4947-bafd-a2eafa8ba7f8' {
menuentry 'LMDE 4 Debbie, with Linux 4.19.0-16-amd64' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19.0-16-amd64-advanced-b7008ffe-883b-4947-bafd-a2eafa8ba7f8' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos9'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos9 --hint-efi=hd0,msdos9 --hint-baremetal=ahci0,msdos9 b7008ffe-883b-4947-bafd-a2eafa8ba7f8
else
search --no-floppy --fs-uuid --set=root b7008ffe-883b-4947-bafd-a2eafa8ba7f8
fi
echo 'Loading Linux 4.19.0-16-amd64 ...'
linux /boot/vmlinuz-4.19.0-16-amd64 root=UUID=b7008ffe-883b-4947-bafd-a2eafa8ba7f8 ro quiet splash
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.19.0-16-amd64
}
menuentry 'LMDE 4 Debbie, with Linux 4.19.0-16-amd64 (recovery mode)' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19.0-16-amd64-recovery-b7008ffe-883b-4947-bafd-a2eafa8ba7f8' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos9'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos9 --hint-efi=hd0,msdos9 --hint-baremetal=ahci0,msdos9 b7008ffe-883b-4947-bafd-a2eafa8ba7f8
else
search --no-floppy --fs-uuid --set=root b7008ffe-883b-4947-bafd-a2eafa8ba7f8
fi
echo 'Loading Linux 4.19.0-16-amd64 ...'
linux /boot/vmlinuz-4.19.0-16-amd64 root=UUID=b7008ffe-883b-4947-bafd-a2eafa8ba7f8 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.19.0-16-amd64
}
menuentry 'LMDE 4 Debbie, with Linux 4.19.0-8-amd64' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19.0-8-amd64-advanced-b7008ffe-883b-4947-bafd-a2eafa8ba7f8' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos9'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos9 --hint-efi=hd0,msdos9 --hint-baremetal=ahci0,msdos9 b7008ffe-883b-4947-bafd-a2eafa8ba7f8
else
search --no-floppy --fs-uuid --set=root b7008ffe-883b-4947-bafd-a2eafa8ba7f8
fi
echo 'Loading Linux 4.19.0-8-amd64 ...'
linux /boot/vmlinuz-4.19.0-8-amd64 root=UUID=b7008ffe-883b-4947-bafd-a2eafa8ba7f8 ro quiet splash
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.19.0-8-amd64
}
menuentry 'LMDE 4 Debbie, with Linux 4.19.0-8-amd64 (recovery mode)' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19.0-8-amd64-recovery-b7008ffe-883b-4947-bafd-a2eafa8ba7f8' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos9'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos9 --hint-efi=hd0,msdos9 --hint-baremetal=ahci0,msdos9 b7008ffe-883b-4947-bafd-a2eafa8ba7f8
else
search --no-floppy --fs-uuid --set=root b7008ffe-883b-4947-bafd-a2eafa8ba7f8
fi
echo 'Loading Linux 4.19.0-8-amd64 ...'
linux /boot/vmlinuz-4.19.0-8-amd64 root=UUID=b7008ffe-883b-4947-bafd-a2eafa8ba7f8 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.19.0-8-amd64
}
}
### 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 ###
menuentry 'Windows 7 (on /dev/sda2)' --class windows --class os $menuentry_id_option 'osprober-chain-CC70378A703779F2' {
insmod part_msdos
insmod ntfs
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 CC70378A703779F2
else
search --no-floppy --fs-uuid --set=root CC70378A703779F2
fi
parttool ${root} hidden-
chainloader +1
}
menuentry 'Windows 7 (on /dev/sda3)' --class windows --class os $menuentry_id_option 'osprober-chain-AC7C4EC27C4E86D4' {
insmod part_msdos
insmod ntfs
set root='hd0,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 AC7C4EC27C4E86D4
else
search --no-floppy --fs-uuid --set=root AC7C4EC27C4E86D4
fi
parttool ${root} hidden-
chainloader +1
}
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###
### 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 ###
- ricardogroetaers
- Level 6
- Posts: 1374
- Joined: Sat Oct 27, 2018 3:06 am
- Location: Rio de Janeiro, Brasil
Re: Quik, easy, reliable way to edit grub menu?
Despite opinions to the contrary, the "grub customizer" program is a good option.
Just uncheck (do not delete) the menu options you want to hide.
Note in the figure that I only hid the "memory test" options, not eliminated them.
Observation:
Don't be impressed if "GrubCustomizer" shows "Ubuntu" instead of "Linux Mint". Don't worry and don't mess with it.
Don't be impressed if I made an option for grub to launch DOS.
Re: Quik, easy, reliable way to edit grub menu?
The offending entry is coming from os-prober. If you want to make the necessary changes manually, then do this:
1. add this line to
2. add this to
3. run
Basically what you'll have done is eliminate Mint's searching for other bootable OS's and manually added an entry for Windows 7. If you ever change to Windows 10 you'll need to back these changes out.
1. add this line to
/etc/default/grub
Code: Select all
GRUB_DISABLE_OS_PROBER=true
etc/grub.d/40_custom
Code: Select all
menuentry 'Windows 7 (on /dev/sda2)' --class windows --class os $menuentry_id_option 'osprober-chain-CC70378A703779F2' {
insmod part_msdos
insmod ntfs
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 CC70378A703779F2
else
search --no-floppy --fs-uuid --set=root CC70378A703779F2
fi
parttool ${root} hidden-
chainloader +1
}
sudo update-grub
to make the changes permanentBasically what you'll have done is eliminate Mint's searching for other bootable OS's and manually added an entry for Windows 7. If you ever change to Windows 10 you'll need to back these changes out.
Re: Quik, easy, reliable way to edit grub menu?
I've used grub customizer before and it did seem a little flaky. But I went ahead and moved the Windows 7 option to the top and left the recovery option at the bottom and I think I will go back and set the delay to 2 or 3 seconds until my wife is comfortable using Linux full time. I don't see ever updating to Windows 10. Now if I can enable hibernation and/or speed up the boot (over 60 seconds from the grub menu seems too long) I should be ready to have her give it a try. And thank you very much for your help.