Monday, 8 September 2014

Easy2Boot v1.56Beta10 now available for testing

E2B v1.56 Beta10 is now available in the Alternate Download area on the Easy2Boot Download page here. I consider this to be a Release Candidate and will release it as the official v1.56 soon unless anyone spots any bugs. It uses the latest versions of grub4dos which have several new minor bug fixes thanks to Chenall. The E2B version history is here.

To update your E2B drive, just extract all files from the zip file directly onto your E2B USB drive (even if you have the DPMS version on your E2B USB drive, it will still be updated correctly).

P.S. I have updated RMPrepUSB to include the same new version of grub4dos too. Download from here.

Saturday, 6 September 2014

How to make your own linux ISO .mnu files

I was asked today about LXLE with persistence. This distro is based on Lubuntu and the user wanted to get persistence working. There was a lubuntu-13.04-desktop-i386_Persistent.mnu menu available but not one for LXLE.

I thought I would describe how I went about changing this lubuntu-13.04-desktop-i386_Persistent.mnu file to get it working with LXLE.

  • First I copied the lubuntu-13.04-desktop-i386_Persistent.mnu file and the lxle ISO file to the \_ISO\MAINMENU\MNU folder of my E2B NTFS USB drive which I use for testing.
  • Next, I renamed the file to lxle-1404-x64_Persistent.mnu.
  • Next, I edited the .mnu file in Notepad to change all occurrences of the  lubuntu-13.04-desktop-i386.iso file to lxle-1404-x64.iso.
  • Next, I changed all occurrences of the persistent file lubuntu-rw to lxle-rw
  • Finally, I made a persistent ext2 file in the root of the E2B USB drive using RMPartUSB's - Create ext2 FS button. When prompted I used:
               File Name = lxle-rw
               Volume Name = casper-rw
               Size = 500
  • I then ran WinContig on the drive (RMPrepUSB - Ctrl+F2).

Unfortunately, I got an error when I tried to boot from the menu entry in E2B


This indicated that the file \casper\initrd.lz was not actually present inside the .iso file.

Looking inside the ISO file using 7Zip to view it, I found:


Normally, in a linux ISO that uses isolinux to boot, there is an isolinux folder which holds several .cfg files, the main one being isolinux.cfg. If grub is used, there may be a \grub folder containing config files. If grub4dos is used, it may have a \menu.lst file and other .lst files.

I double-clicked isolinux.cfg to open it up in Notepad ++ (if you try to use Windows NotePad, it will merge all the lines together due to a CR/LF problem - see below).

The isolinux.cfg main LiveCD menu entry seems to be:

label live
  menu label live - boot the Live System
  kernel /casper/vmlinuz
  append  file=/cdrom/preseed/custom.seed boot=casper initrd=/casper/initrd.gz quiet splash --

So I converted this to grub4dos as follows:

kernel /casper/vmlinuz file=/cdrom/preseed/custom.seed boot=casper persistent quiet splash --
initrd /casper/initrd.gz 

As you can see, we just need to re-arrange a few things. The reason for the error is now apparent, because the file used for the initial ramdrive (initrd) is initrd.gz and not initrd.lz as it was in the Lubuntu .mnu file.

Warning: Do NOT copy and paste whole lines from a linux .cfg file into a grub4dos .mnu file. The carriage-return/line-feed end-of line characters are not the same in a linux file and although it may look OK in NotePad, it won't work in grub4dos due to embedded invisible CR/LF characters! It is better to type them in manually rather than copy and paste in lines from a linux text file!

We need to add in the 'persistent' parameter so that it will look for a casper-rw volume when it boots.

In the end, after tidying up the .mnu file a bit to make it easier to modify for the end user, we have:

# Make a ext2 file using latest version of RMPrepUSB in the root of the drive 
# File Name=lxle-rw  Volume Name=casper-rw
# Place this .mnu file and the ISO in either \_ISO\MainMenu\MNU or \_ISO\Linux\MNU
# This menu will work even on an NTFS USB boot drive
# IMPORTANT: you MUST run WinContig (Ctrl+F2) before booting E2B.
# e.g.
#\lxle-rw
#\_ISO\MAINMENU\MNU\lxle-1404-64.iso
#\_ISO\MAINMENU\MNU\lxle-1404-64_Persistent.mnu


iftitle [if exist $HOME$/lxle-1404-64.iso] LXLE 14.04\n Boot using .mnu file with persistence

set ISO=$HOME$/lxle-1404-64.iso
set PER=/lxle-rw

if exist CD echo WARNING: Cannot use partnew command! && pause && configfile (bd)/menu.lst
if "%E2BDEV%"=="" set E2BDEV=hd0 && pause E2BDEV forced to hd0!
#enable parttype output
debug 1
# make empty table entry in 3rd position in ptn table
parttype (%E2BDEV%,2) | set check=
debug off
set check=%check:~-5,4%
if "%check%"=="0x00" partnew (%E2BDEV%,2) 0 0 0
if not "%check%"=="0x00" echo WARNING: PTN TABLE 3 IS ALREADY IN USE - PERSISTENCE MAY NOT WORK! && pause
debug 1
if not exist %PER% echo WARNING: %PER% persistence file not found! && pause
errorcheck off
if "%check%"=="0x00" partnew (%E2BDEV%,2) 0x0 %PER%
errorcheck on
#map ptn 4 to ISO
partnew (%E2BDEV%,3) 0x0 %ISO%
map %ISO% (0xff)
map --hook
root (0xff)
kernel /casper/vmlinuz file=/cdrom/preseed/custom.seed boot=casper persistent quiet splash --
initrd /casper/initrd.gz 


This .mnu file will be in the Sample mnu Files folder in the next E2B 1.56Beta download and is also in the Alternate Download area now (though it may be removed later when 1.56 is released).




Friday, 5 September 2014

E2B v1.56Beta9 available

Stephan has emailed me with some suggestions on improving E2B when using FASTLOAD.

As you may know, if you enable FASTLOAD by simply copying the \_ISO\FASTLOAD.YES file to the root of your E2B USB drive, it causes the Main Menu to be cached the first time you boot to E2B. The next time you boot to E2B, it will not need to enumerate all the files in the \_ISO\MAINMENU folder + sub-folders, but will just load the cached menu that was made during the previous boot. This can speed up the appearance of the E2B Main Menu if you have a slow USB drive and lots of files in your \_ISO\MAINMENU folder.

The main changes affect the following files:

\_ISO\e2b\grub\MENU.lst  - small changes to improve messages and set STALE variable
\_ISO\e2b\grub\E2B.cfg  - small text changes
\_ISO\e2b\grub\ENG\STRINGS.txt - new strings $$STRmFS1, $$STRhMFD and $$STRhMFE
\_ISO\MAINMENU\ZZZF8ReloadMenu.mnu - modified to also refresh the cached FASTLOAD menu
\_ISO\MAINMENU\ZZA_FASTLOAD_ON_OFF.mnu - If FASTLOAD is active, this new menu entry will allow the user to enable or disable it. This menu entry can be suppressed using set NOFLDMNU=1 in your \_ISO\MyE2B.cfg file
\_ISO\MAINMENU\ZZZF8$_SHOW_FASTLOAD.mnu - new file to display a non-operational menu entry just above the F8 menu entry which shows the user that they are using a cached (old) menu.

You can, of course, delete any of these .mnu files and/or make a new version to modify their action or appearance (just don't use the same filename as E2B uses or they will be overwritten the next time you update!). You can also make your own STRINGS.txt file to modify the menu entry text.

The new Enable\Disable FASTLOAD menu entry can be suppressed by using the NOFLDMNU variable in your \_ISO\MyE2B.cfg file if you don't want the user to be able to disable it. Alternatively, you can just delete the ZZA_FASTLOAD_ON_OFF.mnu file.

If the \FASTLOAD.YES file is not present, then the Main menu will appear just as it did before.
If the \FASTLOAD.YES file is present, then you will see the Main menu below:

FASTLOAD ENABLED - Menu was loaded from cache on booting.
Note the 'CACHED MENU (FASTLOAD)' warning is displayed in the menu.

FASTLOAD ENABLED - Menu was just Refreshed by user using F8.

FASTLOAD DISABLED - it can be enabled again by the user with '3 Enable FASTLOAD'.

Let me know if you like this new arrangement or not.

I am still waiting for a few more bugfixes in grub4dos before I release v1.56. Chenall is working hard on the fixes and it should be done in a day or so.

Thursday, 4 September 2014

Tiny PXE Server tryout

I had seen Erwans Tiny PXE Server app but tonight I decided to try it out.

I wanted to just boot a WinPE ISO file via PXE as I thought this would be the easiest to get going.

Documentation for getting started is not that well organised on reboot.pro or in his Blog.
I eventually found a Blog post here for booting PE.

Here are step-by-step instructions for how I did it:

1. On My Windows 8.1 x64 PC, I downloaded Tiny PXE Server from reboot.pro (check the download link in this post)

2. I extracted the files to C:\temp\pxesrv on my Windows system

3. I copied a WinPE_x86.ISO file that I had lying around to the C:\temp\pxesrv\files folder.

4. I used NotePad to create a winpe.ipxe text file in the C:\temp\pxesrv\files folder as below:

#!ipxe
dhcp net0
set boot-url http://${dhcp-server}
initrd ${boot-url}/images/WinPE_x86.ISO
kernel ${boot-url}/memdisk iso raw
boot

5. Next I ran the C:\temp\pxesrv\pxesrv.exe file and changed a few settings as show in the red boxes below:


Note that I needed to choose a DHCP server address of 192.168.1.xx to match the subnet address of the router.
The Extra Option also needed to be set to 175.6.1.1.1.8.1.1  -> vendor option is 175.6.1.1.1.8.1.1 (etherboot length 6 code 1 length 1 value 1 code 8 length 1 value 1). More details here http://www.etherboot.org/wiki/dhcpd

When you are happy with the settings - click the Online button.

6. Finally, I connected an Ethernet cable from my router to my EeePC 904HA netbook, switched it on and selected 'Network Boot' from the BIOS Boot menu.. VIOLA! - it started to load the ISO into memory and then booted to it! The EeePC now runs WinFE via PXE boot.

I have not yet experimented any further with Tiny PXE Server, but so far it looks encouraging!

Erwan has more examples on his Blog here and some quick HowTo's are here for different payloads.

Tip: If you are having problems PXE booting from a real system, it may be due to your router or client system. A good test is to run a Virtual Box virtual machine. Just set the Network adapter to 'Bridged' - start the VM - press F12 and then L for Lan. It should then PXE boot. This tends to bypass your router + cable + client and often works when a real system does not!

Tuesday, 2 September 2014

PassPass for Win8.1 (32-bit and 64-bit)

Add PassPass to your E2B USB drive and get access to any Windows system without needing to know the user account password!

I fixed the issue with 32-bit 8.1 and now the PassPass20140902SS.zip version 1.5 should patch XP -> Win8.1. Not tested on Win8.1 Update (but dll for 64-bit looks same as Win8.1 so hopefully will work).
I suggest you test on a 'test' system and not your work/office/home system (or at least make a backup first!).

Note: Latest version (same filename!) is listed in the E2B menu as (PassPass E2B v1.6) - if yours does not say this please download latest version. The E2B PassPass download is available in the Alternate Download areas from this page.

Monday, 1 September 2014

PassPass update for Win 8.1/10

I have updated the clever PassPass grub4dos utility written by Holmes.Sherlock and Wonko the Sane from reboot.pro. It should now work for XP through to Windows 8.1.

Note: Latest version in E2B v1.87+ includes PassPass v1.7 for XP through to Win10.

This utility allows you to bypass the Windows user password required for logging into a  local user account on Windows (does not work if you select an online Microsoft account, so select a local user account first). It works by hard-patching a Windows dll file before you boot to Windows. Once you have finished with the Windows system, you can Unpatch or restore the dll so that normal password function is restored.

Note: KonBoot v2.5 will allow you to get into a local user account or online account in Win8/8.1/10.

For more details on PassPass, see here.  It allows you to gain access without using the user's account password, PIN number or picture gestures (just use any password, PIN or gesture!).

Add PassPass to E2B

PassPass can be found in the \_ISO\docs\PassPass folder on your E2B drive with a ReadMe.txt file or you can unzip the downloaded E2B PassPass version.

  1. Copy the PassPass folder to your E2B USB drive  (e.g. to \_ISO\UTILITIES\PassPass). 
  2. Then move the large PassPass.bak file to the root of the E2B USB drive - for example:

\_ISO\MAINMENU\UTILITIES\PassPass\PassPass.mnu
\_ISO\MAINMENU\UTILITIES\PassPass\PPass.g4b
\_ISO\MAINMENU\UTILITIES\PassPass\wenv
\PassPass.bak

I would advise you to test it first on a 'test' system and NOT on a system that you need (or at least take a full backup first). The file \Windows\system32\msv1_0.dll is the only Windows file altered by PassPass.

PassPass menu entry

PassPass will detect all Windows installations on all disks
Choose which one you want to patch.

You can backup the msv1_0.dll file first before you patch it.
Then run the Patch Windows menu option.

You will be told how many patch areas have been identified.
Press ENTER to patch the dll and then choose the Boot from Internal Hdd menu option
to boot to the patched OS (or reboot the system).

To change a User Account password once patched with PassPass,

  1. Create a new Administrator User Account (e.g. NEWUSER) with no password
  2. Log-in as NEWUSER. 
  3. You can then change the password on any other user account. 
  4. Then delete the NEWUSER account and restore the DLL by running PassPass again.
P.S. If you try PassPass and it worked, please tick the 'funny' box below. If it failed, please add a comment and give details of the msv1_0.dll file in your version of Windows (click on Properties).

PassPass for WinPE

If you need to patch a system that is UEFI-bootable only, you can boot to WinPE and run the Windows PE executable version PEPassPass.exe.

E2B UtilMan and SetHC  hack feature

E2B v1.92+ also contains a useful automated way to use the UtilMan.exe hack for Windows XP-10 which works on all (unencrypted) Windows OS's.

Sunday, 31 August 2014

E2B v1.56 now recognises .iso64 file extensions

E2B v1.56 Beta6 and later versions will now recognise the .iso64xxxxx file extension and will only list the ISO in the menu if the system contains a 64-bit CPU.

This means that if you boot from a 32-bit CPU, you will not see the menu entries for any 64-bit ISOs if you simply use a .iso64 file extension for them.

Note that this does NOT apply to ISOs under the \_ISO\WINDOWS folder (the Windows Installler ISOs) - for these you must use the .ISO file extension.


Most of the .iso family are supported - e.g. .iso64, .iso64PE, .iso64PE01, .iso64mem, .iso64win, .iso64linux, .iso64grub, .iso64force, .iso6401, .iso64dd, .iso64gz, .iso64e0, .iso64meme0,  .iso64pup and .iso64WB.

You can prevent all the file extensions from being listed in the menus by using  set EXTOFF=1  in your \_ISO\MyE2B.cfg file.

Note: If your menu uses FASTLOAD, you do not need to Refresh the menu when you boot on a different 32/64 bit system. The menu will test for a 32-bit or 64-bit CPU each time it is loaded.



A nice-sounding lady telephoned me yesterday and asked me if  I would like sign up to go on a Meditation Course - I told her I would think about it...

Thursday, 28 August 2014

Adding Unattend.xml files to Windows 7/8 Install UEFI .imgPTN images in E2B

If you want to install Windows Vista/7/8 etc. in MBR\CSM mode, you can just copy the Windows Installer ISO to the correct E2B USB folder, and you can copy over your own Unattend.xml files to the same E2B folder. E2B will then allow you to pick any one of these XML files so that the Windows install uses the correct Product Key (which is required by Win8), or is semi-automated or even full-automated, depending on what is in your Unattend.xml file.

However, if you use MakePartImage to convert the Windows Installer ISO into a partition image (.imgPTN file) so that you can both  UEFI- and MBR\CSM-boot from it, you will not have any of the E2B features to choose your own XML file or automate the install.

I have therefore detailed some instructions here on how to add your own AutoUnattend.xml file to a partition image .imgPTN file.

If you are using an E2B Removable type of USB Flash drive, then you just need to copy the AutoUnattend.xml file to the root of the image. However, if your E2B USB drive is a Hard disk or 'Fixed disk' type, then this will not work because Windows only auto-detects a \AutoUnattend.xml file on removable media like Flash drives, floppy disks (remember those?) or DVDs.

Instead we need to tweak the files inside the \sources\boot.wim file.

If you follow the instructions, you can even offer the user a choice of XML files to use before Windows Setup runs.


Wednesday, 27 August 2014

Detect a 64-bit or 32-bit CPU in Easy2Boot

We can use grub4dos to detect the CPU bitness using the is64bit command.
E2B v1.56 Main  menu heading shows CPU type and total usable system memory

We can use this to make a .mnu file for the MAINMENU folder:



$$$CPU_TYPE.mnu
===============
# Display as menu item if CPU is 32-bit or 64-bit

iftitle [checkrange 2,3 is64bit]   --- INFORMATION: 64-bit CPU ---
errorcheck off


iftitle [checkrange 0,1 is64bit]   --- INFORMATION: 32-bit CPU ---
errorcheck off


To make a menu entry that will allow the user to check it use:

title Check the Processor\n Detect if CPU is 32-bit or 64-bit
checkrange 2,3 is64bit && pause Processor is 64-bit
checkrange 0,1 is64bit && pause Processor is 32-bit
errorcheck off
boot

The 64Bit_Auto_Detect_ISO.mnu file in the E2B Sample mnu folder has an example where either a 32-bit or 64-bit ISO will be automatically run depending on the system CPU:

# Change the 1st, 2nd and 3rd line as required - line 4 may be deleted if no pause required

title Run a 32-bit or 64-bit linux ISO \n Auto-Detect system type and run correct ISO
set ISO=Ubuntu32.iso
checkrange 2,3 is64bit && set ISO=Ubuntu64.iso
pause WILL BOOT %ISO% - Press ENTER key to continue...
/%grub%/qrun.g4b $HOME$/%ISO%
boot

To make a .mnu file for a 64-bit ISO that will only be visible if the system has a 64-bit CPU, we can use:

iftitle [if exist $HOME$/Ubuntu64.iso && checkrange 2,3 is64bit] Ubuntu 64-bit \n Boot from a 64-bit ISO
/%grub%/qrun.g4b $HOME$/Ubuntu64.iso
boot

Monday, 25 August 2014

E2B v1.56 Beta available

A number of people have hit the problem of using Windows Install ISOs which have non-standard characters in the ISO filename, such as ( and ) and ! and & etc. This caused a problem with some of the Windows .cmd scripts which are automatically run when Windows\WinPE boots.

I have attempted to fix this now in v1.56Beta, so you can have names like:

Windows 8.1 32-bit & 64-bit (English).iso

also, I have found a way to suppress the 'Press any key to boot from CD or DVD' prompt which you may see when you boot from some Windows ISOs. This message is caused by the \boot\bootfix.bin file inside the ISO file. If the bootfix.bin file is not present then the code inside it which prompts you to press a key is not run. I found a neat way to prevent this from being run - see here for details.

Please let me know if you find any issues with this Beta version.