Sunday 6 November 2016

Restore the E2B partition under 64-bit WinPE

If you use .imgPTN partition image files to boot to WinPE, you sometimes may want to return the E2B USB drive partitions back to it's original 'E2B' state (without having to boot into CSM\MBR mode), so that you can access the files on the E2B partition whilst running WinPE.

Saturday 5 November 2016

E2B Grub2 Menu system Beta 5 available

UEFI_GRUB2_PTN2_Beta5.imgPTNLBAa23 is available from the Alternate Downloads Area - Other Files folder.

The main difference between this version and the previous version is that for UEFI-booting to grub2, it uses a 64-bit shim for Secure Booting.

Making files contiguous on an NTFS volume under linux

Recent versions of E2B contain a 32-bit version of the binary executable for 'UltraDefrag' for linux (udefrag).

This can be found in the \_ISO\docs\linux_utils folder.

You will need to use chmod to make it executable first. More details are here.

To run the 32-bit version of udefrag under Ubuntu 64-bit:
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
(change to _ISO/docs/linux_utils folder)
sudo chmod 777 *
sudo udefrag -om /dev/sdX1  (where sdX1 is your NTFS USB partition - e.g. /dev/sdb1)

I got the udefrag file from here (tools.zip). There is also a post here which may help.

I am afraid my linux skills are virtually non-existent, so if anyone would like to provide me with a compiled, 64-bit version of udefrag, I will add it to E2B for others to use.

Thursday 3 November 2016

Weird UEFI-boot behaviour from my Asus Z87A mainboard

I was trying to boot a UEFI grub2 payload yesterday when I discovered something odd.

I was using an IODD 2531 Hard disk enclosure fitted with an SSD. I had loaded the grub2 menu system .imgPTN file using Switch_E2B.exe so it had the grub2 .EFI boot files present.

I then connected the drive to my Lenovo IdeaPad 300 and pressed F12 to get the Boot Selection menu. A UEFI boot entry was then displayed, so I selected that option and it booted to the grub2 menu - no problem!

Next, I did the same thing but using my Asus Z87A PC. To my surprise, the BIOS refused to list the IODD 2531 as a UEFI-bootable drive! There was an MBR-bootable option for the USB drive, but there was no UEFI boot option listed. This was very strange because I had UEFI-booted in this way dozens of times before from the same PC in the same way.

When I examined the Master Boot Record using RMPrepUSB - Drive Info - 0, I found that I had these partitions:

ptn #1 : FAT32 with EFI boot files
ptn #2 : NTFS with payload files
ptn #3 : Type 0x83 ext3 partition
ptn #4 : (empty)

Now ptn #3 was not supposed to be there. It was only there because it was left over from a previous experiment and because the grub2 .imgPTN file was switched in, it left partitions 2 and 3 alone, so that both were still present.

So I deleted ptn #3 and tried it again in the Z87A PC. This time the BIOS listed a bootable UEFI option for the IODD 2531 and it could now UEFI-boot.

So it seems that the mere presence of the Type 0x83 ext3 partition prevents the Z87A firmware from detecting the USB drive as UEFI-bootable!

Weird!

Footnote:
It seems that most UEFI BIOSes do not like MBR partitions which are out of order.
If a non-zero partition type is present and the Start Sector value is lower then the previous partition table entry, then it regards the whole disk MBR as invalid.

So in the above case, the start sector of partition 3 was before the start sector of partition 2.
Changing the partition 3 type to 0x00 fixed the issue and linux could still access the ext partition.




Wednesday 2 November 2016

PC Rescue ToolKit Live CD by Bertrand Goio

Rescue ToolKit by Bertrand Goio is Linux-based rescue and diagnostic - RTK-3.iso (password=live).

The author has now replaced this toolkit with the PC Rescue Tool (Italian keyboard by default).
Just add it to your E2B USB drive and check it out.
It also has 64-bit UEFI boot files and so should work if converted to a FAT32 .imgPTN file too.




Package List is here.

Tuesday 1 November 2016

Add salix+persistence to E2B

Following from a request from kasep, here is how to boot salix with persistence from E2B.

Salix with Persistence (folder STEVE was created)

