
我如何摆脱这些不需要的 GRUB 菜单条目。我的 Ubuntu 和 Windows 已正确加载,但我不需要这些不必要的条目。提前致谢。这就是 grub.cfg(/boot/grub/grub.cfg) 在我的情况下的样子:
# 开始 /etc/grub.d/00_header ###
如果 [ -s $prefix/grubenv ]; 然后
设置 have_grubenv=true
加载环境
菲
如果 [ "${next_entry}" ] ; 然后
设置默认值="${next_entry}"
设置 next_entry=
save_env next_entry
设置 boot_once=true
别的
设置默认值=“5”
菲
如果 [ x"${feature_menuentry_id}" = xy]; 然后
menuentry_id_option="--id"
别的
menuentry_id_option=""
菲
导出 menuentry_id_option
如果 [ "${prev_saved_entry}" ]; 然后
设置saved_entry="${prev_saved_entry}"
save_env saved_entry
设置 prev_saved_entry=
save_env prev_saved_entry
设置 boot_once=true
菲
函数保存默认{
if [ -z "${boot_once}" ]; 然后
saved_entry="${选择}"
save_env saved_entry
菲
}
功能记录失败{
设置记录失败=1
if [ -n "${have_grubenv}" ]; 然后如果 [ -z "${boot_once}" ]; 然后 save_env 记录失败;fi; 菲
}
功能加载视频{
如果 [ x$feature_all_video_module = xy ]; 然后
insmod all_video
别的
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
安装 vga
insmod video_bochs
insmod video_cirrus
菲
}
如果 [ x$feature_default_font_path = xy ] ; 然后
字体=Unicode
别的
insmod part_gpt
insmod ext2
设置 root='hd0,gpt7'
如果 [ x$feature_platform_search_hint = xy ]; 然后
搜索 --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7 0307c8a7-964b-4f91-9eb0 -31dddf1eee73
别的
搜索 --no-floppy --fs-uuid --set=root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
菲
font="/usr/share/grub/unicode.pf2"
菲
如果 loadfont $font ; 然后
设置 gfxmode=auto
加载视频
insmod gfxterm
设置 locale_dir=$prefix/locale
设置 lang=en_US
insmod 获取文本
菲
terminal_output gfxterm
如果 [ "${recordfail}" = 1 ] ; 然后
设置超时=-1
别的
如果 [ x$feature_timeout_style = xy ] ; 然后
设置 timeout_style=menu
设置超时=30
# 回退正常超时代码,以防 timeout_style 功能是
# 不可用。
别的
设置超时=30
菲
菲
### END /etc/grub.d/00_header ###
### 开始 /etc/grub.d/05_debian_theme ###
设置 menu_color_normal=白色/黑色
设置 menu_color_highlight=黑色/浅灰色
如果 background_color 44,0,30,0; 然后
清除
菲
### 结束 /etc/grub.d/05_debian_theme ###
### 开始 /etc/grub.d/10_linux ###
函数 gfxmode {
设置 gfxpayload="${1}"
如果 [ "${1}" = "保持"]; 然后
设置 vt_handoff=vt.handoff=7
别的
设置 vt_handoff=
菲
}
if [ "${recordfail}" != 1 ]; 然后
if [ -e ${prefix}/gfxblacklist.txt ]; 然后
如果 hwmatch ${prefix}/gfxblacklist.txt 3; 然后
如果 [ ${match} = 0 ]; 然后
设置 linux_gfx_mode=keep
别的
设置 linux_gfx_mode=text
菲
别的
设置 linux_gfx_mode=text
菲
别的
设置 linux_gfx_mode=keep
菲
别的
设置 linux_gfx_mode=text
菲
导出 linux_gfx_mode
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-0307c8a7-964b-4f91-9eb0-31dddf1eee73' {
记录失败
加载视频
gfxmode $linux_gfx_mode
insmod gzio
insmod part_gpt
insmod ext2
设置 root='hd0,gpt7'
如果 [ x$feature_platform_search_hint = xy ]; 然后
搜索 --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7 0307c8a7-964b-4f91-9eb0 -31dddf1eee73
别的
搜索 --no-floppy --fs-uuid --set=root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
菲
linux /boot/vmlinuz-3.13.0-49-generic.efi.signed root=UUID=0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro安静飞溅$vt_handoff
initrd /boot/initrd.img-3.13.0-49-generic
}
子菜单 'Ubuntu 的高级选项' $menuentry_id_option 'gnulinux-advanced-0307c8a7-964b-4f91-9eb0-31dddf1eee73' {
menuentry 'Ubuntu, with Linux 3.13.0-49-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-49-generic-advanced-0307c8a7-964b -4f91-9eb0-31dddf1eee73' {
记录失败
加载视频
gfxmode $linux_gfx_mode
insmod gzio
insmod part_gpt
insmod ext2
设置 root='hd0,gpt7'
如果 [ x$feature_platform_search_hint = xy ]; 然后
搜索 --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7 0307c8a7-964b-4f91-9eb0 -31dddf1eee73
别的
搜索 --no-floppy --fs-uuid --set=root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
菲
echo '正在加载 Linux 3.13.0-49-generic ...'
linux /boot/vmlinuz-3.13.0-49-generic.efi.signed root=UUID=0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro安静飞溅$vt_handoff
echo '正在加载初始 ramdisk ...'
initrd /boot/initrd.img-3.13.0-49-generic
}
menuentry 'Ubuntu, with Linux 3.13.0-49-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-49-generic-recovery -0307c8a7-964b-4f91-9eb0-31dddf1eee73'{
记录失败
加载视频
insmod gzio
insmod part_gpt
insmod ext2
设置 root='hd0,gpt7'
如果 [ x$feature_platform_search_hint = xy ]; 然后
搜索 --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7 0307c8a7-964b-4f91-9eb0 -31dddf1eee73
别的
搜索 --no-floppy --fs-uuid --set=root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
菲
echo '正在加载 Linux 3.13.0-49-generic ...'
linux /boot/vmlinuz-3.13.0-49-generic.efi.signed root=UUID=0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro 恢复 nomodeset
echo '正在加载初始 ramdisk ...'
initrd /boot/initrd.img-3.13.0-49-generic
}
menuentry 'Ubuntu, with Linux 3.13.0-48-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-48-generic-advanced-0307c8a7-964b -4f91-9eb0-31dddf1eee73' {
记录失败
加载视频
gfxmode $linux_gfx_mode
insmod gzio
insmod part_gpt
insmod ext2
设置 root='hd0,gpt7'
如果 [ x$feature_platform_search_hint = xy ]; 然后
搜索 --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7 0307c8a7-964b-4f91-9eb0 -31dddf1eee73
别的
搜索 --no-floppy --fs-uuid --set=root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
菲
echo '正在加载 Linux 3.13.0-48-generic ...'
linux /boot/vmlinuz-3.13.0-48-generic.efi.signed root=UUID=0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro安静飞溅$vt_handoff
echo '正在加载初始 ramdisk ...'
initrd /boot/initrd.img-3.13.0-48-generic
}
menuentry 'Ubuntu, with Linux 3.13.0-48-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-48-generic-recovery -0307c8a7-964b-4f91-9eb0-31dddf1eee73'{
记录失败
加载视频
insmod gzio
insmod part_gpt
insmod ext2
设置 root='hd0,gpt7'
如果 [ x$feature_platform_search_hint = xy ]; 然后
搜索 --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7 0307c8a7-964b-4f91-9eb0 -31dddf1eee73
别的
搜索 --no-floppy --fs-uuid --set=root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
菲
echo '正在加载 Linux 3.13.0-48-generic ...'
linux /boot/vmlinuz-3.13.0-48-generic.efi.signed root=UUID=0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro 恢复 nomodeset
echo '正在加载初始 ramdisk ...'
initrd /boot/initrd.img-3.13.0-48-generic
}
menuentry 'Ubuntu, with Linux 3.13.0-46-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-46-generic-advanced-0307c8a7-964b -4f91-9eb0-31dddf1eee73' {
记录失败
加载视频
gfxmode $linux_gfx_mode
insmod gzio
insmod part_gpt
insmod ext2
设置 root='hd0,gpt7'
如果 [ x$feature_platform_search_hint = xy ]; 然后
搜索 --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7 0307c8a7-964b-4f91-9eb0 -31dddf1eee73
别的
搜索 --no-floppy --fs-uuid --set=root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
菲
echo '正在加载 Linux 3.13.0-46-generic ...'
linux /boot/vmlinuz-3.13.0-46-generic.efi.signed root=UUID=0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro安静飞溅$vt_handoff
echo '正在加载初始 ramdisk ...'
initrd /boot/initrd.img-3.13.0-46-generic
}
menuentry 'Ubuntu, with Linux 3.13.0-46-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-46-generic-recovery -0307c8a7-964b-4f91-9eb0-31dddf1eee73'{
记录失败
加载视频
insmod gzio
insmod part_gpt
insmod ext2
设置 root='hd0,gpt7'
如果 [ x$feature_platform_search_hint = xy ]; 然后
搜索 --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7 0307c8a7-964b-4f91-9eb0 -31dddf1eee73
别的
搜索 --no-floppy --fs-uuid --set=root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
菲
echo '正在加载 Linux 3.13.0-46-generic ...'
linux /boot/vmlinuz-3.13.0-46-generic.efi.signed root=UUID=0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro 恢复 nomodeset
echo '正在加载初始 ramdisk ...'
initrd /boot/initrd.img-3.13.0-46-generic
}
menuentry 'Ubuntu, with Linux 3.13.0-44-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-44-generic-advanced-0307c8a7-964b -4f91-9eb0-31dddf1eee73' {
记录失败
加载视频
gfxmode $linux_gfx_mode
insmod gzio
insmod part_gpt
insmod ext2
设置 root='hd0,gpt7'
如果 [ x$feature_platform_search_hint = xy ]; 然后
搜索 --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7 0307c8a7-964b-4f91-9eb0 -31dddf1eee73
别的
搜索 --no-floppy --fs-uuid --set=root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
菲
echo '正在加载 Linux 3.13.0-44-generic ...'
linux /boot/vmlinuz-3.13.0-44-generic.efi.signed root=UUID=0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro安静飞溅$vt_handoff
echo '正在加载初始 ramdisk ...'
initrd /boot/initrd.img-3.13.0-44-generic
}
menuentry 'Ubuntu, with Linux 3.13.0-44-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-44-generic-recovery -0307c8a7-964b-4f91-9eb0-31dddf1eee73'{
记录失败
加载视频
insmod gzio
insmod part_gpt
insmod ext2
设置 root='hd0,gpt7'
如果 [ x$feature_platform_search_hint = xy ]; 然后
搜索 --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7 0307c8a7-964b-4f91-9eb0 -31dddf1eee73
别的
搜索 --no-floppy --fs-uuid --set=root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
菲
echo '正在加载 Linux 3.13.0-44-generic ...'
linux /boot/vmlinuz-3.13.0-44-generic.efi.signed root=UUID=0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro 恢复 nomodeset
echo '正在加载初始 ramdisk ...'
initrd /boot/initrd.img-3.13.0-44-generic
}
menuentry 'Ubuntu, with Linux 3.13.0-32-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-32-generic-advanced-0307c8a7-964b -4f91-9eb0-31dddf1eee73' {
记录失败
加载视频
gfxmode $linux_gfx_mode
insmod gzio
insmod part_gpt
insmod ext2
设置 root='hd0,gpt7'
如果 [ x$feature_platform_search_hint = xy ]; 然后
搜索 --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7 0307c8a7-964b-4f91-9eb0 -31dddf1eee73
别的
搜索 --no-floppy --fs-uuid --set=root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
菲
echo '正在加载 Linux 3.13.0-32-generic ...'
linux /boot/vmlinuz-3.13.0-32-generic.efi.signed root=UUID=0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro安静飞溅$vt_handoff
echo '正在加载初始 ramdisk ...'
initrd /boot/initrd.img-3.13.0-32-generic
}
menuentry 'Ubuntu,使用 Linux 3.13.0-32-generic(恢复模式)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-32-generic-recovery -0307c8a7-964b-4f91-9eb0-31dddf1eee73'{
记录失败
加载视频
insmod gzio
insmod part_gpt
insmod ext2
设置 root='hd0,gpt7'
如果 [ x$feature_platform_search_hint = xy ]; 然后
搜索 --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7 0307c8a7-964b-4f91-9eb0 -31dddf1eee73
别的
搜索 --no-floppy --fs-uuid --set=root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
菲
echo '正在加载 Linux 3.13.0-32-generic ...'
linux /boot/vmlinuz-3.13.0-32-generic.efi.signed root=UUID=0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro 恢复 nomodeset
echo '正在加载初始 ramdisk ...'
initrd /boot/initrd.img-3.13.0-32-generic
}
}
###结束/etc/grub.d/10_linux ###
### 开始 /etc/grub.d/20_linux_xen ###
### 结束 /etc/grub.d/20_linux_xen ###
### 开始 /etc/grub.d/20_memtest86+ ###
### 结束 /etc/grub.d/20_memtest86+ ###
### 开始 /etc/grub.d/25_custom ###
menuentry "Windows UEFI bootmgfw.efi" {
搜索 --fs-uuid --no-floppy --set=root E467-1A3B
chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
}
菜单项“Windows 启动 UEFI 加载程序”{
搜索 --fs-uuid --no-floppy --set=root E467-1A3B
chainloader (${root})/EFI/Boot/bkpbootx64.efi
}
menuentry "EFI/HP/SystemRecovery/bootmgfw.efi" {
搜索 --fs-uuid --no-floppy --set=root E467-1A3B
chainloader (${root})/EFI/HP/SystemRecovery/bootmgfw.efi
}
###结束/etc/grub.d/25_custom ###
### 开始 /etc/grub.d/30_os-prober ###
menuentry 'Windows 启动管理器(在 /dev/sda2 上)' --class windows --class os $menuentry_id_option 'osprober-efi-E467-1A3B' {
insmod part_gpt
脂肪
设置 root='hd0,gpt2'
如果 [ x$feature_platform_search_hint = xy ]; 然后
搜索 --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 E467-1A3B
别的
搜索 --no-floppy --fs-uuid --set=root E467-1A3B
菲
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
设置 timeout_style=menu
如果 [ "${超时}" = 0 ]; 然后
设置超时=10
菲
### END /etc/grub.d/30_os-prober ###
### 开始 /etc/grub.d/30_uefi-firmware ###
menuentry '系统设置' $menuentry_id_option 'uefi-firmware' {
设置
}
### END /etc/grub.d/30_uefi-firmware ###
### 开始 /etc/grub.d/40_custom ###
# 该文件提供了一种添加自定义菜单条目的简单方法。只需键入
# 您要在此评论后添加的菜单条目。注意不要改变
# 上面的 'exec tail' 行。
#
# 不要编辑这个文件
#
# 由 grub-mkconfig 使用模板自动生成
# 来自 /etc/grub.d 和来自 /etc/default/grub 的设置
#
### 开始 /etc/grub.d/00_header ###
如果 [ -s $prefix/grubenv ]; 然后
设置 have_grubenv=true
加载环境
菲
如果 [ "${next_entry}" ] ; 然后
设置默认值="${next_entry}"
设置 next_entry=
save_env next_entry
设置 boot_once=true
别的
设置默认值=“0”
菲
如果 [ x"${feature_menuentry_id}" = xy]; 然后
menuentry_id_option="--id"
别的
menuentry_id_option=""
菲
导出 menuentry_id_option
如果 [ "${prev_saved_entry}" ]; 然后
设置saved_entry="${prev_saved_entry}"
save_env saved_entry
设置 prev_saved_entry=
save_env prev_saved_entry
设置 boot_once=true
菲
函数保存默认{
if [ -z "${boot_once}" ]; 然后
saved_entry="${选择}"
save_env saved_entry
菲
}
功能记录失败{
设置记录失败=1
if [ -n "${have_grubenv}" ]; 然后如果 [ -z "${boot_once}" ]; 然后 save_env 记录失败;fi; 菲
}
功能加载视频{
如果 [ x$feature_all_video_module = xy ]; 然后
insmod all_video
别的
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
安装 vga
insmod video_bochs
insmod video_cirrus
菲
}
如果 [ x$feature_default_font_path = xy ] ; 然后
字体=Unicode
别的
insmod part_gpt
insmod ext2
设置 root='hd0,gpt7'
如果 [ x$feature_platform_search_hint = xy ]; 然后
搜索 --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7 0307c8a7-964b-4f91-9eb0 -31dddf1eee73
别的
搜索 --no-floppy --fs-uuid --set=root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
菲
font="/usr/share/grub/unicode.pf2"
菲
如果 loadfont $font ; 然后
设置 gfxmode=auto
加载视频
insmod gfxterm
设置 locale_dir=$prefix/locale
设置 lang=en_US
insmod 获取文本
菲
terminal_output gfxterm
如果 [ "${recordfail}" = 1 ] ; 然后
设置超时=-1
别的
如果 [ x$feature_timeout_style = xy ] ; 然后
设置 timeout_style=menu
设置超时=10
# 回退正常超时代码,以防 timeout_style 功能是
# 不可用。
别的
设置超时=10
菲
菲
### END /etc/grub.d/00_header ###
### 开始 /etc/grub.d/05_debian_theme ###
设置 menu_color_normal=白色/黑色
设置 menu_color_highlight=黑色/浅灰色
如果 background_color 44,0,30,0; 然后
清除
菲
### 结束 /etc/grub.d/05_debian_theme ###
### 开始 /etc/grub.d/10_linux ###
函数 gfxmode {
设置 gfxpayload="${1}"
如果 [ "${1}" = "保持"]; 然后
设置 vt_handoff=vt.handoff=7
别的
设置 vt_handoff=
菲
}
if [ "${recordfail}" != 1 ]; 然后
if [ -e ${prefix}/gfxblacklist.txt ]; 然后
如果 hwmatch ${prefix}/gfxblacklist.txt 3; 然后
如果 [ ${match} = 0 ]; 然后
设置 linux_gfx_mode=keep
别的
设置 linux_gfx_mode=text
菲
别的
设置 linux_gfx_mode=text
菲
别的
设置 linux_gfx_mode=keep
菲
别的
设置 linux_gfx_mode=text
菲
导出 linux_gfx_mode
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-0307c8a7-964b-4f91-9eb0-31dddf1eee73' {
记录失败
加载视频
gfxmode $linux_gfx_mode
insmod gzio
insmod part_gpt
insmod ext2
设置 root='hd0,gpt7'
如果 [ x$feature_platform_search_hint = xy ]; 然后
搜索 --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7 0307c8a7-964b-4f91-9eb0 -31dddf1eee73
别的
搜索 --no-floppy --fs-uuid --set=root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
菲
linux /boot/vmlinuz-3.13.0-49-generic.efi.signed root=UUID=0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro安静飞溅$vt_handoff
initrd /boot/initrd.img-3.13.0-49-generic
}
子菜单 'Ubuntu 的高级选项' $menuentry_id_option 'gnulinux-advanced-0307c8a7-964b-4f91-9eb0-31dddf1eee73' {
menuentry 'Ubuntu, with Linux 3.13.0-49-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-49-generic-advanced-0307c8a7-964b -4f91-9eb0-31dddf1eee73' {
记录失败
加载视频
gfxmode $linux_gfx_mode
insmod gzio
insmod part_gpt
insmod ext2
设置 root='hd0,gpt7'
如果 [ x$feature_platform_search_hint = xy ]; 然后
搜索 --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7 0307c8a7-964b-4f91-9eb0 -31dddf1eee73
别的
搜索 --no-floppy --fs-uuid --set=root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
菲
echo '正在加载 Linux 3.13.0-49-generic ...'
linux /boot/vmlinuz-3.13.0-49-generic.efi.signed root=UUID=0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro安静飞溅$vt_handoff
echo '正在加载初始 ramdisk ...'
initrd /boot/initrd.img-3.13.0-49-generic
}
menuentry 'Ubuntu, with Linux 3.13.0-49-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-49-generic-recovery -0307c8a7-964b-4f91-9eb0-31dddf1eee73'{
记录失败
加载视频
insmod gzio
insmod part_gpt
insmod ext2
设置 root='hd0,gpt7'
如果 [ x$feature_platform_search_hint = xy ]; 然后
搜索 --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7 0307c8a7-964b-4f91-9eb0 -31dddf1eee73
别的
搜索 --no-floppy --fs-uuid --set=root 0307c8a7-964b-4f91-9eb0-31dddf1eee73
菲
echo '正在加载 Linux 3.13.0-49-generic ...'
linux /boot/vmlinuz-3.13.0-49-generic.efi.signed root=UUID=0307c8a7-964b-4f91-9eb0-31dddf1eee73 ro 恢复 nomodeset
echo '正在加载初始 ramdisk ...'
initrd /boot/initrd.img-3.13.0-49-generic
}
menuentry 'Ubuntu, with Linux 3.13.0-48-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-48-generic-advanced-0307c8a7-964b -4f91-9eb0-31dddf1eee73' {
记录失败
加载视频
gfxmode $linux_gfx_mode
insmod gzio
insmod part_gpt
insmod ext2
设置 root='hd0,gpt7'
如果 [ x$feature_platform_search_hint = xy ]; 然后
搜索 --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7 0307c8a7-964b-4f91-9eb0 -31dddf1eee73
别的
搜索 --no-floppy --fs-uuid
最后我能够解决这个问题......遍历 /etc/grub.d/ 目录下的每个文件并删除不需要的条目,然后运行“sudo update-grub”。我进入 25_custom 并擦除了所有不需要的条目(在启动时启动 - 就像所有不必要的 EFI 条目一样)。
sudo gedit /etc/grub.d/25_custom
sudo update-grub
Run Code Online (Sandbox Code Playgroud)
请确保备份您正在编辑的文件。确保您没有存储任何以 25_custom 开头的备份文件...如果您将其存储为 25_custom_today'sdate 等....EFI 引导加载程序仍会从中读取条目....对于拥有 HP 的人笔记本电脑 - 这绝对适合您。感谢您的帮助。
更新
我的戴尔 XPS 台式机再次遇到了这个问题。这次我需要对 custom_40 和 custom_41 做同样的事情。请参阅下面的任何内容/etc/grub.d以找出特定于您的机器的问题。
另一个替代方法: 使用 grub-customizer - 图形用户界面
sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer
grub-customizer
Run Code Online (Sandbox Code Playgroud)
下次重新启动时 - 您可以检查那些不需要的条目是否消失。
关于 grub-customizer 的一个好处是,在右侧 - 它有已删除的项目 - 如果您误删除了某些内容,可以恢复其中的部分或全部。另外不要忘记清除旧内核,以便您也可以节省磁盘空间。
| 归档时间: |
|
| 查看次数: |
12071 次 |
| 最近记录: |