5.5 Editing the Boot Menu
The next step is to modify the CentOS boot menu. Since this was originally a dual boot system, the menu is configured to provide the option of booting either Windows or CentOS. Now that the Windows partition is gone, we need to remove this boot option. Start by editing the /etc/grub.d/40_custom file and removing the Windows menu entry:
#!/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 "Windows 10" {
set root=(hd0,1)
chainloader +1
}
Save the file and use the grub2-mkconfig tool to generate the /boot/grub2/grub.cfg file as follows:
# grub2-mkconfig --output=/boot/grub2/grub.cfg
Generating grub configuration file ...
done
Next time the system restarts, the Windows 10 option will no longer be provided by the boot menu.