From various experiments, I could not get salix to recognise an ext3 persistence file when mapped to partition 3 of the E2B drive. It seems that salix specifically looks for a 'persistent' file in the root of a FAT32 or ext3 volume with a volume name of  'LIVE'.

So, we need to convert the .ISO file to a FAT32 .imgPTN file. Here is how I did it:

Monday 31 October 2016

Use Tron to automatically clean an infected Windows system

Tron by 'vocatus' is a large Windows script that will automatically 'spring-clean' an infected/unwell Windows system. After Tron has been run, the system should be free from infection and may also run faster than before.

You will need to be able to boot to the Windows system (in Safe Mode+n/w mode) and you will need internet connectivity for best results.

If you download the self-extracting Tron .exe file, you can keep it on your E2B USB drive (but disconnect the E2B drive and any other USB drive before starting Tron.bat, or else it will needlessly scan those drives too).

How to check if you booted to WinPE via UEFI or MBR

If you have booted from a WinPE image, you can check what mode you have booted in (UEFI or MBR) using a small cmd script:

Report_UEFI_MBR_boot_mode.cmd

@echo off
wpeutil UpdateBootInfo > nul
color 1f
for /f "tokens=2* delims= " %%A in ('reg query HKLM\System\CurrentControlSet\Control /v PEFirmwareType') DO SET Firmware=%%B
:: Note: delims is a TAB followed by a space.
if %Firmware%==0x1 echo WinPE booted in BIOS mode.
if %Firmware%==0x2 echo WinPE booted in UEFI mode.
echo.
pause

You can use this script to determine what mode you have booted in (original source here).
The script only works in WinPE not Windows.

This code may be useful when you write a diskpart script for instance, and you need to know whether to partition a disk using GPT partitions or MBR partitions depending on how the user booted to WinPE initially.

The Report_UEFI_MBR_boot_mode.cmd script can be downloaded from the Alternate Downloads - Other files folder.

Saturday 29 October 2016

E2B v1.86 is now available

Changes from v1.85 are:
  • Bug fix for wsusoffline Win8 updates not working. 
  • Win8/10 Repair option now offered (press a key within 4 seconds after selecting an ISO). 
  • Language files updated to add a Windows Repair option prompt (see below).
  • Self-extracting .exe versions available.
I have used WinRar to create self-extracting exe files from the zip files. This means you can download and click on the .exe file and it will automatically extract the files to a temporary folder and then run the Make E2B USB Drive (run as admin).cmd script.

This should make it easier for naive users to make E2B USB drives.

If you don't want the contents to be extracted to a temporary folder, just open the .exe file using 7Zip or WinRar and extract the contents, or download one of the .7z or .zip versions.

If you have a Win8/10/2016 ISO in the \_ISO\WINxxx menu folders, when you select the ISO file, you will be given 4 seconds to press a key before being prompted to select an XML file. If you press a key within 4 seconds, it will boot straight to the ISO and you will be able to use the standard Windows Repair option in the Windows Install Setup menu (you will NOT be able to install Windows though!). See my previous blog for more details.

The downloads are available from the Alternate Download Areas as usual.

Thursday 27 October 2016

Get Windows 10 Professional for £4 (legally)?

You can still upgrade to Windows 10 from Windows 7 if you know how (see here), but what if you want to install Windows 10 Pro on a new home-built system?

It seems that some sellers on eBay (UK and USA) are selling Windows 7 Pro keys for approx £4.

Now, as far as I am aware, you can still use a Windows 7 key to perform a fresh install of Windows 10 (as long as you use a recent version of the Windows 10 install ISO and not the first version).

These eBay sellers seem to think that they are 'legal' because they are also selling a faulty mainboard together with the Product Key. The only catch being that although they email you the Product Key within an hour or so, if you want the faulty mainboard then you have to either pick it up yourself or pay for postage and packing (which is quite expensive, so they clearly don't expect anyone to request the faulty mainboard!).

Whether this is actually within the terms of a Microsoft 'system builder' licence is debatable. I am sure MS never meant that a seller could sell faulty mainboards and that MS intended that the part and the Windows 7 COA should be shipped together.

I don't know if these keys actually work because I have not personally tried one, but for £4 it may be worth a try!