Copy/paste the entire contents of your /boot/grub/grub.cfg file into the /etc/grub.d/40_custom file, below the existing header lines.
#!/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.
Remove everything above the first menuentry except the existing header lines above.
Remove all but the following files from the /etc/grub.d folder:
00_header, 05_debian_theme, 40_custom and README.
Alternatively, you may keep other files in the /etc/grub.d folder if you make them unexecutable.
Edit, add, or remove menuentries as desired, then save the file.
Run update-grub as root to apply the changes!
从https://help.ubuntu.com/community/Grub2/CustomMenus它声明以下仅使用 GRUB 中的自定义菜单:
希望这可以帮助!