Grub2 supports both UEFI and Legacy BIOS modes. It is capable of booting most Windows, Linux, BSD and macOS operating systems. For more information on Grub2, please refer to the GNU GRUB Manual.
Grub2 also supports installation on many operating systems such as Ubuntu, Linux distributions and including Windows. This article will guide you how to install Grub2 from Windows. AIO Boot also uses Grub2, which saves you a lot of time.
Download
You can download Grub2 source code for all platforms here. For Windows, you should download the latest version of Grub2 here. It supports Windows 7, 8, 8.1 and Windows 10, not yet tested on Windows XP.
Once downloaded, you need to extract the downloaded file above. Here I will extract the grub-2.02-for-windows directory to the C: drive.
Install Grub2
We will now start installing Grub2. You can install Grub2 for USB, or HDD, or even a memory card.
- Run Command Prompt under Admin and go to the grub-2.02-for-windows directory that you extracted above.
cd /d C:\grub-2.02-for-windows
- Check the number of hard disk you will install, be it USB or HDD. Run diskmgmt.msc to open Disk Management.
Here I will install Grub2 for USB. In Disk Management is Disk 2, we will remember number 2 here. - Grub2 for Windows supports installation and boot on three platforms: i386-pc, x86_64-efi and i386-efi. If you want to boot Grub2 in UEFI mode, you need to create a partition formatted as FAT32.
- Install Grub2 for BIOS (i386-pc):
grub-install.exe --boot-directory=G:\ --target=i386-pc //./PHYSICALDRIVE2
- Number 2 in the above command is the number of the hard disk that we checked in step 2.
- G: is the drive of one of the partitions of the hard disk above.
- Install Grub2 for UEFI 64-bit (x86_64-efi):
grub-install.exe --boot-directory=G:\ --efi-directory=G: --removable --target=x86_64-efi
- Install Grub2 for UEFI 32-bit (i386-efi):
grub-install.exe --boot-directory=G:\ --efi-directory=G: --removable --target=i386-efi
For UEFI, you need to specify a drive of the FAT32 partition at the –efi-directory parameter. If it does not support UEFI, Grub2 will report an error: grub-install.exe: error: F: doesn’t look like an EFI partition.
- Output results:
C:\grub-2.02-for-windows>grub-install.exe --boot-directory=G:\ --target=i386-pc //./PHYSICALDRIVE2 Installing for i386-pc platform. Installation finished. No error reported.