a1ive grub2 File Manager (MBR+UEFI) :: Easy2Boot

 IODD Mini

UEFI/MBR a1ive grub2 File Manager (agFM)

agFM is based on an open-source grubfm project which is a grub2-based Legacy+UEFI add-on file manager menu system written by the developer a1ive.
agFM is an enhanced version of grubfm and it is added to the FAT32 2nd partition of the E2B USB drive.
agFM has support for WinPE-based ISOs and supports .imgPTN files as well as other file types.
I recommend eBook #4 for full details on agFM.
Menu systems on an Easy2Boot USB drive can include:
  • Easy2Boot - a grub4dos-based MBR\Legacy-only menu system
  • agFM - a grub2-based MBR\Legacy+UEFI32+UEFI64 menu system based on grubfm (optional)
  • Ventoy for Easy2Boot - a grub2-based MBR\Legacy+UEFI64 menu system based on Ventoy  (optional)
Although agFM can also MBR\Legacy boot, I recommend that you use the E2B menu system for Legacy booting and the agFM menu system for UEFI booting. E2B has been developed and tested over many years and is usually more compatible than agFM or Ventoy when used with a Legacy BIOS. Ventoy may be more successful when booting BSD-based ISOs and WinPE-based ISOs.

Note: Some, but not all boot options require the ISO to be contiguous.
agFM is new for 2020
  • Direct MBR-boot and UEFI-boot.
  • Boot to Windows Install ISO files (even >4GB)), Linux ISOs, WIM, VHD, EFI and IMG files.
  • Payload files on first NTFS partition (but can be on other partitions or drives).
  • Windows ISOs do not need to be contiguous.
  • Secure UEFI64-boot to most ISOs (even >4GiB Windows ISOs).
  • If booting a VHD, imgPTN or using the Easy2boot\partnew boot option then the file must be contiguous.
  • Secure UEFI-boot from FAT32 Windows Install .imgPTN files + other OS's.
  • Secure UEFI-boot to FAT32+NTFS .imgPTN files (e.g. for large Windows Install ISOs >4GiB).
  • Configurable menu theme/wallpaper/text colours/layout/user start-up menu.
  • Add your own menu entries for special functions such as Linux+persistence, etc.
  • eBook #4 (PDF) available - UEFI multiboot using the agFM grub2 File Manager. How to add Linux ISOs, DLCBoot, Strelec WinPE, HBCD, Gandalf, Medicat, Kaspersky, DrWeb, Eset, Norton Rescue, Avast, GData, Trend Micro AV, Adaware, Comodo AV, Windows Install ISOs, etc.
  • Ventoy can also be added (MBR\Legacy and UEFI64) - see here and blog article here. You can Secure Boot to Ventoy from agFM.
I recommend you update to E2B v2.06 or later which has better support for the agFM.
Make_E2B.exe can add agFM and Ventoy when you use it to create a new E2B USB drive.
See 'Instructions' section below or eBook #4 for more details.
See agFM version history for changes.
agFM is new and you should check for the most recent version - also follow my blog for changes, etc..
agFM for E2B is under active development, please contact me if you find any issues with the latest version of agFM and the latest Beta version of E2B.
Please make a donation to a1ive (click Sponsor) if you use agFM.

To add or update agFM

1. Download latest E2B UEFI File Manager.zip and extract all files to the 2nd FAT32 partition 
    - OR -
Run "\e2b\Update agFM\Download and update agFM_v2.cmd" on the FAT32 2nd partition 
    - OR - 
Run "\_ISO\docs\Make_E2B_USB_Drive\Download and update agFM_v2.cmd" from the E2B first partition.
Check the  E2B Alternate download areas  for any new Beta versions of agFM UEFI File Manager. This may contain new features and bug fixes.
Info: The main agFM bootable files are:
  • \grubfmx64.efi - UEFI64 boot file
  • \EFI\BOOT\bootia32.efi - UEFI32 boot file
  • \e2b\grubfm.iso - MBR\Legacy boot file
2. If you have already added any .cfg files or .grubfm menu  files, compare them with the 'Menu Files to copy to payload volume' files to see if there is now a better version.


When you make an E2B v2 USB drive, the curent release of agFM files will be downloaded and added to the second partition.
Just add your ISO files to the first NTFS partition as usual and you are ready to MBR\Legacy or UEFI-boot.
The E2B UEFI File Manager (agFM) .zip download file contains a1ive's version of grub2 and the grub2 File Manager (Open Source on GitHub) and also boot files so that we can Secure UEFI64-boot directly from the payload files on the E2B USB drive. Just extract and copy the E2B agFM files to the FAT32 2nd partition.
Partition 1 E2B:               PRIMARY NTFS   - E2B files + added payload files (max. 128GB for best compatibility)
Partition 2 PTN2:             PRIMARY FAT32 - agFM files                               (max. 32GB)
Partition 3 PTN3:             PRIMARY NTFS   - image files and user files          (*optional)
Partition 4   -                    MUST BE UNUSED
Now UEFI-boot to the second partition using the BIOS Boot Selection pop-up menu on your system, then select a payload\ISO file and boot from it.
  • Secure UEFI64 should work without needing to disable Secure Boot (even for unsigned ISOs). 
  • The agFM menu can switch-in .imgPTN files or restore the E2B partition - you do not need to first boot to WinPE or MBR-boot!
  • Windows Install ISOs also work with SDI_CHOCO XML files for a Windows 10 fully automated install with drivers and apps from the ISO file!
ISO boot options:
  • Install Windows [.isowin] - use to install Windows from a Windows Install ISO
  • Boot ISO (Easy2Boot/partnew) (.isodef)- mainly used for Linux ISOs - files must be contiguous
  • Boot ISO (map) [.isomap] - only works for some ISOs
  • Easy2Boot Image Partition (.imgPTN23) - mainly used for Secure UEFI64-boot to Windows Installers or AIO WinPE OS's
  • User menu - runs the user-added .grubfm menu file, if present
  • grubfm may try to identify the type of ISO and add extra menu entries (e.g. 'Boot from Ubuntu ISO')

File types

