Double-click on any .imgPTN file to change the partitions and switch to 'CSM-mode' or click the 'Restore E2B partitions' button to get back to the E2B Menu mode.
SWITCH_E2B is for use with NTFS E2B USB drives (it does not fully work on FAT32 or exFAT drives). You can use the 'Restore E2B partitions' button on all types of drive, but you can only switch in an .imgPTN file if the E2B USB partition is NTFS.
SWITCH_E2B.exe can be found in the \_ISO folder on the E2B USB drive (v1.73+), or in the \e2b folder of the USB drive if you have switched to the .imgPTN file.
SWITCH_E2B.exe is a Windows\WinPE 32-bit utility which allows you to select any .imgPTN file on your E2B USB drive and 'switch' partitions. The end result is similar to if you had booted to E2B and then selected the same .imgPTN file from the E2B menu to switch to the CSM menu. Running it under XP is not fully supported (it may or may not work!).
You can make a .imgPTN file (using the MPI Tool Pack), copy it to your E2B USB drive, make it contiguous and then use SWITCH_E2B.exe to switch the new image onto the E2B USB drive (it replaces the first E2B partition). You can then access any of the files inside the partition image file directly by simply accessing the new USB drive partition in Windows Explorer. If the .imgPTN file is UEFI-bootable, you can connect it to a UEFI system and boot from it, without needing to boot to the E2B menu in Legacy\CSM\MBR-mode first.
SWITCH_E2B.exe also has a 'Restore E2B partitions' button which will switch the original Easy2Boot partitions back from CSM-Mode to E2B-Mode, so that the USB drive will now boot to the Main E2B menu again.
SWITCH_E2B.exe (all capital letters) is a self-extracting .exe file, which contains three Windows 32-bit files - Switch_E2B.exe (the app), getFileExtents.exe and msvbvm60.dll. These 3 files are automatically extracted to a temporary Windows folder, and then the extracted Switch_E2B.exe executable is run. The files are copied to a temporary folder because they will no longer exist once you switch partitions on the USB drive! Administrator rights are required because low-level, sector-write access to the USB drive is required.
If SWITCH_E2B is run under a 64-bit Windows OS, then WoW64 will be required, because Switch_E2B.exe is a 32-bit application. Therefore, it will not run under those Windows PE 64-bit environments which do not have the WoW64 components installed. ChrisR's WinPESE 8 and 10 WinBuilder projects can make WinPE 64-bit OS's with WoW64 support. SWITCH_E2B should also run OK under full Windows 32-bit and 64-bit OS's (Vista or later).
Note: E2B_SWITCH v1.0.3+ supports FAT32 USB drives formatted using FlashBoot. However, you cannot boot to the CSM Menu when using .imgPTN files on a FlashBoot E2B USB drive - you can only UEFI-boot (if there are UEFI boot files present).
(Drive list) - This lists all USB drives in the system that have an MBR which contain the grub4dos boot code (see also 'List all drives' below). Up to four volumes on each physical drive only, will be shown. Drives with more than four partitions (e.g. drives with multiple Logical partitions) may therefore not display all the volumes in the Drive list box.
(File list form) - This lists any files with a .imgPTN* file extension on the selected drive volume. You can double-click on one of the .imgPTN files to 'switch in' the partition image and replace the Easy2Boot partitions. The function is similar to the Easy2Boot menu function. Switch_E2B will indicate what partition type (0C=FAT32 or 07=NTFS it will use). All .imgPTN files in the drive volume are listed except for those in the $RECYCLE.BIN if the 'Only search \_ISO folder' checkbox is unticked.
.imgPTN* - removes all 4 primary partitions and replaces PTN1 with the partition image and flagged as 'Active\bootable' (see 'Note' below).
.imgPTN*23* - as above but any existing PTN2 or PTN3 will not be removed (recommended for maximum compatibility when using a standard E2B USB drive).
(no extension) - image is added as PTN3 if a .imgPTN* file also exists. .imgPTNX4aux - as .imgPTN but also replaces PTN4 with the partition image file aux. The aux file can be any name (no extension) and can be located at PTN2:\_ISO (recommended) or the same folder as the .imgPTN4aux file or on PTN1:\_ISO. (MPI v0.094+).
If a second image file exists with the identical file name but no file extension, then that will be switched into PTN3.
The MBR partition table has four spaces for PTN1/2/3 and 4.
Note: If the file extension exactly matches ".imgPTN" or ".imgPTNAUTO" and Partition #2 is the dummy Hidden Type 21 hex partition, then the hidden Partition #2 table entry will NOT be deleted when switching to CSM mode. Having a 2nd partition improves the bootability of the USB drive with some BIOSes. If you do not want the Type 21 hex partition in CSM mode, use a different file extension, e.g. .imgPTNa (or any other file extension not ending in "23"). This is the same feature that is included in E2B v1.73+ versions. If your E2B USB drive has a user-created 2nd partition, use the file extension .imgPTN23 so that the 2nd partition is present in CSM mode, otherwise you may have problems CSM-booting on some systems.
If a second partition image file is present which is without a file extension, then the Type 21 hex partition will not be kept.
You may be prompted to enter a partition type number for the second image (SWITCH_E2B.exe v1.0.18+). Choose an appropriate type number (usually it does not really matter what the number is). If the partition type is 0, only linux OS's may recognise it (not grub4dos or DOS or Windows).
All new partition table entries will have the 'max. CHS LBA fix' applied to the partition table entry for maximum compatibility. A backup of the MBR (LBA0) is made at sectors LBA30 and LBA60 (if unused) before overwriting the MBR (same action as E2B).
Access Partition 2 on Removable drive - if the selected drive is a Removable drive, some Windows versions will only allow access to the first partition. If you use this button to switch partition 1 with partition 2, the files on the second partition will be accessible to Windows and any .imgPTN files will be listed (if present) so that you can select one of the .imgPTN files from the second E2B partition. This is only useful if you have a Removable USB flash drive with two primary partitions.
Tip: Copy the .mnu file "\_ISO\docs\Sample mnu files\E2B Menus\E2B_PTN_SWAP.mnu" to the \_ISO\MAINMENU folder. Then you can switch partitions 1 and 2 by booting to E2B if a Windows system with Admin rights is not available (it adds a hide\unhide E2B partition option).
List all drives - Lists all drives (not just USB drives) that have grub4dos code in the Master Boot Record (MBR). Be warned that if your main system hard disk(s) use grub4dos, then they may also be listed in the drive list. If you are running Windows under VBOX or QEMU, then you will need to tick this box because under a VM, the USB drive will appear to the guest Windows OS as a hard disk.
Restore E2B partitions - When a .imgPTN file is 'switched in', a backup of the MBR is made at sectors LBA30 and LBA60 on the USB disk (if they are unused). This restore function will read LBA30 (or LBA60, if LBA30 is invalid) and write it to LBA0 (the MBR) - thus restoring the original E2B partitions. This is the equivalent of booting to the CSM menu and choosing menu option 0 EASY2BOOT - Switch to the Easy2boot menu. If LBA30 and LBA60 are both invalid, the contents of \e2b\MBR.BIN will be used (if present and valid).
Refresh - This re-enumerates the drives in the system and re-populates the drive list. Use it if you connect or disconnect a USB drive.
Only search \_ISO folder - If ticked (default), only folders under \_ISO will be searched for *.imgPTN* files. If unticked, all *.imgPTN* files in the whole drive volume will be listed (v1.0.6+). Note that if you have a very large (e.g. 2TB) E2B USB drive containing many files, it may take a while for SWITCH_E2B.exe to search the whole volume for all .imgPTN* files, if you have unticked the 'Only search \_ISO folder' checkbox.
No USB drives listed?
Ensure that the USB drive is not locked by another process or utility (such as VirtualBox, VMUB or VMWare). If in doubt, reboot your Windows system.
Only valid E2B drives that contain a recognised version of grub4dos, flashboot or BootIce grub4dos 0.4.6a code in the MBR sector are listed.
If your E2B USB drive is not listed, try RMPrepUSB - Install grub4dos - Y=MBR (and cancel the copy of the grldr file).
If you still have problems, remove all USB drives except the E2B USB drive and see below...
Possible Problems and Errors
The getFileExtents.exe utility is used to obtain the start position and length of a file on an NTFS volume. It does not work if the target file is on a RAM Drive. Under some circumstances (e.g. Windows PE), you may see a 'Please run as Admin' error if Switch_E2B tries to test getFileExtents by specifying a file on a temporary RAM Drive - in this case you can ignore the warning message.
No .imgPTN files listed - Check you have the correct drive and partition selected in the Drive List box. This problem could be also be due to not having sufficient privileges/Admin rights. Also check that you have not 'swapped' PTN1 with PTN2 if using a two-partition Removable USB Flash drive.
SWITCH_E2B only lists drives that have the grub4dos MBR boot code installed. If you suspect that the boot code has been replaced (perhaps by a Windows or linux installation), use RMPrepUSB - Install grub4dos - Y (=MBR) - do NOT overwrite the \grldr file.
No drive volumes listed - If you are running under a VM and booting from a USB drive, it may appear as a 'hard disk' and not a USB drive - tick the List all drives checkbox.
If you are warned that Switch_E2B is about to 'write to Drive 0' - check that Drive 0 is the correct target drive. For instance, if you are running under QEMU or VirtualBox, you may see this warning if the USB drive is Drive 0 (the drive will not be detected as a 'USB' drive under QEMU\VBox).
If Switch_E2B detects that sector writes are being made to a non-USB Drive 0, you will be prompted before the sector write takes place. This is to ensure you do not unintentionally corrupt your system drive! If you are sure that Drive 0 is the E2B drive (e.g. if running under VBox) then click OK to allow writes to drive 0.
If the drive contents do not seem to change after switching partitions, try the Refresh button. If that doesn't work, unplug the USB drive and re-connect it.
'INFORMATION: Only the old grub4dos LBA1 backup MBR is present on this drive!' - Switch_e2b.exe cannot find a valid backup MBR sector and so cannot restore the E2B partitions, however it has detected an old MBR sector at LBA1. This would have been written as a backup sector when you last installed grub4dos to the MBR of the E2B USB drive. The partition table at LBA1 may be out-of-date (old) however, if you have re-partitioned the drive since installing grub4dos. I suggest you use RMPrepUSB - Drive Info - 1 to inspect the partition table of LBA1 and if it looks OK, save LBA0 and LBA1 to two files using 'Drive->File', and then use 'File->Drive' to write the LBA1 file to Sector 0 of the E2B drive. This will restore the original E2B partitions. You may then need to re-install grub4dos to the MBR using RMPrepUSB - Install grub4dos. If you know that you have re-paritioned the E2B drive since installing grub4dos to it, then writing LBA1 to Sector 0 (MBR) may corrupt the drive partition table - in that case you will need to restore the LBA1 file to Sector 0 and try to repair the E2B USB drive in some other way (e.g. using the TestDisk repair tool).
'RichEd20.dll (or other dlls) missing' - you may see a 'missing DLL' error when booting to a Mini XP (such as Hirens) or other PE environment. The DLLs are required by the self-extracting code in SWITCH_E2B.exe. If you correctly boot to Hirens Mini XP (e.g. use the .isowinvh file extension instead of the .iso file extension), then you will see many more Desktop icons, get full functionality and Switch_E2B should work correctly. A work-around would be to extract the three files inside the SWITCH_E2B.exe first to a folder on your USB drive, and then boot to Mini XP and copy them to a RAM drive (e.g. X: or B:) and then run the extracted version of Switch_E2B.exe from the RAM drive.
'WARNING: Files are in wrong order for UEFI-booting' - you have two image files - for UEFI-booting the FAT32 .imgPTN file needs to be the first partition. If you want to UEFI-boot from the image, answer Yes - otherwise answer No. Re-ordering may take a long time and also requires much free space. If re-ordering does not succeed, you can try again. If re-ordering fails and you cannot UEFI-boot, try deleting some unwanted large files and running Defraggler - Action - Advanced - Defrag Freespace.
Some systems such as Asus EeePC's, may not MBR\CSM boot to the CSM menu unless the USB drive has at least two primary MBR partitions. If the file extension .imgPTN does not work, try .imgPTN23 so that the second partition (and 3rd if present) is kept. The second partitions could be the dummy Type 21 hex partition (default if using MAKE_E2B_USB_DRIVE.cmd) or a user-created primary partition of any size.
Most systems will only UEFI-boot from a FAT12/FAT16/FAT32 partition.
If using two partition image files - e.g. windows.imgPTN and windows, the windows.imgPTN file must be positioned on the E2B volume first - otherwise you may not get any UEFI-boot option in the BIOS boot menu.
Note: Most UEFI-BIOSes will ignore any disk that has overlapping partitions.
Many UEFI systems will only boot from a USB drive if the partitions are in ascending order.
e.g. PTN1:NTFS + PTN2:FAT32 will be recognised by a UEFI system as long as partition 1 is located on the disk before partition 2.
Switch_E2B v1.09+ will warn you of this condition and will offer to re-order the two files for you.
Alternatively, you can use the MOVE_IMGPTN Windows script to re-order the two files.
For UEFI-booting via the firmware, you should ensure that the FAT32 partition image contains the UEFI boot files (e.g. \EFI\BOOT\bootx64.efi).
Note: If using a Removable USB drive, the 2nd and 3rd partitions (if any) will not be accessible to Windows/WinPE (pre-Win10 1607):
PTN1: FAT32 (accessible to Windows)
PTN2: NTFS (hidden from Windows)
If you want to use UEFI-boot images, I recommend that you use an NTFS-formatted USB HDD rather than a 'Removable' type USB Flash drive because if you boot to Windows, it will be able to access any other partition on the USB drive (if it has multiple partitions). Later versions of Windows 10 (1703+) can however access all partitions on a Removable USB drive.
Encrypted (BitLocker, etc.) systems
When you first run Switch_E2B.exe, you may see a 'Run as Admin (GFE Size test failed) - getNextTranslation: the data is invalid' error box - you can ignore this error if it has extracted the files to an encrypted drive.
Switch_E2B should still work correctly.
If Switch_E2B detects that sector writes are being made to a non-USB Drive 0, you will be prompted before each sector write takes place. This is to ensure you do not unintentionally corrupt your system drive! If you are sure that Drive 0 is the E2B drive (e.g. if running under VBox) then click OK for each sector-write prompt.