How e2b works

Содержание:

Make an E2B drive

  • If possible, use a large (at least 16GB) and fast USB 3 Flash drive (any SanDisk Extreme but avoid the SanDisk Go as it is too slow!). USB Hard disks and SSDs can also be used.
  • Download and run the .exe (self-extracting file) (it runs Make_E2B.exe) to make an NTFS E2B drive (if your language+keyboard combination is not listed, click on the Make_E2B_USB_Drive.cmd wrench\spanner button instead of the big red button). Use a Windows 10 system if using a USB FLash rive.
  • E2B uses two partitions, 128GB max for Ptn1, and a smaller Ptn2. Make_E2B.exe can make a larger second partition for you. Keep the E2B Ptn1 size below 128GB for best BIOS compatibility due to a commonly found USB BIOS bug which cannot access files past 128GB on USB drives.
  • E2B v2 can add a second partition and menu system (grub2 agFM) for UEFI-booting (optional). Ventoy can also be added (optional).
  • Check that your E2B MBR\Legacy menu works by using the green QEMU button or run \QEMU_MENU_TEST (run as admin).cmd from the E2B drive.
  • Now simply copy over your payload files/ISOs (see below) to one of the menu folders under \_ISO.
  • For UEFI booting, add agFM to the second partition — or copy .imgPTN files to the E2B drive and then select one of them before you can UEFI-boot. You can make .imgPTN files using the MPI Tool Kit. .imgPTN files must be contiguous.
  • You can add your own folders and files, e.g. \MyFiles\.
  • Press F1 in the E2B Main menu for help.
  • Run \E2B Launcher.exe to help you use the included scripts and utilities which are already on the USB drive.

.imgPTN files and UEFI booting

All UEFI systems will boot from a FAT partition as long as the correct .EFI boot file is present. UEFI booting does not use the MBR or PBR sectors on a USB drive or run any sector boot code. Easy2Boot can replace the Easy2Boot partition entry (e.g. an NTFS partition) with a partition entry which points to a partition image file (an .imgPTN file).

An .imgPTN file is a sector-by-sector copy of a whole partition. E2B will replace the partition table on the USB drive with a single partition table entry which points to the .imgPTN file. 

E2B USB drive — before switching      (FAT32, exFAT, ext or NTFS E2B USB drive)
The example 2.5GB .imgPTN file is at about the 6GB position on the J: volume
 

 After selecting the .imgPTN file in E2B

Once this is done, the E2B drive appears as a single FAT32 (or NTFS) partitioned drive. If it is a FAT32 partition and contains UEFI boot files then a UEFI BIOS will boot from it in UEFI mode. If you boot from it in MBR\CSM mode, the grub4dos menu will allow you to restore the original E2B partitions and thus return it to it’s original state (or you can boot from the image in MBR mode).

Examples:

E2B USB drive in normal E2B MBR mode:

After selecting a .imgPTN file from the E2B menu which has been formatted as FAT32  in E2B menu (CSM mode):

After selecting a .imgPTNLBA23 file from the E2B menu which has been formatted as NTFS (CSM mode):

 

Using two partition image files:

If you have Ubuntuv1.imgPTN and another partition image named Ubuntuv1 in the same folder, we will get this arrangement:

 

If you have Ubuntuv1.imgPTNLBA23 and another partition image named Ubuntuv1 in the same folder, we get:

 

In this way, we can boot to any bootable image. If you have a USB Flash drive that is bootable, you can easily make a .imgPTN file from it and add the file to E2B. You can add 100’s of bootable images (including FAT32 UEFI-bootable images) to your E2B USB drive!

When you select a .imgPTN file from the Easy2Boot menu, it will replace the current partition table with one for the .imgPTN file. This requires you to boot in MBR\CSM mode first, however you can use the SWITCH_E2B.exe Windows utility to ‘switch’ partitions under Windows, or boot in MBR\CSM mode using QEMU or VirtualBox.

