Thursday, 27 November 2014

Boot Fedora and CentOS directly from ISO using grub4dos

I have added another small tutorial on how to boot Fedora 20 and CentOS 7 directly from an ISO file using grub4dos.

I found that they are rather fussy in their requirements.

This method uses the cheat codes and does not use partnew command.
For Fedora, the ISO file does not need to be contiguous.
For CentOS, the ISO file does not need to be contiguous if it is well below 4GiB in size so it will fit in memory.  CentOS-7.0-1406-x86_64-DVD.iso is just under 4GiB but the file must be contiguous as it is too large to load into memory.

Note that because we must use a FAT32 USB drive, we cannot have files over 4GiB.

Wednesday, 26 November 2014

E2B v1.61Beta 2 available

v1.61 Beta2 has these additions (compared to v1.60):

1. Italian language files added (thanks to Fabrizio)
2. Can specify both a specific ISO and XML file for a single Windows Install ISO from a mnu file.
3. German language STRINGS.txt improved.
4. isoboot.g4b added to boot some non-contiguous linux ISOs,
5. Fix problem with F1 menu heading
6. Better menu heading positioning using HEADPOS variable, menus left-aligned, Footer Help text directly positioned by HBTM variable.

The grub4dos batch file isoboot.g4b is now run if you attempt to boot from a non-contiguous payload file from any of the normal menus (not Windows Install Menu) but only if the CONTIG,.ISO dd copy fails. This can occur if the CONTIG.ISO is not big enough or missing.

The isoboot.g4b batch file will look at the filename of the ISO (so don't change it too much!) and attempt to run the ISO by using the map --mem grub4dos command and cheat codes such as 'fromiso=' and 'iso-scan/filename=' - in this way a non-contiguous linux iso can be booted.
Also don't use spaces in filenames!

The problem with this method however, is that even different versions of the same linux distro vary in what cheat codes are needed and many don't even support booting from an ISO file in this manner! Also, some distros (e.g. Fedora) are not able to access the ISO file if it is on an NTFS USB drive.

Currently, isoboot.gb4 looks for these strings in the iso filename:

  • ubuntu
  • linuxmint
  • fedora     (FAT32 drives only)
  • sabayon
  • kali
  • opensuse
  • slackw     (slackware)
  • sysresc    (systemrescue)
  • knoppix
  • debian
  • tails
  • gpart        (gparted)
  • centos
  • arch         (user will be prompted for 32-bit or 64-bit boot, if dual ISO)
  • avg

It is quite possible that some versions of some of these distros may not boot, so please report any linux ISOs that don't work (especially ones larger than 500MB that won't fit in CONTIG.ISO).
Note that Puppy cannot be booted just from an ISO file.

If you want to test any ISOs directly using isoboot.g4b, you can use the \_ISO\docs\Sample .mnu Files\$$BootNonContigISO.mnu file (copy it to the \_ISO\MAINMENU folder). You can then test-boot any linux ISO that is present in \_ISO\MAINMENU using that menu entry.

The ISOs 1-13 were tested.

The grub4dos commands are displayed before it attempts to boot!

This method is nowhere near as reliable as the E2B (partnew) boot method and also does not display the full boot menu contained within the ISO - so only one boot mode (live boot) is made available.

Friday, 21 November 2014

MPI Tool Pack updated to v0.040

Devadev found that the default partition size calculated by MakePartImage was not quite large enough for one particular ISO, so I have slightly increased the volume size in the new version.

However, whilst testing this on my Windows 7 64-bit notebook, I found that the code I use to display the amount of free space in the virtual volume did not work. The code I used was this (simplified):

WMIC.EXE LogicalDisk Where DeviceID="C:" Get DeviceID,FileSystem,FreeSpace  /Format:csv

It turns out that the /Format:csv part was causing the problem and generating the error message:

Invalid XSL format (or) file name.

By Googling I found that this switch only works on en-US locale systems! Nice one Microsoft - not everyone in the world lives in the US! Still not fixed by a Windows 7 update!

Wednesday, 19 November 2014

Easy2Boot 1.61Beta1 available

  • STRINGS.txt files updated.
  • Can now have .mnu files for Windows Install ISOs menu entries in Main menu which specify both the .ISO file AND the .XML file to use. The ISOs must go in the usual \_ISO\WINDOWS\xxx folders.
  • Updated grub4dos versions.
  • Menu Heading positions changed and HEADPOS now easier. Menu headings are now left-aligned instead of being centred. 
  • Help text Footer text no longer padded out by HPAD, so HBTM determnes it's absolute position in the menu.
  • \_ISO\docs\mythemes and \_ISO\docs\Templates files updated
  • \_ISO\Sample_MyE2B.cfg file updated (HEADPOS)
  • Bugfix - menu headings on submenus not always moved if HEADPOS used.

