我在虚拟机下运行 Ubuntu 12.04。我必须修改 grub 菜单,添加一些自定义条目。我尝试编辑/etc/grub.d/40_custom然后运行update-grub;但是,没有显示新的菜单条目。
这是我的40_custom文件的内容:
#!/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 "System restart" {
echo "System rebooting..."
reboot
}
menuentry "System shutdown" {
echo "System shutting down..."
halt
}
menuentry "Other Linux" {
set root=(hd0,1)
linux …Run Code Online (Sandbox Code Playgroud) grub2 ×1