Software & AppsOperating SystemLinux

How To Remove Windows from UEFI Boot Menu After Installing Ubuntu

Ubuntu 7

In this article, we will walk you through the process of removing Windows from the UEFI boot menu after installing Ubuntu. This might be necessary if you have decided to completely switch over to Ubuntu and no longer need the Windows boot option.

Quick Answer

To remove Windows from the UEFI boot menu after installing Ubuntu, you need to access the terminal, identify the Windows boot entry using the efibootmgr command, remove the boot entry using the efibootmgr -b -B command, delete the Windows folder from the EFI partition, and update GRUB to hide the GRUB menu.

Prerequisites

Before we start, ensure that you have:

  • Administrative access to your Ubuntu system.
  • Basic knowledge of terminal commands.
  • Made a backup of any important data.

Step 1: Accessing the Terminal

The first step is to access the terminal in Ubuntu. You can do this by pressing Ctrl + Alt + T. This will open a terminal window where you can input commands.

Step 2: Identifying the Windows Boot Entry

To identify the Windows boot entry, we will use the efibootmgr command. This command allows you to interact with the UEFI firmware of your system. Run the following command:

sudo efibootmgr

This command will display a list of boot entries. Each entry will have a unique identifier such as Boot0001* Windows Boot Manager. The number following Boot is the boot number, and the text following the asterisk (*) is the description of the boot entry.

Step 3: Removing the Windows Boot Entry

After identifying the boot number of the Windows Boot Manager, you can remove it using the efibootmgr -b -B command. Here, -b specifies the boot number and -B instructs the command to delete the boot entry. Replace 1 with your boot number:

sudo efibootmgr -b 1 -B

Step 4: Deleting the Windows Folder from the EFI Partition

After removing the boot entry, you need to delete the corresponding Windows folder from the EFI partition. First, identify the EFI partition using the os-prober command:

sudo os-prober

This command will list all partitions along with their filesystem types. The EFI partition is usually formatted as FAT32.

Next, mount the EFI partition. Replace /dev/sda1 with your partition:

sudo mount /dev/sda1 /boot/efi

Now, list all the folders in the EFI subfolder of the partition:

sudo ls /boot/efi/EFI

Identify the folder corresponding to the Windows entry. This may be named Windows or Microsoft. Delete this folder using the rm -r command, which removes directories and their contents recursively:

sudo rm -r /boot/efi/EFI/Windows

Step 5: Updating GRUB

The final step is to update GRUB to hide the GRUB menu. First, open the GRUB configuration file with a text editor such as nano:

sudo nano /etc/default/grub

Next, modify the following lines to hide the GRUB menu:

GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0

If the GRUB_TIMEOUT_STYLE=hidden line does not exist, add it. Save and exit the editor by pressing Ctrl + X, followed by Y and Enter.

Finally, update GRUB with the following command:

sudo update-grub

Conclusion

After completing these steps, the Windows entry should be removed from the UEFI boot menu, and GRUB should directly boot into Ubuntu without showing the menu. If you need to access the GRUB menu in the future, you can press Esc while the system boots.

Remember, always be cautious when modifying system files and settings. It’s recommended to have a backup of any important data before making such changes. If you encounter any issues, consult the Ubuntu community documentation or seek help from the Ubuntu forums.

Can I remove Windows from the UEFI boot menu without installing Ubuntu?

No, the steps provided in this article are specifically for removing Windows from the UEFI boot menu after installing Ubuntu.

Will removing Windows from the UEFI boot menu delete my Windows files?

No, removing Windows from the UEFI boot menu will only remove the boot entry. Your Windows files will not be deleted.

Can I still access Windows after removing it from the UEFI boot menu?

Yes, you can still access Windows by either reinstalling the Windows boot entry or by accessing the UEFI firmware settings and selecting the Windows boot option.

What happens if I delete the wrong boot entry?

Deleting the wrong boot entry can cause your system to be unable to boot. It’s important to double-check the boot number before running the command. If you accidentally delete the wrong entry, you can try reinstalling it or restoring your system from a backup.

Can I undo the changes and restore the Windows boot entry?

Yes, you can reinstall the Windows boot entry by using the efibootmgr command to add a new boot entry. Refer to the Ubuntu community documentation or seek help from the Ubuntu forums for detailed instructions.

Will updating GRUB affect my Ubuntu installation?

Updating GRUB will not affect your Ubuntu installation. It only modifies the GRUB configuration to hide the GRUB menu.

Leave a Comment

Your email address will not be published. Required fields are marked *