The changes in HEADPOS and HBTM may require you to change your \_ISO\MyE2B.cfg file slightly (if you have used one). However, the new changes mean that we can place the HELPTEXT FOOTER anywhere on the screen. It is also now much easier to have your Menu heading on any line you like using HEADPOS.

Menu headings in the STRINGS.txt files have been changed to be left-aligned with only two leading spaces. This makes it easier to re-size the menu and move it.

This Palms theme and the new Beta can be found in the Alternate Download areas at - Downloads.

Sunday, 16 November 2014

Add multiple WindowsToGo MBR+UEFI payloads to your E2B USB drive

If you want to UEFI-boot from a WindowsToGo .imgPTN file on Easy2Boot, the system partition needs to be FAT32 to support UEFI-booting.

I have added instructions on how to add WinToGo .imgPTN files that will boot in both UEFI and MBR modes, to the website here. It uses two partitions, one small one for a FAT32 system partition and a large NTFS partition for the Windows boot files.

I have used WinToUSB instead of DISM or ImageX, so that only one command line needs to be typed by the user during the whole process. If you use WinNTSetup.exe instead, then no command line needs to be typed.

I have only tested the process with Win8.1 x64, but it should be the same for Win8 and Win10. For Win7 you may need to tweak the process slightly.

I have not tested the process on UEFI 32-bit OS's or systems...

Why not add the Windows 10 Technical Preview to your E2B USB drive and take it round to your friends house to demo it on their system?

P.S. Please tick one of the feedback boxes if you found this useful and subscribe to this blog.

Wednesday, 12 November 2014

Easy2Boot v1.60 now released

No problems reported in last two days, so I have released v1.60.
This version should be faster to boot to the Main menu on slower systems (especially if you make a new E2B drive from scratch).

Don't forget to use the new \UPDATE_E2B_DRIVE.cmd file to update your existing E2B USB drive (requires RoboCopy which is already included on Vista/7/8 systems), otherwise you will get multiple menu entries for the sub-folders!

Monday, 10 November 2014

E2B v1.60 Beta6 now available

  • New grub4dos (fixes minor issue of cursor left on screen when p for password is pressed)
  • wimboot file added
Unless anyone reports a problem, this version will be made the 'release' version 1.60 in a day or so.

(click Alternate Download Areas links on  for the download)

I have added a sample 'Boot from WIM file.mnu' file to the \_ISO\docs\Sample mnu files folder:

# Boot from an image inside a .WIM file (useful for self-contained WinPE - e.g. MSDaRT)
# extract files from a WinPE ISO to a folder on the E2B drive (do not place files in a \_ISO\XXX folder)
# set FOLDER value below - check location of boot.wim and other files are correct (else 0xc000000f error)
# Some files and folders may not be required and can be deleted

title WinPE boot from WIM\n Boot from a .wim file
kernel /%grub%/wimboot index=2
initrd @bcd=%FOLDER%/boot/bcd @boot.sdi=%FOLDER%/boot/boot.sdi @bootmgr=%FOLDER%/bootmgr @boot.wim=%FOLDER%/sources/boot.wim

New wimboot feature for experimental purposes:
This allows you to boot from any image inside a .wim file. You could, for instance, make a large .wim file containing lots of WinPE (MSDaRT ??) OS's and boot from any one of them by using a different index value.
Note that this cannot be used for lots of different Windows Installs because the install,wim file will not be found unless you ensure it is in the \sources folder on the E2B drive (or if using a E2B hard disk, it can be on a different partition).
If you wish, all the files could be placed in a single folder and the paths altered to match - e.g.:

title WinPE boot from WIM\n Boot from a .wim file
kernel /%grub%/wimboot index=2
initrd @bcd=%FOLDER%/bcd @boot.sdi=%FOLDER%/boot.sdi @bootmgr=%FOLDER%/bootmgr @boot.wim=%FOLDER%/boot.wim

Note: Don't be tempted to put the files in a \_ISO menu folder (e.g. \_ISO\WIN\MSDART) because E2B will enumerate all the extra files which will slow down the appearance of the menu a lot!

The new grub4dos also means we can access files inside an initrd file - e.g.
map /inirtd.gz (rd)
ls (rd) /
This may be useful for patching bytes in a linux file (e.g. script file) to modify the boot behaviour of an initrd file inside a .iso file without needing to unzip-patch-remake-rezip the initrd file and then re-make the ISO file.

Thursday, 6 November 2014

Two new Introductory E2B videos uploaded

E2B 1.60Beta2 now uploaded. Includes an Update script that will automatically update your v1.5 E2B drives.

Tuesday, 4 November 2014

Easy2Boot 1.60 Beta 1/2/3/4

