grub 是否可能仅显示来自的菜单项/etc/grub.d/40_custom
?
如果是yes
,怎么办?谢谢。
答案1
从https://help.ubuntu.com/community/Grub2/CustomMenus它声明以下内容仅使用 GRUB 中的自定义菜单:
仅使用自定义菜单
以下是仅使用自定义菜单且不接收任何自动菜单项更新的方法之一:
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!
希望这可以帮助!