The MakePartImage.cmd file not only copies the files from the source (e.g. ISO), but if the source contains isolinux or grub configuration files, it looks for any references to ‘labels’, or ‘UUID’ or ‘CD’ references, etc. and changes them to work with a USB drive. Any isolinux files are changed to syslinux files and syslinux boot code is installed. This means that MakePartImage should be able to convert most linux ISOs to boot from a USB partition successfully and it does not need to know what type of linux it is dealing with.

I recommend you watch the YouTube videos to see how this works.

Note: Partition 2 can contain a FAT32 volume with UEFI boot files and WinPE OS files. This allows you to UEFI-boot from the E2B drive to WinPE and use SWITCH_E2B.exe to select any .imgPTN file you want to use — no MBR-boot is required. See here and eBook #3 for details.

Clover

Clover is a ‘replacement UEFI BIOS’ which can be loaded directly from a grub4dos menu. Clover can boot 32-bit or 64-bit UEFI files.

Clover is included in the MPI Tool Pack, so that when you convert a payload to a .imgPTN file, the resulting image file will also contain the Clover boot files. This means you can boot to Clover directly from the CSM (BIOS) Menu to a 64-bit or 32-bit UEFI boot file.

If the Clover boot option is in the CSM menu on a system containing a 64-bit CPU, there will be a \EFI\boot\bootx64.efi file present in the image. For instance, if you convert a 64-bit Windows 8 Install ISO to a .imgPTN FAT32 file, you can boot to Windows 8 Setup in UEFI-mode using the Clover menu entry in the CSM menu and install Windows via UEFI (with GPT partitions,etc.) — no need to directly boot via UEFI from the system’s UEFI firmware.

You may see two Clover menu entries in the CSM menu, one for a 32-bit UEFI system and one for a 64-bit UEFI system when you have a 64-bit CPU present. If your system is a 32-bit UEFI system then only the 32-bit UEFI Clover option will work correctly. If your system is a 64-bit UEFI system, then only the Clover 64-bit option will work.

Clover is very hardware-dependant and so may not work on all systems. You can instead boot the system in UEFI-mode and your system’s UEFI firmware should automatically boot to the UEFI payload without loading the CSM menu. If you see the CSM menu then it has MBR\Legacy booted!

Step 3 — Try a different USB drive and on different USB ports

Sometimes, some types of USB drive are not compatible with some systems/BIOSes. So install E2B to a different make/model/type of USB drive and try that on the real systems (or try a different system). Don’t worry if the USB drive is not the one you want to end up using — this is just a test.

Problems have been seen with Mushkin USB drives, HP InSyde BIOS+Danelec/MSI USB flash drives, Emtec 64GB USB 3.0 color mix flash drives.

Beware of any USB drives that are very slow in use or cause your system to take a long time before the BIOS Boot selection menu appears. Test using RMPrepUSB Speed Test and Quick Size Test. Do not use cheap, unbranded or slow USB drives. A Quick Size test should take a few minutes (not 1 hour+!) and the Speed Test should return at least 5MB/s+ speeds for both read and write.

If you find that some USB drives work and some don’t, you should check that the BIOS is the most recent available for that system (see below).

If you suspect that there is something about the USB drive that one particular system does not like, use RMPrepUSB to format the USB drive as FAT32+’Boot as HDD’ and then install grub4dos to the MBR and PBR. Then see if it boots to the grub4dos console. If it boots, try adding the E2B files to the USB drive. You can view the MBR and PBR using RMPrepUSB — Drive Info — and RMPrepUSB — Drive Info — P1.

Tip: Some USB Flash drives have badly-designed connectors and these may not make contact properly in some USB sockets which have weak springs. If you find it does not work in some USB ports but does in others, try using a short USB extension cable instead of plugging it directly into the USB socket.

Why is the Fixed\Removable type important?

There are a number of reasons why this single RMB value is important for E2B.

1. Up until Windows 10 Redstone 2 1703 (Creators update), all previous versions of Windows would only mount and assign a volume letter to the first partition of a Removable drive. This meant that Windows could not access files on any other partition of a Removable drive.

If your E2B USB drive is of the ‘Fixed-disk’ type, you can have multiple partitions and store files on any partition.