In an attempt to speed up file enumerations as E2B boots, I have modified E2B so that the number of .mnu files in the \_ISO\MAINMENU folder is reduced. is now available on the Alternate Download sites at the bottom of the Download page.

(Note: in Beta3+ versions I have also removed support for HDG_xxx heading variables and %xxxx% color variables. This means if you have an old MyE2B.cfg file, you may have to update it and make your own LANGuage STRINGS.txt file for your menu headings.)

Note that before you use it to update your E2B 1.5x drive, you should delete all the \_ISO\ZZ*.mnu files on your E2B drive first, otherwise you will get multiple menu entries. The included Windows script in the download, UPDATE_E2B_DRIVE.CMD, will delete the old mnu files and update your E2B drive automatically. However, I recommend you start with a fresh USB drive to get v1.60 to work as fast as possible as I have removed some other text/help files to make booting faster and these will still be left on an updated E2B USB drive.

All the old ZZSubMenuxx.mnu files have now been combined into one large ZZSubMenuAll.mnu file. This means that you cannot easily individually re-order or remove some of the Main menu entries by changing the separate .mnu files:
(2 new features/changes are in bold below)...
  • Menu default and timeout default - there was no .mnu file for this before - so suppressed by MyE2B setting as before
  • Fastload enable/disable menu - controlled by NOFLDMNU in the MyE2B.cfg file
  • Fastload indicator line - only be displayed if the menu is from the cached version and FASTLOAD is enabled.
  • Normal folder menus (ANTIVIRUS-->WINPE) - if the folders contain files then you will get a menu entry - rename the folder (e.g. \_ISO\WINPEx) to suppress the menu entry.
  • WINDOWS INSTALL menu entry - set NOWINMAIN in the MyE2B.cfg file to remove it
  • F1 menu - suppressed by NOF1 in MyE2B.cfg
  • F7 menu - suppressed by NOF7HD in MyE2B.cfg
  • F8 menu - suppressed by NOF8MAIN in MyE2B.cfg
  • F9 and F10 were not controller by a .mnu file before - can be suppressed using the MyE2B.cfg file as before.

This makes the Main menu faster to load on slow systems and de-clutters the MAINMENU folder, but it does mean that you cannot easily change the order of these items in the Main menu. If you want to change the order of these menu items, then you will need to rename ZZSubMenuAll.mnu and then edit it yourself.

Some text files have been moved/deleted/renamed and the \_ISO folder and \_ISO\docs folder tidied up too.

I have also added a debug feature which will report timings of various operations whilst E2B boots.
To use this feature, add  set SHOWTIME=1 to your \_ISO\MyE2B.cfg file. When E2B boots, just before it loads the Main menu from memory, it will display various times as shown below:

This will show you where most of the time is taken (e.g. loading a large background wallpaper or the unifont file). The timings in the screen shot above were taken from a QEMU run and so are slowwwww... Under VirtualBox+VMUB the times are all identical (i.e. <1 second from beginning to end!).

Slow times are usually due to poorly written USB BIOS code (or possibly a very slow USB drive).
Using the USB 2.0 driver in grub4dos 0.4.6a will often improve these times dramatically if booting from a USB 2.0 port (use  set GRUB_USB=Y in the MyE2B.cfg file).

Unfortunately, the grub4dos 0.4.6a driver doesn't work on many new systems or USB 3.0 ports and can sometimes cause problems with grub4dos and E2B on some systems - which is why it is a menu option and not enabled by default!

Saturday, 1 November 2014

Use RoboCopy to update your E2B USB drive

I use RoboCopy (included in Windows Vista and later versions) to update all my E2B USB drives to the latest version.

I have a UPDATE_E2B_DRIVE.CMD file in the same folder as my new E2B files (after unzipping them).

To update any E2B USB drive with the new version, I just double-click the CMD file and enter the drive letter. It then copies the new files over but does not bother copying any unaltered files, resulting in a much faster update as only the files with a different size or timestamp are copied.

Only 1 file has been updated as all the others were already present and current,

My version excludes copying over all .zip files and the UPDATE_E2B_DRIVE.CMD file itself by using the /XF switch. Note that the /MT:1 parameter ensures only one execution thread is used (the robocopy default is 8) and this ensures that the files have the best chance of being contiguous (a multi-threaded copy tends to cause fragmentation of large files).

@echo off
color 1f
echo %~n0
echo Only new and changed files are copied.
set ask=%1
if "%ask%"=="" set /P ask=Enter Drive Letter to copy files to (e.g. E) : 
if "%ask%"=="" goto :EOF
REM exclude .zip files and this file
robocopy %~dp0 %ask%:\ /E /NFL /NDL /NJH /MT:1 /XF *.zip %~nx0