Ubuntu – Can I remove Windows Boot Manager from dedicated Ubuntu computer

bootboot-repairgrub2

It appears that I stopped my Ubuntu-based system in mid-update. It later wouldn't boot. Through the use of this excellent resource:
Grub2/Troubleshooting
I got my system running again after running the command: configfile (hd0,2)/boot/grub/grub.cfg . My system immediately starting behaving OK.

By advice I then installed and ran:

sudo update-grub 
sudo grub-install
Installed and ran boot-repair, doing its default option

When doing reboots to prove that the system still booted I noted the following changes in my boot configuration:

  • I now have the grub menu instead of simply booting

  • My computer's boot options list (on my Dell I hit the F12 on power
    on) now has two ubuntu options in addition to the Windows Boot
    Manager. Previously it had only a single ubuntu option and no
    Windows Boot Manager.

My issue with the Windows Boot Manager is that this hard disk has never seen a Windows install. The disk was bought for Linux.

I looked through the boot-repair advanced options and didn't see things that would help me there. So, what must I do to remove the Windows Boot Manager from my computer's boot manager, the extra Ubuntu boot option from the same, and the "boot to the Grub menu" choice?

(Yes, I know that a lot of this is computer-specific. But it is part of my Linux experience. Losing the ability to boot at all had me looking at ads for a new Windows laptop…)

UPDATE: Data from my PC by way of the boot-repair log file:

 ============================= Boot Info Summary: ===============================

=> No boot loader is installed in the MBR of /dev/sda.

sda1:  

__________________________________________________________________________

 File system:       vfat
 Boot sector type:  FAT32
 Boot sector info:  No errors found in the Boot Parameter Block.
 Operating System:  
 Boot files:        /EFI/Boot/bootx64.efi /EFI/ubuntu/MokManager.efi 
                    /EFI/ubuntu/grubx64.efi /EFI/ubuntu/shimx64.efi 
                    /EFI/Microsoft/Boot/bootmgfw.efi 
                    /EFI/Microsoft/Boot/bootx64.efi

 sda2:

_________________________________________________________________________

 File system:       ext4
 Boot sector type:  -
 Boot sector info: 
 Operating System:  Ubuntu 14.04.3 LTS
 Boot files:        /boot/grub/grub.cfg /etc/fstab

sda3:
_________________________________________________________________________

 File system:       swap
 Boot sector type:  -
 Boot sector info:

[SNIP]

================================ Mount points: =================================

Device           Mount_Point              Type       Options

/dev/sda1        /boot/efi                vfat       (rw) /dev/sda2   
/                        ext4       (rw,errors=remount-ro)

Best Answer

It is normal to have two ubuntu entries. One is shim and the other grub. You can see the details of each with :

sudo efibootmgr -v

You can delete the /EFI/Microsoft folder in the ESP - efi system partition and then delete the UEFI NVRAM entries. If you leave the folder, UEFI will often find the boot files & add them again to UEFI boot menu. It can depend on how you have mounted ESP on where it is. Inside install it is /boot/efi/EFI/Microsoft. But newer versions of Ubuntu make ESP write protected with 0077 mount permissions in fstab. Change to defaults like 14.04 and remount to make sure no errors before rebooting and you have to reboot for new permissions on /efi to take effect:

sudo nano /etc/fstab
sudo mount -a

14.04 fstab entry defaults

UUID=FD76-E33D  /boot/efi       vfat    defaults        0       1

16.04 fstab entry umask=0077

UUID=68CD-3368  /boot/efi       vfat    umask=0077      0       1

This discusses the removal of an entry. Just be sure to use the Windows one:

How do I remove "Ubuntu" in the bios boot menu? (UEFI)

Delete entry change XXXX to correct entries. Some UEFI require all 4 HEX char, other just need 1 or 2 significant char.

sudo efibootmgr -b XXXX -B

details on efibootmgr commands:

man efibootmgr

http://linux.die.net/man/8/efibootmgr

Related Question