2. Some software and linux scripts, etc. specifically test for a Removable USB device. If you use a USB HDD then the software will not work. This includes Windows To Go 8.1 and early Win10 versions which would not boot from a ‘flat-file’ installation on a Removable type of USB drive (but WindowsToGo will boot from a VHD on a removable USB drive). Other examples are AVG Rescue, Avira, Geek Squad, Avast, Norton Bootable Recovery Tool, Windows Boot Genius, SmartKey Windows password Recovery ISO, and some WinPE ISOs.

3. Standard Microsoft Windows Setup ISOs (WinPE) run a ‘wpeinit.exe’ program. This program includes a function to look for all Removable drives (CD\DVD, USB CD\DVD, Removable-type USB drives, etc.) and it will look for \AutoUnattend.XML and \Unattend.XML files on these volumes. Thus versions of Windows 10 which precede 2018 will not detect the XML file on a Fixed type of USB drive.

The XML file can contain settings and commands which are automatically used by Windows Setup.

This useful and powerful feature is used by E2B when booting directly from a Windows Install ISO as follows:
 

1. E2B writes an \AutoUnattend.XML file to the E2B USB drive.

2. E2B boots to Windows Setup directly from the ISO.

3. Windows Setup loads the \AutoUnattend.XML file from any Removable Media it can find (searched in order or drive letter).

4. The XML file contains a command to load the ISO file as a virtual DVD (e.g. drive letter Y:) using ImDisk.

5. Setup searches all drive letters to find a \Sources\Install.wim file (if not, it asks you to install the ‘missing CD\DVD device driver’ because it cannot find the source files needed to copy to the target drive and assumes it cannot access the DVD!).

6. Setup extracts the Windows files from the Install.wim file and copies the files to the target drive.

So if the E2B USB drive is of the Removable type, E2B has no problem booting directly from an ISO.

However, if your E2B USB drive is of the ‘Fixed’ type, the XML file on the E2B USB drive will not be found by Windows Setup — the ISO file will not be loaded as a virtual DVD drive — and so you will get a ‘missing CD\DVD driver device driver’ message:

Legacy/MBR Booting

To boot from the E2B USB drive, configure the BIOS:

  • Disable Fast Boot
  • Disable Secure Boot
  • Enable Legacy\CSM

To ensure that it boots from the E2B USB drive, connect the E2B USB drive, press a key after switching on the system (dependng on Make\Model):

ACER:              Esc, F9, F12

APPLE:             Option/Alt key

ASUS:               Esc, F8

COMPAQ:          Esc, F9

DELL:               F12

EMACHINES:     F12

HP:                  Esc, F9

INTEL:              F10

IBM LENOVO:    F12 (or Fn+F12), F10, F8

NEC:                 F5

PACKARD BELL: F8

SAMSUNG:        Esc, F12

SONY:              F10, F11

TOSHIBA:         F12

APPLE: Option/Alt key

ASUS: Esc, F8

COMPAQ: Esc, F9

DELL: F12

EMACHINES: F12

HP: Esc, F9

INTEL: F10

IBM LENOVO: F12 (or Fn+F12), F10, F8

NEC: F5

PACKARD BELL: F8

SAMSUNG: Esc, F12

SONY: F10, F11

TOSHIBA: F12

Tip: Try also holding down the Fn key first and then tapping the other Fxx key — e.g. Fn+F12.

You may find this list of BIOS keys useful.

More Information

Recommended USB drives

Tip: Always buy USB 3.0/3.1 drives if possible — they are faster and are fully backwards compatible with USB 2.0, so there is no reason to buy USB 2.0 drives!

Removable USB Flash drive — I highly recommend the SanDisk Extreme range 64GB/128GB USB 3.1 — it is the best and fastest USB drive for E2B that I have found (note: avoid older versions which may be of the Fixed-disk type. Also, avoid ‘fast’ USB drives such as the Lexar P20 Flash drive or Kingston HyperX because they are very slow with small files and WindowsToGo!). See here for an interesting comparison between the SanDisk Extreme Pro, Pro 3.1 and Sandisk Extreme. The maximum recommended size for the first partiton is 128GiB/137GB — there can be BIOS compatibility issues with USB drives >137GB.External USB HDD (max 2TB), for best compatibility, I recommend a non-UASP USB 3.0 SATA drive enclosure (such as the IT-CEO USB 3.0 IT-700 — see blog post on enclosures here).  I also highly recommend the IODD 2531 HDD enclosure- see blog post here, this drive can emulate USB CD/DVD drives and can also be used to boot E2B without needing a ‘Helper’ USB flash drive and you can write-protect the HDD whilst in use.

