Tuesday 26 January 2016

Adding >4GB UEFI-bootable NTFS .imgPTN files to E2B

This page on the E2B site describes 5 methods on how to add UEFI-bootable .imgPTN files to E2B that contain >4GB files. i.e. how to UEFI-boot from an NTFS image file. This is useful if your source contains a >4GB Install.wim or Install.esd file.

I have recently added Method 5 to this page which describes how you can add a 2nd small FAT Primary partition to your E2B USB drive which contains Pete Batard's (Rufus author) UEFI-NTFS boot files (which I provide as an EFI_TOGO zip download file).


This method can be used on both Fixed and Removable USB drives and if you currently only have one usable partition on your E2B USB drive, then this solution is probably the easiest one to use which can support large UEFI-bootable files on an NTFS partition.

Note: Your E2B USB drive may already have a very small Type 21h hidden partition on it. You can delete this and replace it with a FAT16 or FAT32 partition (you will need to reduce the size of the first partition to make room for the 2nd partition though).

Make a single .imgPTNLBAa23 file

Once the extra FAT partition is present and contains the EFI_TOGO files, all you need to do is convert your UEFI-bootable ISO or payload file\folder into an NTFS .imgPTNLBAa23 partition image file by dragging-and-dropping it onto the MPI_NTFS Windows desktop shortcut.

The '23' in the file extension means 'keep partition 2 and 3 in the partition table'.

Once we switch-in the partition image file (using SWITCH_E2B or the E2B Menu), we get:

PTN1: NTFS .imgPTNLBAa23 files
PTN2: FAT32  EFI_TOGO files
PTN3: unused
PTN4: unused

The UEFI  firmware will always boot to a FAT partition, and this contains an EFI NTFS driver and code to find a UEFI-bootable NTFS partition on the drive and then load the EFI boot file that is on the NTFS partition (i.e. a similar function to rEFInd but automatic).

If you MBR-boot, it will boot from the grub4dos files on the first partition to the CSM menu and from there it boot to \bootmgr as normal.

You can use the FAT partition for other purposes (e.g. file storage, etc.) but if your E2B USB drive is a removable flash drive, it won't be easily accessible to Windows. If you want to save space, you can use a FAT16  instead of a FAT32 volume so that it just holds the 200KB of files needed).

Tip: Switch_E2B.exe has a 'Access Partition 2 on a Removable drive' button which will swap over partition 1 with partition 2 and allow you to quickly access the 2nd partition on a Removable USB Flash drive.

New EFI-TOGO (UEFI_NTFS) version

I have updated EFI_TOGO with today's new build from Pete Batard. This new version does not have any bug-fixes as such, but if you have a UEFI system that allows you to UEFI-boot from both FAT and NTFS partitions (like my Asus Z87A board) then you get two UEFI boot options in the pop-up system menu - one is for the FAT partition and the other one is for the NTFS partition EFI boot files.

The old version of EFI_TOGO  (UEFI_NTFS) would not boot if you selected the NTFS boot option because it tried to load the UEFI NTFS driver when the firmware already had NTFS support. Pete's new version checks for an NTFS UEFI system and does not try to load the NTFS driver if it already supports NTFS partitions. The upshot is that both the UEFI boot entries will now boot, no matter which one I pick!

From my point of view this new version is very handy, because the Z87 presents two UEFI boot options that look identical so you cannot tell which is which!

  • One option would boot from the NTFS partition and work as expected using the firmware's own NTFS support.
  • The other UEFI boot option would run Pete's code and fail to boot!

Furthermore, if you rebooted the system a few times, I got even more UEFI boot options added to the pop-up boot menu each time, so I ended up with numerous identical UEFI boot options with no way of knowing which one would work and which one would not!

Which of these UEFI options is which partition?

With the new version, all UEFI boot options work, so no Russian roulette games any more!

The big disadvantage with this method however, is that you may not be able to boot to the E2B menu (MBR-boot) on some systems! This is because some systems will only give a UEFI boot option if a valid UEFI boot file is present. If this happens, I suggest you temporarily rename the \EFI folder in order to use E2B on that system.

Note: The most reliable way to UEFI-boot on an UEFI system, is to use a single FAT32 .imgPTN file and not have a second FAT partition containing EFI boot files. This means using split wim files if possible (Method 1).


No comments:

Post a Comment