File extensions are not case sensitive when using the agFM menu system.
Recognised non-standard extension types (subject to change):
agFM supports Secure UEFI64, UEFI64, UEFI32 as well as MBR\Legacy booting:
.ISO - Linux, Windows Install, WinPE, Android (Windows Install ISO may require 2GB RAM or more)
.XML - unattend.xml files can be used with Windows Install ISOs
.IMG - disk image
.VHD - Virtual Hard Disk Image
.WIM - NT6 wim file (using wimboot or NTBOOT)
.EFI - EFI applications, boot loaders, etc. (e.g. MemTest86, KonBoot)
.LUA - lua scripts
.CFG - Special grub2 menus or grub2 commands
.GRUBFM - grub2 menus or commands written for the grubfm menu system - e.g. Ubuntu ISO + persistence
.LST - grub4dos menu (MBR mode only)
Other extensions: .IPXE (ipxe boot file), .MOD (grub2 module), .PF2 (loads a grub2 font file - e.g. unicode-large.pf2), .JPG and  .PNG (display only).


agFM File extensions

Easy2Boot can recognise a wide range of different file extensions.
agFM only recognises a subset of these which includes these:
cfg, cfg32, cfg64, ima64, imgptn, imgptn23, imgptn2332, imgptn2332pwd, imgptn233gb, imgptn234gb, imgptn23644gb, imgptn2364pwd, imgptn23auto, imgptn23auto32, imgptn23auto32pwd, imgptn23auto64, imgptn23autopwd, imgptn23autopwd4gb, , imgptn23pwd, imgptn32, imgptn32autopwd, imgptn3gb, imgptn64, imgptn644gb, imgptn64autopwd, imgptn64pwd, imgptnauto, imgptnauto32, imgptnautopwd, imgptnpwd, imgptnREP3, imgptnrep364, imgptnrep3auto, imgptnrep3auto6, iso01, iso32, iso323gb, iso3gb, iso4gb, iso64, isoagfm, isoagfm64, isodd, isodef, isodef32, isodef323gb, isodef4gb, isodef64, isodef644gb, isodefault, isodefpwd, isofira01, isoloop64, isomap, isomap64, isomem, isomem64, isoPE, isopersist, isopup, isoventoy, isowin, isowin32, isowin3gb, isowin64
Use .isoagFM if you need to select one of the recognised linux entries with icons (e.g. Kaspersky icon or Ubuntu icon)
Use .isodef or .isodefault to boot using the Easy2Boot\Partnew method
Use .isoloop to boot using the 'loopback' method
Use .isomem to boot using the 'load to memory' method
Use .isomap or .isoPE to boot using the 'map' WinPE method (tip: try Ventoy for WinPE-based ISOs)
Use .isopersist to boot a casper\Ubuntu compatible ISO with a second *-rw persistence file (see eBook #4)
Use .isowin for Windows based ISOs (though some require a .iso file extension)
Use ._WinNTSetup.iso to boot to a Windows ISO and auto-run WinNTSetup.
Use .binacpi if the file is a binary ACPI file and you want to overwrite the ACPI tables.
File extension suffixes:
E2B supports a wide range of these, but agFM support is limited.
23 - (.imgPTN only) - keep partitions 2 and 3 (second partition image file which has no extension will replace ptn3 if present - second image file must be in ptn3)
AUTO - (.imgPTN only) - switch partition without user confirmation
3GB - only show if Total RAM 3GB or less (<4GB)
4GB - only show if Total RAM 4GB or more (3.99GB)
32 - only show if 32-bit CPU
64 - only show if 64-bit CPU
pwd - prompt user for password ($pwd variable must be set in user startup menu)
e.g. The file Ubuntu 15.1 64-bit.isodef64 will only be listed on systems with a 64-bit CPU and will not show a secondary agFM boot menu. A .isodefpwd file extension will prompt for a password if a pwd variable has been set.
.imgPTN extension suffixes can only be in the order: 23 - AUTO - 32\64 - pwd - 3GB\4GB. e.g. .imgPTN23auto64pwd is OK, but .imgPTN23pwdauto64 won't be detected. (agFM 1.42+). e.g. .imgptn2364 will still be selectable, but it will not run when selected if on a 32-bit system. To use pwd, you must first set the pwd variable in your startup menu file (e.g. set pwd="mysecret123"). 

Only a few GB suffixes are supported: see Ptn2: \boot\grubfm\types folder for a list of E2B extensions that are recognised by agFM.

Note that some E2B files extensions may not be recognised (e.g. .iso64pwd. .isofira01, etc.) or may not function in quite the same way as E2B. Please contact me if you need a particular extension. Always use E2B for MBR\Legacy booting. If necessary you can use two copies of the same payload file but with different extensions. agFM payload files do not have to use the E2B Menu folders, so you can place agFM payload files in a different folder (e.g. \_ISO\agFM\LINUX) so they do not appear in the E2B menu system.

MBR\Legacy-only and UEFI-only payload files

If you have a payload file that only MBR-boots using the E2B menu and does not support UEFI-booting, simply add 'MBR' to the file extension. E2B will ignore these three letters in any extension (e.g. old_linux64.isodef64MBR will run as .isodef but only if a 64-bit CPU is present). Note that 'MBR' should not be added to file extensions in the \ISO\WINDOWS\xxxxx folders. (E2B v2.03+).
If you have payload files that will only UEFI-boot (i.e they don't support MBR\Legacy booting), then copy them to a non-standard folder such as \_ISO\LINUX\UEFI\ or \_ISO\UTILITIES\UEFI\. These folders will be ignored by E2B but can be accessed via agFM.
agFM Feature table:
Also Windows Install ISOs with XML files and Partition Image files are supported.
Note: For UEFI Secure Boot + Install Windows, BIOS may need to be set to UEFI: 'Boot other OS' instead of UEFI: 'Microsoft Windows' or else you will get 0xc000000f 'Windows failed to start' error. OR you can make and add a Windows .imgPTN23 file for Windows Secure Boot (see below).

Instructions - how to make an E2B+agFM USB drive

The quick and easy way (Windows 10 is required for USB Flash drives)

E2B v2.00 and later ver sions will make a two-partition E2B USB drive and then automatically download and add the agFM files for you, if you have a Windows 10 system or a USB hard disk. 
Note: If your USB drive is a Removable USB Flash drive, Windows 10 is required because XP/7/8 can only access the first partition on a Flash drive (see below for instructions)! If your USB drive is a Fixed\Hard disk, any Windows OS will work.
  1. Download E2B v2.06 or later (extract the .zip file to an empty folder if it is in .zip format)
  2. Run the .\Make_E2B.exe utility as Administrator
  3. Click on the button with the large red arrow (or click on the Gear Wheel button if you want to specify up to three partitions+sizes).
  4. When asked to install UEFI boot files (agFM) answer Y=Yes. Partition 2 must be FAT32 (0.5-32GB) - choose 1GB if not sure.
  5. Then go to Step 5 below...

Add Ventoy (optional)

If you wish, you can now add the Ventoy boot files for MBR\Legacy+UEFI64 booting and Secure Boot UEFI64.

See here for details.


The harder way to add agFM (if you don't have Windows 10 and have a USB flash drive)

  1.  Update to the latest version of E2B or Make the E2B USB drive as detailed above. 

    If you are using a USB Flash drive and Windows XP\7\8 then the second partition will not be made correctly.
  2. You will need to delete the second PTN2 partition and create a new FAT32 Primary partition (rec. min. size 200MB or more). It may be necessary to shrink the E2B partition first using EaseUS Partition Master or a similar tool to make the 2nd FAT32 partition (Windows XP\7\8 can't do it!).
Partition 1: Type 07           PRIMARY NTFS  (recommended max. size 128GiB for best compatibility)
Partition 2: Type 0B/0C/0E PRIMARY FAT32 (recommended  min. size 200MB, max. 32GiB)
Partition 3: Unused (you can add a partition 3 but it may limit some uses)
Partition 4: Unused (MUST BE FREE)
Note: You can download and run the Install agFM.exe utility for Windows 7 and 8 systems
After you have made the E2B drive using Make_E2B.exe, run the 'Install agFM.exe' utility to perform the following actions:
1. Ask the user for the USB drive number (does not work if Windows 10)
2. Delete the second partition
3. Create a new FAT32 second partition using the remaining space (Z:)
4. Re-order the first and second partition
5. Download the current release of agFM and extracts the files to the second partition
6. Re-order the first and second partitions back to their original order
7. Re-assign a drive letter to partition 1
Now go to Step 5...
If your E2B USB drive is larger than 128GiB, you may want to create a third NTFS partition which can be used to store applications or backup images, etc.
Note that this may limit some E2B features however (e.g. Linux ISO+persistence).
Note: Do not use Logical partitions! If it does not UEFI-boot, check the partitions using RMPrepUSB.exe - Drive Info - 0.
For UEFI-booting, the partition entries must have the START sectors in ascending order (partition 1 must start before partition 2) and the partitions must not overlap.
Example 'RMPrepUSB - DriveInfo - 0' output
Partition 1   SIZE=102398.616MiB   Type: 07 NTFS\exFAT *ACTIVE*
START POS   = CYL:0 HD:32 SEC:33       END POS = CYL:1023 HD:254 SEC:63
START (LBA) = 2,048 (00000800) SIZE (LBA) = 209,712,366 (0C7FF4EE) [End=209,714,413]
Partition 2   SIZE=19489.33MiB   Type: 0C FAT32LBA (2047GB max)       
START POS   = CYL:1023 HD:254 SEC:63       END POS = CYL:1023 HD:254 SEC:63
START (LBA) = 209,714,414 (0C7FFCEE) SIZE (LBA) = 39,914,147 (02610AA3) [End=249,628,560]
Partition 3 SIZE=0MiB Type: 00
START POS   = CYL:0 HD:0 SEC:0       END POS = CYL:0 HD:0 SEC:0
START (LBA) = 0 (00000000) SIZE (LBA) = 0 (00000000)
Partition 4 SIZE=0MiB Type: 00
START POS   = CYL:0 HD:0 SEC:0       END POS = CYL:0 HD:0 SEC:0
START (LBA) = 0 (00000000) SIZE (LBA) = 0 (00000000)
P1   Start=2,048 (1,048,576 bytes) End=209,714,413 (107,373,779,456 bytes)
P2   Start=209,714,414 (107,373,779,968 bytes) End=249,628,560 (127,809,822,720 bytes)
Drive 4  SanDisk Extreme Pro  F/W Rev.=0  Serial No.= [ bytes = 00 00 00 00 00 00 00 00 ]
Reported size 128,043,712,512 bytes (119.25GiB)  Last LBA 250,085,375
RMPrepUSB Max 128,034,708,480 bytes (119.2416GiB)  Last LBA 250,067,789

Note: a Type 0 partition will be ignored by most OS's (except Linux if it contains a valid start and size).

3. Download the latest 'E2B UEFI File Manager vx.x.zip' file. There may be more than one version. Choose the latest version. Do not download the imgptn file.
The download file can be found in the Alternate Dow nload Areas - a1live grub2 file manager folder (e.g. E2B UEFI File Manager v1.43 and later includes MemTest86, Secure UEFI64 boot and .imgPTN switching).

4. Extract the files from the "E2B UEFI File Manager vx.x.zip' file directly to the root (top level) of the 2nd FAT32 partition on the USB drive.

Note: If you are using a Win XP/7/8 system, you will not be able to access the 2nd FAT32 partition on a Removable USB drive. You can temporarily switch over partition 1 with partition 2 by running \_ISO\SWITCH_E2B.exe
Make sure you switch them back before UEFI-booting or it may not boot!
    1. Click on Access Partition 2 - the first NTFS partition will be swapped with the second FAT32 partition. Explorer should assign a drive letter to this volume.
    2. Extract the contents of the agFM zip download file to the USB drive using Explorer
    3. Click on Access Partition 2 - the NTFS partition should now be available again
5.  (optionalMove the file \e2b\grub_filemanager.mnu to the \_ISO\MAINMENU folder on the E2B partition (if not already present). Edit this file to change the language\text if you wish. This will allow you to run the grub2 file manager from the E2B Main Menu. I strongly suggest you use the E2B menu for MBR booting as it should be more successful for most payloads. The agFM menu system however may be able to boot non-contiguous Linux ISOs more successfully. This menu may also add the Clover UEFI boot options.
6. (optional) Copy the file \_ISO\WINDOWS\WIN8\NO KEY (choose a version to install).xml to the folder \_ISO\WINDOWS\WIN7 (if not already present). You can use this XML file after you select a Windows 7 ISO so that all Win7 Editions will be available to install.
7. Copy your ISO files, VHD files, WIM files, .imgPTN files, EFI files, IMG files, etc, to the first E2B NTFS partition. Use the menu folders which are already provided for you (e.g. \_ISO\MAINMENU, \_ISO\ANTIVIRUS, \_ISO\WINDOWS\WIN10, etc.). Change any .imgPTN file extensions to .imgPTN23 so that the second and third partitions will remain when you switch in a .imgPTN23 file.
Note: Payload file names must not contain the $ symbol. Spaces are allowed.
8. Run \MAKE_THIS_DRIVE_CONTIGUOUS.cmd to make all the files on the first NTFS partition contiguous. Linux .ISOs and .imgPTN files must be contiguous when using the 'Easy2Boot/partnew' boot options.
You can copy the wincontig folder from the \_ISO\docs folder to any other partition and then run one of the .cmd files to make the files on that same partition contiguous (e.g. copy the wincontig folder to partition3 if you have one and have payload files on it).
Tip 1: Rename \_ISO\UTILITIES_MEMTEST\Passmark Memtest86 (MBR+UEFI).imgPTN to Passmark Memtest86 (MBR+UEFI).imgPTN23 so it can be easily used with agFM (if not already present).
Tip 2: As with the E2B menu system, if the file extension is .ISO then you will be prompted by agFM with a choice of boot methods, however if you use an E2B file extension (.isodef, .isodefault, .isodd, .iso01, .iso32, .iso64, .isoPE, .isoPE01, .isomem, .isomap, .isoloop) then it will immediately boot the ISO - e.g. use .isodef for Linux ISOs. If the (.map) menu entry works then use .isomap. If the (loop) entry works however, you must keep the original Linux filename and the .iso extension. If agFM has recognised the linux iso type and displays the correect icon (e.g. Ubuntu icon or Fedora icon, etc.) and it works, then use a file extension of .isoagfm (v1.39+).


Use the E2B menu system for MBR booting and the grub2 File Manager for UEFI-booting.
You should be able to load the Legacy grub2 File Manager from the E2B Main Menu if you added the .mnu file, or directly UEFI-boot to the UEFI grub2 File Manager.

Using the a1ive grub2 File Manager

You can browse to the \_ISO menu folders on the E2B drive to boot payload files such as .ISO, .EFI, .WIM and .VHD files. 
.imgPTN files must be on the first partition if you want to UEFI-boot from them. I recommend using .imgPTN23 so that the agFM partition is always available. Files MUST be contiguous. Secondary partition image files which have no file extension must be on partition 3.
Linux ISOs - Choose the Easy2Boot (partnew) option if available for Linux ISOs (ISO files must be contiguous). Use a .isodef file extension for quick booting.
Windows Install ISOs - Choose 'Install Windows' to boot to Windows Install ISOs.
The file extension _.winntsetup.iso is supported by agFM as well as Easy2Boot. Using this file extension will automatically run WinNTSetup.exe and load the ISO for you.
Note: For Secure Boot + Install Windows, BIOS may need to be set to UEFI Secure Boot: 'Boot other OS' instead of 'Microsoft Windows' or will get 0xc000000f 'Windows failed to start' error. To change the Secure Boot BIOS option you may need to first set a BIOS Supervisor Password and then reboot back to the BIOS Setup menu on some computers.
If the BIOS is set to Secure Microsoft UEFI, you can install Windows from a Windows Install ISO by first Secure UEFI-booting to a WinPE ISO (e.g. Strelec, Bob Omb's, DLC, Hirens WinPE) and then running WinNTSetup. Alternatively, make a Windows Installer .imgPTN23 file for Secure Boot (see below for details).
Note: If booting to a Windows 7 or Windows 8.1 Install ISO, choose 'Install Windows' and then choose the 'NO KEY (choose a version to install).xml' file to see all Editions in the Win7/8 ISO and to avoid having to enter a Product Key for Win 8.1.
You can select an XML file if one is present in the same folder as your Windows Install ISO. This means you can use SDI_CHOCO XML files with your Windows Install ISOs in the same way that it works with MBR\Legacy booting.
Choose 'NT5' option to boot to XP-based payloads (does not include E2B DPMS drivers) - I suggest you use the Easy2Boot menu for XP installs.
Use .isowin, .isoPE or .isoPE01 for WinPE ISOs (or keep as .ISO and use the 'Windows' or 'map' menu entry). Some WinPE ISOs must end in .iso. Use .imgPTN23 for DLCBoot, Sergei Strelec WinPE and other AIO WinPE ISOs.
You can boot directly from WindowsToGo .VHD or .VHDX files (use the 'Boot Windows NT6.x VHD\VHDx (NTBOOT)' menu entry if UEFI booting. To see this option you may need to select 'F4 - enable secondary boot options' first. VHD files must be contiguous.
You can boot directly to WinPE .WIM files.
You can also make your own grub2 menus by using a file with the .cfg or .grubfm file extension. 
See here for an example of a Ubuntu-based ISO + persistence.
grub2 and linux can be 'fussy' about spaces and non-standard characters in filenames. Always use paths and filenames which do not contain spaces. Once you have it working, then you can try adding spaces and changing the filename. Always avoid using folder paths which contain spaces. Never use a dollar sign ($) in file names!
Tip: Once it is working, try changing the file name and add spaces to see if it still works!
If the graphical menu is slow to scroll, press F4 and then T to switch to terminal mode.

Selecting an .ISO file

The agFM may provide you with a list of boot choices after you select a file with a .ISO file extension:
  • Boot ISO (partnew/Easy2Boot) [.isodef] - writes an entry for the ISO into partiton table entry 4 - the ISO file MUST be contiguous. Use for most Linux ISOs.
  • Install Windows from ISO [.isowin] - Usually runs Windows Setup or WinPE. Use if the ISO is a Windows boot ISO. Using .isoPE extension will auto-select this option.
  • Boot ISO (loopback.cfg) - use the loopback.cfg file within the ISO - this often contains a cheat code that specifies the name of the ISO to allow booting directly from the ISO file - use if the Easy2Boot\partnew option does not work. Keep the original filename and the .iso extension.
  • Boot ISO (map/WinPE) [.isomap] - uses the grub4dos map command to map the ISO as cd device (0xff) in Legacy mode, or uses the grub2 map command if UEFI.
  • Boot ISO (mem) [.isomem] - load ISO into memory before booting from it.
  • User menu - runs the .grubfm grub2 file which must have the same path and filename as the ISO file.
  • Boot xxxxx from ISO [.isoagfm] - where xxxxx is a specific linux distro - it uses linux cheat codes which do not require a contiguous file (may not work on all versions). Use the .isoagfm file extension.
If you use a recognised E2B file extension - e.g. .isodef, then the 'Boot ISO (Easy2Boot\partnew)' entry will be automatically used and this secondary menu will not be displayed.
Recommend file extensions are shown in square brackets.

F4 Settings Menu

You can switch to Terminal mode, choose to display all files in the menu, change resolution, etc.
Full details in eBook #4.

Secure Boot

UEFI64 Secure Boot is achieved by first booting to a Kasperksy signed shim which then loads a1ive's grub2. Most systems will UEFI64 Secure booot without any problem.
If the Kaspersky shim signature has been blacklisted in your UEFI BIOS however (i.e. added to the DBx list by a Windows Update), then grub2 will not load and you will just get a Firmware message about 'Secure Boot Violation'.
To avoid this:
1. Switch-in a .imgPTN23 file (using SWITCH_E2B.exe or MBR-booting to the E2B menu first)
2. Go into the BIOS Setup menu and delete the DBx blacklist contents (a Windows Update may add-in the blacklist entry at some future point though!)
3. Disable Secure Boot in the BIOS settings

BIOS bugs!

Many BIOSes have some bugs:
1. In MBR\Legacy mode, files positioned beyond 128GiB on the disk cannot be accessed. This is why the first partition should be no larger than 128GiB.
2. Some UEFI-enabled BIOSes will ALWAYS boot to the grub2 UEFI boot files - you will not be able to boot to the E2B (Legacy) menu even if you enable CSM mode and disable Secure Boot. To fix this, you can temporarily rename the \EFI folder on the 2nd FAT32 partition to something else (e.g. EFIx). This will prevent it from UEFI-booting. There is a .mnu E2B file which will do this for you - add it to \_ISO\MAINMENU folder.
Note: If you get a Security Violation error then 'Secure Boot (Microsoft only)' is enabled in the BIOS and the EFI boot file used by agFM has been blacklisted. 
To fix: disable Secure Boot, clear the DBx blacklist in the BIOS or set the BIOS to 'Secure Boot (Other OS)' - or use .imgPTN23 partition image files to Secure Boot (see below).

Add a grub2 menu

Some ISOs may not be directly UEFI64 bootable or you may want to boot an ISO with different parameters (cheat codes) or boot with persistence.
There are two types of grub2 menu files which you can add:
  • .cfg files        - these can be placed anywhere but must containg grub2 code with the correct path and filenames for each specific payload file. The user can directly select the .cfg file and run it as a grub2 menu file.
  • .grubfm files - these must be placed in the same folder as the payload file and have the same file name as the payload file  - the user must first select the payload file (not the .grubfm file) and then the user will need to select the 'User Menu' entry. e.g. \_ISO\LINUX\Ubuntu_x64.iso and \_ISO\LINUX\Ubuntu_x64.grubfm.
Examples of these menu files can be found in the Alternate Download Area - alive grub2 Fil e Manager folder. 
Example .cfg and grubfm files can also be found in the agFM downloaded folder \Menu Files to copy to payload volume (these are not actually used by agFM but just provided as sample files).

.cfg files

You can make a grub2 .cfg file and select the file using the File Manager...
You can create a .cfg file in any folder and the .cfg file can have any filename as long as it has a .cfg file extension. 
Note: grub2 environment variables are case-sensitive and can be set and used as below:
set "fred=xxxxx"
echo ${fred}
For instance $grubfm_device will be name of the device+partition and $grubfm_dir will be the directory, so you can use (${grubfm_device})${grubfm_dir}fred.iso which will be equivalent to (hd0,msdos1)/_ISO/LINUX/fred.iso (for example). You will however need to 'hard-code' the name of the file (e.g. fred.iso) that you want to boot.
(hd0,msdos1) = first partition
(hd0,msdos2) = second partition
.cfg files will be directly loaded as a grub2 menu - therefore the .cfg file can be placed anywhere and can boot any file with any extension.
Open agFM at the /_ISO/WINDOWS/WIN10 folder.
grubfm "(hd0,msdos1)/_ISO/WINDOWS/WIN10/"
Open agFM and select a specific file.
grubfm_open "(hd0,msdos1)/_ISO/WINDOWS/WIN10/Windows10x64UK_Oct_2018.iso"
.cfg files usually contain a 'menuentry' command so that new menu line is listed in the agFM menu.

Example Windows 10 x64.cfg menu file:

(This example can be placed anywhere on same partition as the ISO and XML file).
Win10 1909 x64.cfg
menuentry "Install Windows 10 1909 x64 Pro Eng" --class=nt6 {
    set "XML=(${grubfm_device})/_ISO/WINDOWS/WIN10/Windows 10 Pro (no prompt to repair).xml"
    set "ISO=(${grubfm_device})/_ISO/WINDOWS/WIN10/Windows10_1909_x64_English_MS.iso"
    set "grubfm_file=${ISO}"
    source (memdisk)/boot/grubfm/rules/iso/win.sh
    win_isoboot "(loop)/sources/boot.wim"  "${XML}"

Example .cfg file for Ubuntu .isopersist file with persistence

#Ubuntu x64 iso boot with persistence
#No spaces in filename
#Place this .cfg file in the same partition as the .iso file (any folder)
#Assumes persistent file is in root of E2B partition
#ISO file is in \_ISO\LINUX folder
# Only show menu if 64-bit CPU:
if [ "$CPU" == "64" ] ; then
menuentry "Ubuntu 64-bit with persistence" --unrestricted --class ubuntu {
# WARNING: partnew will write a new partition entry
   set "grubfm_per=(${grubfm_device})/ubuntu-18.04.3-desktop-amd64-rw"
   set "grubfm_file=(${grubfm_device})/_ISO/LINUX/ubuntu-18.04.3-desktop-amd64.isopersist"
   set "grubfm_path=/_ISO/LINUX/ubuntu-18.04.3-desktop-amd64.isopersist"
if [ ! -e "${grubfm_per}" ] ; then 
echo ERROR ${grubfm_per} does not exist on (${grubfm_device}) ; read ; fi
if [ ! -e "${grubfm_file}" ] ; then 
echo ERROR ${grubfm_file} does not exist on (${grubfm_device}) ; read ; fi
if [ ! -e "(${grubfm_device})${grubfm_path}" ] ; then 
echo ERROR (${grubfm_device})${grubfm_path} does not exist on (${grubfm_device}) ; read ; fi
   if ! test -d (${grubfm_disk},4) ; then partnew --type=0x00 --file="${grubfm_per}" (${grubfm_disk}) 4 ; fi
   loopback loop "${grubfm_file}"
   set root=(loop)
   linux (loop)/casper/vmlinuz boot=casper persistent iso-scan/filename=$grubfm_path quiet splash
   initrd (loop)/casper/initrd

.grubfm files

An alternative is to use a .grubfm file. These are automatically added as a new 'User Menu' menu entry after you select a payload file (e.g. after you select Ubuntu.iso). 
The filename of the .grubfm file must exactly match the filename of the payload file and must be in the same folder, e.g.
\_ISO\LINUX\Ubuntux64.iso            (select the iso)
\_ISO\LINUX\Ubuntux64.grubfm (do NOT select this file)
Only valid payload file extensions can be used (e.g. .iso, .vhd, .wim, etc.) when using a .grubfm file.
Available grub2 variables when using .grubfm files:
# available variables are:
# grubfm_file  - (dev)+fullpath+name.ext
# grubfm_path  - e.g. /test/ubunto.iso
# grubfm_dir   - e.g. /test/
# grubfm_device - e.g. hd0,msdos1
# grubfm_disk    - e.g. hd0
# grubfm_name    - e.g. ubuntu.iso
# grubfm_filename - e.g. ubuntu
# grubfm_fileext   - e.g. iso
# grub_platform=efi or pc  (UEFI or Legacy BIOS)
# grub_cpu=i386 or x86_64 (i386=Legacy mode or 32-bit UEFI, x86_64=UEFI64)
# grub_uefi_version  (e.g. 2.4)
# grub_secureboot
# CPU  (=32 or 64)
# grubfm_file        - e.g. (hd0,msdos1)/test/ubuntu.iso
# grubfm_path      - e.g. /test/ubunto.iso
# grubfm_dir         - e.g. /test/
# grubfm_device    - e.g. hd0,msdos1
# grubfm_disk       - e.g. hd0
# grubfm_name     - e.g. ubuntu.iso
# grubfm_filename - e.g. ubuntu
# grubfm_fileext     - e.g. iso
# grub_platform=efi or pc  (UEFI or Legacy BIOS)
# grub_cpu=i386 or x86_64 (i386=Legacy mode or 32-bit UEFI, x86_64=UEFI64)
# grub_uefi_version  (e.g. 2.4)
# grub_secureboot
# CPU  (32 or 64)
  Environment variables can be listed from the command line (press 'c').
  e.g. echo $grubfm_name

Here is a simplified .grubfm menu which uses some of these variables:

menuentry "Ubuntu 64-bit with persistence" --unrestricted --class ubuntu {
# WARNING: partnew will write a new partition entry
   if ! test -d (hd0,4) ; then partnew --type=0x00 --file="(${grubfm_device})/persist/${grubfm_filename}" (${grubfm_disk}) 4 ; fi
   loopback loop "${grubfm_file}" 
   set root=(loop)
    linux (loop)/casper/vmlinux boot=casper persistent iso-scan/filename=$grubfm_path quiet splash
    initrd (loop)/casper/$init

.grubfm menu for Windows Install ISO:

.ISO and .grubfm must have same file name and be in the same folder. Run Windows Install with a specific XML file:
menuentry "Install Windows 10 1909 x64 Pro Eng" --class=nt6 {
    set "XML=Windows 10 Pro (no prompt to repair).xml"
    source (memdisk)/boot/grubfm/rules/iso/win.sh
    loopback loop "${grubfm_file}" 
    win_isoboot "(loop)/sources/boot.wim" "(${grubfm_device})${grubfm_dir}${XML}"

About .imgPTN files

.imgPTN files are sector-for-sector images of a whole primary partition. When you select a .imgPTN file, it will replace partition #1 (the E2B partition) with the contents of that file.
A file with the extension .imgPTN23 will keep partitions 2 and 3 - a file extension which does not contain '23' will remove Primary partitions #2 and #3 (if they exist).
E2B and agFM v1.19 and later versions also support auxiliary partition image files.
Auxiliary partition image files must have the same filename as the .imgPTN* file but do not have any file extension.
The filename must not contain any dots. It will replace Primary partition #3 on the E2B USB drive.
All partition image files MUST be contiguous.
Install Defraggler - right click on the file and choose Defragment.
The Auxiliary file search is in this order of preference:
  1. Ptn3 (path)/(filename).
  2. Ptn3 /_ISO/(filename).
  3. Ptn3 /(filename).
  4. Ptn2 (path)/(filename).
  5. Ptn2 /_ISO/(filename).
  6. Ptn2 /(filename).
  7. Ptn1 (path)/(filename).
  8. Ptn1 /_ISO/(filename).
  9. Ptn1 /(filename).
  • Files beginning with the extension .imgPTN will replace Partition 1
  • If an auxilliary file exists with the same filename BUT NO FILE EXTENSION then that will replace Partition 3
  • If the .imgPTN file extension has '23' in it (e.g. .imgPTN23), then Partitions 2 and 3 will not be deleted
  • For UEFI-booting, the final partition table must be in ascending order and must not overlap each other
Note: Auxilliary partition image files should be placed in the 3rd partition to avoid UEFI boot issues.
E2B USB Drive partitions
Ptn1: NTFS E2B files
Ptn2: FAT32 agFM files
Ptn3: NTFS Auxilliary files + user files
Ptn4: unused
I recommend you always use .imgPTN23

Example files(s) and  results:

Assuming the payload is called FRED.imgPTN and auxilliary file is called FRED, AFTER switching in the file(s) we would get...
after switching, we get:
Ptn1: FRED.imgPTN contents
Ptn2: (empty)
Ptn3: (empty)
Ptn4: (empty)
Ptn1:\_ISO\ANTIVIRUS\FRED.imgPTN23 (recommended)
after switching, we get:
Ptn1: FRED.imgPTN23 contents
Ptn2: FAT32 agFM files
Ptn3: NTFS Auxilliary files + user files
Ptn4: (empty)
Ptn1:\_ISO\ANTIVIRUS\FRED.imgPTN + Ptn3:\FRED  (no agFM)
after switching, we get:
Ptn1: FRED.imgPTN contents
Ptn2: (empty)
Ptn3: FRED contents
Ptn4: (empty)
Ptn1:\_ISO\ANTIVIRUS\FRED.imgPTN23 + Ptn3:\FRED  (recommended)
after switching, we get:
Ptn1: FRED.imgPTN23 contents
Ptn2: FAT32 agFM files
Ptn3: FRED contents
Ptn4: (empty)
FRED will also be detected if placed in the Ptn3:\_ISO\ANTIVIRUS or Ptn3:\_ISO folder.

Using .imgPTN23 files to Secure Boot to Microsoft OS's

Note: In the past Microsoft had blocked the boot files used by agFM when Secure Booting from agFM to a Microsoft EFI boot file which requires Secure Boot (within the Feb 2020 Windows Update). If you experience 'Secure Boot Violation' messages, then run a Windows Update or use the UEFI BIOS pop-up menu to UEFI-boot from Partition 1 after switching-in a FAT32 .imgPTN23 file.
You must boot from a bootx64.efi file (not a .wim or .iso file) if 'Secure Boot (Microsoft only)' is enabled in the BIOS otherwise you may get a '0xc000000f Unexpected error' BSOD.

1. UEFI-boot to agFM and select the .imgPTN23 file, answer the question (1) and the partitions will be changed.
    IMPORTANT: You always need to reboot before you can boot from EFI files on the new Partition 1 because the UEFI firmware will be unaware that the partitions have been changed (even though grub2 will be aware).
2. Reboot from the new partition 1 directly to Windows.
    If the system reboots to agFM instead of Windows then press F3 and select the 'Boot hd0,msdos1' option from the F3 boot menu.
3. You can restore the original USB drive partitions by booting to the agFM partition and running the \RESTORE_E2B.cfg file which is in the agFM FAT32 second partition. The original MBR and E2B partitions will be restored.

Non-Secure Boot to large Windows Install ISOs

If the install.wim or install.esd is over 4GB, then create an NTFS .imgPTN23 file using the MPI Tool Kit (instead of using the MPI_FAT32 Desktop shortcut).
It will always reboot to the agFM menu but you should be able to use F3 to boot to (hd0,msdos1) from the NTFS volume.
Note: Due to a recent (February 2020) Microsoft Windows update which updates the BIOS blacklist , you may need to disable Microsoft Secure Boot for this to work!

Secure Boot to large Windows Install ISOs

If directly booting from a .ISO file does not work...

Method 1

1. Extract all contents of the Windows Install ISO to a new empty folder on your Desktop called 'FAT32'
2. Create a new folder on the Desktop called 'NTFS' and create a folder under it called 'Sources'
3. Cut (move) the two files in .\FAT32\Sources\Setup.exe and the large .\FAT32\Sources\Install.wim (or .esd)
4. Paste the two files into the empty .\NTFS\Sources\ folder
Note: .\FAT32\Sources folder must not contain setup.exe or an install.wim\esd file.
5. Drag-and-drop the FAT32 folder onto the MPI_FAT32 Desktop shortcut and use the default answers to make a C:\temp\Win10.imgPTN23 file
6. Drag-and-drop the NTFS folder onto the MPI_NTFS Desktop shortcut and use the default answers to make a C:\temp\Win10 file
    Note: you may need to increase the default suggested size if there is not enough room.
7. Copy the Win10.imgPTN23 file to the E2B first partition: \_ISO\WINDOWS\WIN10\Win10.imgPTN23
8. Copy the Win10 file to the 3rd NTFS partition (either to the root or \_ISO\WINDOWS\WIN10 folder
9. Run Defraggler and defrag each file to ensure it is contiguous.
You can rename the files if you wish (do not use dots in the name).
If you are using a Removable USB drive and are using Win7/8 Installl files, you will need to rename the files e.g.  the large NTFS file is \_ISO\WINDOWS\WIN8\Win8.imgPTN23 and the smaller FAT32 file is at Ptn3:\_ISO\WINDOWS\WIN8\Win8.
Note: If your ISO has \x64\sources and \x86\sources folders, then replicate both folders in your 'NTFS' folder structure.

Method 2

Use Split_WinISO.exe, which is in the MPI Tool Kit, to split the large install.wim/esd file into smaller files and create a single .imgPTN23 file. This may not work for all types of Windows Install ISOs (e.g. non-standard AIO ISOs).

WinPE ISO booting

Some WinPE-based ISOs will boot directly (HBCD, Gandalf, Strelec), but many WinPE ISOs such as DLC Boot, Bob Omb's PEs, etc.) work better when the ISO is converted into a .imgPTN file using the E2B MPI Tool Kit.
Some ISO files need to keep the .iso file extension. We can add a _.xxxx. suffix extension instead, where xxxx is a special extension name. For instance, DLCBoot looks for a file ending in .iso, so we can use an extension of _.isohw.iso so that agFM and E2B will boot it as if it ended in .isohw.
  • Bob Omb's WinPE - use xxxxx_.isomap64.iso (map) or .imgPTN23 (recommended).
  • DLCBoot - xxxxx_.isohw.iso or use .imgPTN23 (see blog)
  • Gandalf WinPE - use xxxx_.isomap.iso (map) or xxx_.isodef.iso or .imgPTN23.
  • HBCD WinPE - use xxxx.isomap64 or .imgPTN23.
  • Sergei Strelec - use xxxx.isowin or .imgPTN23.
  • Medicat - use xxxxx _.isowin.iso or .imgPTN23.

Instructions to add a WinPE ISO

  • Download the WinPE ISO (e.g. HBCD_PE_X64.iso 1.3GB) and copy it to the E2B NTFS partition - the (map) option or .isowin  will usually work even when in Secure Boot mode.
  • Most WinPEs will boot immediately if you use the .isoPE file extension (same as map option).
  • Some WinPE's will only work correctly if the extension is .iso (e.g. BobOmbs, Medicat, Gandalf)
  • Some WinPE's are quite large and 2GB+ of RAM may be required.
  • Some WinPE ISOs are designed to be extracted onto a USB drive - in this case convert the ISO to a .imgPTN23 file.

Instructions to add WinPE WIM files

By adding Microsoft boot .WIM WinPE files, you can install Windows even with a 'Secure UEFI: Microsoft OS only' BIOS setting. 
You can boot to WinPE and run WinNTSetup.exe and then select any Windows Install ISO.
When Secure Boot (Microsoft only) is enabled, we can boot from a bootx64.efi boot file:
bootx64.efi -> \efi\microsoft\boot\bcd -> \boot\boot.sdi -> \sources\xxxxxx.wim
If the following WinPE files are already present, go to Step 6 (or add your own boot.wim file).

eBook #3 WinPE files

Details of these files are in eBook #3.
  1. Download SWPEFAT32_eBook_FILES.zi_ and open in it 7Zip (password is given in eBook #3)
  2. Extract \EFI\Boot\BOOTX64.efi to the root of the FAT32 partition
  3. Rename \BootX64.EFI to \SWITCHPE_x64.EFI
  4. Extract \boot\boot.sdi to the FAT32 partition (\boot\boot.sdi)
  5. Extract the \EFI\microsoft folder to the FAT32 partition (\EFI\microsoft\)
  6. Extract and copy the \sources\SWITCH_X64.wim file to the FAT32 partition (\sources\SWITCH_X64.wim). We now have:
  • \SWITCHPE_X64.efi
  • \boot\boot.sdi
  • \EFI\microsoft\boot\bcd
  • \sources\SWITCH_X64.wim  (can also add SWITCH_X32.wim also)
The FAT32 partition must be large enough to contain the .wim file(s).
You can use any .wim file of your choice, but 64-bit WinPE must support WoW64 and you may need to add SWITCH_E2B.exe to the FAT32 partition if you don't use the eBook .wim files which already include SWITCH_E2B.exe.

Steps for Secure Boot to Install Windows from a .imgPTN file

Requires a pre-made Windows .imgPTN23 file (e.g. \_ISO\WINDOWS\WIN10\Win10_x64_1909.imgPTN23).
  1. UEFI Secure Boot to the a1ive grub2 File Manager
    Ptn1: E2B menu system (MBR only)
    Ptn2: a1ive grub2 File Manager (MBR+UEFI) + WinPE .wim file(s)
  2. Select the desired .imgPTN23 file - we now have:
    Ptn1: Windows 10 (UEFI)
    Ptn2: a1ive grub2 File Manager (UEFI)
  3. Reboot to the new image on partition 1 (there may be two UEFI USB boot options in the BIOS Boot menu - you must pick the correct one or it will boot to the agFM again!). If you do boot to the agFM, then you can boot run the \EFI\BOOT\BOOTX64.EFI file on partition #1 to boot to Windows.
  4. Install Windows 10
  5. Reboot to agFM on Partition 2 and select \RESTORE_E2B.cfg *
    Ptn1: E2B menu system (MBR only)
    Ptn2: a1ive grub2 File Manager (MBR+UEFI)
  6. The E2B USB drive now contains the Easy2Boot menu system in partition 1.
* Note: Not all BIOSes will list the 2nd agFM partition as a boot option in the boot menu. In this case, move the \EFI\BOOT\BOOTx64.efi boot file on partition 1 up to the \EFI folder - see eBook #4 for more details.

Add an agFM Startup User menu

You can replace the default start menu with your own menu which must be called startup_menu.txt.
\boot\grubfm\startup_default.cfg is the default startup menu of agFM. DO NOT EDIT
\boot\grubfm\startup_menu.txt is the name of the user's menu which, if present, will be used instead of startup_default.cfg.
You can change the start menu by copying startup_default.cfg to create a new file called startup_menu.txt or you can copy the file SAMPLE_startup_menu.txt to create a new file called startup_menu.txt.
Full details are in eBook #4.
You can define a default menu entry and a timeout, add menu entries, change the theme, etc.
A sample 'slack' theme is also included - see the instructions in SAMPLE_startup_menu.txt.
NOTE: If you update agFM to the latest version, all original files will be replaced. For this reason you should always create new files and folders - never edit the original agFM files.
 agFM default theme
Instead, for fastest performance, you can define a non-themed, text-based user menu with the colours and background wallpaper of your choice...
text mode with users background
or change the 'slack' theme to use your own wallpaper and add a Menu heading, etc....
 or use a different theme 
The main agFM File Manager menu system can also use your new theme or the default theme.
  • Add entries to boot to ISOs, VHDs, WIM files, EFI files, .imgPTN files, etc
  • You can change the default language.
  • You can also add a master password prompt.
  • You can add SubMenus to the bottom of your user menu.
  • Use the default theme, set background wallpaper+text mode or use your own theme and background
More details on how to make and configure the agFM user menus, themes and wallpapers are in eBook #4
The 'seven of nine' theme download is also included in eBook #4.