Beware of some native 4K-sector external USB Hard Disk drives whch often come with an XP driver — they will not MBR-boot!

Some ‘bad’ BIOSes cannot access files on USB drives which are past the 137GB (128GiB) point. Keep the first E2B partition below 137GB. 

Linux users — please go here for instructions. 

If possible, use Windows to make the E2B USB drive because it will be more compatible on a wider range of systems (2 partitions should be created for best compatibilty).

Do not Write-Protected the USB drive — When booting from an E2B drive, the drive must not be write-protected. However, when connecting it to a Windows\Linux system to run software from the drive, it is useful to write-protect the USB drive to prevent infection from the user’s OS. WP USB3 drives are available from Kanguru or Netac.

Quick Setup Guide — For help on making an E2B USB drive and how to add payload files.

Spanish video — Make E2B USB using Windows (Español) here

TroubleShooting

If you are prompted to first select a Locale, etc. — check that the Locale and Language settings under the settings pass=»windowsPE» section and other sections are correct. WAFG does not always set this correctly. For instance, if you have an English UK ISO version, the Locale and Language settings must be for the UK, i.e. set en-GB and not en-US (in both amd86 and x86 sections of «Microsoft-Windows-International-Core-WinPE»).
 

If the XML file does not seem to run, check the X:\Windows\Setupact.log file to see if Setup found an AutoUnattend.xml file, then check the X:\Windows\Panther\Setupact.log to see how it interpreted the settings in the XML file. If there is a failure after rebooting, check the C:\Windows\Panther\Setupact.log file and other log files as detailed here. The Setuperr.log file in the same folder will often point you to the problem.

If the oobeSystem stage fails, check the C:\Windows\Panthe\UnattendGC folder.

If the XML file seems to be ignored by Setup — check it for syntax errors.

If Setup stops with an error message about not being able to set an Active partition — you are probably trying to create an MBR type disk whilst booting via UEFI. If you want to create an MBR disk you must boot in MBR-mode.

If Setup stops with an error message about ‘the selected disk is of the GPT partition style’ — you are probably trying to create a GPT disk whilst booting via MBR. If you want to create a GPT (UEFI) disk, you must boot in UEFI-mode.

‘Windows could not set a partition Active on disk 0’ — if you are UEFI-booting, you cannot make an MBR partition, you must use a GPT disk configuration.

If you think there is a bug in XMLtoE2B — please report it and send me the three debug*.* files immediately after generating the XML file.

Change the ComputerName and UserName each time (MBR-booting from .ISO file only)

It is possible to prompt the user for a ComputerName and UserName before you start the install, and then E2B will modify the XML file before Setup begins.

See here for details and also see the WIN10_Prompt_for_PCNAME_and_UNAME.mnu file in the \_ISO\docs\Sample mnu Files\Windows folder.

See also WIN10_Prompt_for_UNAME_auto_serial_COMPNAME.mnu for a method of setting the ComputerName to contain the Serial Number of the system.

The Sample Mnu file WIN10_Prompt_User_for_XML_settings.mnu prompts the user for various XML settings and then modifies the XML file before it is used. This allows you to use the same XML file each time, but specify the UserName, ComputerName, FullName, RegisteredOwner, RegisteredOrganization, etc. before you start each build (E2B v1.A1+).

Boot problems

MBR\CSM booting

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.

UEFI-booting

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.

SDI_CHOCO (run a batch file)

If you want to use the SDI_CHOCO feature (e.g. to run any batch file during the Specialize or OOBE pass), you must add some more lines into the XML file using the checkboxes provided.

