This is really only for those people who are very familiar with grub4dos and drive partitions...
You can move and run payload files to other partitions or even to other drives.
You will need to add a grub4dos menu file (.mnu) to E2B which tells E2B to make a new menu for files on the other partition.
Note: The small, dummy, Type 21h 2nd partition that is created on the USB drive if you ticked the 'Boot as HDD' in RMPrepUSB or used the automated E2B creation script, is only used to ensure that a BIOS boots from the USB as a hard disk rather than boot as a SuperFloppy\ZIP drive.
If you create a larger 2nd partition, you do should delete this small Type 21h partition first. The E2B USB drive must only have a maximum of two Primary partition entries in the MBR Partition table (use RMPrepUSB - Drive Info - 0 to view the MBR partition table entries - only two should be used). You can either have two primary partitions, or one primary partition + any number of Logical partitions.
If you are using E2B from a USB hard disk that has two Primary partitions, place some payload files (e.g. ISO files, .VHD files, etc.) in the \_ISO\AUTO folder on the 2nd partition of the USB hard disk and copy the PTN2_AUTO.mnu file (in the \_ISO\docs\Sample mnu files\E2B Menus folder) to the \_ISO\MAINMENU folder of your E2B drive (or to any other 'normal' menu folder).
\_ISO\docs\Sample mnu Files\E2B Menus
The files listed below are example .mnu files. You can edit them to use any partition or folder to suit your needs.
PTN_LOG1_AUTO.mnu - this menu is an example of how to have a \_ISO\AUTO folder on Logical partition 1 (hd0,4) of the E2B drive
PTN2_AUTO.mnu - this menu is an example of how to have a \_ISO\AUTO folder on the 2nd Primary partition (hd0,1) of the E2B drive
PTN2_MNU.mnu* - this menu is a example of how to have a second \_ISO\ANTIVIRUS folder on the 2nd Primary partition (hd0,1) of the E2B drive
* The PTN2_MNU.mnu file enumerates payload files AND .mnu files in the same way that any one of the 9 'standard' menu folders on the E2B partition work - i.e. payload files are only enumerated if in the 'top' folder and .mnu files are added to the menu.
Any .mnu file used (e.g. (hd0,1)\_ISO\ANTIVIRUS\MNU\Ubuntu.mnu) may need to be changed\tweaked if moved to a different partition. Any paths to files that begin with / may need to be changed to a full path (e.g. you may need to use set PER=(hd0,1)/ubuntu-rw instead of set PER=/ubuntu-rw).
You can copy and edit these .mnu files to have Menu entries for any folder you like on any other partition. Note that the PTNxxxAUTOxx.mn files behaves the same as the \_ISO\AUTO folder and enumerates ONLY payload files but in all sub-folders under the specified folder - .mnu files are ignored.
Note: Payload files on a different partition will need to be made contiguous manually. The 'MAKE_THIS_DRIVE_CONTIGUOUS.cmd' script and the CTRL+F2 WinContig key in RMPrepUSB only operates on the E2B partition. You will need to run WinContig manually (or use SHIFT+F2 in RMPrepUSB) and pick the correct drive volume to make all files contiguous on that volume.
Alternatively, copy the 'MAKE_THIS_DRIVE_CONTIGUOUS.cmd' file to the root of the 2nd partition and copy the \_ISO\docs\WINCONTIG folder to the 2nd partition (same path). You should then be able to make all files on the 2nd partition contiguous by running the script from the 2nd drive (v1.71+).
The (partial) contents of the PTN2_AUTO.mnu file is shown below:
Please Note: The old PTN2_Menu.mnu file in the Sample mnu Files folder had a BUG/TYPO and did not work. The correct version uses (md)0x3000+0xA0 (corrected in E2B v1.70).
# EXAMPLE .MNU FILE FOR 2ND PRIMARY PARTITION (max for E2B is 2 Primary ptns or 1 Primary+multiple logical ptns) - see also PTN_LOG1_Menu.mnu
# Add this file to the /_ISO/MAINMENU folder on the E2B drive
# You can add payload files under \_ISO\AUTO on partition 2 and they will be included in the menu
# EDIT lines 1 and 3 to match the name of your partition (hd0,1) and folder (/_ISO/AUTO)
# 2nd Primary partition is (hd0,1), 3rd Primary = (hd0,2), fourth primary = (hd0,3), first Logical partition = (hd0,4), second Logical partition = (hd0,5), etc.
Then, in RMPrepUSB, press Ctrl+O to swap Windows access over to partition 2 (choose 2) - this is only necessary for Removable-type USB Flash drives if you cannot access the 2nd partition under Windows.
Now create a _ISO folder on the 2nd partition and copy over any payload files that you want to run automatically (avoid Windows-based payloads).
Then press Ctrl-O again to swap back to the E2B NTFS partition (choose 2 again).
Add the PTN2_Menu.mnu file to \_ISO\MAINMENU folder
The PTN2_AUTO.mnu file is only for payload files that will auto-run, such as linux liveCD ISOs or floppy disk images, etc.
Note: Many BIOSes have a bug and are not able to access files past 137GB on a USB drive, this means E2B (grub4dos) will fail to boot from those files. Therefore, I strongly recommend you ensure that any partitions used by E2B do not extend past 137GB (e.g. PTN1=60GB, PTN2=60GB). If the drive is larger than 137GB, then use the following partition arrangement:
PTN1 = Primary E2B boot = 60GB
PTN 2 = Logical = 60GB
PTN 3 = Logical = (rest of disk) - can be used to store data files or executables that are accessible under Windows\linux
*PTN1+PTN2 should not exceed 137GB. This arrangement is only suitable for hard disks (not removable flash drives).
FAT32 + NTFS partitions
Due to a common BIOS bug, you should try to keep all files within the first 128GB of the start of disk. For this reason, it is best to have all E2B+payload files on the first partition.
(hd0,0) PTN1 - NTFS - E2B files - Windows Install ISOs must be under \_ISO\WINDOWS\xxxx folders
(hd0,1) PTN2 - FAT32 - \_ISO\AUTO folder can contain payload files that will autorun using the PTN2_AUTO.mnu file (files must be <4GB)
--- OR ---
(hd0,0) PTN1 - Primary FAT32 - E2B files - Windows Install ISOs must be under \_ISO\WINDOWS\xxxx folders (files must be <4GB)
(hd0,1) PTN2 - Primary NTFS - \_ISO\AUTO folder can contain payload files that will autorun using the PTN2_AUTO.mnu file
If E2B is on the 2nd partition, then you will need to use a 'PTN1_Menu.mnu' file which can be made from PTN2_AUTO.mnu but has (hd0,0) instead of (hd0,1).
Config 3 (not recommended)
(hd0,0) PTN1 - Primary FAT32 - \_ISO\AUTO folder can contain payload files that will autorun using the PTN1_Menu.mnu file (files must be <4GB)
(hd0,1) PTN2 - Primary NTFS - E2B files - Windows Install ISOs must be under \_ISO\WINDOWS\xxxx folders and you must swap partitions first
--- OR ---
Config 4 (not recommended)
(hd0,0) PTN1 - Primary NTFS - \_ISO\AUTO folder can contain payload files that will autorun using the PTN1_Menu.mnu file
(hd0,1) PTN2 - Primary FAT32 - E2B files - Windows Install ISOs must be under \_ISO\WINDOWS\xxxx folders (files must be <4GB) and you must swap partitions first
Note: the partition that has the \menu.lst file is considered by grub4dos to be the 'boot partition' (bd). That partition is expected to contain the E2B files and the \_ISO\WINDOWS\xxxxxx folders. For Windows Install ISOs, the ISOs must be on the first partition if using a Removable Flash drive (unless Win10 1703 or later is being installed).
If you have some bootable files (e.g. DOS OS files) that need to be on a FAT32 partition (e.g. extracted files from the Hirens Boot CD), then you can copy and modify a .mnu file so that it will find the correct partition and set it as the root partition - e.g.:
title Hiren's Boot CD (extracted) \n This will find the HBCD folder on any partition
find --set-root /HBCD/menu.lst
More than two partitions (HDD/Fixed disk only)
If you need more than two usable formatted partitions on the E2B USB drive, then you will need to create one primary partition and the other partitions must all be Logical partitions. In grub4dos, the first logical partition on the USB drive is (hd0,4), then second Logical partition on the 2nd (internal hard drive) would be (hd1,5), etc. etc. The four primary partition table entries in the MBR of the E2B USB drive will thus be:
(hd0,0) PTN1 - NTFS Primary
(hd0,1) PTN2 - Extended partition entry (points to any number of Logical partitions)
(hd0,2) PTN3 - (blank) Reserved for use by E2B (if using persistence with ISOs)
(hd0,3) PTN4 - (blank) Reserved for use by E2B (required - must be unused or E2B will not run)
Windows does not allow access to Logical partitions on Removable USB Flash drives.
Accessible partitions under grub4dos\E2B will be (hd0,0) and then (hd0,4), (hd0,5), (hd0,6), etc.