agFM – a1ive grub2 File Manager

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.

Introduction

  • 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 file 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 – a1ive grub2 File Manager for Easy2Boot (PDF)  – 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.

To add or update agFM

Run “\e2b\Update agFM\Download and update agFM_v2.cmd” on the FAT32 2nd partition 

Using agFM

The agFM menu system can have an initial grub2-based menu, but then a ‘File Explorer’ type menu system is loaded. This allows you to select any file on any drive in the system (not just the files on the USB drive).

To MBR\Legacy boot to agFM – first Legacy boot to the E2B Menu system – then select the ‘a1ive grub2 File Manger (agFM)’ menu entry

Easy2Boot Legacy menu will list the agFM Legacy menu entry

To UEFI-boot, use your BIOS Boot Selection pop-up menu to select Partition 2 on the E2B USB drive.

To UEFI-boot, select the correct EFI BIOS entry (Partition 2)
Default agFM startup menu
Using the agFM File Manager menu system, you can locate any payload file on any drive and select it.

Tip: When you boot to agFM, it will tell you what mode it has booted in (Legacy, UEFI32, UEFI64, Secure Boot, etc.)

agFM startup information

Add payload files (ISO files, etc.)

Although you can copy your payload files to any folder or partition on the E2B USB drive, it is best to use the standard E2B menu folders so that the files will also be listed by the E2B Menu system.

Windows Install ISO files should always be copied to the appropriate E2B menu folder – e.g. \_ISO\WINDOWS\WIN10 for a Windows 10 Install ISO file. This allows you to use it with Easy2Boot and to use the XML files if required.

All other types of ISO file can be copied to whichever menu folder that you like. For instance, you can copy an Ubuntu LiveCD ISO file to the \_ISO\LINUX folder or to the \_ISO\MAINMENU folder or even to the \_ISO\DOS folder.

Ubuntu ISO in \_ISO\LINUX folder

Select the payload file from any folder on any drive…

The Secondary Menu allows you to choose several different boot methods…

Secondary Menu for ISO files

You can suppress the secondary menu by changing the file extension (use Windows Explorer or Linux to rename the file).

For instance, if the Ubuntu ISO boots successfully after selecting the ‘Boot ISO (partnew/Easy2Boot) [.isodef]’ option, rename the file to have a .isodef file extension.

Note: The Ventoy Menu system will not list files with non-standard file extensions, so if you also want to use Ventoy, you must not change the file extension.

The Ubuntu ISO’s boot menu

Recommended file extensions

You can use a special file extension which is only ‘understood’ by the E2B menu system and the agFM menu system.

The E2B menu system understands a greater number of special file extensions than agFM but the Ventoy menu system only recognises standard file extensions.

Example file prefixes, suffixes and extensions

Filename format: [_aaa_] name [_.xxxx] . zzzz

E2B and agFM can understand some special file suffixes (_.xxxx.) and file extensions (.zzzz).

E2B will not display the prefix part that starts and ends with an underscore (_aaa_) in the menu, but agFM displays the complete filename and extension (so _001_Ubuntu.iso will be displayed as ‘Ubuntu’ in the E2B menu but agFM always displays the full filename).

E2B and agFM both sort files alphabetically. You can select a menu entry using the initial letter when listed in the menu. e.g. Pressing the letter U three times will select the third menu entry that begins with u (if there is one). In agFM, pressing L once may select the LINUX folder if the \_ISO folder is listed in the menu.

  • ubuntu-20.04-desktop-amd64.iso – unaltered (will be listed alphabetically and produce a Secondary Menu when selected)
  • ubuntu-20.04-desktop-amd64.isodef – will automatically run the ISO when it is selected and boot using the ‘partnew’ method (no Secondary Menu)
  • _001_ubuntu-20.04-desktop-amd64.isodef – same as above but will be listed near the top of the menu screen
  • _001_ubuntu-20.04-desktop-amd64.isoagfm – same as above but will use the agFM ‘Boot Ubuntu from ISO’ boot option automatically
  • _001_ubuntu-20.04-desktop-amd64.isoloop – same as above but will use the agFM ‘Boot ISO (loopback.cfg)’ boot option automatically
  • _002_DLCBoot 2019 v3.6_.isohw.iso – E2B will use the isohw boot extension method, agFM will display a secondary boot option screen
  • _003_Gandalf’s Win10PE x64 Redstone 3-07-10-2018_.isomap64.iso – E2B and agFM both ‘understand’ _.isomap64.ISO file extension, agFM will warn if not booted on a 64-bit CPU
  • _010_Gandalf5_.isodef.iso – E2B and agFM will boot immediately (no Secondary menu) – extension must be .iso to work for Gandalf
  • _015_HBCD PE x64 1.0.1_.isomap64.iso
  • _050_BobOmbsModifiedWin10PEx64.v4.8.isomap64 – will not be listed in E2B or agFM menu on systems with 32-bit CPUs (no Secondary menu)
  • _030_Sergei_Strelec_WinPE_8and10 x86x64_2019.02.04English.isowin – run Strelec with no secondary menu choice

Note: In the agFM menu system, if the filename does not begin with a letter, you will always need to use the cursor keys to select that menu entry because the initial-letter hotkey function will not work. In the E2B menu system, you can type the initial letter or the menu number (e.g. press 1 and then 2 to jump to item #12).

Special grub2 configuration files

You can write your own grub2 menu file for agFM if you require special kernel parameters or need to specify a persistence file, etc. The menu file is normally placed in an E2B menu folder.

A file with the extension .cfg will be treated as a grub2 menu file – it will be listed in the agFM menu and can be selected from the agFM menu.

  • \_ISO\LINUX\blackarch-linux-full-2020.12.01-x86_64.cfg

Example .grubfm

A file with a .grubfm file extension must have exactly the same filename as the ISO. When the user selects the ISO file, a ‘User’ boot menu option will be listed in the Secondary ISO boot menu which will run your .grubfm grub2 menu code.

  • \_ISO\LINUX\blackarch-linux-full-2020.12.01-x86_64.grubfm
  • \_ISO\LINUX\blackarch-linux-full-2020.12.01-x86_64.iso

menuentry "BlackArch Linux 64-bit (ISO boot) " --class=archlinux {
set "grubfm_path=/_ISO/LINUX/blackarch-linux-full-2020.12.01-x86_64.iso"
set "grubfm_file=(${grubfm_device})${grubfm_path}"
probe -u ${grubfm_device}) --set=abc
set pqr="/dev/disk/by-uuid/$abc"
loopback loop "${grubfm_file}"
set "params=archisobasedir=blackarch accessibility=on img_loop=$grubfm_path img_dev=$pqr driver=free"
linux (loop)/blackarch/boot/x86_64/vmlinuz-linux ${params}
initrd (loop)/blackarch/boot/intel-ucode.img (loop)/blackarch/boot/amd-ucode.img (loop)/blackarch/boot/x86_64/initramfs-linux.img
}

You can find example .cfg and .grubfm menus in the \e2b\Sample agFM Menu Files folder on the agFM Partition #2.

Example .cfg: Puppy ISO with persistence (save file)

  • Copy the sample file on Ptn2: \e2b\Sample agFM Menu Files\LINUX\slacko64-7.0_persistent.cfg to Ptn1:\_ISO\LINUX folder
  • Download and copy slacko64-7.0.iso to Ptn1:\_ISO\LINUX folder
  • Rename file extension from .iso to .isopup
  • If your ISO is not named slacko64-7.0.isopup, you will need to edit one line in the .cfg file

Now when you run the slacko .cfg file from the agFM Menu system, the Puppy kernel will find and load the persistence file from the root of E2B Ptn1. When you exit Puppy, it will ask you if you want to save your changes. The first time you exit, it will ask for various options including save file size. Default persistence filename is usually \slacko64save.3fs.

Note: The .isopup file extension is only required by E2B. The file extension can be kept as just .iso if you are not going to use E2B to boot it with persistence. If you select the .isopup file in the agFM menu system then persistence will not work. E2B Menu system will not list the .cfg file. If you do not want the ISO file to be listed in the agFM menu, you can move it to another folder (e.g. \_ISO\LINUX\ISOS) so that only the .cfg file is listed under the agFM LINUX folder menu (you will need to edit the path in the .cfg file).

Changing the agFM menu background or theme

The default agFM menu system uses a default in-built grub2 theme. You can use your own theme or use a unthemed menu with a wallpaper background.

You must create a Ptn2:\boot\grubfm\sample_menu.txt menu file (use one of the sample files in the same folder). Instructions are within each .txt file.

Some sample themes are available from the Alternate Download sites (hitman, seven, slax, tela).

Details on how to do add a theme are in eBook #4 or you can read more at: https://www.easy2boot.com/uefi-mbr-a1ive-grub2-file-manager/

Partition Image files (.imgPTN/.imgPTN23)

agFM can switch in Partition image files in the same way that E2B can. A Partition Image file can replace one of the MBR partitions on the E2B USB drive.

If you select a .imgPTN file, then partition #1 is replaced but partition #2 (the agFM partition containing agFM and the EFI boot files) and partition #3 are removed.
For this reason, it is best to simply rename the .imgPTN file to use the .imgPTN23 file extension.

An image partition file with a file extension of .imgPTN or .imgPTN23 should be located on partition #1.

If used, An auxiliary image partition file which has no file extension should be located on Partition #3 of the USB drive, e.g.
Ptn #1: \_ISO\LINUX\Ubuntu64.imgPTN23
Ptn #3: \Ubuntu64
The .imgPTN23 file will replace partition 1 and the auxiliary image file will replace partition 3. In this example, the Ubuntu64 image file could contain an ext3 filesystem with a full install of Ubuntu.

Any image partition file with the file extension of .imgPTNREP3 should be located on Partition #3, e.g.
Ptn #3: \xxx\Catalina.imgPTNREP3
The .imgPTNREP3 file will replace only Partition #3. The image can contain any filesystem (e.g. ext4 or hfs). Only agFM can use .imgPTNREP3 files (not E2B).