Thursday, 21 November 2013

Defining fonts in grub4dos

Chenall's grub4dos versions have the ability to load a GNU Unifont hex file using the inbuilt 'font' command. Easy2Boot uses this feature to load the unifont.hex.gz font file.
It seems there are a few bugs with this and chenall is hopefully going to fix this very soon (see issue 160). [Edit] Use grub4dos v0.4.5c 2013-11-30 or later[/Edit].

The normal way to use this is to switch to graphicsmode and load the font file, e.g. a UTF-8 format menu.lst file like this can be used:

graphicsmode -1 800
font /unifont.hex.gz

title reboot (重启)
reboot

However, we can also define hex fonts within a menu. The following menu will work without needing to use the font command or use a unifont file:

# font demonstration

graphicsmode -1 800

title test grub4dos font (GGGgggGGG)\n reload the menu
configfile /menu.lst

title Reset to BIOS font (use left/right cursor keys to select this menu item)
font

title reboot (重启)
reboot

title halt (关机)
halt

# Define specific UTF-8 fonts just by adding them to the end of the menu.lst file

# 4 chinese glyphs
5173:10100810082000003FF8010001000100FFFE010002800280044008203018C006
542F:010000801FFC1004100410041FFC10001000100017FC24042404440487FC0404
673A:100011F011101110FD10111031103910551055109110111211121212120E1400
91CD:001000F83F000100FFFE01001FF011101FF011101FF001003FF80100FFFE0000
# g character - ASCII code 67 hex
0067:0000000000023A44444438203C42423C









Note that the four chinese characters are displayed correctly and also the letter g is in a different font.
Each glyph has a unicode hex index number - you can look them up on a chart here
Standard ASCII characters are in the Basic Latin (ASCII) chart.

The font command will overwrite any existing ASCII font with the font contained in the BIOS, thus selecting the 2nd menu item will cause the g to be displayed in the standard font but the four chinese glyphs will be unaffected (as they are not part of the BIOS font table).

Note: If you try this yourself using an October/early November 2013 version of grub4dos, you will find that the g character will not be changed due to a bug in grub4dos. Hopefully, chenall will release a new version to fix this issue soon.

This feature means that you can define your own special characters if you wish, without needing to use a hex font file. If you only need a few special characters, you can just use the relevant lines taken from the unifont.hex file (extracted from unifont.hex.gz).

For instance, you can redefine the letter g as a series of vertical lines using:

0067:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

As the hex byte AA is 10101010 in binary, we get 4 vertical lines per characters, like this:





Of course, you can use a different character code such as 0024 for $ rather than 67 for 'g'.

Note: The latest versions of Easy2Boot contain a variety of grub4dos font files for the standard 'Basic Latin' 0x20-0x7E characters.

Wednesday, 20 November 2013

Adding WinBuilder ISO files to Easy2Boot

If you have an ordinary WinPE ISO file on your Easy2Boot USB multiboot drive, you can make it automatically load the ISO file as drive Y: if you rename the file with a .isoPE or .isoPE01 file extension (more info here). However, PE ISOs are only mounted as a virtual drive when wpeinit runs, which for most WinBuilder PE builds is too late! So if you use a .isoPE extension for your WinBuilder PE ISO, you may not see all the Desktop icons (but the ISO will be loaded as drive Y: eventually by E2B).

Many WinBuilder builds have a \Windows\System32\winpeshl.ini file which typically runs some early Desktop initialisation utilities before the Easy2Boot unattend.xml has a chance to run and load the ISO as virtual drive Y: - e.g.

[LaunchApps]
MountPEmedia.exe
"hide /NOCONSOLE /SILENT /WAIT start.cmd"
"Shortcuts.exe -f %SystemDrive%\Windows\System32\Win7PE.cfg"
"PinTool.exe -debug %SystemDrive%\Windows\System32\Win7PE.cfg"
"X:\Program Files\PEShell\PEShell.exe"

Luckily (actually, probably luck had nothing to do with it!) most builds of WinBuilder have a special feature which will load the ISO file automatically as drive Y: on boot, if an .INI file is found.

For example, if you have made a recent WinBuilder Win7PESE ISO, just place a file in the root of the E2B drive called Win7PESE.ini with the path and filename of the ISO - e.g.

[IsoInfo]
IsoName=\_ISO\MAINMENU\Win7PE_x86.ISO


The filename may vary depending of what PE build you are using. The .ini file will cause the WinBuilder PE to load the ISO as drive Y: when MountPEmedia.exe runs. Consult the documentation for the exact INI filename that is required (click the yellow warning triangle that appears on the PE Desktop when drive Y: is not found).

Tuesday, 19 November 2013

System won't boot Easy2Boot from a USB Hard disk?

TGP1994 on reboot.pro wrote that he had a Dell Optiplex 7010. He had made an Easy2Boot (E2B) USB Hard drive and also an E2B USB 'Helper' Flash drive. The problem was that when both USB drives were connected, the Dell insisted on booting from the USB Flash drive and would not boot from the E2B USB Hard disk.

If you are using the E2B Helper+USB HDD combination, it would be useful if you could boot from either of them and still run E2B. To do this, just install grub4dos onto the USB Helper Flash drive and also copy the grldr file onto it (using RMPrepUSB). Then add a new menu.lst file (press F4 in RMPrepUSB) and add these lines:

echo Booting from the Easy2Boot Helper USB Flash drive...
find --set-root /_ISO/e2b/grub/menu.lst
chainloader /grldr
boot

This will allow you to boot from either one of the USB drives and run E2B. However, you will only be able to run Windows Install ISOs. If you use any function which uses the grub4dos partnew command (e.g. booting from a linux .iso file) this will not work because partnew makes a new partition on hd0 (the boot drive) and the ISO file must also be on the same drive. As hd0 will be the helper flash drive and the ISOs are on the USB HDD, partnew will not work. v1.23 and later may fix this issue.

Friday, 15 November 2013

Easy2Boot v1.17 with support for DOS .ISO files

Ashwani emailed me today to ask how he could get his Partition Magic ISO to boot correctly.
It turns out that this ISO boots via MS-DOS Floppy Disk emulation, it then loads the MSCDEX CD-ROM driver to give access to the files on the CD as drive S:.
This type of ISO is difficult to boot from successfully without modification, because there is no 'CD' for the CD-ROM driver to find when booting it as an ISO file from a USB drive. As a workaround, I have added support for the special .isoDOS file extension to E2B v1.17. This will copy the contents of the CD part of the ISO to a virtual floppy drive so that all the files are easily accessible from DOS.

