Adding UEFI/.imgPTN images - Quick Instructions

.imgPTN files are typically used to UEFI-boot or for converting Windows Installer ISOs when you have an E2B USB HDD.
They can also be used to run fully-installed linux OS's or WindowsToGo OS's, OpenElec\LibreElec with persistence and lots of other scenarios.
The E2B menu system can only be booted from a Legacy BIOS or CSM-mode. You cannot UEFI-boot directly to grub4dos and the E2B menu. However, E2B can 'switch' partitions so that the USB drive will contain a completely different partition containing UEFI-bootable files. In this way, a single E2B USB drive can contain dozens of image files which can contain UEFI payloads and can boot via UEFI. See here for an explanation.

Please note: Once you 'switch-in' a .imgPTN file, it will replace the original E2B partition.
To restore the original E2B partition, you can MBR-boot and select CSM Menu 0, or run \e2b\SWITCH_E2B.exe - Restore E2B Partition(s) under Windows.

In a NutShell: Download MPI Toolkit, install it, drag any UEFI-bootable ISO to MPI_FAT32, copy .imgPTN file to \_ISO\MAINMENU, run \_ISO\SWITCH_E2B.exe, pick the .imgPTN file, eject USB drive, plug into target system, boot via UEFI (or MBR).

.imgPTN files contain an image of a whole disk partition
The .imgPTN image file can contain any bootable payload - for instance, it could be an image of a FAT32 partition that contains UEFI boot files.

If you boot to E2B in BIOS\CSM mode (or use the Windows Switch_E2B.exe utility), we can 'switch' in the new partition image and then UEFI-boot from the new partition.
Using MakePartImage, you can make a FAT32 or NTFS partition .imgPTN image file from a source ISO file, or from a USB drive, or from files within a folder.
  • For UEFI-booting, the .imgPTN file should contain a partition image that has been formatted as FAT32.
Because .imgPTN files can be larger than 4GB, it is best to use an NTFS-formatted E2B USB drive (Switch_E2B.exe only works fully with NTFS E2B drives).
Note: You can still UEFI-boot from an NTFS E2B USB drive as long as the .imgPTN file contains the image of a FAT32 filesytem.
Topics covered below are::
How to make a .imgPTN file
Booting via UEFI
Adding UEFI images
To UEFI-boot from a 'Partition Image' file on the E2B USB drive:
How to UEFI-boot
How to convert your payload to a 'Partition Image' file
How to use MakePartImage.cmd
Troubleshooting MakePartImage
Booting from .imgPTN images
Troubleshooting UEFI Mode
Linux UEFI-Mode booting
Linux MBR\CSM-Mode booting
What does MakePartImage.cmd do?
  • How to make a .imgPTN file
  • Booting via UEFI
  • Adding UEFI images
  • How to UEFI-boot
  • How to convert your payload to a 'Partition Image' file
  • How to use MakePartImage.cmd
  • Troubleshooting MakePartImage
  • Booting from .imgPTN images
  • Troubleshooting UEFI Mode
  • Linux UEFI-Mode booting
  • Linux MBR\CSM-Mode booting
  • What does MakePartImage.cmd do?

How to make a .imgPTN file

  1. Download and extract the MakePartImage MPI Tool Kit (then install ImDisk and WinRAR + run CreateDesktopShortcuts.cmd) - see this page for more details.

               Create the three Windows Desktop shortcuts
  2. Convert the ISO file (or UEFI-bootable USB drive or .zip file or source files) to a partition image file (.imgPTN) using MakePartImage.

    This is usually as simple as dragging-and-dropping the ISO file (or source folder) onto the MPI_FAT32 Desktop shortcut
    If prompted, just hit [ENTER] to accept the default size (or increase the size if there is a 'not enough space' problem).
  3. Copy the .imgPTN file to your NTFS (or FAT32) E2B USB drive (e.g. \_ISO\MAINMENU or \_ISO\WIN). Do NOT copy to the \_ISO\WINDOWS\XP folder! - See video above at 9:11.
  4. Run WinContig (RMPrepUSB - Ctrl+F2, or the \MAKE_THIS_DRIVE_CONTIGUOUS.cmd file) to make all files on the E2B drive contiguous
