CSM Menu changes

The CSM menu is determined by the  \menu.lst file which you will find inside the .imgPTN image file (NOT the small \menu.lst file on the E2B drive).
Note that changes to E2B, the \_ISO\MyE2B.cfg or STRINGS.txt files will NOT affect the CSM menu. You cannot set a different language for the CSM Menu (you must replace the \menu.lst file with a different one).
If, for some strange reason (!), you don't like my choice for the CSM Menu background ("\csm\e2b\CSM.bmp.gz") or text colours or want to change the language or text, you can change them. 
You can, of course, edit the existing partition image contents, either by mounting the .imgPTN file using ImDisk or by switching to the partition image on an E2B USB drive by using a real system (or QEMU or VBox or SWITCH_E2B.exe) and then access the files directly in Windows Explorer.

To change MakePartImage (MPI) so that it always uses your own custom CSM menu whenever you make a .imgPTN file, use the CUSTOM folder in MPI. When MakePartImage runs, the entire CUSTOM folder will be copied to the partition image when it is made and will overwrite the existing MPI files inside the .imgPTN image. See below for details.

The .\csm\menu.lst file is used for the CSM menu. Most lines are commented for you, to tell you what they do.
WARNING: Do NOT change the long, single line in menu.lst:
##set PAYLOAD= ;; ##############################################################################################
This long line in \menu.lst is automatically changed by MakePartImage and it will be replaced with the name of the payload file.
If possible, do not edit or replace the \menu.lst file. Instead use a \MyCSM.cfg file.
However, if you need to change the menu entry text (e.g. to have a different language) you will need to copy the menu.lst file to the CUSTOM folder and then edit it.

Modifying the CSM Menu using the CUSTOM folder

To create new .imgPTN images with modified contents automatically using MakePartImage, place your new or replacement files in the CUSTOM folder. 
The contents of the CUSTOM folder will be copied by MakePartImage to the root of the image after the payload\ISO has been extracted - any existing files will be overwritten by the files in the CUSTOM folder.

For example: You can place your own menu.lst or MyCSM.cfg file in the CUSTOM folder and it will be used by MPI. If you place your own 800x600 bitmap file at .\CUSTOM\e2b\CSM.bmp.gz it will overwrite the default background wallpaper (the file does not need to be a compressed .gz file and it can be a JPEG file instead of a .bmp file, but it must be named CSM.bmp.gz).
To change the CSM menu, simply copy the contents of the whole .\csm folder (or any part of it) to the CUSTOM folder.

You can then edit the menu.lst file situated in the CUSTOM folder and change the CSM.bmp.gz background file in the CUSTOM\e2b folder and make any other changes you like.
You can add any other files or folders you like under the CUSTOM folder and they will be included in each image you make using MakePartImage.
A typical change is to add a MyCSM.cfg file which will change the wallpaper, colours, menu position, etc.

Change the language of the CSM Menu

To change the language, we must replace the English default menu.lst with a different file with translated menu entries.
1. Copy the .\csm\menu.lst file from the MPI Tool Pack folder, to the CUSTOM folder in the MPI Tool Pack.
Note: Do NOT use the \menu.lst file from an existing .imgPTN file because it will have been modified by MakePartImage.cmd. You must copy the menu.lst file from the .\csm folder.
2. Now edit the .\CUSTOM\menu.lst file and change the 'title' and 'iftitle' lines into your own language. For example:
title EASY2BOOT - Switch back to the Easy2Boot menu\n Restore the Easy2Boot MBR.\n This will restore all the Easy2Boot partitions.
title EASY2BOOT - Zurück zum Easy2Boot-Menü\n Easy2Boot MBR wiederherstellen.\n Das wird alle Easy2Boot Partitionen wiederherstellen.
Save the file in UTF-8 format using NotePad.
Now, whenever you make a new .imgPTN file, the .\CUSTOM\menu.lst file will be used.

Updating the MPI Tool Pack

By using the CUSTOM folder, your changes can be kept when you update the MPI Tool Pack to a newer version - just copy your CUSTOM folder to the new CUSTOM folder in the new MPI download.
Frettt has provided a German translation of the CSM Menu.lst file - check the Alternate Downloads - Other files folder!

MyCSM.cfg - Changing the menu and wallpaper (v0.067+  Aug 2016+)

Recent MPI Tool Kit versions (0.067+) after July 2016, will use a \MyCSM.cfg file which can be created using the E2B_Editor.exe utility.
MyCSM.cfg does not support different languages or keyboards and the F7, F9 and F10 menu entries cannot be suppressed using NOF7. NOF9 and NOF10.
The \Sample_MyCSM.cfg (included in the image) is an example of a MyCSM.cfg configuration file.
    Sample_MyCSM.cfg when used as \MyCSM.cfg

Design you own CSM Menu

