Thursday 17 December 2015

New Switch_E2B.exe v1.0.6 available

There have been some recent changes to Switch_E2B.exe

  1. Bugfix - When E2B switches to a .imgPTN file, it changes the Disk Signature bytes (four bytes starting at 1b8h in the MBR) to be the same as the start LBA position of the .imgPTN file. This ensures the 'new' partition arrangement also has a new disk signature. Switch_E2B.exe did not change these Disk Signature bytes. This meant that if you had a BCD inside your .imgPTN file which used the disk signature to identify the USB disk, if you switched to the .imgPTN file using Switch_E2B.exe, it would not boot to Windows due to a mismatched BCD and Disk Signature. This has now been fixed in Switch_E2B.exe.
  2. If you made a FAT32 E2B USB drive using flashboot, Switch_E2B would not recognise it.
  3. If you had a large E2B USB HDD which contained thousands of files, it could take Switch_E2B a long time (20+ seconds) to search the whole volume for all .imgPTN files. The new version only searches under the \_ISO folder by default. To search the whole drive volume, you now need to untick the 'Only search \_ISO folder' checkbox.


About E2B .imgPTN Disk Signatures

When E2B switches to any .imgPTN file, as well as changing the partition table in the MBR, it also changes the Disk Signature bytes in the MBR. This identifies the E2B USB drive as a 'different' drive to Windows (it was a precaution which I thought was wise to avoid any file corruption). The Disk Signature is changed to be the same as the LBA start address of the .imgPTN file.

Currently, if you move the .imgPTN file to a different part of the same USB drive, or copy it (either to a different place on the same drive or to a different USB drive), then it's file start position will change. This means that the Disk Signature will be different when you switch in the .imgPTN file and so if it uses the BCD to boot to an ID'd disk and volume (such as a WinToGo OS), then it won't boot any more until you fix the BCD entries.

If I had left the Disk Signature alone, then it would be possible to move the .imgPTN file to anywhere on the same E2B disk or copy it to anywhere on the same E2B disk. However, if I changed E2B and Switch_E2B.exe now, so that it did not change the Disk Signature, it would 'break' any existing .WinToGo imgPTN file. So anyone who updated to a new version of E2B would find that their WinToGo .imgPTN files would no longer boot! 

Another option would be to use the same disk signature for all .imgPTN files so that whenever you switched to a .imgPTN file, it always modified to MBR to use the same disk signature each time (e.g. 00 11 22 33). This would mean that you could copy and move any .imgPTN file across different E2B USB drives and they would still boot. However, there is a danger that Windows would get confused if you had two or more E2B USB drives connected at the same time and they both were in the CSM Mode and so would both have identical disk signatures! Also, this would 'break' all existing WinToGo .imgPTN files!

If Windows XP and Vista sees two drives with the same Disk Signature, it will automatically change one of the disk signatures! If Win 7 and later OS's see a signature collision, Windows will 'offline' one of the disks until you fix the offline disk by manually 'Onlining' it using Windows Disk Manager - it will then be assigned a new drive letter and the Disk Signature will be automatically changed.

So for now I am going to leave things as they are. If you move a working .imgPTN file and find that the BCD is no longer working because of the change in disk signature, you will need to fix it using BootIce or EasyBCD or bcdboot.

No comments:

Post a Comment