In the case of this particular ISO, what Ashwani needs to do is install E2B v1.17 and then copy his DOS-based Partition Magic.iso file to the \_ISO\MAINMENU folder and change the file extension to .isoDOS.

What will happen when you pick this entry from the E2B menu, is that E2B will create a large FAT16 virtual floppy disk (fd0) in memory and then copy the files from the ISO to the virtual floppy.
When grub4dos boots, it does so via floppy emulation and so the virtual fd0 is shifted by the BIOS to fd1,  and fd0 becomes the floppy boot image which was on the ISO file boot sectors. Thus when DOS boots from the emulated floppy image on the ISO, it will be drive A: and the CD files will be found on drive B:.
When Autoexec.bat runs (or Config.sys), no CD will be found and there will be no drive letter assigned to the 'CD' and thus the ISO will probably fail to run any program automatically from a batch file.
However, if we look at the contents of the A:\autoexec.bat we can see that it runs MSCDEX to assign drive S: as the CDROM drive letter, changes to the S: drive and then runs either 'ghost.exe -nousb' or 'pqmagic.exe'.


So all we need to do is type:

B:
ghost.exe -nousb

to run ghost, or

B:
pqmagic.exe

to run partition magic.

The new E2B version can be found at the very bottom of the page of Tutorial 72a (as usual).

The .isoDOS file extension may prove useful for a variety of DOS-emulation based ISO files. If you want to, you can edit the startup files in the ISO to remove any cdrom drivers and use the drive letter B: instead for the 'CD' volume (instead of S: or whatever was used), then it will boot automatically directly from the ISO under E2B.

v1.17 also now has an option to suppress the checkaccess BIOS bug check on startup and also has modified code around the finding of the \autounattend.xml file (which hopefully has not broken Windows installs!).

Wednesday, 13 November 2013

Add Hirens 9.5 to Easy2Boot

I have added a new Tutorial so that you can add old DOS-based Hirens ISOs to Easy2Boot (or any grub4dos USB drive) here.

The Get_Boot_Files.cmd batch file is useful because it extracts the DOS boot image from any ISO and makes a 1.44Mb .bin file from it, which can be read by WinImage or ImDisk, etc as a floppy disk image. It also extracts the files from the ISO boot image for you, into a new folder.

The Tutorial is based on an original article I found here.

Monday, 11 November 2013

Easy2Boot - changing the font

Note: grub4dos has now been fixed and E2B v1.22 and later now contains dozens of different fonts which can be used by E2B simply by specifying the font file in your MyE2B.cfg file! This article is therefore now (2014) outdated.

Easy2Boot loads the unifont font file so that non-Roman characters can be displayed.
You may have noticed that the when this occurs during booting, the text changes from relatively bold characters to thin characters:



However, when a grub4dos menu is loaded using configfile, grub4dos changes the text back to bold.

It would be nice to have different fonts selectable in E2B and maybe also be able to select italic or bold fonts for the menus too. I am working on this, but for now, if you want to try using the thin font in your menus, you can try this workaround:

At the bottom of your \_ISO\MyE2B.cfg file  (which should start with !BAT on the first line), add these

two lines:

set gg=;;
set pwd=easy2boot %^gg% font /%grub%/unifont.hex.gz


This will cause all menus to be displayed in the thin font (except the Windows Install menu).

Let me know if you want to have this type of thin font as an option for all your menus.

P.S. You can change the line width and separate each individual menu entry by changing the lnspace variable value in \_ISO\MyE2B.cfg. The spacing between letters can also be changed using the wdspace variable. Here is what you get using a MyE2B.cfg file of:

!BAT
set gg=;;
set pwd=fred %^gg% font /%grub%/unifont.hex.gz
set wdspace=2
set lnspace=4
set topstart=2
set rstart=3
set noitems=18
set menuw=42
set bdwidth=1
set tophelp=20

Note that because the word spacing has been changed, it affects the menuwidth (menuw) setting because less characters will fit across the screen. The number of menu items is also affected if you increase the lnspace setting.



I would not recommend changing the wdspace value (keep it at 0) as this affects the menu title spacing at the top of each menu.


Sunday, 3 November 2013

Listen to Amateur Radio Hams using the internet!