1. Copy the \_ISO\E2B_Editor.exe file to your Windows Desktop (or run it from an E2B USB drive)
2. Make a .imgPTN file (any ISO will do) and switch to it (using Switch_E2B.exe or boot to E2B and select the .imgPTN file)
3. Place your background wallpaper in \e2b folder on the USB drive (in CSM mode) - 24-bit colour .bmp or .bmp.gz or .jpg (800x600 recommended, or 1024x768)
4. Rename \Sample_MyCSM.cfg to \MyCSM.cfg on the E2B USB drive (in CSM mode)
5. Run the E2B_Editor.exe, select the \MyCSM.cfg file on the E2B USB drive when prompted
6. Select the bitmap or jpeg file you placed in the \e2b folder (ignore any warnings about it being a non-ISO/non-USB folder and any language\keyboard warnings)
7. Use the E2B_Editor GUI to configure your menu - tip: place XXXX in the HEADING field so you can see where the heading will be placed
8. Boot to the image to test it (you can use RMPrepUSB - F11)
9.  Make sure the HEADING field in E2B_Editor is completely empty (THIS IS IMPORTANT!)
   Now re-save the \MyCSM.cfg file and check that the HEADING value is blank:
   set HEADING=
10. Now copy the \MyCSM.cfg file into the .\CUSTOM\ folder and copy the wallpaper .bmp/.jpg file into the .\CUSTOM\e2b folder in the MPI Toolkit download folder (you can delete the Sample_MyCSM.cfg file if you wish).
Do NOT copy the \menu.lst file (because the 'set PAYLOAD= ;; #####' line needs to be unmodified)! 
Make sure the HEADING value is empty in the MyCSM.cfg file, otherwise all your .imgPTN files will have the same heading!
Make sure that the path in the MyCSM.cfg file is correct - e.g.
set MYWBMP=/e2b/pink.jpg
Note: If a \MyCSM.cfg file exists, the informational menu messages about 32-bit and 64-bit EFI boot files at the bottom of the CSM menu will be suppressed (see below).
Also, the Menu heading will be set to the Payload name (as set by MakePartImage when the .imgPTN file was made), i.e. there will be no 'EASY2BOOT MAIN MENU xxx' heading.
You can also change the grub4dos password and change the default menu entry and add a timeout using the MyCSM.cfg file, e.g. add these lines to the bottom of the MyCSM.cfg file:
# All lines below here will be preserved by the MyE2B_Editor.
#to change default menu entry and timeout
#default 5
#timeout 10
# All lines below here will be preserved by the MyE2B_Editor.
default 5
timeout 10
set pwd=fred
Note that this will override any timeout and default menu entry changes that you may make using the 'Set menu default and timeout' menu entry.
If you want to adjust the Menu Heading  after  the .imgPTN file has been created, then edit the 'set HEADING=' entry in the \MyCSM.cfg file inside the .imgPTN file, e.g.
set HEADING=My new menu  (%VER%) %B64% %@DATE% %@TIME%
The HEADING parameter supports the variables %B64% %day% %month% %year%  %@DATE% %@TIME% %VER% and %UUID%
To have a full-length menu bar for the highlighted menu item, add this line to either the \menu.lst file or the \MyCSM.cfg file:
# set full length highlight bar for selected menu item (--highlight-short or --highlight-full)
setmenu --highlight-full > nul
Note: If black is used for the highlight background colour then the background bar will be transparent (invisible), e.g. highlight=yellow/black

Using a 1024x768 menu

Modern systems which support UEFI-booting will support 1024x768x24 graphics mode. However, some older systems (e.g. netbooks) may only support 800x600x24. In this case, you can create an alternate configuration file, e.g. MyCSM800.cfg, and use the following 2 lines at the top of your \MyCSM.cfg file:
debug 1 ;; vbeprobe > (md)0x220+5 ;; debug 0
cat --locate=1024x768x24 (md)0x220+5 > nul || /MyCSM800.cfg && goto :EOF
If the system does not support 1024x768x24 then the MyCSM800.cfg file will be used instead of the settings in MyCSM.cfg.

UEFI Information

When you use a \MyCSM.cfg file, the UEFI boot file messages are not displayed because they may conflict with the new menu position.
To include the EFI boot file lines under the menu, add the following 5 lines to your \MyCSM.cfg file
set E=
# To adjust position, change P:XXXX in lines below
if exist /EFI/boot/bootia32.efi   set E=%E%echo -n -e    -P:3331 \\x24[0103]INFORMATION: x86 32-bit UEFI boot file \\\\EFI\\\\boot\\\\bootia32.efi present 
if exist /EFI/boot/bootx64.efi    set E=%E% \necho -n -e -P:3431 \\x24[0103]INFORMATION: x86 64-bit UEFI boot file \\\\EFI\\\\boot\\\\bootx64.efi  present
ls /EFI > nul || set E=\necho -n -e -P:3331 \\x24[0103]INFORMATION: No \\\\EFI folder present (cannot UEFI boot)
Note that the 32-bit message is on line 31 and the 64-bit message is on line 32 in this example.
To display a single \ character, you must use \\\\.
To display any more text on the CSM menu, add another line similar to:
set E=%E%\necho -n -e -P:3731 \\x24[0105]Here is my text
[0103] defines the colour (see \_ISO\Sample_MyE2B.cfg for explanation of colours - e.g. [0103] = 0 no blink, 1=bright, 0=black\transparent background, 3=cyan).
-P:RRCC defines the Row and Column position where the text will start - e.g. 3331 = line 33 down and 31 characters across.
\n throws a new line.

Add a GFXBoot Menu file

Recent MPI Tool Kit versions (0.067+) after July 2016, will support a GFX menu. 
Ensure that your GFXMenu file is at .\CUSTOM\e2b\message  (it must be named message with no file extension). It will automatically be used if it is present.
If you do not want any of the F7, F9 or F10 menu entries, then copy the .\csm\menu.lst file to the .\CUSTOM\ folder, and edit it to delete the menu entries you do not need.
The 'default' and 'timeout' settings will be valid for a GFXBoot menu, but the HEADING and other menu settings will not apply.

Testing changes

If you have existing .imgPTN files, instead of making new images, you can mount the .imgPTN file using ImDisk (right-click on the file) - then make your changes, e.g. you can replace the menu.lst and CSM.bmp.gz files, etc. and then dismount the virtual drive to save the changes. An easier alternative is to switch E2B to that image (CSM mode) and then edit the partition on the USB drive under Windows or linux directly.
Note: Your menu.lst file must contain certain phrases which are recognised by E2B. These phrases are in the 'Easy2Boot switch' menu code. If these 'Switch' code phrases are not in the menu.lst file, E2B will refuse to load the partition image (because there will be no way to switch back to E2B from the CSM Menu!).
MakePartImage will replace the string '##set PAYLOAD= ;; ' in the menu.lst with the name\title of the payload and remove the ## characters. To change the payload title in the menu, change the line:
set PAYLOAD=xxxxxxx
or better yet, use a \MyCSM.cfg file and set the HEADING parameter.
Tip: When a new version of MPI is downloaded, compare the .\csm\menu.lst file with your .\CUSTOM\menu.lst file to see what has changed!

Set a default menu entry and a timeout

MPI 0.082+ allows you to change the default and timeout setting using a menu entry.
If using MPI 0.067 or later (after July 2016), then you can use \MyCSM.cfg file, e.g.
set pwd=fred
default 3
timeout 20
For older versions of MPI, you can make the CSM menu automatically boot to any one of the menu entries by editing the \menu.lst file (the one inside the .imgPTN file). e.g. The line in red has been added so it will run the selected menu entry after 2 seconds unless the user presses a key to stop the timeout. 
You can change the default menu item that is automatically run by changing the 'default 2' line.
default 2
timeout 2
debug off
password easy2boot
/e2b/hotkey -A

Read more:
Frettt has provided a German translation of the CSM Menu.lst file - check the Alternate Downloads - Other files folder!

Text-Mode Menu

Some system may have a problem displaying BIOS-mode 800x600 graphics. You can use a text-mode menu by adding a special \MyCSM.cfg file.
A minimal MyCSM.cfg file contains:

set GMODE=3
# use hotkeys
/e2b/hotkey -A
Download Sample_MyCSM_TextMode.cfg if you also want to have a heading and foooter and change the colours, etc.
You can add the MyCSM.cfg file to the CUSTOM folder of the MPI Tool Pack folder so that it is always included in any new .imgPTN file that you make.
set GMODE=3
# use hotkeys
/e2b/hotkey -A
# --------- HIGHLIGHT AND STANDARD COLOURS ------------
# For a highlighted menu entry with a background bar, use 'color highlight=FG/BG'  (FG=Foreground colour, BG=Background colour)
# Valid colours are black, blue, green, cyan, red, magenta, brown, light-gray, dark-gray, light-blue, light-green, light-cyan, light-red, light-magenta, yellow and white.
# --------------------------------------------
color highlight=red/black
color normal=light-gray/black
color helptext=light-blue/black
color border=blue/black
#HEADING - position, text, colour
set HEADPOS=0001
#leave set to PAYLOAD so that you can use this file in the CUSTOM folder of the MPT Tool Pack
#green = 2  1=bright  102=bright green on black bgnd
set HCOLOUR=0102
#FOOTER - position, colour and text 24 is last line, set to 35 if no help text wanted
set HBTM=2413
# 0103=cyan on black
set FCOLOUR=0103
set HELPTEXT=HDD0 [F7]   Back [F8]   Reboot [F9]   Power Off [F10]
# Turn off menu numbers (blank or 0)
#set AUTONUM=0
# Don't ask for menu password (or can set password)
set pwd=
#MENU BOX and position cannot be changed
#CENTREHD does not work for text mode
#write HEADING and FOOTER HELP text
write (md)0x220+2 !BAT\necho -n -e -P:0000 $[0001] \x20                                                             \x20\necho -n -e -P:%HEADPOS% $[%HCOLOUR%]%CHPAD% %HEADING%\necho -e -n -P:%HBTM% $[%FCOLOUR%]%HELPTEXT%\n\0 > nul
initscript (md)0x220+2