If you want to use SDI_CHOCO from a .imgPTN file, you must tick the ‘Add SDI_CHOCO (for .imgPTN files)’ checkbox. This ensures that \e2b\stage1.cmd is called. However, note that the configuration name is set in \e2b\stage2.cmd, so you must also edit \e2b\stage2.cmd which is inside the .imgPTN image if you want to use a different SDI_CHOCO configuration set. If using agFM and directly UEFI-booting from an ISO, the ‘Add SDI_CHOCO (for .imgPTN files)’ checkbox should be unticked. 

The SDI_CHOCO config name (for ISO files) checkbox is only required when NOT using E2B wimboot. It will not hurt to include it, but for most cases it is not needed for the latest versions of E2B.

Easy to maintain, delete or update

How to add all your ISO (and other) files:

  1. Copy each bootable ISO/payload file into a suitable menu folder on the E2B USB drive (e.g. \_ISO\WINDOWS\WIN10 or \_ISO\LINUX) — no extra applications required.
  2. Make all files contiguous (if required), e.g. double-click on  \Make_This_Drive_Contiguous.cmd on the USB drive (or run the linux defragfs or udefrag command from \_ISO\docs\linux_utils folder). Not all files need to be contiguous so try it anyway — it may still work! See here for more info.
  3. Boot to the E2B menu and pick your ISO or payload file from the appropriate menu. To UEFI-boot, select Partition 2. To Legacy-boot, select Partition 1.
  4. To remove any payload/ISO file, just delete it from the E2B drive.

To make a copy of your E2B drive onto another USB drive, run \MAKE_E2B_USB_DRIVE (run as admin).cmd from the USB drive that you want to copy from.

Making files contiguous

E2B requires most ISOs and all persistence files to be contiguous for best and fastest use.

agFM does not require all ISOS to be contiguous depending on menu option.

Ventoy does not require any file to be contiguous.

Usually Windows .VHD and .WIM files don’t need to be contiguous.

Note that if you are using large ISOs, you will need a large drive because at least as much contiguous free space is needed (e.g. a non-contiguous 3GB ISO on an 8GB NTFS drive cannot be made contiguous because there is not enough free space!). 

    Fig. 1 FILE4 cannot be de-fragmented due to insufficient contiguous free space. The free clusters must first be consolidated (e.g. by using Windows Defraggler).

Проверка загрузочной флешки в WinSetupFromUSB

В программе WinSetupFromUSB можно проверить загрузочный USB диск непосредственно из окна программы.

Сначала убедитесь в том, что приложение правильно выбрало флешку, если к компьютеру подключено несколько USB накопителей.

Поставьте галку в пункте «Test in QEMU», а затем нажмите на кнопку «GO».

После этого, запустится виртуальная машина QEMU, в которой отобразится (или нет, если флешка создана неудачно) процесс загрузки с флешки.

Если флешка загружается, откроется окно «GRUB4DOS». Сначала потребуется выбрать, что именно следует загрузить на компьютере.

В нашем случае, по умолчанию, первым выбрана загрузка с Windows, затем идет выбор загрузки с жесткого диска, далее идут Acronis True Image и Kaspersky Rescue Disk (в том порядке, в котором мы их записывали на флешку).

Выберите при помощи клавиш на клавиатуре «» и «↓» соответствующий пункт загрузочного меню, а затем нажмите на кнопку «Enter».

При выборе пункта «Windows NT6 (Vista/7 and above) Setup» откроется окно, в котором предлагается выбрать для установки операционные системы Windows 7 или Windows 10.

После выбора загрузки с Acronis True Image, откроется окно утилиты для резервного копирования и восстановления.

В случае выбора Kaspersky Rescue Disk, откроется окно антивирусного диска.

Не помешает, если вы проверите работу загрузочной флешки непосредственно на компьютере.

Comparison agFM v. Ventoy

Feature agFM Ventoy
Switch in .imgPTN files YES NO
Boot WinBuilder WinPE ISOs YES SOME
Easy selection of XML files for Windows Install ISOs YES NO
Secure UEFI64 boot YES only via Mok Manager*
UEFI32 boot YES YES v1.0.32+
Files can contain spaces YES YES v1.0.29+
Generic method of booting of Linux ISOs YES NO
Use specific file extension to boot in different way YES NO
Menu mode USER MENU + TREE ONE BIG LIST +
TREE
Boot DOS images YES NO
Secure UEFI64-boot non-secure payloads YES     NO
USB drive can be write-protected NO YES
ISO boot speed MEDIUM FAST
Password protect ISOs YES YES

* If you first Secure UEFI64-boot to agFM then you can boot to Ventoy without needing to use Mok Manager.

Ventoy special features

Ventoy has some special features, for example:

  • Full GPT partition style support
  • Contiguous files not needed
  • Auto installation for Linux distros
  • Directly boot for whole FreeBSD series 
  • Boot configuration file dynamically replacement
  • Injection files for Windows and Linux (ideal for WinPE ISOs)
  • Boot configuration file dynamically replacement
  • Driver update disk support

agFM special features

  • agFM also supports different languages and keyboard types.
  • E2B+agFM also supports SDI_CHOCO  automated Windows install from ISO, UtilMan Hack, MemTest86, etc.
  • .imgPTN Partition Image files supported

How to update your Easy2Boot USB drive

1. Download the latest version of Easy2Boot — run it and click on the ‘Update E2B Drive’ button (see screenshot of Make_E2B.exe above). This can also update agFM.

2. To update only agFM, double-click on \e2b\Update agFM\Download and update agFM_v2.cmd on the 2nd partition(requires internet access)

3. To update or add Ventoy for Easy2Boot, double-click on \e2b\Update agFM\Update_to_latest_Ventoy_version.cmd on the 2nd partition  (requires internet access)

Note: The \e2b folder is located on the second E2B_PTN2 partition. If using a flash drive, Windows 10 may be required to access the 2nd partition.

Latest News   Russian guide Russian blog   Chinese post

Copying WindowsToGo files

Windows will not allow you to easily copy a complete WindowsToGo installation as files to another folder or drive (e.g. using Xcopy or Explorer).

Windows will lock some of the WinToGo system files and it will also interpret any symbolic links (e.g. when it sees the ‘My Documents’ hard link in the WinToGo drive, it will start trying to copy all of your C: drive’s Documents too!).

A nice way to copy all the WindowsToGo files to a different destination is to use Olof’s strarc utility.

1. Switch to the .imgPTN file using \_ISO\SWITCH_E2B.exe — my E2B USB drive was now drive D: (16GB) and had the full WinToGo installation on it as flat-files (\Windows, \Program Files, etc.).
2. Delete any unwanted files (e.g. \hyberfil.sys, pagefile.sys, etc.) .
3. Create and attach a fixed VHD using Windows Disk Management console (diskmgmt.msc) — this gave me a virtual 16GB Q: drive.
4. Download strarc and extract it.
5. From an Admin Windows cmd shell, we copy all files on D: to Q: using:strarc.exe -cjd:d:\ | strarc -xd:q:\Note: you can safely ignore any error messages about the \System Volume Information folder.
Be sure to use the vertical bar  | key as shown (Shift+)
Olof recommends this so that some files are also excluded:strarc -c -j -e:»\System Volume Information,\Temp\,\Temporary Internet Files\,\Cache\,.tmp,pagefile.sys,hiberfil.sys,\$NtUninstall» -d:d:\ | strarc -xd:q:\
To ignore messages about 8.3 filename compatibility (I didn’t see any) , use .
I first formatted Q: so it was empty of all files.
6. Detach the Q: drive in the Disk Management console and copy the VHD file to \_ISO\MAINMENU on my E2B USB drive and boot it!

If some files are locked or held open by Windows, you can try using a Volume Shadow Copy Service  (VSS) utility such as ShadowSpawn to make a virtual copy and then run strarc using the new virtual drive as the source. You can also try U-Recover to create a shadow copy of a drive.

Other changes (headings, menu position, colours, etc.)

You can make a new \_ISO\MyE2B.cfg file by using the E2B_Editor or by making a copy of the \_ISO\Sample_MyE2B.cfg file — see the MyE2B.cfg page for more details.