When I was sixteen (many years ago now - I would have to print the year in Roman numerals to tell you what year it was!), I took the UK Amateur Radio Exam (RAE) after joining the Harwell Amateur Radio Club for a year or so and taking part in a 24hr Ham Radio contest stuck on the top of the cold and windy Chiltern Hills all night trying to keep awake! Unfortunately, I failed the exam by just 1 grade (I was in the middle of revising for and taking 10 GCSE O-levels at the same time, so I sort of had an excuse... and the RAE wasn't multiple choice like it is today!). If I had passed the RAE, I believe I would have been the youngest person to have become a licensed Ham in the UK (at that time). Shortly after that, my family moved from the Berkshire countryside into the middle of Oxford City and so I waved goodbye to my hand-made 102' aerial on it's 30' mast strung up to my bedroom window and attached via coax to my Trio ham radio receiver and self-built valve notch pre-amplifier... and never went back to Ham Radio ever again (sigh...).

Have you ever wanted to listen to Amateur Radio (aka Ham Radio) but didn't want the expense and bother of buying the equipment and erecting an aerial, etc? Well why not listen to it over the web?

You may have heard of SDR (Software Defined Radio).
A basic SDR system may consist of a personal computer equipped with a sound card, or other analog-to-digital converter, preceded by some form of RF front end. Significant amounts of signal processing are handed over to the general-purpose processor, rather than being done in special-purpose hardware. Such a design produces a radio which can receive and transmit widely different radio protocols (sometimes referred to as waveforms) based solely on the software used.


Well, if you connect an SDR PC to t'internet, you get a highly tunable radio that can be controlled by anyone on the web. The University of Twente in the Netherlands have made just such a thing available for us all here.
Twente - Wide-band WebSDR

1. Click here to go to the website - if you get a Security Warning, don't worry, it needs to run an app. -  so enable it to run.

2. Next scroll down the page until you see the cyan box for HTML5 and click the 'Click for test of the HTML5 audio' button - if it works then enable HTML5 for both Waterfall and Sound. This gives a better and more controllable display.

2. Next, type in your name or nickname in the log-in cookie box (optional).

3. You should see a moving waterfall display. The frequencies are shown along the X-axis. There is an Amateur band shown in green at 20m, so click on the dark green 20m text. This should move the yellow pointer to that position.
4. Now we need to zoom in for better control, so click on the 'Waterfall view - zoom in' button just below the waterfall graph until you have the whole 20m band in view. If necessary, click and drag the waterfall display across, so that the 20m band is in the correct position. If you zoom in enough, you will see some known station id markers appear - see below:
5. Now find a station in the green 20m band - start with one of the strong white ones and either drag the cursor to that position or use the Frequency adjust buttons (---, --, -, +, ++, +++) to move the frequency cursor. Make sure the AM button is clicked to start with.

6. When you start to hear a channel that sounds like a voice (but it may sound like mickey-mouse or Johnny Cash if a side-band is being used), then use the same Frequency buttons to fine tune for the strongest signal by looking at the signal strength bar:


7. Now we need to find out what type of transmission it is. If the voice sounds like it has been pitch-shifted, try clicking one of the LSB (Lower Side Band), USB (Upper Side Band) or other similar buttons to get the most intelligible sound. If you can hear more than one voice or have other interference, try narrowing the bandwidth using the 'narrower' button. If the signal is weak, try the 'wider' button to try to get as much of the signal as possible (without picking up other broadcasts). Amateur transmissions are not normally FM (Frequency Modulated), so you shouldn't need this unless you are listening to BBC Radio 3!

8. You can now try the squelch and autonotch check-boxes to see if it improves things.

9. Once you have found something and it is nice and clear, use the store button to save that frequency and all other settings. You can also record it using the 'Recording - Start' button.

Have fun!
Steve

P.S. OK, so it is nothing to do with USB, but you can get USB SDR receivers and with special software, hack them to make your own SDR - search for SDR on YouTube if you are interested or click here for a Hak5 video by 'Snubs' using a $20 dongle.

If you know of any other web SDRs or have anything to add, please add a comment.


Saturday, 2 November 2013

Add the CAINE ISO to your E2B drive

C.A.IN.E (Computer Aided INvestigative Environment) is a linux live distro. I downloaded the Caine4 for netbooks ISO after it was suggested to me by Paul M, as I had not seen it before. It's intended purpose is for Forensics and disk volumes are not mounted automatically and you can use the systemtray 'mounter' to mount volumes as read-only.
The netbook ISO downloaded was pretty large (1.8GB) and after copying it to the \_ISO\MAINMENU folder on my Easy2Boot 2TB WD Passport USB hard disk, it booted up fine on my Asus EeePC netbook (Intel Atom 32-bit CPU).
CAINE Boot Menu
Main CAINE Desktop

I haven't actually started to use it yet and investigate it's capabilities but it looks promising.

Tuesday, 29 October 2013

Easy2Boot v1.16 + DPMS2 now available

E2B v1.16 is the same code as 1.15e. Just an extra demo theme added for 'beep' and keeping the background displayed has been added to the \_ISO\docs folder.
I have also updated the link in Tutorial 72a for E2Bv1.16+DPMS2 mass storage drivers.
If you already have v1.15e there is no need to update.

Saturday, 26 October 2013

How to make your USB drive Write-protected under Windows

Many of you may be aware that recent versions of Diskpart (after WinXP) have the ability to set 'Read-Only' attributes on a disk or volume. I decided to investigate this feature a bit more thoroughly and this is what I have found. If you already know about this feature then don't stop reading, what I discovered may surprise you!

First, we have to distinguish between the two types that Windows separates 'disks' into - namely 'Removable' and 'Fixed'.

Now in the case of USB Flash Drives (UFDs), most of these are classed as 'Removable'. In the case of USB Hard Disks (UHDs) these are all (??) classed as 'Fixed' (or 'Local' in Explorer). RMPrepUSB will indicate which type of disk it is when you select it. Diskpart will list the types if you use the 'LIST VOLUME' command - you will see either 'Removable' or 'Partition'...

DISKPART> list volume

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0     E                       DVD-ROM         0 B  No Media
  Volume 1     I                       DVD-ROM         0 B  No Media
  Volume 2     G                       DVD-ROM         0 B  No Media
  Volume 3     D   HDD DRIVE_D  NTFS   Partition     10 GB  Healthy
  Volume 4     C   HDD DRIVE_C  NTFS   Partition    222 GB  Healthy    System
  Volume 5     Z   HDD1_500GB   NTFS   Partition    465 GB  Healthy    Pagefile
  Volume 6     F   SSD HARD DI  NTFS   Partition    111 GB  Healthy    Pagefile
  Volume 7     H   LEXAR JD     FAT    Partition     15 MB  Healthy
  Volume 8     J   USBPEN       FAT32  Removable   1992 MB  Healthy


We can list disks in Diskpart using;
LIST DISK
We can list volumes in Diskpart using:
LIST VOL
We can select a disk or volume using:
SEL VOL 8   or    SEL VOL J   or
SEL DISK 3
We can see what the RO status is using
DETAIL DISK or DETAIL VOL

Current Read-only State : Yes
Read-only  : Yes

Note that the Current Read-only State signifies the current state in Windows and not the state of the disk - for instance, if there is a physical write-protect switch on the USB drive which is set to 'Lock', then the Current Read-only State may be Yes, even if the actual disk state is write-enabled (Read-only : No).

Once we have selected a disk or volume, we can set or clear the Readonly attribute.

Attribute disk set readonly
Attribute disk clear readonly
Attribute vol set readonly
Attribute vol clear readonly

So under Diskpart we have two options when setting 'ReadOnly' status and we have two types of 'disk'.

Here is what happens in each of these 4 cases:

1. Type=Removable, Set Disk=RO
Diskpart makes a change to the Windows Registry - no change is made to any sectors on the disk.

2. Type=Removable, Set Volume=RO
N/A - Diskpart will refuse to run as the disk is removable.

3. Type=Fixed, Set Disk=RO
Diskpart makes a change to the Windows Registry - no change is made to any sectors on the disk.

4. Type=Fixed, Set Volume=RO
Diskpart makes a change to the Windows Registry AND changes the disk contents.
If the drive is an MBR type (not GPT) then all volumes are marked as write-protected.
The MBR and all sectors up to the Partition Boot Record are not protected by Windows however.
If you connect the USB drive to a different Windows system (even a WinXP system), you will not be able to copy files to any volume on the drive. This also applies to UFDs that appear as 'Fixed' disks to Windows.

Now you may be already aware of this behaviour. However, I decided to investigate what disk contents were changed in Scenario 4 above. This was quite easy using RMPrepUSB. I simply made a single 20MB FAT16 partition on a Lexar Jumpdrive UFD that had it's Removable Media bit flipped using the Lexar BooIt.exe utility so that appeared as a Fixed Disk, and then used the RMPrepUSB - Drive->File button to save an image of all sectors up to the end of the partition. I then used Diskpart to set the Volume to Read-only and saved another image and then compared the two images.

The results were rather surprising. Diskpart had completely overwritten the contents of LBA2 (the 3rd sector) of the UFD! It had written 24 bytes of data followed by 488 bytes of 0's to fill the sector. Even if you have boot manager code in this sector, it is overwritten by Diskpart! Luckily this does not seem to stop grub4dos from booting if it was already installed to the MBR and pre-PBR disk sectors.

The bytes that were written were: 
0000 A2 A0 D0 EB E5 B9 33 44 - 87 C0 68 B6 B7 26 99 C7  ¢ Ðëå¹3D ‡Àh¶·&™Ç
0010 00 00 00 00 00 00 00 10 - 00 00 00 00 00 00 00 00  ....... ........
0's etc. etc.

These bytes don't seem to vary, even when Diskpart sets Volume RO status on a 2TB NTFS multi-partition UHD.

However, I found that if you write-protected a 'Fixed' disk Lexar UFD in this way and then 'flipped' the Removable Media Bit to make it a 'Removable' drive again, Windows XP-Win8 no longer treats the volume as write-protected. So this special read-only marker sector only works on 'Fixed' disks and not on 'Removable' disks. :-(

So what if we format a 'Fixed Disk' UFD with RMPrepUSB, install grub4dos to the MBR, and then 'blat' LBA2 with the 'write-protect' sector data... Yep - works fine! The volume is write protected and we cannot copy files to it. If you try to format it in Windows then it won't format it:



However, as the MBR and early sectors are not protected by Windows, we get a strange result if you try to re-partition it using RMPrepUSB. RMPrepUSB erases the early sectors, but then Windows prevents it from erasing the Partition Boot Record and RMPrepUSB returns an error. The volume, PBR and all files are still present. However, if you unplug the USB drive and re-connect it, because LBA2 is now wiped by RMPrepUSB, the USB drive is no longer 'Read-only' and so we can partition and format it using any utility.
You get similar strange results in Disk Manager, which can seem to unformat the partition and return it to 'RAW' status, but not re-format it until the Read-only status has been removed using Diskpart!

So it seems we cannot use this Diskpart Attribute feature to write-protect Removable UFDs... what a pity! If however, you have a UFD that is of the 'Fixed' disk type or you 'flip-the-RMB-bit' using a utility like BootIt (which only works on some Lexar and Netac UFDs and a few other types), then you can have a protected volume using this feature.

P.S. If you have a 'Removable' USB drive, you can hide a partition containing your files by making a drive with two Primary partitions using Easeus Partition Master and then use the RMPrepUSB - Ctrl-O feature to swap Windows access between the two partitions. This does not stop someone from re-partitioning it however and modern Win10 systems can now access all partitions on a Removable drive anyway.

You can write-protect some SD cards and Flash drives if you use the correct special factory utility to reprogram it. This process is not without risk however, and you could end up 'bricking' your flash drive or SD card. You must always use the correct tool. See here.

File Permissions (NTFS)

To protect all files from alteration under Windows, you can change the Windows file permissions on all files on a USB drive.

First select the USB drive in Windows Explorer - right-click and select Properties and then the Security tab. Now click the Edit button and untick the Full Control, Modify and Write boxes - then click on OK. All files on the drive will have their permissions changed. Windows can still add new files but cannot modify or delete any of the existing files. Unfortunately, these permissions are ignored by (most?) linux distros and grub4dos.



Note: If you have a USB HDD with multiple partitions, you can hide any of them from Windows (not linux) by using BootIce - Manage Part - select partition - Hide. When you next connect the USB drive the partition will be hidden. if you unhide it with BootIce, it will immediately be unhidden.

Further reading: 'How to fix Write-protected Read-only drives and SD cards'


Write-Protect NTFS drives

NTFS Drive Protection is  small Windows executable that can change the NTFS permissions on an NTFS volume. You can use this to write-protect a USB drive, but it also allows for some folders on the drive to be read/write whilst all others are read-only.



Keep this on yout USB drive and run it just before you connect the USB drive to an infected system.



E2B v1.15d

In v1.15c, if you reloaded the main menu, then the hotkey codes like ^Ctrl+B etc were displayed in the Menus and hotkeys didn't work. This is now fixed in v1.1d.
Also I found FASTLOAD was not working. This also now fixed in v1.1d

Thanks to Krishna for reporting the bug.

v1.15e will also beep when the FASTLOAD Main menu loads if beep is set.

Thursday, 24 October 2013

Easy2Boot v1.15c

v1.15c includes a few tweaks for people who don't like the grub4dos messages during E2B boot-up.

patchme has been revised so that you can now optionally disable the grub4dos version header at the top of the screen which briefly appears whenever grub4dos loads a new menu file - previously, for a brief few milliseconds, you may have noticed this text at the top of the screen (or part of it).

GRUB4DOS 0.4.5c 2013-10-17, Mem: 636K/1022M/0M, End: 34C2AB

The new version of patchme will remove (optionally) this message and all of the other grub4dos startup messages. This means that a system can boot to E2B with no text messages at all once you have patched it with patchme.

The other changes are to do with startup messages too. Using settings in your MyE2B.cfg file, you can enable the background image to be displayed as soon as it is loaded - any progress messages will be displayed over the top of the background (the only drawback is that the screen won't scroll properly if the cursor gets to the bottom of the screen - so if you have lots of files, set redir=> nul to prevent them all from being listed). An example is shown below (the console text has been set to white in the MyE2B.cfg file in this case):


Alternatively, you can just have a pure blank screen (of whatever colour you have set the standard console background colour too, default=black) right up until the Main menu is displayed. Except for the first few milliseconds, no cursor is displayed either.

As usual the Sample_MyE2B.cfg file contains all the settings details. Here are a few of the relevant lines from it:

#Examples
### Use this line for a blank screen startup with no progress messages
### Tip: use patchme to prevent grub4dos messages (see \_ISO\docs\PatchMe_readMe.txt)
#call Fn.70 0 ;; clear ;; call Fn.5 0 128 ;; set redirp=> nul ;; set redir=> nul
#
### Use this line to display the background image as early as possible with a few progress messages
#call Fn.70 3 ;; set redir=> nul 
#
### Use this line to display the background image as early as possible with no startup messages except an initial quick 'Please wait...' message
#call Fn.70 3 ;; set redir=> nul ;; set redirp=> nul ;; debug -1 ;; pause --wait=1 Please wait... ;; debug 0

Experiment with any one of these three options to see which one you like the best for your E2B project.

Note that you need v1.15c for these to work properly - it can be found at the bottom of Tutorial 72a as usual.



Wednesday, 23 October 2013

bump - please update to E2B v1.15b

Just in case you subscribe to this blog, E2B v1.15 has been updated a few times since yesterday and is now at 1.15b. It includes a bugfix for FASTLOAD which was broken in v1.15.

Tuesday, 22 October 2013

Easy2Boot v1.15b available (bugfixes)


  • bugfix - Krishna reported that it no longer works if you have 2 partitions and swap them over. Now fixed.
  • bugfix - payload files in the \_ISO\AUTO folder were not enumerated below the first folder level. Now fixed.
  • feature - Menus should now not show the menu item number at the top right of each menu when using the cursor keys.
  • bugfix - PTN2_Menu.mnu in \_ISO\docs\Sample Menu files now checks for the non-E2B partition even if you have swapped partitions over using E2B_PTN_SWAP.mnu to change over the two partitions.
Please update to the new version. Sorry for the bugs!

Few more bugs found - 1.15b is now the latest!

Monday, 21 October 2013

Easy2Boot v1.14 available


  • Just some extra variable tweaks added for those of you that really want to play around with the menu structure!
  • Also added a 'beep' feature - when the Main menu loads, you can make it beep 1 to 3 times by setting the beep variable in your MyE2B.cfg file.
  • If only one XP ISO, or only one Vista/7/SVR2K8 xml file is found, then it will now be automatically selected for you so you are not presented with a choice of 1 thing!
  • Menu numbering can be turned off (AUTONUM=0)
  • more global hotkey examples added to Sample_MyE2B.cfg
  • New WinInstMain theme template example added to docs folder
As always, look in the Sample_MyE2B.cfg file for all the new tweaks and settings.
The web page for E2B (72a) has been updated to match v 1.14 features.

Let me know if you find any bugs!

P.S. Some bugs were found. Now v1.15 is available!

cheers
Steve

Sample_MyE2B.cfg  v1.14


!BAT
# IMPORTANT: This file MUST begin with !BAT

# PLEASE READ www.rmprepusb.com - Tutorial #72a for full details

# --- THIS FILE CAN BE COPIED TO \_ISO\MyE2B.cfg and then edited to change E2B ---

#      To use your own settings, change the language, words, startup behaviour, etc.
#      copy this file to MyE2B.cfg
#
#
# HELP USING THIS .CFG FILE
#   # symbols comment out a line - do not remove!
#   ### means you can uncomment and use ### lines - they should contain a command
#
#   e.g.
#       #  Auto menu      - this should not be uncommented - do not delete the # symbol
#       ###set DEFM_MNU=0 - this can be uncommented and changed by the user


# If you want to get rid of any early startup messages displayed by E2B use clear
### clear

# set cursor off the screen so no text or cursor is seen for a while (cursor set to column 0  row 128!)
### call Fn.5 0 128

### AUTONUM=0x0000   sets autonumbering off, 0x2001 sets numbering on with a space (default), use 0x2d01 for hyphen 
#set AUTONUM=0x2001

#If you really want to use a gfxmenu then specify the 'message' file here
#There are many gfxmenu limitations include (if error goes to text mode, no timeout or default option, number of isos cannot be displayed)
#Place your gfxmenu file in the /_ISO folder - see Tut 72a for details.
set GFX=
###set GFX=message

# Text-mode menu (no wallpaper) - suppresses graphicsmode (must use 'none')
# Try these settings if using text mode - set HBTM=2301 set HCOLOUR=0104 set FCOLOUR=0104
# Try these text colours - color normal=0x%lgrey%%%lcyan%   highlight=0x%cyan%%%red%  helptext=0x%lgrey%%%yellow%  standard=0x%black%%%lcyan% border=0x%red%
###set GFX=none

#Turn off alphabetical sorting of menu entries (speeds up enumeration of menus slightly)
###set NOSORT=1

# ------------ HEADING AND FOOTER TEXT COLOUR ---------

# HCOLOUR sets the colour of the HEADING and FOOTER TEXT text 
# HCOLOUR=ABCD specifies the text colour  [BLINK|BRIGHT|BACKGROUND|FOREGROUND]
# A=0/1 1 = BLINK text (does not work under VM)
# B=0/1 1 = BRIGHT colour for foreground text
# C=0-7 = BACKGROUND colour - transparent if graphics mode so has no effect!
# D=0-7 = FOREGROUND menu text colour
# Colours parameters are: 0=black/grey 1=dark blue, 2=green, 3=aqua, 4=dark red, 5=pink, 6=yellow/brown, 7=grey/white.
# e.g. 0133 is non-blinking bright aqua text (on a dark aqua background if not in graphics mode)
set HCOLOUR=0133
set FCOLOUR=0133

# set the version number (is set by E2B already) - used in HEADING (see %VER% below)
###set VER=

#                  --------- MENU HEADINGS -----
#
# Headings must be between two \x20 and between 58 and 78 characters long - but not more than 78 or will get line wrapover if in 640x480 mode
#                          1         2         3         4         5         6         7         8
#              \x202345678901234567890123456789012345678901234567890123456789012345678901234567890\x20
#                                                                           XXXXXXXXXXXXXXXXXXX  <- text must end in this area!
#
set    HEADING=\x20              EASY2BOOT V1 - MAIN MENU  (%VER%)                       \x20

#Heading and Help for DIRECT AUTO menu
set HDRAUTO=DIRECT BOOT Menu  [D] (\_ISO\AUTO) 
set HDRAUTOH=Boot any file in the \_ISO\AUTO folder and below.
if not "%GFX%"=="" set HDRAUTO=DIRECT BOOT Menu      (\_ISO\AUTO)

# WINDOWS INSTALL menu
set   HDG_WIN=\x20            --- INSTALL WINDOWS FROM AN ISO ---             \x20
# set the Default menu entry to be pre-selected in the Windows menu
set  DEFM_WIN=0
# OTHER WINDOWS MENU HEADINGS
set HDG_VISTA=\x20                --- Windows Vista install ---               \x20
set   HDG_2K8=\x20               --- Server 2008 R2 install ---               \x20
set     HDG_7=\x20                   --- Windows 7 install ---                \x20 
set     HDG_8=\x20                   --- Windows 8 install ---                \x20
set  HDG_2012=\x20                  --- Server 2012 Install ---               \x20

# HELP TEXT AT BOTTOM OF MOST MENUs
# use \x20 for no text at the bottom of the menus - e.g. set HELPTEXT=\x20
set HELPTEXT=HDD0 [F7]   Back [F8]   Reboot [F9]   Power Off [F10] www.RMPrepUSB.com

#  ----- GRAPHICS MODE AND WALLPAPER -----
# set graphics mode - use 640, or 800 or 1024 - or specify full mode - e.g. 800 600 24
# 640 and 800 is supported by the default background bitmap
set GMODE=800
set MYWBMP=/_ISO/mybackground.bmp
set MYWBMPGZ=/_ISO/mybackground.bmp.gz

# -------- MENU COLOURS -------

# Colour pairs are Text/Background - i.e cyan/blue = cyan text on blue background
# Use black if a transparent background is required for menu highlight background - e.g. highlight=red/black
# 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.
#  normal    = normal menu text
#  highlight = highlighted menu text when a menu entry is selected
#  helptext  = the colour of the title help text shown just below the menu box
#  standard  = the console background and text colours (e.g. when listing files)
#  border    = the colour of the border of the menu box

color normal=light-cyan/black highlight=red/cyan helptext=yellow/black standard=light-cyan/black border=light-gray/black

# You can also set a full colour value 24-bit as 0xRRGGBB, the value must be larger than 0xFF to work correctly however
# the background colour will be set to black (transparent in graphics mode menus)
# See http://www.rapidtables.com/web/color/RGB_Color.htm
# Red=0xFF0000   Green=0x00FF00   Blue=0x0100FF  (must be larger than FF so add 01 to red!), Yellow=0xFFFF00, White=0xffffff, Brown=0x994c00
### color border=0xFF0000
### color normal=0x777700
### color highlight=0xffffff

# ----- MENU POSITION ---

# If using 640 or 800 x-resolution - the settings below will change automatically depending on GMODE value set above
# word_spacing line_spacing border_width top_help number_of_items_in_menu top_start menu_width right_start_pos_of_menu
# use tophelp=topstart+noitems for menu help text just under menu box
set wdspace=0
set lnspace=0
set topstart=2
set rstart=3
set noitems=18
set menuw=62
set bdwidth=1
set tophelp=20

# -- FOOTER HELP TEXT POSITION ---
#Bottom Easy2Boot HELPTEXT position YYXX
set HBTM=2800

# --- AUTOMATICALLY CHANGE border parameters if 800x600 set, else don't change -----
if "%GMODE%"=="800" set noitems=24
if "%GMODE%"=="800" set tophelp=26
# if in 800 hres set, put bottom help text lower down - 36 lines if 800 mode
if "%GMODE%"=="800" set HBTM=3501

#   ---- PASSWORD PROTECTION -----

#The line below will set a password of 'easy2boot' to stop users editing the menus accidentally (encrypted)
#You can use en encrypted md5 value or a plain text value (see Tutorial 72a for details)
#If YOU want to edit the menus, press p and then enter the password (you can use an unencypted password like this: 'set pwd=fred')
set pwd=--md5 $1$1$okAQ3AJUdhqf3TVrwKvJP1
###set pwd=fred

:mpwd
#If you want to set a Master password for Easy2Boot to prevent anyone from using it 
#(e.g. 'fred') uncomment and edit the following 2 lines (you can use --md5 format if you wish)
###password fred || echo -e \x20WRONG PASSWORD! && goto :mpwd
###echo

#To reboot if the password is wrong, change        goto :mpwd    to     reboot

#Tip: For better security, use 7Zip to compress this file to GZip format (keep the filename as MyE2B.cfg) or use lzma.exe (See Tut 72a for details)
# and set it's file attribute to 'Hidden'.

# ---- KEYBOARD TYPE -----
#set which keyboard you are using (one only!) - see the KBD_xxxx.g4b files in the grub folder if you want to modify the key mapping
###set KBD=KBD_AZERTY.g4b
###set KBD=KBD_FRENCH.g4b
###set KBD=KBD_GERMAN.g4b
###set KBD=KBD_ITALIANO.g4b
###set KBD=KBD_JAPAN_106.g4b
###set KBD=KBD_QWERTY_UK.g4b
###set KBD=KBD_QWERTZ.g4b
###set KBD=KBD_SPANISH.G4B
###set KBD=KBD_QWERTY_UK.g4b

#  ----- REDUCE MEMORY USAGE -----
#This disables the loading of batch file modules into memory for faster execution (so MOD=1 may slower)
#if too many files or variables cause grub4dos to crash then uncomment the line
###set MOD=1

# SUPPRESS STARTUP FILE ENUMERATION MESSAGES from AD2FMM.g4b, AUTOMN.g4b, etc.
###set redir=> nul

# SUPPRESS E2B MENU.LST STARTUP MESSAGES (not recommended)
###set redirp=> nul

# If file extension is .ISO ask user how to run it (e.g. run as if .ISOPE or .ISOWINVH, etc.)
# Use if you have a Zalman Virtual CD USB HDD caddy and you want to keep all .iso files as .iso (tip: use a .txt file with a help entry to remind you which one works best!)
### set ISOASK=1

# If DEFMENU=0 then the '0 Set default menu entry' menu item in the Main menu will not be listed
### set DEFMENU=0

# If NOUNIFONT=1 then the unifont font file is not loaded (to save time) but only ASCII characters will be displayed
# You can then delete the 1MB \_ISO\e2b\grub\unifont.hex.gz file if you wish
### set NOUNIFONT=1

# If NOF7HD is set then the Boot from HDD0 F7 menu entry is suppressed in all menus (delete MAINMENU\ZZZF7BootHdd.mnu if not wanted in Main menu)
### set NOF7HD=0

# If the NOF8B is set then the Windows menu will not display F8 Back to Main Menu (delete MAINMENU\ZZZF8ReloadMenu.mnu if not wanted in Main menu)
### set NOF8B=0

# If NOF9R is set then the F9 Reboot menu item will not be listed in any menu (remember to change HELPTEXT too)
### set NOF9R=1

# If NOF10H is set then the F10 Power Off/Halt menu item will not be listed in any menu (remember to change HELPTEXT too)
### set NOF10H=1

# If NOFLMENU is set then the Refresh FASTLOAD cache Main menu entry will be suppressed
### set NOFLMENU=1

# NOWMENU causes a Windows Install sub-sub menu to return back to the Main menu rather than return to the Windows Install menu
### set NOWMENU=1

# ---- GLOBAL HOTKEYS (applies to all menus) ------

# clear all global hotkeys and reload the hotkey program (only really useful in other menus) 
### ()/%grub%/hotkey -u > nul ;; ()/%grub%/hotkey > nul

# Program hotkeys to work in ALL menus - no menu entry is required. Some examples below
# add global hotkeys - examples only - use ;; or && to separate commands
### ()/%grub%/hotkey [F9] "reboot" > nul
### ()/%grub%/hotkey [F10] "halt" > nul
### ()/%grub%/hotkey [Ctrl+F9] "clear ;; echo \nLoading Windows menu... ;; configfile /_ISO/e2b/grub/menuwininstall.lst" > nul
### ()/%grub%/hotkey [ctrl+f7] "clear && echo $[0004] \n\nPress a key to reboot\n && pause && reboot" > nul
# Set hotkey for FASTLOAD Refresh - only use if /FASTLOAD.YES is present
### if exist (bd)/FASTLOAD.YES ()/%grub%/hotkey [Ctrl+R] "clear && echo REFRESH > /FASTLOAD.YES && configfile /%grub%/menu.lst" > nul
### ()/%grub%/hotkey [F8] "configfile (md)0xa000+0x50" > nul
### ()/%grub%/hotkey [F8] "configfile (bd)/%grub%/menu.lst" > nul

### clear only one global hotkey setting (can be used in .mnu files or .hdr and .lst files - e.g. MenuWininstall.lst)
### ()/%grub%/hotkey [F9] > nul

# Information: \_ISO\menu_defaults.txt will fix which initial main menu default entry will be highlighted and the timeout in seconds.
# Only use if you set DEFMENU to suppress the 'Set default menu entry'
# e.g. use these 3 lines for the first menu item as default and no timeout 
#      (to prevent the menu number being displayed at the top of the screen add debug 0 to the file)
### # fix the default entry and timeout (debug 0 prevents menu item number at top right from being displayed)
### default 0
### timeout -1
### debug 0

# Beep when Main menu loads, values 1, 2 or 3 only (only works if internal speaker fitted to system)
### set beep=3


Joke: 
Q: What did John McEnroe say to Padfoot at the Hogwarts tennis courts?
A: 'You cannot be Sirius!'



Sunday, 20 October 2013

beep! beep! (in grub4dos)

I had a request today from a blind person who wanted the grub4dos menu to beep when it loaded so that he would know when the countdown timer had begun. He was following my 'Tutorial 89 - Automated Windows partition backup\restore boot menu using CloneZilla' and wanted to be able to hit F4 and automatically restore his system.

Unfortunately not all hardware is fitted with a small internal speaker or internal 'beeper'. Most PCs are however - this is the thing that you may hear beep when you switch on your PC or it may beep several times if you have dislodged the DIMM memory cards!

Assuming that your PC does have an internal beeper, we can make it beep by sending a Ctrl-G character to the 'console'.

In grub4dos, we can use the internal function Fn.2 to send Ctrl-G to the 'display' as follows:

call Fn.2 7

This will work if you place it at the top of your menu before any graphicsmode or splashimage calls are made, because the display must be in low-res text mode (CGA) for this to work. So if you want to try this make sure you type graphicsmode 3 first if you are already in hi-res mode after loading a hi-res background bitmap! Of course, as this is a hardware 'beep', it won't work in an emulator or VM either.

We can flash the screen white and beep 3 times using the code below, as long as it is at the start of our menu.lst file (all one line).

color standard 0xF1 && clear && call Fn.2 7 && call Fn.2 7 && call Fn.2 7 && pause --wait=3 > nul && color standard 0xf && clear

If you don't want to see a flashing cursor use:
call Fn.5 0 128 
after the first 'clear' command, this sends the cursor off the screen to row 128! It will also mean that if the calls to Fn.2 produces any odd characters, they won't be seen.

However, once we have switched to a hi-res graphics mode, this trick of sending Ctrl-G to the 'display' will no longer work. Instead we will have to call the BIOS directly to output Ctrl-G to the console.

We can do this using the nice little grub4dos executable 'bios' from Chenall (download the bios.zip from here).

To make 3 beeps, each one second apart in any resolution screen mode, we can use this (assuming the bios executable is in the root of the drive):

/bios int=0x10 eax=0xe07 ebx=0x0 > nul
pause --wait=1 > nul
/bios int=0x10 eax=0xe07 ebx=0x0 > nul
pause --wait=1 > nul
/bios int=0x10 eax=0xe07 ebx=0x0 > nul

Most notebooks and many 'All-in-One' PCs are not fitted with an internal speaker though, so we can't make an annoying noise on every system that we boot from...



Friday, 18 October 2013

Easy2Boot - How to add specific Win7/8 Install ISO entries to the E2B Main Menu

Recently, I was asked if E2B could just jump straight to the Windows menu as he just wanted to use an E2B USB Flash drive for Windows installs. He also wanted to have the different individual ISOs listed in the Main menu.

The best way to just show a 'Windows Install' menu is to de-populate the Main menu by removing all the \_ISO\MAINMENU\*.mnu files that you don't want to be listed in the Main menu, and then add one or more .mnu files for your specific Vista/7/8 Windows Install ISO files using the type of menu entry described in my E2B Tutorial page here (or see below for an example). You can also add the Win XP options too.

You can also specify an XML file using a .mnu file.

In this way we avoid the Windows sub-menus and just use the Main menu. The \_ISO\MAINMENU\ZZWindowsInstall.mnu file is the one responsible for the Windows sub-menu entry in the Main menu, so this can be removed if you don't want it in the Main menu.

If you remove the files and folders in the other \_ISO\xxxx folders, then the DOS, BACKUP and UTILITIES, etc. menus won't be listed in the Main menu as only populated folders are listed. Other entries in the Main menu (set default, F8-10) can be disabled by using a MyE2B.cfg file (see the Sample_MyE2B.cfg file for the available options - use v1.13 or later!).

An example of a .mnu file is shown below:

# Use this for Vista/SVR2K8R2/Win7 ISOs
iftitle [if exist /_ISO/WINDOWS/Win7/Win7_32_SP1.iso] Install Win7 SP1 32-bit \n Install from the ISO
set MFOLDER=/_ISO/WINDOWS/Win7
set ISO=Win7_32_SP1.iso
/%grub%/RunVista.g4b  Win7
boot

# use this for Win8/8.1/SVR2012 ISOs
iftitle [if exist /_ISO/WINDOWS/Win8/Win8.1_32.iso] Install Win8.1 32-bit \n Install from the ISO
set MFOLDER=/_ISO/WINDOWS/Win8
set ISO=Win8.1_32.iso
/%grub%/RunWin8.g4b  Win8
boot

iftitle [if exist /_ISO/WINDOWS/Win8/Windows_8.1_EN-US_x86.ISO] Install Win8.1 32-bit \n Install from the ISO
set MFOLDER=/_ISO/WINDOWS/WIN8
set ISO=Windows_8.1_EN-US_x86.ISO
set XML=
# Specify XML file in MFOLDER folder (e.g. Win8\ has\ spaces\ in\ name.xml)
# OR to choose XML or Product Key, comment out next line
set XML=Sample.xml
set NOWMENU=1
/%grub%/RunWin8.g4b  %MFOLDER% %XML%
boot


Read more: http://www.easy2boot.com/configuring-e2b/add-windows-install-isos-to-the-main-menu/

Have you tried WinMerge?

WinMerge is great for comparing source code and other text-based files (like E2B files!). It is similar to WinDiff but better, IMHO!

If you have two different versions of a bunch of files and folders, WinMerge will list all the different files for you. Then double-click on the file and it will display the two versions of the file in two side-by-side Windows and highlight the differences. You can copy individual lines from one file to the other or just copy the whole file to the other folder. It works on all files and so will show non-identical binary files too.

It is great for comparing two versions of E2B (or any text-based files).
If you download the latest version of E2B to a folder and then compare that folder with your E2B USB drive, it will highlight the changes and you can decide what to update and what to leave alone (or just copy over a few lines inside a file).

A must-have for anyone who works with code source files or wants to compare two different versions of a bunch of files!

Easy2Boot v1.13

There were some small issues with v1.12 like pausing if a gfxmenu was loaded, global hotkeys not being active on all menus and the NoF8B variable not suppressing the F8 entry in Vista/7/8 menus. The new sample theme TextMinimal has also been changed.
Please update to v1.13!
See here for the latest version.

Thursday, 17 October 2013

Easy2Boot v1.12 available

Changes are:
1. If E2B boots as a floppy disk, grub4dos 4.6.a is then loaded which has USB drivers and may treat the USB as hd0 and so work as the great BIOS god in the sky intended!
2. 100K spaces.txt file now removed as no longer required.
3. Global hotkey function added using chenall's great new hotkey version - you can define hotkeys without needing to have a  menu entry for it. See \_ISO\Sample_MyE2B.cfg for details.
4.  Warning message shown if an .iso file is not contiguous.
5. Fix for .iso files hanging - in previous version some HP systems hang when booting an .iso file - this was due to the loading of a firadisk floppy disk image in the E2B QRun.g4b code which seemed to cause the problem, so that line has now been removed (thanks to Colin for reporting and debugging with me to find this issue)
6. Startup message suppression using redir and redirp improved - can now have silent startup.
7. NOF7HD variable will suppress Boot from hd0 menu entries.
8. NOF8B variable will suppress the 'Return to Main Menu [F8]' menu entry in the Windows menu (delete MAINMENU\ZZZF8ReloadMenu.mnu if not wanted in Main menu).

See here for this version.

If you update your version to v1.12, you can delete the \_ISO\e2b\grub\spaces.txt file as it is no longer required.

Tip: If your system has slow USB boot speeds, try using the latest version of grldr (get file from \_ISO\e2b\grub\grldr_46a and copy to root of E2B drive and rename to grldr).

If you try this new v1.12 version of E2B please let me know if it works for you (better or worse) or if it has a problem. It should look the same as the previous version but work on more systems and report any errors better. I will leave v1.11 on the site so you can go back to it if there is a problem.

If you want to replace \grldr with the 0.4.6 version, please give it a try. As it is new, I have not fully tested it...

Tutorial 72a Easy2Boot v1 web page has been updated to add v1.12 features. For example, I show how to just skip the Main menu and show the Windows Install menu on startup.

cheers
Steve

P.S. There were a few small issues with 1.12 so please upgrade to 1.13!


Saturday, 12 October 2013

Swap partitions in Easy2Boot

In my previous blog entry I described how you could create a USB Flash drive with two partitions. The E2B menu will work when it is on the 2nd partition and run linux ISOs, etc. but the E2B partition will be ignored by Windows and thus not visible to the user.

However, this also means that Windows based Operating Systems, once they have booted from the USB drive, will not be able to see any files on the 2nd (E2B) partition. This means that Windows Vista/7/8 Install ISOs will not work because they won't see the AutoUnattend.xml file on the 2nd (E2B) partition.
Also, several versions of Windows PE, once they have booted, will try to access files and folders on the boot drive. A typical example of this is MiniXP on the Hirens Boot CD and spin-offs such as DLC.

Apart from copying these files (AutoUnattend.xml and \HBCD folder, etc.) to the 'user' visible partition, the other alternative is to swap partition 1 with partition 2 before we run Hirens or the Windows Install ISOs.

This can be done by adding a .mnu file to E2B.

I have added E2B_PTN_SWAP.mnu to the \_ISO\docs\Sample mnu Files folder in the E2B download files. Just add this .mnu file to your \_ISO\MAINMENU folder.

You should now see a new menu entry in your menu. If Easy2Boot is detected on the first partition then the menu entry will be
  • Hide E2B Partition 
If Easy2Boot is detected on the 2nd partition, then the menu entry will be:
  • Unhide E2B Partition
When you run the menu entry, it will swap over ptn1 and ptn2 and then reload the main menu.

So before running a Windows Install you can Unhide the E2B partition and then Hide it again afterwards. The same applies when you want to run Hirens MiniXP or MiniWin7.