Saturday 19 January 2019

How to switch back to the E2B partition from a linux OS when using .imgPTN files and UEFI-booting

When you UEFI-boot from a FAT32 .imgPTN file (after you have 'switched' it in), then there is no front-end boot manager. Whatever payload you have used is directly booted to. In this way E2B can secure-UEFI-boot to many different types of payloads without any issues or complications caused by other bootloaders/bootmanagers getting in the way.

The problem is that if you only have access to systems which will ONLY UEFI-boot, then it is difficult to change the payload to something else!

If you use a .imgPTN file to UEFI-boot to a Windows payload, you can use one of the files in the \e2b folder on the USB drive to switch back the partitions so that the E2B USB drive will MBR-boot to the E2B grub4dos menu again...

  • \e2b\Switch_E2B.exe (32-bit Windows app)
  • \e2b\RestoreE2B (run as admin).cmd (32-bit Windows script)
  • \e2b\RestoreE2B_32_64.cmd  (script which should work even under a minimal WinPE environment)

You can use Switch_E2B.exe to switch in a different .imgPTN payload if your Windows will run 32-bit apps.

If you have booted to linux, you could use a VM/emulator to MBR-boot from the USB drive and restore the E2B partitions from the CSM menu and select a different .imgPTN file.

You can restore the E2B partitions from a linux OS by using a script such as the bash shell script. This means you could restore the E2B partitions by using another linux system or the one you have just booted from.

I will add this file into the next version of the MPI Tool Kit (v0.090) but if you want to, you can just copy it to the (MPI Tool Kit)\csm\e2b folder of your current version so that any new .imgPTN files will add it in (or copy it into your existing .imgPTN images after switching to them).

You may need to make the file executable first, by using chmod u+x command however.

I am not sure how useful this .sh script will be because there is no easy way to switch-in a different .imgPTN file unless you:

  • Use a VM like QEMU/VBox under linux to MBR-boot to the E2B menu
  • Run SWITCH_E2B.exe under Windows (anyone tried WINE?)
  • MBR-boot to the USB drive

1 comment: