Wednesday 2 June 2021

E2B v2.09g/h and agFM v1.71f Betas

Previous versions of agFM recognised the .imgPTNREP3 file extension.

If you have a partition image .imgPTNREP3 file  (e.g. hfs partition containing a bootable Mac OSX installer files) on Partition 3, you could select it in the agFM menu system and it would replace the current Partition 3 (if any) with the new image. The partition should be recognised as being in FAT/NTFS/hfs format and use the correct Partition type (e.g. hfs= 0xAF).

You can thus UEFI-boot to agFM, switch-in any image to partition 3 and then boot to it from the agFM F3 boot menu or the MAC boot menu (e.g for Catalina Installer hfs image).

To restore the original partitions, you can UEFI-boot to the agFM menu system and choose the 'Restore E2B Partitions' menu option.

agFM v1.71f

I have now improved the .imgPTNREP3 in agFM so it now should not be possible to install a .imgPTNREP3 image and then install a .imgPTN image (thus overwriting the MBR backup). Also, if the partition type cannot be detected from the image by grub2, it will now prompt you to enter a hex partition type for the new image.

Also, you can now use a substitute file extension in the filename. This means that you can keep the filename extension as .iso, but tell E2B to run it as one type and agFM to run it as another type.

Filename format: [_aaa_] name [_.xxxx][.agfmyyyy] . zzzz . (file extension)

_.xxxx. and .agfmyyyy are override suffixes. If .agfmyyy exists it will always be used by agFM instead of the actual file extension.

  1. If both _.*. or .agfm* does not exist in the filename then the actual file extension will be used by E2B and agFM.
  2. If _.*. exists in the filename then E2B will always use it as the file extension.
  3. If .agfmyyyy. exists in the filename (where yyyy is a valid agFM file extension), then agFM will always use that file extension (yyyy) instead of the actual file extension. E2B ignores it.
  4. If _.xxxx. exists in the filename (where xxxx is a valid file extension) it will be used by both E2B and agFM (unless a .agfmyyyy is also in the filename).
  5. If both _.xxxx. and .agfmyyyy is in the filename -

    e.g. _010_abcd_.isoPE.agfmisowin.iso then E2B will use .isoPE but agFM will use .isowin.

See the agFM page for more information.


E2B v2.09g

E2B (Legacy grub4dos) has also been tweaked to support .imgPTNREP3 files, however, since these files need to be on Partition 3 of the E2B drive, you will need to add a .mnu file to your \_ISO\MAINMENU folder which allows you to list payload files on Partition 3.

\_ISO\docs\Sample mnu files\E2B Menus\PTN3_IMGPTNREP3_MENU.mnu
This new menu file contains two different menu entries which list payload files on Partition 3 - you will need to delete one of them.

One menu lists all payload files in all sub-folders (but .mnu files are not detected) while the other menu only lists payload files and .mnu files in a single folder on Partition 3.

The menu also includes a menu entry to Restore the E2B Partitions if it detects that they have been changed (e.g. Ptn3 has been changed).

#This menu lists all payload files on Partition 3 below the specified folder
#You can specify a sub-folder if you wish - e.g. (bd)/%grub%/QAUTO.g4b .automenu (hd0,2)/_ISO/OSX
#The RESTORE entry will be visible if the MBR differs from the backup (partitions have been changed)
#.imgPTNREP3 files must be stored on Partition 3
#You can use this menu if Partition 3 contains .imgPTNREP3 files because it has a RESTORE MBR option
#This menu will list ALL payload files in all sub-folders below the specified folder

iftitle [ls (hd0,2)/ > nul] ^Ctrl+F3 PARTITION 3 Payload Files Menu [Ctrl+F3]\nRun payload files on Partition 3 folder.
set LBACKMENU=(bd)/%grub%/menu.lst
set HDG=Partition 3 menu
(bd)/%grub%/QAUTO.g4b .automenu (hd0,2)
#(bd)/%grub%/QAUTO.g4b .automenu (hd0,2)/_ISO/OSX
debug 0
configfile (md)0x3000+0xA0

iftitle [checkrange 0 cmp (hd0)0+1 (hd0)30+1 > nul] RESTORE E2B Partitions\nUse if Partition 3 has been replaced.\nCopies backup at LBA30 to MBR.
(bd)/%grub%/RestoreMBR.g4b
chainloader (bd)/grldr

#Use this menu to enumerate payload files in a SINGLE FOLDER - you can add more entries for different folders
iftitle [ls (hd0,2)/_ISO/OSX/ > nul] ^Ctrl+F3 PARTITION 3 Payload Files Menu [Ctrl+F3]\nRun payload files on Partition 3 folder
#MFOLDER must be the full folder path - e.g. (hd0,2)  or (hd0,2)/_ISO/OSX
#set MFOLDER=(hd0,2)
set MFOLDER=(hd0,2)/_ISO/OSX
#HDG is the top heading for the menu (use \x20 for a space)
set HDG=\x20PTN3 PAYLOAD MENU
(bd)/%grub%/SubMenu.g4b
boot

The menu entry is listed in the MAIN MENU like this:

The QAUTO menu version is shown below, all payload files on Partition 3 are listed.



\_ISO\docs\Sample mnu files\E2B Menus\PTN3_MNU.mnu
This (old version, pre-existing) .mnu file will list payload files in a single folder on Partition 3 but it does not include a 'Restore E2B partitions' menu entry and so is not suitable for use with .imgPTNREP3 files on partition 3.

The latest E2B Beta has also been updated to support the .agfm*.iso file extension.

E2B v2.09h has a new prefix feature. Instead of using something like_100_ as the prefix, you can now use any three characters followed by a single underscore to sort menu entries - e.g. a23_Ubuntu.iso, d34_Tails.iso. This shows as Ubuntu and Tails in the E2B menu, but in the agFM menu it means you can press a to jump to the a23_Ubuntu.iso file and press d to jump to the d34_Tails.iso file.



SWITCH_E2B

Switch_E2B.exe (in \_ISO folder of E2B USB drive) has also been updated to work with .imgPTNREP3 files. There is now a button to display the MBR and backup copies.



Re-sizing or adding partitions to the E2B USB drive

When a partition (or partitions) are 'switched-in', a backup of the MBR is copied to LBA30 on the USB drive and the MBR partition table is then changed. The MBR is also copied to LBA60 as a second ary backup. LBA30 is the primary backup however.

If you re-size the partitions on the E2B USB drive or change number of partitions, then this may prevent E2B\agFM\SWITCH_E2B.exe from working with .imgPTN files. This is because a change in the MBR partitions will be detected.

To fix this you will need to wipe the 'outdated' backup sectors at LBA30 and LBA60. This can be done as follows:

1. First thoroughly check that all partitions on your E2B USB drive are correct (no imgptn files switched in, etc.)
2. Legacy boot to the E2B menu system and go to the grub4dos command line (SHIFT+P, enter password, type SHIFT+c). The default password is 'easy2boot'.
3. In the grub4dos console, type FIX30 and follow the prompts.

You should now be able to select and switch-in .imgPTN files again.


Updating

E2B 2.09g and agFM v1.71f can be downloaded from the Latest Betas folder on the Alternate Download Sites.

To update E2B, extract the files to a new folder and run .\Make_E2B.exe and click the Update E2B button (do not install agFM or Ventoy because they will just be the current release version).

To update agFM, just extract the files straight onto the E2B USB drive's Partition 2 (the smaller FAT32 partition).

No comments:

Post a Comment