Software & AppsOperating SystemLinux

How To Add Windows 11 to Grub Menu

Ubuntu 6

In this article, we will guide you through the process of adding Windows 11 to the GRUB menu. This can be a handy tool if you’re running a dual-boot setup with Linux and Windows 11.

Quick Answer

To add Windows 11 to the GRUB menu, you can either enable the OS prober in GRUB or manually add an entry for Windows 11 in the GRUB configuration. The OS prober method automatically detects other operating systems, while the manual method requires you to add the entry yourself.

Understanding GRUB

GRUB, or the Grand Unified Bootloader, is a program that allows your computer to load and manage multiple operating systems. It’s the default bootloader for many Linux distributions.

Enabling OS Prober in GRUB

The first method we will discuss involves enabling the OS prober in GRUB. This is a tool that automatically detects other operating systems and adds them to the GRUB menu.

  1. Opening the Terminal: Open the terminal in your Linux distribution. This can usually be done by searching for ‘terminal’ in the application menu or by using a keyboard shortcut.
  2. Editing the GRUB Configuration File: In the terminal, type the following command to open the GRUB configuration file in a text editor:
sudo nano /etc/default/grub

This command uses sudo to run the command as the root user, nano to open the file in the nano text editor, and /etc/default/grub is the path to the GRUB configuration file.

  1. Changing the OS Prober Setting: In the configuration file, look for the line that says GRUB_DISABLE_OS_PROBER=true and change it to GRUB_DISABLE_OS_PROBER=false. This will enable the OS prober.
  2. Saving and Exiting: Press Ctrl+O to save the file and Ctrl+X to exit the nano text editor.
  3. Updating GRUB: Finally, update GRUB with the following command:
sudo update-grub

This command updates GRUB with the new configuration.

  1. Rebooting: Reboot your computer. When it starts up again, you should see an entry for Windows 11 in the GRUB menu.

Manually Adding Windows 11 to the GRUB Menu

If the OS prober method doesn’t work, you can manually add an entry for Windows 11 in the GRUB configuration.

  1. Opening the Terminal and the Custom File: Open the terminal and type the following command to open the 40_custom file in a text editor:
sudo nano /etc/grub.d/40_custom
  1. Adding the Windows 11 Entry: At the end of the file, add the following lines:
menuentry 'Windows 11' {
 search --fs-uuid --no-floppy --set=root <YOUR "File system UUID">
 chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
}

Replace <YOUR "File system UUID"> with the UUID of your EFI partition. You can find this by running sudo blkid /dev/nvme0n1p1 in the terminal.

  1. Saving, Exiting, and Updating GRUB: Save the file and exit the editor, then update GRUB with sudo update-grub.
  2. Rebooting: Reboot your computer. You should now see an entry for Windows 11 in the GRUB menu.

We hope this guide has been helpful in adding Windows 11 to your GRUB menu. For more information on GRUB, you can visit the official GNU GRUB Manual.

What is GRUB?

GRUB, or the Grand Unified Bootloader, is a program that allows your computer to load and manage multiple operating systems. It is the default bootloader for many Linux distributions.

Why would I want to add Windows 11 to the GRUB menu?

Adding Windows 11 to the GRUB menu is useful if you have a dual-boot setup with Linux and Windows 11. It allows you to easily switch between the two operating systems during startup.

How do I enable the OS prober in GRUB?

To enable the OS prober in GRUB, you need to edit the GRUB configuration file. Open the terminal, type sudo nano /etc/default/grub to open the file, change GRUB_DISABLE_OS_PROBER=true to GRUB_DISABLE_OS_PROBER=false, save the file, and update GRUB with sudo update-grub.

What should I do if the OS prober method doesn’t work?

If the OS prober method doesn’t work, you can manually add an entry for Windows 11 in the GRUB configuration. Open the terminal, type sudo nano /etc/grub.d/40_custom to open the file, add the necessary lines for the Windows 11 entry, save the file, update GRUB with sudo update-grub, and then reboot your computer.

How do I find the UUID of my EFI partition?

To find the UUID of your EFI partition, open the terminal and run the command sudo blkid /dev/nvme0n1p1. Replace /dev/nvme0n1p1 with the correct partition identifier for your system. The UUID will be displayed in the output.

Leave a Comment

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