Install Grub2 on USB and HDD from Windows

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.

Install Grub2 on USB

Download

You can download Grub2 source code for all platforms here. For Windows, you should download the latest version of Grub2 here.

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.

  1. 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
  2. Check the number of hard disk you will install, be it USB or HDD. Run diskmgmt.msc to open Disk Management.

    Install Grub2 from Windows
    Here I will install Grub2 for USB. In Disk Management is Disk 2, we will remember number 2 here.
  3. 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.
  4. 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.
  5. Install Grub2 for UEFI 64-bit (x86_64-efi):

    grub-install.exe --boot-directory=G:\ --efi-directory=G: --removable --target=x86_64-efi
  6. 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.

  7. 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.
  8. 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.
  9. You have now completed the installation of Grub2. Please restart your computer for testing.

Configuration

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.

Wish success!

Share this...Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInPin on PinterestShare on RedditShare on TumblrShare on VKBuffer this pageDigg thisEmail this to someone
Flattr the authorPrint this pageShare on StumbleUponShare on Yummly
 

  • acssca asc

    1. First option isnt working for me .

    “”C:grub-2.02-for-windows>grub-install.exe –boot-directory=G: –target=i386-pc //./PHYSICALDRIVE2″”

    https://uploads.disquscdn.com/images/cec3ff10a7f28e99a3e4b2644c49c063151349d57f06fe272de9e4be516c289c.jpg

    2. I have done 2nd command “”

    grub-install.exe –boot-directory=G: –efi-directory=G: –removable –target=x86_64-efi “”

    But i wanna know where should i put grub.cfg ?

    3. I used to use grub legacy for multiboot usb and it was so easy to set it up but this , i am not able to sept it up .

    Also please kindly tell how can i set multiple iso files to boot u from grub2. If there was any video to show me up then i t would have been amazing .

    4. Please also tell me difference between grub & grub2 and super grub & super grub2 . I found super grub2 too but it was confusing me .

    5. Kidly help me out and clear my doubts .

    Thanks

    • Hi,

      My English is not good, please sympathize for that.

      1. You need to specify the exact number of the disk that you want to install.
      https://www.aioboot.com/wp-content/uploads/2017/06/Install-Grub2-from-Windows.jpg
      //./PHYSICALDRIVE0 for Disk 0.
      //./PHYSICALDRIVE1 for Disk 1.
      //./PHYSICALDRIVE2 for Disk 2.

      2. Grub.cfg needs to be in the grub directory. G:grubgrub.cfg.

      3. You need to do your own research to boot ISO from Grub2. You can search by keywords:
      grub2 ubuntu iso boot
      grub2 linux mint iso boot
      grub2 arch linux iso boot

      4. I do not know the answer to this question. I think the author of it will help you.

      Thanks!

  • bonbonboi

    I’ve Linux installed on a partition, then later on I installed Windows, Windows replaced the MBR with its bootmgr 6, I’d like to know how to add an entry for grub2 to Windows Boot Loader, since I’m lazy to install grub2 on MBR then chainloading bootmgr