Monday, 7 April 2014

Easy2Boot will soon support UEFI booting!

Easy2Boot soon will support booting of FAT32 UEFI disk images!

To make these image files you need to run a Windows script...

Example 1: lubuntu-13.10-desktop-amd64.iso
1. Run the MakePartImage.cmd Windows script to create an image file - e.g. LUBU64.imgEFI
2. Copy the file to your E2B drive \_ISO\MAINMENU folder

Example 2: KonBoot 2.4
1. Make a KonBoot 2.4 USB EUFI drive using a spare flash drive. You can use the batch file provided by KonBoot or just make a single partition USB FAT32 drive using RMPrepUSB. Make sure the \EFI folder is present.
2. (optional) Test that the USB drive boots via UEFI
3. Run the MakePartImage.cmd Windows script to create an image file from the USB drive - e.g. KonBoot24.imgEFI. As an alternative you can skip steps 1 and 2 and just point MakePartImage.cmd at the KonBoot folder on you C: drive that contains just the EFI folder - e.g. C:\temp\KonBootV2.4
4. Copy the image file to your E2B drive \_ISO\MAINMENU folder

Example 3: Windows 8.1
1. Run the MakePartImage.cmd Windows script to create an image file - e.g. Win81x64.imgEFI
2. Copy the file to your E2B drive \_ISO\MAINMENU folder

Note: Due to the file size limitation of FAT32, the \Sources\Install.wim or Install.esd file cannot be over 4GB.

You can also make an .imgEFI file from a working FAT32 USB Flash drive using RMPrepUSB - Drive->File (use P1, P1, 0) - but see the easy2boot website for instructions as you need to add some grub4dos files first.

Some linux ISOs won't boot from a FAT32 filesystem unless the files are modified. You can use Fedora Live-USB Creator to make a working USB Flash drive and then use the contents of that Flash drive in your .imgEFI. You just need to ensure that the volume label of the image is the same as that of the USB stick. To get the USB Flash drive working, some editing of the .conf and .cfg files may be necessary to get both MBR and UEFI booting to work. Once a USB Flash drive works, the same image should work when copied into a .imgEFI file using the MarkPartImage.cmd script, as long as the FAT32 volume names are the same.

Now we have prepared our Easy2Boot drive ready to use for MBR or UEFI booting and we can boot any one of the images via UEFI (and most via MBR too) - sweet!

 Here is how to use it:

1. Boot from the target system via MBR\CSM booting to the Easy2Boot menu

2. Select one of the .imgEFI images - this will change the MBR on the drive and load the new CSM Menu (after some warnings about the possibility of it destroying your E2B drive!)


3. From the CSM Menu, you can instantly switch back to E2B Mode, or run the payload files in the current MBR mode (works for Windows and KonBoot, etc. but not linux) OR...


4. Choose Reboot and boot from the USB drive via UEFI BIOS mode - it should immediately boot to the selected EFI payload (e.g. CentOS, Deft8, Lubuntu, KonBoot or Win8.1 install in UEFI mode).

5. To change back to E2B again, reboot from the USB drive via MBR\CSM booting - you will see the CSM Menu- choose Switch and it will immediately restore the E2B partitions and load the E2B menu.

The advantages of this process is that this should be 100% compatible with most UEFI BIOSes as it uses a single FAT32 volume. It is also a very simple concept. Switching modes is virtually instantaneous.
The 'cons' are that you can easily accidentally 'destroy' the MBR of your E2B USB drive if anything goes wrong and it does not boot in MBR mode. Secondly, you have a file size limit of 4GB which may apply to files like install.wim (the .imgEFI file can be bigger if your E2B drive is NTFS, but the individual files inside the image cannot be larger than 4GB). Another disadvantage is that you have to prepare an .img file first (though this takes only a minute or so when using the MakePartImage script, even for a 4Gb Windows 8 ISO).

For some EFI images - e.g. KonBoot and Windows Installs, you can run them in MBR mode and UEFI mode, thus you don't need to have both the .ISO files  and the .imgEFI files on your E2B drive for these. The linux images however won't boot in MBR mode unless you add a grub4dos boot menu entry to run the correct kernel/initrd commands (the files are already in 'flat-file' format in the FAT32 image).

If anyone is interested in trying out a very early Alpha, please let me know. You may need to be experienced in Disk Sector editing if you run into trouble (but only your USB E2B drive will be affected) but by using Disk Doctor in RMPrepUSB it is quite easy to put back the E2B MBR should anything go very wrong!

Installing Windows from a USB Hard Drive without needing a Helper USB Flash drive

Using .imgEFI images also has the side-affect that you dont' need to use a USB Removable Flash 'Helper' drive to install Windows. If you format the image as FAT32 then you can install Windows from an E2B USB Hard disk both in MBR mode or UEFI mode. However, you are limited to install.wim files of less than 4GB.

If you format the .imgEFI image file as NTFS, you can only install Windows in MBR mode but the install.wim file can be of any size and at least you don't need a Helper Flash drive.

More information on the easy2boot site here.

MakePartImage now installs syslinux to the PBR if it sees a \syslinux folder in the image. This allows you to run linux in MBR mode. The file extension .imgPTN is now recognised as well as .imgEFI (deprecated). It makes more sense to call it .imgPTN as it is just an image partition and does not necessarily have to contain EFI files or support UEFI booting.