
Adding UEFI/.imgPTN images
Contents
-
Quick Instructions
- .imgPTN files contain a partition image
- How to make a .imgPTN file (and batch conversion)
- Booting via UEFI
- Adding UEFI images
- How to UEFI-boot
- How to convert a payload to a .imgPTN 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 use two partition images
Quick Instructions
To convert an ISO to .imgPTN file for UEFI-booting:
- Download E2B MPI Toolkit
- Install ImDisk and create the Desktop shortcuts
- Drag any UEFI-bootable ISO to the MPI_FAT32 shortcut to make an .imgPTN file
- Copy the .imgPTN file to \_ISO\MAINMENU and run \MAKE_THIS_DRIVE_CONTIGUOUS.cmd
- Run \_ISO\SWITCH_E2B.exe and pick the .imgPTN file (or use the E2B menu to select the file)
- Connect the E2B USB drive to target system and boot via UEFI (or MBR-boot).
YouTube Video here
Please note:
You can 'switch-in' a partition image file using the E2B menu (MBR-boot only) or using the \_ISO\SWITCH_E2B.exe Windows utility or by UEFI-booting to the agFM grub2 menu suystem.
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 option #0, or run \e2b\SWITCH_E2B.exe -> Restore E2B Partition(s) under Windows.The target folder for the .imgPTN file must be a standard physical disk volume, not a virtual volume (such as a Microsoft Storage Space volume).
You can use Split_WinISO.exe to convert a Windows Install ISO (or extracted contents) to a FAT32 .imgPTN file - this utility will split Install.wim files larger than 4GB for you, add the missing Windows 7 UEFI boot file if required, can modify the boot.wim and then covert it to a .imgPTN file (or a .iso file) - see here for more details.
Change the file extension to .imgPTN23 if you want the existing USB drive partitions 2 and 3 (if present) to be still there after switching to the new image.
Two partition images can be switched in at the same time - the second image file must have no file extension (e.g. Ubuntu64.imgPTN + Ubuntu64).The file which has no file extension can be in the \_ISO folder on the 2nd partition (recommended) or in the same folder as the .imgPTN file.
.imgPTN files contain an image of a whole disk partition
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.
For UEFI-booting, the .imgPTN file should contain a partition image that has been formatted as FAT32 and contains a \EFI\BOOT folder.
- 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 actually do?
- How to use two partition images
How to make a .imgPTN file
-
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
-
Convert the ISO file (or UEFI-bootable USB drive or .zip file, DVD\CD or source files) to a partition image file (.imgPTN) using MakePartImage.
Answer N for No if asked to add rEFInd.
Drag-and-drop the ISO file (or source folder or USB drive letter) onto the MPI_FAT32 Desktop shortcut.
For 'Clover' question, use default = N.
-
If prompted, just hit [ENTER] to accept the default size (or increase the size if there is a 'not enough space' error message).
-
Copy the .imgPTN file to your NTFS E2B USB drive (e.g. \_ISO\MAINMENU or \_ISO\WIN or \_ISO\LINUX). - See video above at 9:11.
Note: .imgPTN files copied to the \_ISO\WINDOWS\XP folder are not supported.
- Run WinContig (RMPrepUSB - Ctrl+F2, or the \MAKE_THIS_DRIVE_CONTIGUOUS.cmd file) to make all files on the E2B drive contiguous.
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').
Tip: To prevent partitions #2 and #3 from being removed from the E2B USB drive when using .imgPTN files, use the file extension .imgPTN23. See the list of file extensions for more supported .imgPTN file extensions.
- 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 you want to select a different .imgPTN file under UEFI, select the SWITCH_E2B option in the rEFInd UEFI boot menu (you need to add in REFIND when making the .imgPTN file) (v1.B0+).
- If your target system does not support CSM-booting, you may need to boot to the E2B Menu system in some other way - read this blog post.
- *If your system does not offer a MBR boot entry in the boot menu, try a different file extension - e.g. .imgPTN23. Another thing to try is to temporarily rename the \EFI folder.
Batch ConversionTip: You can convert a whole batch of files which are placed in a folder into .imgPTN files by running .\utils\Convert_all_ISOs_to_imgPTN_Files (run as Admin).cmd. Questions are automatically answered using the default answer so no user interaction is required (Windows Install ISO files may require you to answer one question though).
Booting via UEFI
Adding UEFI images
To UEFI-boot from a 'Partition Image' file on the E2B USB drive (see video):
- Insert the E2B USB drive into any system (or Virtual Machine or use QEMU) and MBR\CSM boot from it (see below)
- Select the Partition Image file from the E2B menu to switch the E2B drive to the new image and the CSM boot menu
If Windows Explorer does not show you the new USB drive contents after switching to a .imgPTN image, unplug and reconnect the E2B USB drive. - Insert the E2B USB drive on the UEFI target system and UEFI-boot directly to the UEFI image
- Insert the E2B USB drive onto the target system and MBR\CSM boot from it
- Select the Partition Image file from the E2B menu to switch the E2B drive to the new image
- 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).
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:
Tip: If you use a file extension of .imgPTN23 then any second or third Primary partition on the E2B USB drive will NOT be removed when you switch in the new image file. This is useful if you wish to UEFI-boot and still have the files on a second partition of the E2B Hard Disk accessible. For instance, PortableApps or disk images can be kept on the second partition.
Some systems require the start address of each partition to be in ascending order. SWITCH_E2B.exe will try to move the files if they are in the wrong order.
For example, if partition 1 starts after partition 2 then the system may not offer the user a UEFI boot option.
The problem can be avoided by using a second partition on the E2B USB drive (v1.B0+) as follows:
Copy the secondary file (not the .imgptn* file) to a \_ISO folder on second partition on the E2B drive.
Example 1
E2B Ptn 1 - \_ISO\LINUX\Ubuntu64.imgptn
E2B Ptn 2 - \_ISO\Ubuntu64
Example 2
E2B Ptn 1 - \_ISO\LINUX\Ubuntu64.imgptnX4Winpe
E2B Ptn 2 - \_ISO\Winpe
Example 3
E2B Ptn 1 - \_ISO\LINUX\Ubuntu64.imgptnX4Winpe and Ubuntu64 (must be in order)
E2B Ptn 2 - \_ISO\Winpe
How to convert your payload to a 'Partition Image' file
- Convert your source files to .imgPTN files (typically FAT32 partition images) using MakePartImage from the MPI Pack.
- Copy the .imgPTN files to your Easy2Boot USB drive (e.g. \_ISO\MAINMENU folder) (the original ISO is not required)
- Run WinContig to make sure the files are contiguous
- 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
- 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)
How to use MakePartImage.cmd
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.
- Download the 'MakePartImage' MPI Tool Pack (this also contains ImDisk and 7Zip) - read the ReadMe.txt file for full instructions.
-
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 (for UEFI-booting)
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)
OR...
- Right-click on the MakePartImage.cmd file and choose Run as administrator
- 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:\
- 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
- 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]
- Type in the format type (NTFS or FAT32) - for UEFI booting you must use FAT32 - e.g. [ENTER] will format as FAT32
- 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.
Troubleshooting MakePartImage
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: https://www.easy2boot.com/faq-/
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.
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
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
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?
- Creates a virtual ram drive with a 'backing file' of the size and name that you specified, using ImDisk
- Formats the new virtual ram drive (as NTFS or FAT32)
- Copies the source files to the ram drive (if a file is specified then it invokes 7Zip to extract the files from it)
- Copies over some grub4dos files required for the CSM Menu
- 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.
- Sets a Volume Label of 'EASY2BOOT' for the ram drive. This can be changed by the user before dismounting the ram drive.
- 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).
- 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.
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.
How to use two partition images
E2B will recognise any valid E2B file that starts with the file extension .imgPTN (not case sensitive). If a second file exists in the same folder which has the same file name but no extension, then E2B will also change the MBR partition table so that the 3rd entry points to that file:
\_ISO\LINUX\fred.imgPTN
\_ISO\LINUX\fred
fred.imgPTN >> ptn #1 (must contain E2B MPI files)
fred. >> ptn #3
The partition image #3 can contain any filesystem (NTFS, ext3, etc. or even be unformatted). It could be used as a persistence or swap area.
You can also use the extra partition to install a full linux OS into (e.g. KALI).
Note: SWITCH_E2B.exe will also switch-in both partition images (if present).
You can also place the auxiliary file on the 2nd partition (E2B v1.B0+).
Ptn1: \_ISO\LINUX\fred.imgPTN
Ptn2: \_ISO\fred
If UEFI-booting, the .imgPTN file must precede the other file, otherwise a UEFI BIOS will not 'see' the disk as 'valid'.
By placing the second file on the second partition, it will always be in the correct order.
SWITCH_E2B.exe will attempt to re-order the two files if they are in the wrong order for UEFI-booting.
X4 (E2B v1.B0)
You can specify a second partition image using an X4 suffix - e.g. fred.imgPTNX4doris.
This will cause the file to be loaded as partition 1 and the file 'doris' to be loaded as partition 4.
The file doris is searched for in this order:
\_ISO on partitions 2 or 3, the same file as the .imgPTN file, in the \_ISO folder on partition 1.
Recommended for Easy2Boot (fastest flash drive!)
SanDisk Extreme SDCZ880-128G-G46
- Home
- Start & Intro
- Quick Setup Guide >>>
- DOWNLOADS >>>
- YouTube videos
- Tutorials and How To's
-
Make a USB Drive >>>
- Make a multi-partition E2B USB drive using RMPrepUSB
- Use an existing USB HDD for E2B
- Use LINUX to make an E2B drive + defrag
- How to Update E2B
- How to make a WINHELPER USB Flash Drive (fix 'Required DVD drive driver is missing')
- Multiple partitions on a USB Flash drive
- Using other partitions or drives
- Backup/Restore/Copy (clone) any E2B USB drive
- Make and burn an E2B DVD
- Using E2B with a Zalman/IODD
- Add E2B to your own grub4dos USB drive
- How to remove E2B
- E2B Menu System
- UEFI booting from E2B
-
How to add Payload Files and Use E2B >>>
- Make files CONTIGUOUS
- File Extensions recognised by E2B
- UEFI+MBR and how to make .imgPTN files
- MakePartImage and how to change the CSM Menu
- UEFI-Multiboot and rEFInd
- Using SWITCH_E2B with .imgPTN files
- Using the \_ISO\AUTO folder
-
WINDOWS payloads >>
- E2B USB HDD - Installing Windows with a 'WinHelper' drive
- Windows XP Install ISOs
- Install XP 32-bit + disk drivers (DPMS)
- Windows XP 64-bit
- Install XP using WinPE (one step process)
- Add XP Install ISOs using WinSetupFromUSB
- Windows Vista/7 Install ISOs
- UEFI boot from Windows 7 Install ISOs
- Windows 8/10 Install ISOs
- Unattended Installs
- XMLtoE2B.exe (Unattend.XML files)
- Adding >4GB Windows Install ISOs using .imgPTN files
- Automating Windows Installs from .imgPTN files
- Split_WinISO
- Add Windows ISOs to partition 2
- Windows AIO ISOs
- WindowsToGo
- WinNTSetup
- WinLite10 XML files
- SDI_CHOCO (install drivers, apps and updates) >>
- .VHD and .WIM files
- PassPass (bypass the Windows Password)
- Hack Windows Account Passwords (UtilMan.exe)
- Windows 2000
- Windows 98
- Multipoint Server
- Add the latest XP drivers (DPMS)
- Add a Windows Install menu entry
- LINUX payloads >>
- MSDart ERD ISOs
- WinBuilder, Medicat, Gandalf and WinPE ISOs
- Hirens/Strelec/DLC/F4 ISOs
- DOS (MS-DOS and FreeDOS)
- HAIKU
- MAC OS X
- FreeBSD
- MOVE_IMGPTN
- List of tested ISOs\payloads (with instructions)
-
Configure E2B >>>
- Menu settings (quick reference)
- E2B Menu Demo
- E2B_Editor
- E2B files and folders explained
- MyE2B.cfg - E2B configuration file >>
- Change the payload menu entries and help text using a .txt file
- Change the order of the menu entries
- Change the background wallpaper
- Different background wallpaper for each menu
- Default Menu and Timeout
- Change the Language, Headings, Menu and text
- Changing the default E2B menu entry order
- 'Change File Extension' prompt (Auto-Suggest)
- Change the Keyboard Layout
- About .mnu files
- Sample .mnu files
- PimpMyDrive.cmd
- Reduce the E2B messages
- Add a new Sub-Menu folder
- Stamps, Animation and Tunes
- Draw lines and boxes on the screen
- Write text/time/date to the menu screen
- Global Hotkeys
- Themes (Skins)
- Fonts
- Speeding up E2B (inc. FASTLOAD)
- One Single Menu
- The E2B F1 Help menu
- Add your own Help Menu
- Add Help text files (.help)
- Add Windows Install ISOs to the Main Menu
- Change the Windows Install Menu
- Passwords and Security
- Hide Payloads and Menu Entries
- Guest Mode
- GFX Boot Menus
- Dual Booting
- Change the CSM .imgPTN Menu
- Configure Clover
- Right-to-Left Languages
- Create new language files
- How to modify LOADISO.CMD (Repair message)
- Count number of boots
- UEFI - useful things know!
-
FAQ, Info, TroubleShooting, QEMU and Virtual Machines >>>
- 'File Not Contiguous' and 'Too Many Fragments' Errors
- 137GB 'BAD BIOS' bug
- TroubleShooting E2B
- E2B Error Messages
- Grub4dos Error Numbers
- Common problems with payload files
- Repair a corrupt E2B drive
- Known Issues and Bugs
- Slow and buggy BIOSes
- How E2B Works
- QEMU and Virtual Machines >>
- Using VBOX with a WinHelper USB drive
- Debugging E2B
- CONTIG.ISO
- ISOBOOT
- WIMBOOT (iPXE)
- grub4dos
- Useful resources
- Removable v. Fixed
- Gallery
- Guestbook
- Forum
- Blog
- a1ive grub2 File Manager (MBR+UEFI)
- Add Ventoy
- Site Map
- eBooks
- Contact Me >>>
- Donate
- Licensing
- Privacy policy (GDPR)
- Bespoke design service
- Grub2 Menu System (UEFI_GRUB2_PTN2)