需要修改的配置文件:grub.cfg
获取root权限,并进入/boot/grub文件夹:
sudo su
cd /boot/grub
备份配置文件,并复制一份
cp grub.cig grub_bak.cfg
cat grub.cfg > tmp
在tmp中去除(或注释)掉多余引导项,保存并用cat命令更新配置文件
利用gedit或vim打开:
vim tmp
### menuentry "EFI/BOOT/bkpbootx64.efi" {
### search --fs-uuid --no-floppy --set=root 2AA0-EC8F
### chainloader (${root})/EFI/BOOT/bkpbootx64.efi
### }
###
### menuentry "EFI/BOOT/fbx64.efi" {
### search --fs-uuid --no-floppy --set=root 2AA0-EC8F
### chainloader (${root})/EFI/BOOT/fbx64.efi
### }
###
### menuentry "EFI/ubuntu/mmx64.efi" {
### search --fs-uuid --no-floppy --set=root 2AA0-EC8F
### chainloader (${root})/EFI/ubuntu/mmx64.efi
### }
###
### menuentry "Windows UEFI bootmgfw.efi" {
### search --fs-uuid --no-floppy --set=root E4D2-C860
### chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
### }
###
### menuentry "Windows Boot UEFI loader" {
### search --fs-uuid --no-floppy --set=root E4D2-C860
### chainloader (${root})/EFI/Boot/bkpbootx64.efi
### }
###
### menuentry "Windows Boot UEFI fbx64.efi" {
### search --fs-uuid --no-floppy --set=root E4D2-C860
### chainloader (${root})/EFI/Boot/fbx64.efi
### }
###
### menuentry "EFI/ubuntu/fwupx64.efi" {
### search --fs-uuid --no-floppy --set=root E4D2-C860
### chainloader (${root})/EFI/ubuntu/fwupx64.efi
### }
###
### menuentry "EFI/ubuntu/mmx64.efi nvme0n1p2" {
### search --fs-uuid --no-floppy --set=root E4D2-C860
### chainloader (${root})/EFI/ubuntu/mmx64.efi
### }
更新到grub.cfg
cat tmp > grub.cfg