E2B uses keyword lookup strings which begin with $$STR followed by 4 alphanumeric characters (e.g. $$STR1bhx). To change the existing E2B menu headings or standard menu entries or change the language, please refer to the ‘Languages’ page here.

Highlighting and centering the menu entries

When a menu entry is selected, the ‘highlight’ text colour and background colour can be changed, e.g.

# yellow text FFFF00 + background will be 222222 (v. dark grey/black) for selected menu entry — 0x00rrggbb00RRGGBB
color highlight=0x0022222200FFFF00

If the background highlight colour value is 0 (black) then the background colour will be transparent.

If SHORT_HL is set, then the background selection bar will not extend across the whole menu.

Menu entries can be aligned from the left (most languages are ‘LTR’ =  left-to-right) or from right-to-left (‘RTL’, e.g. Arabic), or they can be centred within the menu area (v1.A0+). e.g. in your MyE2B.cfg file, add a setmenu command under the ADVANCED MENU CONFIGURATION section…

# — ADVANCED MENU CONFIGURATION —-

# set a short bar for background of highlighted menu entry (E2B v1.A0+) requires grub4dos 0.4.6a 2018-07 or later
set SHORT_HL=1

# centre the menu entries inside the menu area (and centre help text under menu) — requires grub4dos 0.4.6a 2018-07 or later
setmenu —middle-align

See the \_ISO\Sample_MyE2B.cfg file for more details.

Sub-Menu heading positions

HEADPOS can be set in the MyE2B.cfg file. If CENTREHD is used, the HEADPOS xx value is set to 0 by E2B.

HPAD is usually automatically calculated by E2B from the rstart value set in MyE2B.cfg and so does not usually need to be set.

e.g. If HEADPOS = 0200 (3rd line down)  and rstart=4  (5th column across) then HPAD will be automatically set to ‘\x20\x20\x20’  (i.e. rstart = 3 spaces) — followed by the menu heading string (‘AntiVirus Menu’).

HPAD can be set in the MyE2B.cfg file — e.g. set HPAD= \x20  \x20.

Sub-menu headings may start with leading spaces if you wish. If you look in the \_ISO\e2b\grub\ENG\STRINGS.txt language file you can see entries like:

$$STRm017=AntiVirus Menu   

So if you want one Heading to start further to the right, you must add the spaces in the STRINGS.txt headings — e.g.

$$STRm017=\x20   AntiVirus Menu         

All Sub-Menu headings will be automatically centred if CENTREHD has been set in the MyE2B.cfg file.

Menu help text

The help text area directly below the menu requires 5 clear lines of space, because up to 5 lines of help text can be printed, starting at the ‘tophelp’ position, on the display.

In all versions of grub4dos, you can define only a maximum of 4 lines of help text for each menu entry.

e.g. if the .mnu file was:

title TEST \n1\n2\n3\n4\n5\n6
pause
boot
The help text below the menu would be:1
2
3
4
grub4dos messages may be on line 5- e.g. ‘The highlighted entry will be booted automatically in x seconds’

So you always need to ensure that there a 5 clear lines directly below your menu and then the HELPTEXT footer text below that.

If you want to hide the menu entry title help text, set tophelp to a large value so it is positioned just off-screen (e.g. set tophelp=47) in the \_ISO\MyE2B.cfg file.

Use hstart and hwidth (E2B v1.97+)

Using MyE2B.cfg, you can change the default position of the menu entry help text under the menu using:
 

tophelp — sets row at which to start help text (y offset)

hstart    — sets column at which to start help text (x offset) (default = rstart-1), min = 1, 0 = use menu width and menu start

hwidth   — sets the width of each help text line before it will wrap over (default = menuw+2), 0 = use whole screen width — 2 x hstart

# Example 1 — define exact position of help text

set tophelp=26

set hwidth=70

set hstart=6

# Example 2 — use whole screen width (minus 2 x hstart value) — so 3 spaces at start and 3 spaces at end

set hstart=3

set hwidth=0

# Example 3 — use menu default position and width

