Grub2 is a very powerful boot loader, developed by GNU. You can easily install Grub2 from Windows with just a few commands.
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.
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.
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.
- 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. C:\grub-2.02-for-windows>grub-install.exe --boot-directory=G:\ --efi-directory=G: --removable --target=x86_64-efi Installing for x86_64-efi platform. Installation finished. No error reported. C:\grub-2.02-for-windows>grub-install.exe --boot-directory=G:\ --efi-directory=G: --removable --target=i386-efi Installing for i386-efi platform. Installation finished. No error reported.
- If you want to change the path of the grub directory, change the value of the –boot-directory parameter. For example, if you want the grub directory located in YourName, use –boot-directory=G:\YourName.
- You have now completed the installation of Grub2. Please restart your computer for testing.
The configuration file for Grub2 is grub.cfg, which is stored in the grub directory. This file includes all Grub2 configurations, including interface, fonts and menus.
You can create this file for yourself. Or download my grub.cfg file here and copy it into the grub directory.