Ubuntu 删除 Window EFI 启动项

Ubuntu 删除 Window EFI 启动项

Ubuntu + window双系统,删除window后,在grub和bios的EFI启动项中残留WindowBootManager。

单纯修改/boot/grub下的菜单配置,在执行sudo upgrade-grub2后启动项又会恢复WindowBootManager.

  1. install efibootmgr
1
sudo apt install efibootmgr
  1. add kernel efi support
1
sudo modprobe efivars
  1. run sudo efibootmgr:
1
2
3
4
5
6
7
8
9
10
BootCurrent: 0004
Timeout: 2 seconds
BootOrder: 2001,0003,0005,0006,0000
Boot0000* Lenovo Recovery System
Boot0001* EFI Network 0 for IPv6 (B8-88-E3-84-F3-EF)
Boot0002* EFI Network 0 for IPv4 (B8-88-E3-84-F3-EF)
Boot0003* Windows Boot Manager
Boot0004* EFI USB Device (SanDisk)
Boot0005* ubuntu
Boot2001* EFI USB Device
  1. delete the option
1
sudo efibootmgr -b 3 -B

more details

  1. where run sudo upgrade-grub,still found window efi files.
1
2
3
4
5
6
sudo mkdir /mnt/tmp
sudo mount /dev/sda2 /mnt/tmp
# sda2 is which contains the efi file,change it for your pc

cd /mnt/tmp/EFI
sudo rm -rf window
-------------本文结束感谢您的阅读-------------
坚持分享,您的支持将鼓励我继续创作!
0%