NTFS E2B USB drives can UEFI-boot as long as you create a FAT32 .imgPTN file (e.g. using the MPI_FAT32 shortcut).
Note: .imgPTN files are not just for UEFI images, you can use .imgPTN files for normal BIOS booting too (such as Hirens, DLC and All-In-One Windows install ISOs for use with E2B on a USB hard disk). 
When you boot to E2B and select an .imgPTN file in the E2B menu, it deletes the E2B partition table and replaces the E2B partition entry with the entry for the .imgPTN file. In this way, we now have a completely different partition on the USB drive! If the new partition is a FAT32 partition, then it will support UEFI-booting if the payload contains the required EFI boot files. You can view the new partition in Explorer and even change it's contents, if you wish.
.imgPTN files can also be mounted as a drive volume by using ImDisk (from Windows Control Panel - ImDisk) and then edited and dismounted ('Removed').
ISO files of any size can be converted to a FAT32 .imgPTN file, as long as all the files inside the ISO are smaller than 4GB. For instance, a 6GB Windows 10 Install ISO can be converted to a FAT32 .imgPTN file because none of the files inside the ISO are more than 4GB in size. If the .imgPTN file is larger than 4GB, your E2B USB drive must be formatted as NTFS and it will still be possible to UEFI-boot from a FAT32 .imgPTN file.
Tip: To prevent partitions #2 and #3 from being removed from the E2B USB drive when using .imgPTN files, use the file extension .imgPTNLBAa23. See the list of file extensions for more supported .imgPTN file extensions.
Special instructions for Windows 7 64-bit UEFI booting here.
Note: E2B v1.75+ allows you to add Windows Install .imgPTN files to the \_ISO\WINDOWS\xxxx folders (except for the \_ISO\WINDOWS\XP folder) as well as the standard E2B menu folders.
UEFI Secure Boot is supported because there is no extra boot loader used.
Frettt has provided a German translation of the CSM Menu.lst file - check the Alternate Downloads - Other files folder!
  • To boot to a UEFI payload, you first need to boot E2B in normal MBR\CSM mode to select the .imgPTN file (or use SWITCH_E2B.exe).
  • If your target system does not support CSM-booting, you will need to boot to the E2B Menu system in some other way - read this blog post.
  • If your system does not give a UEFI boot option on power-up, try renaming the .imgPTN file to another type - e.g. .imgPTNLBA.
  • If your system does not MBR-boot to the CSM menu, try a different file extension - e.g. .imgPTNLBAa23 or .imgPTNLBA23
N.B. Some UEFI systems (e.g. Fujitsu LifeBook) will not offer the user a MBR\CSM boot option if there are UEFI boot files present on the USB drive. This means that after changing to an .imgPTN file which contains EFI boot files, you may not be able to boot to the CSM Menu and restore the drive back to the E2B menu. For these systems, you must either MBR-boot on a different system, or use a Windows system to run \e2b\SWITCH_E2B.exe to restore the E2B partitions.
P.S. If you install the E2B grub2 menu system, it is possible to UEFI-boot directly from many linux ISOs (even those that don't officially support UEFI-booting!) but it does require you to add a second partition.

Booting via UEFI

Note: Due some bugs in older versions of grub4dos, always use the version of grub4dos (\grldr) that is included with the Easy2Boot download.
Easy2Boot uses the simple principle that a UEFI system will boot from a .EFI boot file on the first FAT32 partition of a USB drive.
UEFI firmware will always look for and boot from \EFI\BOOT\BOOTx64.EFI if it is an Intel 64-bit UEFI system, or \EFI\BOOT\BOOTia32.EFI if it is an Intel 32-bit UEFI system.
So what Easy2Boot can do is replace all of it's partitions with a FAT32 partition that contains your payload boot files. Once the new FAT32 partition has been substituted, we can UEFI-boot from the USB drive as long as it has the correct .efi boot file(s) on it.
For instance, recent Clonezilla ISOs support both 64-bit and 32-bit UEFI booting - this is easy to check - just look for the two .efi files \EFI\BOOT\BOOTx64.EFI and \EFI\BOOT\BOOTia32.EFI. If you want to UEFI-boot to an OS or utility, simply check that it has one or both of these files present. e.g. If the bootia32.efi file is not present then it does NOT support booting from a 32-bit UEFI system.
For each payload that you want to add (e.g. Clonezilla, Passmark Memtest86, Fedora, Acronis True Image, Windows 8 Install, etc.) we must make a FAT32 partition image (.imgPTN) file (though is some cases we can have both FAT32+NTFS partitions by using two image files).
Tip: If MBR-booting to E2B's CSM menu does not work on some systems (flashing cursor), rename the file from .imgPTN to .imgPTNaLBA23.
Watch the YouTube video.

Adding UEFI images

If you wish to boot an ISO file or other type of payload (e.g. from the files on a UEFI-bootable USB stick), you can add these to E2B but you must first convert them to a 'Partition Image' file using MakePartImage from the MPI Tool Pack. A partition image file is simply a sector-for-sector copy of a partition. E2B can replace the E2B partition table entry with the partition entry for a partition image.
Booting via the UEFI firmware on modern systems, allows you to access/repair/install systems with large (>2TB) hard disks and access GPT partitions. You can also install Operating Systems such as Windows 8 in UEFI-mode and create GPT partitions.
    Download the MPI Pack from here.
    Watch the YouTube video here.
    Note: Your E2B USB drive can be formatted as FAT32, NTFS, exFAT or ext2/3/4 - it will still be capable of UEFI-booting from a .imgPTN file. 

    To UEFI-boot from a 'Partition Image' file on the E2B USB drive (see video):

    1. Insert the E2B USB drive into any system (or Virtual Machine or use QEMU) and MBR\CSM boot from it (see below)
    2. Select the Partition Image file from the E2B menu to switch the E2B drive to the new image and the CSM boot menu
    3. Insert the E2B USB drive on the UEFI target system and UEFI-boot directly to the UEFI image
    Note: It is also possible to use Clover to UEFI-boot on many UEFI systems as follows:
    1. Insert the E2B USB drive onto the target system and MBR\CSM boot from it
    2. Select the Partition Image file from the E2B menu to switch the E2B drive to the new image
    3. Select the Clover Boot entry in the E2B CSM menu and then select the EFI boot file - the system will now boot directly from the EFI file in UEFI-mode. (i.e. no need to UEFI-boot using the target UEFI firmware).
    You can also use SWITCH_E2B.exe to pre-select a .imgPTN file:
    1. Insert the USB drive into any Windows system
    2. Run the \_ISO\SWITCH_E2B.exe Windows 32-bit utility
    3. Select the USB drive in the drive list and double-click on a .imgPTN file
    4. Now connect the USB drive to a UEFI target system and UEFI-boot directly to the UEFI image (you can switch the USB drive back to E2B by running \e2b\SWITCH_E2B.exe - 'Restore E2B partitions' button.)

    How to UEFI-boot

    • To boot from USB in UEFI mode, you must pick the UEFI boot option (e.g. UEFI: WDC WD3200BEVT)
    • To boot in CSM\MBR mode, pick the non-UEFI boot option: (e.g. WDC WD3200BEVT)

    Note: Some boot screen use very strange terms for the UEFI boot option. For instance, the UEFI boot option on a Lenovo IdeaPad 300 uses 'Linpus Lite:  ' instead of 'UEFI: '!

    How to convert your payload to a 'Partition Image' file

    The steps required to add a UEFI-bootable image to Easy2Boot are:
    1. Convert your source files to .imgPTN files (typically FAT32 partition images) using MakePartImage from the MPI Pack.
    2. Copy the .imgPTN files to your Easy2Boot USB drive (e.g. \_ISO\MAINMENU folder) (the original ISO is not required)
    3. Run WinContig to make sure the files are contiguous
    This allows you to boot in UEFI mode such things as:
    • Windows Installers
    • Linux LiveCD & Installs (only those that will run from a FAT32 USB drive, e.g. LUbuntu, CentOS)
    • KonBoot
    • Images made from bootable USB Flash drives
    For the source, you need one of the following:
    • An ISO file which supports UEFI booting (typically 64-bit), or .img or .zip/.rar compressed file of a LiveUSB (e.g. clonezilla USB zip file) OR...
    • A working single-partition USB drive which you know boots via UEFI (and/or MBR) mode, OR...
    • A folder containing the source files required (with a \EFI\boot folder)
    For UEFI booting, a \EFI\boot folder must be present containing the appropriate .EFI boot files. 
    It is possible to UEFI-boot to large NTFS images by adding a 2nd partition image which is formatted as FAT32 and contains a .efi boot file - see Methods 1-4 here.
    Non-UEFI images (such as large All-in-One Windows Installer payloads) which do not contain the .efi boot files, can also be made, but they will only boot via MBR booting - you can use either FAT32 or NTFS formatting for non-UEFI bootable .imgPTN images. 
    Tip: You may not wish to boot in MBR mode to the E2B menu on a target system first and then have to reconfigure the BIOS to boot in UEFI mode. In this case, simply run SWITCH_E2B.exe or an emulator such as QEMU or Virtual Box and boot from the E2B drive within the emulator/VM - then select the desired UEFI partition image file and switch to it - then eject the E2B USB drive. Now you can boot in UEFI mode from the E2B USB drive on the target system. In cases where you may not have access to a system that has an emulator or VM already installed, use the \QEMU_MENU_TEST .cmd file on the E2B USB drive to run QEMU - OR - copy MobaLiveCD.exe to your E2B USB drive and you will be able to run QEMU on any Windows system and boot from the E2B drive to select the desired .imgPTN file - see my blog for details.
    SWITCH_E2B is a Windows 32-bit appliation that allows you to select and 'switch' to any .imgPTN file from Windows.

    How to use MakePartImage.cmd

    An easy way to make a .imgPTN file from an ISO is to use MakePartImage. You can also use as a source, a tested and working USB Flash drive made by YUMI, XBOOT (syslinux), Universal USB Installer, SARDU, WinSetupFromUSB, LiveUSB Creator, Rufus, etc.
    Tip: Drag-and-drop the source (e.g. .ISO file or folder) onto one of the Desktop MPI shortcuts (MPI_FAT32 or MPI_NTFS) to help automate the conversion.
    This method works well for Windows Install ISOs, Lubuntu, Deft8, CentOS and many others. For most things, MPI will choose the best defaults for you - just press [Enter] to accept the defaults.
    1. Download the 'MakePartImage' MPI Tool Pack (this also contains ImDisk and 7Zip) - read the ReadMe.txt file for full instructions.
    2. Install ImDisk (this can be done by running Imdisk\ImDiskinst.exe as Admin) - I also recommend installing WinRaR which may also be used by MPI if 7Zip fails to work.

      Highly Recomended: Run CreateDesktopShortcuts.cmd to make the 3 Desktop shortcuts:

      MPI_FAT32 - drag-and-drop onto this shortcut to quickly create a FAT32-formatted .imgPTN file 
      MPI_NTFS - drag-and-drop onto this shortcut to quickly create a NTFS-formatted .imgPTN file 
      MakePartImage - drag-and-drop onto this shortcut to run MakePartImage to create a .imgPTN file and manually set the options (e.g. filename, volume name, etc., see 4-8 below)

    3. Right-click on the MakePartImage.cmd file and choose Run as administrator
    4. Type in the path and name of your ISO or folder or drive path that you want to convert to an image - e.g. C:\temp\Lubuntu64.iso or F:\
    5. Type in the path and name of the image file you want to create - e.g. c:\temp\Lubu64.imgPTN (tip: use an SSD drive for fastest results!) - press [ENTER] for the default name
    6. Type in the size of the image file in MB - e.g. 807  (you will be given a clue as to what size might just fit) or just press [ENTER]
    7. Type in the format type (NTFS or FAT32) - for EFI booting you must use FAT32 - e.g. [ENTER] will format as FAT32
    8. If required, change the Volume Name of the mounted volume (e.g. U:) manually, before dismounting the volume when prompted. The default Volume Label will be EASY2BOOT.
    The image file should be made for you in a minute or so, depending on it's size and the speed of the drive. e.g. For a large Win8 Install image to an SSD drive, this should be a minute or less. Specifying the E2B USB drive as the location for the image will slow down the image creation time!
    Now simply copy the .imgPTN file to your E2B USB drive (e.g. the \_ISO\MAINMENU folder), run WinContig (RMPrepUSB - Ctrl+F2) and boot!
    You don't need to read any more on this page unless you are having trouble...
    To modify the CSM menu or add your own files to the image, see the MakePartImage page.

    Troubleshooting MakePartImage

    If ImDisk creates a virtual image but fails to dismount it, you will need to use ImDisk Manager in Windows - Control Panel to remove the virtual drive.
    If the copy process fails due to insufficient space, create a larger image next time! Typically large ISO files require more extra space (+120MB). If you wish, you can extract all the files inside the ISO to an empty folder (e.g. using 7Zip), then drag-and-drop the folder onto the MPI Desktop shortcut - that way you will not have any size problems.

    It is always best to test E2B and .imgPTN files by booting on a real system!

    Note: When running from a live partition, please shutdown or reboot 'nicely' or you may corrupt the files inside your image file!

    ERROR: No Grub4dos installed to MBR of this drive!
    To use .imgPTN files, you must install grub4dos into the first sectors of the disk (MBR install) - simply run RMPrepUSB and click the 'Install grub4dos' button and click 'Yes' to install grub4dos to the MBR. Read more:

    Disk contents not changed when viewed in Windows
    If you have changed partitions using an .imgPTN image inside a VM and then exit the VM, you may find that Windows Explorer does not show the new partition contents (i.e. it still shows the original contents even though you have changed the disk using a VM). To fix this, eject and unplug the USB drive and then reconnect it. Alternatively, use the Windows Disk Management Tool (diskmgmt.msc - use RMPrepUSB - Ctrl+K) and select Action - Rescan Disks.
    Cannot boot to the CSM Menu in non-UEFI mode
    If you find that one type of system will not boot to the CSM menu and you cannot return the USB drive back to the E2B menu, try renaming the .imgPTN file to .imgPTN23A. Ensure that your E2B drive (when in normal E2B-mode) has two or three partitions (check using RMPrepUSB - Drive Info - 0).
    If you get a 'Missing MBR Helper' message when booting from E2B
    If you are using an emulator (VBox or QEMU), this may be due to the VM getting confused by the change of partitions - there may actually be nothing wrong with the USB drive. Test the drive on a real system or use a different VM (e.g. if VBox is giving the error, see if it boots using RMPrepUSB-QEMU). Try unplugging and re-connecting the E2B drive.
    If this still fails, use RMPrepUSB to install grub4dos to the MBR and copy over the grldr file if it is not already present (eject and replug the USB drive first).
    If E2B says that the file is not a .imgPTN file or displays ERROR 60: file not contiguous or corrupt - run WinContig on the drive (RMPrepUSB - Ctrl+F2) to make all files contiguous.
    Windows To Go boot BCD errors - if you are booting Windows To Go and have moved or copied the .imgPTN file, you will find that the BCD is no longer valid and so will get a BSOD error. This is because the Disk Signature of the E2B disk is set to start address of the .imgPTN file. If you move the file, it's start position will change and so the Disk Signature will change when you switch to it. To fix this, switch to the .imgPTN partition and run bcdboot or BootIce to fix the BCD(s).

    Booting from .imgPTN images

    The E2B USB drive can be NTFS or FAT32.  Use RMPrepUSB to format it. One of the USB disk sectors at LBA 30 or 60 need to be unused (it will be checked).

    It must have the E2B files on the first partition or second partition. It can have a second partition (and even a 3rd partition), but the fourth primary partition must be empty. You must install grub4dos to the MBR of the E2B drive (grub4dos can also be installed to the PBR in addition to the MBR).

    • When you select an .imgPTN file, E2B will backup the MBR sector to LBA 30 and 60 (if unused). For UEFI booting you must use a FAT32 image file. The screen will indicate if any UEFI boot files are present in the image (and thus may support UEFI booting).

        E2B will warn you before updating the MBR of the USB drive!
       This prompt can be suppressed by using the .imgPTNAUTO file extension or using set AUTOCSM=1 in your \_ISO\My_E2B.cfg file.
    • E2B will then erase all 4 partition entries (though ptn 2 & 3 can be preserved if you use a .imgPTN23 file extension) in the USB drive partition table and replace the first partition table entry with a partition entry pointing to the .imgPTN file, and then switch to the new partition and display the CSM menu, as below:

      At this point the E2B USB drive contains a single partition which points to the new image (your original E2B partition table entries have now been backed up and erased!).

    CSM Menu

    • You may be able to run the payload contents in MBR mode.
    • You can 'Switch' the drive back to the normal E2B menu (this will restore the original MBR and original contents of the E2B drive) - no reboot is required.
    • If the '1 BOOT' option doesn't work, try another one if present (e.g. the 'Alternate syslinux' or grub menus)
    • If a Clover menu option is displayed, you may be able to boot directly to the UEFI boot files in UEFI mode
    • To boot to the USB drive in UEFI mode - choose Reboot. If you select UEFI boot mode in your BIOS menu for the USB drive, your USB drive will immediately boot from the payload files in UEFI mode.
      Note: If you see the CSM menu then you didn't boot in UEFI mode!
    • To return the E2B USB drive to normal E2B mode, boot the drive in MBR\CSM BIOS mode to the CSM Menu and choose the 'Switch drive back to Easy2Boot' menu option. The E2B menu will reload after the original drive partitions are restored - no reboot is required. You can also run the \e2b\RestoreE2B (run as admin).cmd file or the \e2b\SWITCH_E2B.exe utility from Windows.
    Note: You can also test-boot the USB drive using VirtualBox+DavidB's VMUB utility to swap between E2B Menu and CSM Menu modes.

    Troubleshooting UEFI Mode

    • If you cannot get the E2B image to boot in UEFI mode (you only get the CSM menu) then check the image is FAT32 and has either a \EFI\boot\bootx64.efi file or a \EFI\boot\bootia32.efi file present. If not then the BIOS won't boot from it in UEFI mode or even give you that option! If your system has a 32-bit only CPU, then the bootia32.efi file MUST be present. If your system has a 64-bit CPU, then a \EFI\boot\bootx64.efi file is normally present (for Intel x86 systems) - note however that some systems which have a 64-bit CPU actually have a 32-bit UEFI BIOS and so will only boot 32-bit EFI boot files (typically these systems have a 32-bit version of Windows pre-installed even though they have 64-bit CPUs) - for a 32-bit UEFI system, the \EFI\BOOT\BOOTIA32.EFI file is required.
    • If the CSM boot menu does not appear, and/or you cannot return the USB drive to the Easy2Boot normal menu mode:

       1. Use QEMU in RMPrepUSB to boot from the USB drive and choose the 'Switch to E2B' option. If this does not work then go to Step 2

       2. Unplug and re-connect your E2B drive. From Windows, run RestoreE2B (run as admin).cmd or  SWITCH_E2B.exe utility which you will find in the MakePartImage MPT Tools download (run as admin). The same file may also be found on the E2B drive under \e2b.

    • If linux does not fully boot on a VM such as VirtualBox, this is probably due to a 'media=usb' parameter being added by MakePartImage - it should work on a real system (but on a VM, the USB drive is emulated as a hard disk so linux cannot detect a USB drive as a USB drive). If you want it to boot on a VM, change the 'media' parameter in the \EFI\Boot\*.conf file to remove it or set it to look for a hard disk. Tip: Often removing the 'media=usb' parameter will allow it to boot on both a hard disk and a USB drive.

    Linux UEFI-Mode booting

    For most linux ISOs, just run MakePartImage using the ISO file as the source file and make a new .imgPTN file.
    Alternatively, some linux distros like Fedora, provide utilities to make a USB UEFI and MBR-bootable Flash drive. e.g. Fedora Live-USB Creator.
    Use a different, spare USB Flash drive as follows:
    1. Create a working USB Flash drive using Live-USB Creator (no persistence)
    2. Test it to make sure it works
    3. Run MakePartImage and use the USB drive (e.g. specify H:\ if the USB drive is drive H:) as the Source to create an .imgPTN image. You can also just drag-and-drop the USB drive icon onto the MPI_FAT32 Desktop shortcut.
    4. Now copy the .imgPTN file to your E2B USb drive.
    Or you can...
    1. Boot from the E2B drive and switch to the Fedora.imgPTN image by selecting it in the menu (this can be done using a VBox+DavidB's utility (recommended!), on a real system - or - using the RMPrepUSB - QEMU button or VBox alone and then unplugging and reconnecting the USB drive to cause Windows to see that the partition has changed.
    2. Quit the VM (or reboot to Windows if you used a real system) and connect the E2B drive to a Wiindows system. You should see the contents of the Fedora files (e.g. \EFI, \ISOLINUX, etc.) on the E2B USB drive.
    3. Delete all the folders on the E2B USB drive image (e.g. isolinux, EFI folders) EXCEPT for the menu.lst, grldr and \e2b folder.
    4. Run Live-USB Creator and select the Fedora ISO and use a different, spare, empty FAT32 USB Flash drive as the target - do not select any persistence.
    5. Copy the files over from the spare USB Flash drive to the E2B image to update the xxxx.imgPTN file contents.
    6. make sure the Volume Name (right-click - Properties) of the E2B drive is the same as the source USB drive (e.g. 'LIVE') or change the syslinux parameters to match.

    Some menu systems use UUID (e.g. for persistence) - you should look at the .cfg and .conf files for any mention of UUID and change the value to match that of the image. When you use the CSM menu, it will show you the volume UUID at the top of the menu - e.g. UUID=E68A-1902.


    Linux MBR\CSM-Mode booting

    If MakePartImage sees a \syslinux folder, it will install the syslinux bootloader into the image. The 'Boot from this drive in MBR mode' menu option should then boot to the linux image correctly.
    So if you make a working USB Flash drive (e.g. using Live-USB Creator) you should be able to use MakePartImage to make a working .imgPTN image file from it which will boot to the syslinux menu.
    If the #1 Boot menu or 'Syslinux boot' menu entries do not work (e.g. 'COM32R error'), use MakePartImage.cmd to re-make the .imgPTN file (not MPI_FAT32 or MPI_NTFS) and choose a different version of syslinux - e.g. recent versions of linux may use Syslinux Version 6.
    MakePartImage should also successfully convert most ISOs directly to a working, bootable MBR partition image (e.g. android_x86, bitdefender (some versions only!), Fedora 17/18/19/20, dsl, PMagic, Sabayon, Lubutu, Ubuntu, Zorin, korora, etc.). MakePartImage attempts to convert the parameters in the config files and install syslinux for you. Normally, you just need to accept the defaults.
    If it does not boot to the syslinux menu then you may need to add an extra grub4dos entry to the bottom of menu.lst file inside the image. As an example of a menu (although Fedora 20 converts perfectly OK directly from an ISO file)...
    1. Boot from the E2B drive and switch to the Fedora.imgPTN image by selecting it in the menu (this can be done using a VBox+DavidB's utility (recommended!), on a real system or using the RMPrepUSB - QEMU button or VBox alone and then unplugging and reconnecting the USB drive to cause Windows to see that the partition has change)
    2. Quit the VM (or reboot to Windows if you used a real system) and connect the E2B drive to a Wiindows system. You should see the contents of the Fedora files (e.g. \EFI)
    3. Edit Menu.lst and add a BIOS boot option - note that you should use LABEL not CDLABEL and the Volume label will always be EASY2BOOT unless you have changed it - e.g.
    title Fedora\n Boot to Fedora in MBR mode
    kernel /isolinux/vmlinuz0 root=live:LABEL=EASY2BOOT rootfstype=auto ro quiet  rhgb rd.luks=0
    initrd /isolinux/initrd0.img 
    If you have used Live-USB Creator to make the files, change the isolinux folder entries in the above example to syslinux. You will normally need a \syslinux folder and \syslinux\syslinux.cfg

    Some menu systems use UUID (e.g. for persistence) - look at the .cfg and .conf files for any mention of UUID and change the value to match that of the image. When you use the 'Boot from this drive in MBR mode' menu option, it will tell you what the UUID is -e.g. UUID=E68A-1902.

    For persistence - If there is a \LiveOS\overlay-LIVE-xxxx-xxxx file, change the name of the file so that LIVE matches the volume label and xxxx-xxxx matches the UUID (as shown at the top of the CSM menu).


    What does MakePartImage.cmd do?

    The image file made by MakePartImage is a sector-by-sector copy of a whole partition starting at the Partition Boot Record.
    MakePartImage can use either a folder, whole drive or ISO file as the payload source.
    If you have a working USB Flash drive that contains a single partition, MakePartImage will make an image of it, but you can resize it (e.g. If an 32GB USB Flash drive contained 2GB of files on a 32GB partition, you can make a 2GB .imgPTN file from it, instead of having to make an image of all 32GB).
    1. Creates a virtual ram drive with a 'backing file' of the size and name that you specified, using ImDisk
    2. Formats the new virtual ram drive (as NTFS or FAT32)
    3. Copies the source files to the ram drive (if a file is specified then it invokes 7Zip to extract the files from it)
    4. Copies over some grub4dos files required for the CSM Menu
    5. If a \syslinux folder is detected, then syslinux is installed to the PBR so that the image will boot to syslinux in BIOS mode. Also it will copy the isolinux folder over and rename isolinux.cfg to syslinux.cfg.
    6. Sets a Volume Label of 'EASY2BOOT' for the ram drive. This can be changed by the user before dismounting the ram drive.
    7. Warns the user about UUID= and LABEL= strings in .cfg, .conf and .lst files (useful for linux ISOs as you may need to edit these files before dismounting the image) it will then proceed to automatically convert any parameters in syslinux cfg files for use on a USB drive (see section above).
    8. Dismounts the ram drive and saves the contents to the .imgPTN backing file and launches an Explorer window to display the image file that was created.
    Grub4dos and the menu.lst file that is added to the image, allows you to restore the original E2B MBR. Without this, the drive would always be seen as a single partition containing only the files in the .imgPTN image file. If a menu.lst file already existed in the source, it will ask you if you wish to combine them and you can edit the menu.lst file in the mounted ram drive before you dismount it and save the image.
    The image files can be remounted using ImDisk at any time and edited and saved by unmounting them. Alternatively, you can boot to E2B and select the .imgPTN file to switch disk images. Then you can edit the files on the USB drive. The changes will directly alter the .imgPTN file contents.
    When an E2B USB drive is in the CSM mode, you must not use a partition manager to move or re-size the partition as this will probably destroy many or all files on the E2B drive!

    Please note: Once you 'switch-in' a .imgPTN file, it will replace the E2B partition. To restore the original E2B, MBR-boot and select CSM Menu 0, or run \e2b\SWITCH_E2B.exe - Restore E2B Partition(s) under Windows.