set hstart=0

Note: In My_E2B.cfg, hstart and hwidth should be defined below the ‘ADVANCED MENU SETTINGS’ area so that they are preserved if you use the E2B_Editor utility.

In 800×600 mode, hstart+hwidth < 101, in 1024×768, hstart+hwidth<129.

Tip:

You can draw a box around the help text using ‘setmenu —draw-box’. Note that you may have to draw a box one-character wider than the help text width to allow for an extra space that can occur at the end of a help text line. You may also need to adjust the vertical start position of the box downwards by one line.

Type help setmenu in the grub4DOS command prompt to see the syntax.

Step 8 — Contact Me

Use the Contact Me form to contact me and ask for advice. Please let me know what happened when you tried each of the steps above together with any successful combinations and any failing combination.

e.g.

  • Case 1: HP Pavillion Model XYZ + Mushkin 16GB USB 3.0 flash drive — works in QEMU but not when booting from other real system
  • Case 2: HP Pavillion Model XYZ + Corsair Voyager GT 32GB USB 3.0 flash drive — works in QEMU and when booting from other real system
  • Case 3: Dell  Model XYZ + Mushkin 16GB USB 3.0 flash drive — works in QEMU and also when booting from real system but not DELL XYZ

This clearly shows a problem with the HP BIOS and Mushkin USB drives (this is just an example)

.MNU Files

.mnu files simply contain normal grub4dos menu entries which are collated and copied by Easy2Boot into it’s temporary grub4dos menu which is held in memory. Note that folder paths must use the forward-slash symbol /  (like linux) when using paths inside grub4dos .mnu files — grub4dos does not understand \ (backslash) as a path delimiter. 

However, spaces in file paths/names should be preceded by a backslash \ symbol (e.g. /folder/a\ space.iso).

The following special ‘words’ are recognised by E2B and can be used inside .mnu files:

The %MFOLDER% variable will hold the current menu folder path (e.g. /_ISO/MAINMENU or /_ISO/BACKUP, etc.) so that a .mnu file which uses %MFOLDER% can be moved to any folder location and it will still work.

The $HOME$ keyword can be used in a .mnu file to represent the complete path of the folder that contains the .mnu file. It is preferable to place the .mnu file and payload file in the same folder (e.g. \_ISO\LINUX\MNU) and use $HOME$/ in your .mnu files, rather than, for example, use %MFOLDER%/MNU/.

$NAME$ is the filename of the .mnu file (without the file extension).

$$STRxxxx keywords are looked up by E2B in a STRINGS.txt language file and are subsitituted with the corresponding text from within the STRINGS.txt file. If a $$STRxxxx keyword is not found in the specified language file (which is set in the \_ISO\MyE2B.cfg file), then the keyword string will be searched for inside the English  .\ENG\STRINGS.txt file.

The file name of your .mnu file does not matter and it can be changed to whatever you like — but all .mnu files are collected by E2B in alphabetical order, and all folders below the specified Menu folder (‘MFOLDER’) are searched.

MNU sub-folder and .mnu files

The folder names under the menu folders on the E2B USB drive (e.g. \_ISO\MAINMENU\MNU) have no particular significance — any folder name can be used — but most .mnu files are usually designed so that the payload file should be in the same folder as the .mnu file. Look at the .mnu files in the docs folder to see how they work. Also, in the \_ISO\docs\E2B Utilities folder there is a drag-and-drop cmd file tool to help you create .mnu files and .txt files.

Tip: It is best to inside .mnu files so that the user can delete the ‘payload’ file and just leave the .mnu file on the USB drive. Then at a later date, the payload file can be restored and the .mnu file will still be present. 

 

GFXBoot menus do not support grub4dos hotkeys, so often you will see two ‘iftitle’ type menu entries for the same function in an E2B .mnu file, one menu entry will test for if GFX=»»  (normal grub4dos menu) and will define a hotkey, and the other menu will contain a test for  if not GFX=»»   (in case the user has specified a GFXBoot menu using the GFX variable in the MyE2B.cfg file).

For information about agFM menu files and UEFI booting, see here.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *