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:

# 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

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%

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

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.

Sunday, 24 August 2014

Easy2Boot v1.55 released (at last!)

Quite a few changes in version 1.55, thanks to many others for ideas, improvements, language files and bug reports!

E2B v1.55 changes:
  • F1 Help Main menu added (English only). F1.cfg help file can be translated into other languages.
  • \_ISO\e2b\grub\menu.lst code change to work around incompatibility issue between AMI BIOSes and MyDigitalSSD OTG USB drive - grub4dos losing all variables! Affects HP Compaq dx2400 microtower, Asus M4A89GTDPRO-USB3 motherboard, Asus x550ca - all have American MegaTrends BIOS. Exact cause still under investigation.
  • Portuguese language STRINGS.txt added (thanks Carlos).
  • Romanian language STRINGS.txt added (thanks Anto).
  • French language STRINGS.txt added (thanks Nicolas).
  • New \_ISO\docs\mythemes folder added - supports adding a $Change_Theme.mnu menu file to the Main menu. Read the ReadMe.txt file in the folder for more info.
  • .cfg file extension support added - can now switch themes by copying a MyE2B.cfg-style file to a menu folder.
  • \_ISO\docs\Sample E2B Templates folder name changed to Templates due to path length limitations in grub4dos. If updating, you can delete the old Sample E2B Templates folder.
  • Latest grub4dos grldr versions included in E2B (important long-standing NTFS bug fixed in new version). Longer paths allowed for splashimage, etc. see for details of fixes.
  • EXTOFF variable added for MyE2B.cfg file - if set to 1, file names are listed in the menu without their file extension.
  • Various small changes to Qrun.g4b, English STRINGS.txt and other E2B files.
  • You can change or remove the menu   arrow marker symbol which indicates the highlighted menu entry, using a new grub4dos feature (see Sample_MyE2B.cfg).
  • If you prematurely abort an .imgPTN file selection, the 4th partition is now cleared instead of leaving it switched in.
  • Sample_MyE2B.cfg has sample code to detect host display resolution and choose different wallpapers.
  • linux script revised so works with older bash shells (thanks Todd).
New files added to \_ISO\docs\Sample mnu Files folder:
  • linuxmint-17-mate-32bit-v2_Persistent.mnu - for new versions of Mint
  • Tails_for_USB_HDD_Persistent.mnu - required if running Tails from a USB HDD or if you want persistence
  • Change_Wallpaper.mnu - allows user to change the wallpaper background from a menu entry
  • Change_Language.mnu - menu entry to change E2B language
  • Change_Theme.mnu - menu entry to allow user to select a theme
  • BlueTheme.mnu  - example of how user can select an alternate Theme template
  • Desinfect_2014_Peristent.mnu
  • Desinfect_2014_with_Updates.mnu
  • A_BlankMenuEntrySeparator.mnu - fancy 3-line separator
  • Win_Vista_7_2K8R2_Direct.mnu - for Win install menu entry with preset XML file
  • Win_Win8_2012_Direct.mnu - for Win install menu entry with preset XML file and/or KEY
  • PTN_LOG1_Menu.mnu - If you have an E2B drive with a Logical partition, you can boot from files on that partition with this menu.
As always, let me know if you find any problems - there are many 1000's of happy E2B users who don't have a problem, so if you do find a problem ,it will probably be due to an incompatibility with your particular system or payload file. Many of these sorts of problems can be worked-around or fixed, but only if you let me know using the Contact Me page on the website!

Let me know what you think of the new changes.

 Please tick 'funny' 'interesting' or 'cool' or add a comment to let me know which posts you most enjoy.

Saturday, 23 August 2014

A problem with a wireless mouse and USB 3.0 flash drives was driving me crazy!

If you have read my blog, you may remember that I had built a new system a few months ago - see here.
On the whole I have been very pleased with the system. It is quiet and fast.

The front panel has four USB ports, the top two are USB 2.0 and the bottom two are USB 3.0.
I specifically wanted this Cooler Master N600 case so that I could have convenient access to both types of ports.

The only problem that I have been having for months now was with the Anker Wireless Mouse and dongle that I have fitted to the front panel USB 2.0 port.

Most of the time it worked just great, but I noticed that when I plugged in a USB 3.0 Flash drive into the USB 3.0 port on the front panel, the wireless mouse started to respond in an unreliable and jerky fashion, particularly just after the USB 3.0 Flash drive had been connected. If left it for a few minutes, the wireless mouse response would improve, but it still gave me trouble and still caused me great frustration (and I now humbly apologise for any physical harm that I may have caused to the poor mouse and the abusive comments I may have shouted in moments of anger)!

My first thought was that perhaps the single AA battery in the mouse was getting flat, I found that if I changed it for a new one, the response did seem to improve slightly, however it still wasn't perfect.

As always, as soon as I unplugged the USB 3.0 Flash drive - the mouse responded perfectly!

I tried many different USB drives and found that:

1. The issue only occurred with USB 3.0 Flash drives  (not external USB 3.0 hard disks which, of course, had a short USB 3.0 lead)
2. The issue only occurred when I connected a USB 3.0 flash drive to the USB 3.0 front port - if I connected the same flash drive to the other spare USB 2.0 front port or rear USB 3.0 port - no problem!
3. If I connected a USB 2.0 Flash drive to a front USB 3.0 port there was no problem.
4. There was no difference in behaviour, whether I connected the USB 2.0 wireless dongle to the front USB 3.0 port or to the front USB 2.0 port.
5. If I replaced the wireless dongle with an ordinary wired USB 2.0 mouse it worked fine.
6. The wireless dongle worked in the rear USB ports (but this was inconvenient if I wanted to use the dongle in another system, because I could not easily get access to the rear of the PC to remove it).

Over the last few months, I have tried updating the USB chipset drivers of my Haswell mainboard but to no avail.

Today however, I Googled for 'USB 3.0 wireless mouse jerky' and found this thread.
It said that USB 3.0 signals can cause interference with the 2.4GHz wireless mouse dongle and that I should separate the USB 3.0 flash drive from the USB 2.0 wireless Bluetooth dongle. It cited an Intel PDF on the subject here (esp. see 4.3).

So I got out a spare, well-shielded USB 2.0 extension cable and used it to connect the wireless dongle to the same USB 2.0 front port as before.


Fig. 1   Before (mouse was jerky)    - and -     Fig.2  After (works perfectly)!

The result was  (drumroll......)   >>>   the wireless mouse now works fine!

Even if I taped the wireless dongle directly on top of the USB 3.0 Flash drive it still worked without any problems! This suggests to me that Intel's assumption that the problem was caused by radiated interference is not correct. It seems to me that the problem is caused by electrically transmitted noise.

Another test was to completely wrap the USB 3.0 Flash drive in tin foil and earth the foil to prevent any wireless interference (without using an extension cable). Again this proved ineffective.

I also tried inserting a 1m USB 3.0 extension cable between the Corsair GT USB 3.0 Flash drive and the front panel USB 3.0 port with the wireless dongle directly plugged into the USB 2.0 port  (i.e. as in Fig.1 but using a USB 3.0 cable to connect the Flash drive). I placed the flash drive directly next to the wireless dongle so it would cause maximum radiated interference - again the mouse worked fine!

So it seems that merely using a USB extension cable fixes the problem - this may be because the RF frequencies in the USB 3 data lines or power lines are being absorbed by the USB cable's ground shield, so that less electrical RF noise get's back to the front panel PCB via the signal/data wires.

So I am not at all convinced that this is a case of wireless interference - more likely, it is a case of poor grounding and isolation on the USB port PCB that is inside the front panel of the case. It may be that a few high-frequency decoupling capacitors sprinkled around the USB port PCB may fix the problem, but I am going to leave that for another day! Getting rid of high-frequency noise such as 2.4GHz is tricky and often a multi-layer PCB with close ground-Vcc planes is the only way - this would mean Cooler Master would need to make a decent multilayer front panel PCB. Better grounding would also help!

Equally, there may be a lack of high-frequency decoupling inside the USB 3.0 Flash drives too (I tried 3 different makes and they all gave problems - Corsair Voyager GT 32GB, a Pretec Rex 100 8GB and a Busbi 16GB, the Busbi USB 3.0 Flash drive had a silver 'metalic-paint' plastic case and did not seem to cause quite as much of a problem as the other two). The PCBs inside these pen drives are often simple dual-layer PCBs.


So just bear in mind that if you have  USB 3.0 devices  AND wireless devices such as  wireless mouse dongles, bluetooth dongles or WiFi dongles (or perhaps TV tuner dongles) - keep all USB 3.0 devices away from them. If possible, use rear ports for one and front USB ports for the other.

If you are still having problems, try using short, well-shielded USB cables instead of connecting them directly to the system's USB ports.

If they ever start making USB 3.0 versions of wireless dongles - I can see this issue becoming a BIG problem!

P.S. Since sorting out this problem, I have noticed that the battery in my wireless mouse lasts for several months now instead of just a few weeks. My guess is that it had to keep re-transmitting 100's of bluetooth packets due to the interference problems and that this quickly depleted the battery.

If you found this blog post useful please tick one of the Reactions boxes below.

Wednesday, 20 August 2014

Easy2Boot v1.55 can display files in the menu without their file extensions

Files in E2B menus are normally displayed by using their full  filename + extension, as below...

You can use a .txt file to define an alternate menu entry for each file.

However, now with v1.55, if you use  set EXTOFF=1 in the \_ISO\MyE2B.cfg file, all files in all menus will be displayed without their file extensions, as shown below...

You can use spaces in the filename if you wish (see #4).

A Beta7 version of 1.55 is available in the Alternate Downloads area as usual.

It is almost ready for release, I am just waiting for one bugfix to grub4dos 0.4.6a from the developers.
E2B v1.55 will complain if the latest version of grub4dos is not used. Although it may work using earlier versions of grub4dos, some bugs have been fixed recently in grub4dos (one of which was quite serious to do with writing to NTFS files not working), so a new version is 'required'.

Many thanks to the E2B users who have suggested small tweaks and improvements to make E2B even better!

The latest grub4dos also allows you to disable or change the ► symbol that is displayed at the side of the highlighted menu entry - see the \_ISO\Sample_MyE2B.cfg file for details.

P.S. MakePartImage has also been updated to v 0.037 and now includes RMPartUSB.exe in the \e2b folder so you can restore the E2B partition from Windows using the RestoreE2B.cmd script, without needing to boot from the E2B USB drive to the CSM menu.

Please tick 'funny' 'interesting' or 'cool' or add a comment to let me know which posts you most enjoy.

Sunday, 17 August 2014

Add Desinfect+Persistent Virus Updates to your Easy2Boot USB drive

Here are the steps to add the Desinfect 2014 (and 2015/2016/2017) ISO to you E2B USB drive and have persistent virus definition updates too ...

As well as your E2B USB drive, you will need a spare 4GB or larger USB Flash drive that can be wiped - otherwise you will need a previously-made desinfect bootable Flash drive. This spare drive is not needed once the E2B installation has been completed.

I also had an internet connection (via Ethernet) connected to the system so that I could get the latest updates.

Direct link to .mnu file for persistent updates here and also the .mnu file is in the E2B's \_ISO\docs\Sample mnu Files folder.

If you are new to Easy2Boot, the instructions here may help too.
You can, of course, add 100's of different  linux LiveCD ISO files or Windows Installer ISOs or 100's of other files to the E2B drive as well as Desinfect! See here for a list of tested payload files.

Tip: Before you begin, I suggest you just first use a spare USB Flash drive to install Desinfect onto. You will need this anyway, so it is best to create one now and check it works!

If you have more than one Desinfect (e.g. 2016 and 2017) on the same E2B USB drive, you will need to change the name of the \desinfect-rw file in one of the .mnu files (e.g. use \desinf2016-rw for the 2016 .mnu file and create a new \desinf2017-rw ext2 file using RMPrepUSB).

Tip: If you want English+USA keyboard, when at the linux boot menu when booting from the ISO, press TAB and edit the kernel parameters to change 'de' to 'en' (two places).

Instructions (2014-2016)

On your E2B USB drive...

1. Make an ext2 file -  the Volume Name of the ext2 file must be desinfSIGS - create a 1000-2000 MB ext2 file using RMPrepUSB - Create Ext2 FS as follows:

File Name       = desinfect-rw  (must match the filename specified in the .mnu file)
Volume Name = desinfSIGS    (do not change!)
Size                 = 2000 MB        (1000MB minimum but I suggest larger to allow for more updates)

Note: ext3 is less prone to file corruption than ext2. You may wish to use ext3 instead of ext2 (untested).

2. Add the .ISO to your E2B drive (name must be ct_desinfect_2014.iso) as well as the .mnu file - e.g. you should now have added to your E2B USB drive:
  • \desinfect-rw
  • \_ISO\MAINMENU\MNU\ct_desinfect_2014.iso
  • \_ISO\MAINMENU\MNU\Desinfect_2014_with_Updates.mnu (find it in the \_ISO\docs\Sample mnu Files folder)
Or for Desinfect 2015:
  • \desinfect-rw
  • \_ISO\MAINMENU\MNU\desinfect-2015.iso  (extracted from original ISO file)
  • \_ISO\MAINMENU\MNU\Desinfect_2015_with_Updates.mnu (download from the E2B Alternate Download Area if not in the \_ISO\docs\Sample mnu Files folder)
Don't forget to run WinContig (RMPrepUSB - Ctrl+F2) to make all files contiguous! You can use any of the \_ISO\XXX\MNU folders depending on what menu you want desinfect to be listed in.

3. Boot from the E2B drive to desinfect - this must be done on a real system, NOT a VM.

4. We now need to copy the signature files from a Desinfect bootable USB Flash drive that has been made by the Desinfect 'Create USB' utility. If you don't already have one, then make one now...

Insert a spare 4GB or larger USB Flash drive into the system and click on the Desktop icon to 'Create bootable USB drive with desinfect' - follow the prompts to create a Bootable USB drive - untick the  'Kompatibilitat' box or else your will get a GPT disk!

After the USB drive has been made, you should be asked if you want to copy the latest updates - I chose Yes at this point. If you choose No then there will be no new updates and you will have to update the E2B ext2 partition later anyway. The update download can take quite a while (e.g. 40 minutes to 2 hours!). If you just want to get the E2B USB drive working without waiting an hour or more then choose No.

5. Shutdown desinfect.

6. Remove the spare USB Flash drive (important!) and reboot from the E2B drive to desinfect again (English or default German language).

7. Insert the spare USB Flash drive again - Ubuntu should now mount all the 3 partitions on that drive including the desinfSIGS partition that is on the spare USB Flash drive and which contains the virus signatures.

Note: if you have both a desinfSIGS and desinfSIGS_ volume - you did not correctly follow these instructions! One will be the E2B ext2 volume and the other will be the spare Flash drive volume you just created! Shutdown and try again from step 6 or step 1!

8. The spare flash drive 'signatures' volume should be mounted at /media/desinfSIGS - we now need to copy the contents to our ext2 filesystem as follows:

For 2015: the signatures are at /media/desinfect/desinfSIGS

Open a command console window and type the blue text below:

df                          (find the E2B ext2 partition - e.g. /dev/sdb3)

sudo fdisk -l           (looks at all disks - see screenshot below)

ls /media/desinfSIGS/ (2014 only)
ls /media/desinfect/desinfSIGS/  (2015 - check you have the desinfect-signatures persistent  lost+found logs config folders and several other files present)

mkdir ss

sudo mount /dev/sdb3 ss     (assumes sdb3 is your E2B ext2 partitition made from desinfect-rw)

ls ss -la                       (should list lost+found only)

sudo cp -pur /media/desinfSIGS/.   ss   (many files will be copied - note the /. is important do NOT use /* - for 2015 use /media/desinfect/desinfSIGS/.)
                                   instead of the cp command you can try   rsync -avHP (source) (target)

ls ss -la                (check all files/folders have been copied)
   Note: For Desinfect 2015, the empty, hidden file .desinfect2015 MUST be present)

sudo umount ss

Example of sudo fdisk -l  command:
In this example sda3 is the correct device (sda4 is the ISO).

For the 2015 version, make sure  .desinfect2015 is present (for 2015 version)!

9. Shutdown Desinfect - and now remove the spare USB Flash drive - we won't need this again.

10. Now boot to Desinfect from the E2B drive and click on the 'Viren-Signaturen aktualisieren' shortcut - it should report that you have all the latest updates.

in RAM = did not work!                       on USB = it worked!

Desinfect shows the signatures in RAM or they are now on the USB drive

Tip: Make a backup of the \desinfect-rw file, zip it up and keep it in a safe place. If you ever need to reformat your E2B drive or if the ext2 file on the E2B drive gets corrupted, you can easily restore it!

UEFI booting with persistence

Once you have normal MBR booting working as detailed above, you can convert the image to UEFI-boot as follows:

1. Drag-and-Drop the ct_Desinfect_2014.iso file onto the MPI ToolKit  MPI_FAT32  MakePartImage Desktop shortcut on your Windows Desktop to make a ct_Desinfect_2014.imgPTN file. See here for details.

2. Copy the ct_Desinfect_2014.imgPTN file to the \_ISO\MAINMENU folder

3. Move the \desinfect-rw file to the \_ISO\MAINMENU folder

Note: If you wish, you can put both files in a different menu folder - e.g. \_ISO\ANTIVIRUS.

4. Rename the desinfect-rw file to \_ISO\MAINMENU\ct_Desinfect_2014   (i.e. the file name must be identical to the .imgPTN file name but have no file extension)

e.g. we now have:
\_ISO\MAINMENU\ct_Desinfect_2014                  - was desinfect-rw
\_ISO\MAINMENU\ct_Desinfect_2014.imgPTN   - image partition file

5. The ct_Desinfect_2014.iso file and .mnu file in \_ISO\MAINMENU\MNU are no longer required and can be deleted.

6. (optional) - create a \_ISO\MAINMENU\ct_Desinfect_2014.txt file with whatever menu title you require - e.g.

title Desinfect with Signature updates (MBR+UEFI)\n Normal BIOS MBR mode or UEFI mode

7. Finally, don't forget to run WinContig on the E2B USB drive (RMPrepUSB - Ctrl+F2)

You can now select the ct_Desinfect_2014.imgPTN menu entry and it will switch in the new FAT32 partition and display the CSM boot menu.

Tip: E2B v.1.60+ supports the .imgPTNauto file extension to go straight to the CSM menu without a user prompt to switch partitions. So when it is all working, just rename the .imgPTN file to .imgPTNauto.

From the CSM menu you can boot in UEFI-mode using Clover (64-bit systems only) or boot in normal MBR-mode. You can also reboot the computer and then boot from the E2B USB drive in UEFI-mode by selecting the BIOS UEFI USB boot option.

Note: Desinfect does not support 32-bit UEFI booting.

If you want to UEFI-boot from a system that does not support CSM/MBR booting, you can run RMPrepUSB - QEMU or  VirtualBox+VMUB or MobaLiveCD or the QEMU Test boot.cmd file in the root of the E2B USB drive or \_ISO\SWITCH_E2B.exe, to boot from the E2B USB drive first under Windows - then you can select the .imgPTN menu entry to switch to the CSM menu before you connect the E2B USB drive to the target UEFI system.

Desinfect 2017 ISO

You will need a spare 8GB+ USB Flash drive to create a Desinfect USB drive.

I used ct_desinfect_2017_18.iso This is available on the DVD insert of the c't wissen Desinfec't 2017/18 special issue at
1. Add the .ISO file to your E2B USB drive at \_ISO\ANTIVIRUS

2. Boot to the ISO and create a Desinfect USB Flash drive using the icon on the Desktop.

I unticked the 'Compat' checkbox before making a USB drive, but I don't think it is necessary for these instructions (?).

3. Add the Desinfect_2017_Updates.mnu file to \_ISO\ANTIVIRUS and edit it so it has the exact name of your ISO file (two edits).

4. Use RMPrepUSB to create a 2GB (or larger) persistent file:

Make an ext3 file -  the Volume Name of the ext2 file must be desinfSIGS - create a 2000-3000 MB ext3 file using RMPrepUSB - Create Ext2 FS as follows:

File Name       = desinfect-rw  (must match the filename specified in the .mnu file)
Volume Name = desinfSIGS    (do not change!)
Size                 = 2000 MB        (2000MB minimum but I suggest larger to allow for more updates)

I suggest 2500MB, currently 1.4GB seems to be used.

5. Boot to E2B and select the desinfect menu (not the ISO file).
Allow Desinfect to boot and then you must ShutDown. 

IMPORTANT: Do NOT reboot to E2B after doing this or the next step will not work.


The 3rd partition entry on the E2B drive will now contain the ext3 file.

5. On a real system (not a VM), connect the Desinfect USB flash drive (only) and boot.

Ensure the status table at the top right of the desinfect Desktop says 'Signaturen auf USB'.

Click on the Update Download icon to get the latest updates, so we can copy them later on.

6. Now connect E2B USB drive to the same system whilst it is running Desinfect. We now need to copy the signature files from the Desinfect flash drive to our E2B ext3 file:

X in my case was c (e.g. /dev/sdc3)...

sudo fdisk -l  - ensure sdX3 is present and the correct size - e.g. 1.9GB
sudo mkdir ss
sudo mount /dev/sdX3 ss
sudo rsync -avHP /opt/desinfect/signatures/ ss/ --exclude swap.img    - note / at end of paths!
sudo umount ss

If the copy process goes wrong, you can delete the files from ss/ using sudo rm -rf ss/

7. Now shutdown Desinfect and try booting from the E2B menu entry (make sure the Desinfect flash drive is not connected).

You may see a 'Trouble' pop-up, if so, just close it and continue to the Desktop.

Check that the update status box shows the latest updates in 'Signaturen auf USB' and try to re-update it.

A df command should list /dev/sdX3 as being mounted on /opt/desinfect/signatures.

8. Finally, you can move the ISO file and the .mnu file to the \_ISO\ANTIVIRUS\MNU folder, so that you will not see a menu entry for the ISO file in the Antivirus menu.


# Make a \desinfect-rw ext3 file using RMPrepUSB in the root of the drive using RMPrepUSB
# File Name=desinfect-rw  Volume Name=desinfectSIGS size=2000MB to 3000MB
# Place this .mnu file and the ISO in either \_ISO\ANTIVIRUS or \_ISO\ANTIVIRUS\MNU
# This menu will work even on an NTFS USB boot drive
# IMPORTANT: you MUST run WinContig (Ctrl+F2) before booting E2B.

# You MUST follow the instructions at...
# and use sudo rsync -avHP /opt/desinfect/signatures/ ss/ --exclude swap.img   to copy the signatures

iftitle [if exist $HOME$/ct_desinfect_2017_18.iso] Desinfect 2017 + Updates\n Boot using .mnu file with persistent updates
set ISO=ct_desinfect_2017_18.iso

if exist CD echo WARNING: Cannot use partnew command! && pause && configfile (bd)/menu.lst
if "%E2BDEV%"=="" set E2BDEV=hd0 && pause E2BDEV forced to hd0!
set PER=/desinfect-rw
#enable parttype output
debug 1
parttype (%E2BDEV%,2) | set check=
debug off
set check=%check:~-5,4%
# make empty table entry in 3rd position in ptn table
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! Press a key to continue... && pause
errorcheck off
if "%check%"=="0x00" partnew (%E2BDEV%,2) 0x0 %PER% && echo -e PERSISTENCE FOR UPDATES IS ENABLED\n\n
errorcheck on

set L=debian-installer/language=de console-setup/layoutcode?=de
set ask=
set /p:3 ask=Press E and [Enter] for English (within 3 seconds)... 
if /i "%ask%"=="E" set L=

#Set language by uncommenting line below and changing it as required
#set L=debian-installer/language=en console-setup/layoutcode?=en

#map ptn 4 to ISO
partnew (%E2BDEV%,3) 0x0 $HOME$/%ISO% > nul
map $HOME$/%ISO% (0xff) > nul
map --hook > nul
root (0xff) > nul

set A=file=/cdrom/preseed/ubuntu.seed boot=casper 

if exist /software/desinfect.iso set B=iso-scan/filename=
if exist /software/desinfect.iso set INTISO=/software/desinfect.iso
if exist INTISO if not exist %INTISO% echo ERROR: INTISO is set to %INTISO% but it is not present inside %ISO% && pause

set C=quiet splash memtest=4 

#mode = native=nonet xfce easymode or none = unity or nomodeset
#options are: nonet xfce easymode nomodeset
echo N = Native (no net)
echo X = xfce
echo S = Safe (nomodeset)
echo E = Easymode
echo U = Unity Desktop
set ask=X
set /p ask=Choose mode ([X],N,S,E,U) : 
if /i "%ask%"=="X" set mode=xfce
if /i "%ask%"=="S" set mode=nomodeset
if /i "%ask%"=="E" set mode=easymode
if /i "%ask%"=="U" set mode=
if /i "%ask%"=="N" kernel /casper/vmlinuz nonet && initrd /casper/initrd.str && boot

#pause kernel /casper/vmlinuz %A% %B%%INTISO% %C% %mode% -- %L%

kernel /casper/vmlinuz %A% %B%%INTISO% %C% %mode% -- %L% > nul
initrd /casper/initrd.lz > nul

Desinfect 2018

Note: The first release from c't magazine issue 2018_12 is buggy. It does not make a working USB flash drive when using the linux desktop icon. It can be fixed by:
Boot from USB flash drive made using linux desinfect2018 (not WinImage).
cd /media/desinfect/desinfSIGS ls -a sudo chmod 666 .desinfect2017 sudo mv .desinfect2017 .desinfect2018
then reboot

Once you have a working USB Flash drive with  'Signaturen auf USB' showing, you can follow the instructions for 2017 version, but you will need at least 4200MB for the desinfect-rw file!

Use the Desinfect_2018.mnu file in E2B v1.99g or later.

Version 2018 has 32-bit and 64-bit linux versions and a 64-bit UEFI version.

The .mnu file will allow you to boot 32 or 64-bit.

Please tick 'funny' 'interesting' or 'cool' or add a comment to let me know which posts you most enjoy.

Saturday, 16 August 2014

Add Desinfect 2014 + Persistence to your Easy2Boot multiboot USB drive

As with most ISO files, you can just add the Desinfect 2014 ISO file to your Easy2Boot USB drive and boot from it in BIOS/MBR mode - OR - you can drag-and-drop the ISO onto the MPI Toolkit FAT32 Windows Desktop icon to make a partition image file and then add the ct_desinfect_2014.imgPTN file to your Easy2Boot drive, if you want to 64-bit UEFI-boot to Desinfect as well as MBR-boot.

If you want to enable persistence however, you will need to use a special .mnu file as well as the Desinfect ISO file.

Adding a persistence ext2 file allows some Desktop settings to be remembered after a reboot. For instance, any files placed on the Desktop will be preserved. However, the background wallpaper is reset to the Desinfect wallpaper after every boot.

I also could not get the antivirus updates to be persistent using this method, they have to be downloaded each time you boot to Desinfect.

Note: You can have persistent updates, but not with persistence as well - see the next blog post!

Here is the .mnu file. The top lines are comment lines and contain instructions on how to add persistence. The .mnu file is also available in the Alternate Download Area from here.

# Make a \casper-rw ext2 file using RMPrepUSB in the root of the drive using RMPrepUSB
# File Name=desinfect-rw  Volume Name=casper-rw size=500MB or change as desired
# 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.

iftitle [if exist $HOME$/ct_Desinfect_2014.iso] Desinfect 2014 PERSISTENT\n Boot using .mnu file with persistence
if exist CD echo WARNING: Cannot use partnew command! && pause && configfile (bd)/menu.lst
if "%E2BDEV%"=="" set E2BDEV=hd0 && pause E2BDEV forced to hd0!
set ISO=ct_Desinfect_2014.iso
set PER=/desinfect-rw
#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
set P=0
if "%check%"=="0x00" partnew (%E2BDEV%,2) 0x0 %PER% && set P=1
errorcheck on

set L=debian-installer/language=de console-setup/layoutcode?=de
set ask=
#English text below can be changed to German
if "%P%"=="1" echo -e PERSISTENCE IS ENABLED: Some settings, Desktop items, etc. will be remembered after reboot.\n\nNote: The background will always be reset back to the Desinfect wallpaper.\n      Virus updates are not persistent.\n      Always SHUTDOWN correctly to avoid corrupting the persistence file.\n

set /p:3 ask=Press E and [Enter] for English (within 3 seconds)... 

if /i "%ask%"=="E" set L=
#set L=debian-installer/language=en console-setup/layoutcode?=en

#map ptn 4 to ISO
partnew (%E2BDEV%,3) 0x0 $HOME$/%ISO%
map $HOME$/%ISO% (0xff)
map --hook
root (0xff)
set A=file=/cdrom/preseed/ubuntu.seed boot=casper 
set B=iso-scan/filename=
set INTISO=/software/desinfect-2014.iso
set C=quiet splash memtest=4 -- 
set D=persistent persistent-path=/
if not exist %INTISO% echo ERROR: INTISO is set to %INTISO% but it is not present inside %ISO% && pause

kernel /casper/vmlinuz %A% %B%%INTISO% %C% %L% %D%
initrd /casper/initrd.lz

Note that the ct_Desinfect_2104.iso file actually contains a second ISO file inside it (/software/desinfect-2104.iso). It is this ISO file that we must use for the iso-scan/filename parameter.

Thursday, 14 August 2014

F1 Help function added to Easy2Boot v1.55

A user requested an F1 help hotkey feature, so I have added this into E2B v1.55.

There is a new .mnu file for the Help Main menu entry and the actual Help text (English only) is held in an F1.cfg file:

  • \_ISO\MAINMENU\ZZZF1SubMenuHelp.mnu
  • \_ISO\e2b\grub\ENG\F1.cfg

Help menu screen (F1.cfg)

Help text is displayed in the console screen.

It is expected that the user will want his own F1 menu, so all they have to do is copy the \_ISO\e2b\grub\ENG\F1.cfg file to the \_ISO folder and edit it to show whatever help text they want for their E2B payload files and hotkeys, etc.

If you do not want a Main menu entry, but you still want the F1 hotkey to work, then you can specify a generic F1 hotkey in the \_ISO\MyE2B.cfg file. The user can then press F1 in any E2B menu and they will see the Help menu and so no Main Menu entry is needed.

There is example code in the Sample_MyE2B.cfg file for this (just uncomment the 3 lines):

# Make the F1 key show the Help Menu from any menu (uncomment 3 lines below) - you can put your own help file in \_ISO\F1.cfg
###if exist /_ISO/F1.cfg   ()/%grub%/hotkey [F1] "configfile /_ISO/F1.cfg" > nul && goto :f1skp
###if exist /%grub%/%LANG%/F1.cfg ()/%grub%/hotkey [F1] "configfile /%grub%/%LANG%/F1.cfg" > nul && goto :f1skp
###if exist /%grub%/ENG/F1.cfg ()/%grub%/hotkey [F1] "configfile /%grub%/ENG/F1.cfg" > nul

The F1 Help menu can be removed from the MAIN Menu by deleting the file \_ISO\MAINMENU\ZZZF1SubMenuHelp.mnu (in later versions of E2B use 'set NOF1=1' in the \_ISO\MyE2B.cfg file). is available from the Alternate Download links on the Easy2Boot Download page.

Friday, 8 August 2014

New .cfg file extension recognised by Easy2Boot

The new version 1.55 of E2B recognises the .cfg file extension which can be used for changing the 'theme' of E2B  (non-volatile, the change will be remembered on reboot).

Any .cfg files that are in a menu folder (e.g. \_ISO\MAINMENU or \_ISO\UTILITIES, etc.) will be enumerated and listed in the relevant menu.

The contents of the .cfg file should be the same as the contents of a valid MyE2B.cfg file.
When you select a .cfg file from the menu, QRUN.g4b runs and copies the contents of the file to the \_ISO\MyE2B.cfg file (which, of course, must be present).

The \_ISO\MyE2B.cfg file must be at least as big as your .cfg file.

To change the menu entry from just listing the filename+extension, you can make a .txt file for each .cfg file (containing a 'title' entry) in the usual way or use the 'set EXTOFF=1' line in the \_ISO\MyE2B.cfg file.

In this way you can switch to any 'theme' from a menu entry.

Jolene.cfg added to MAINMENU

To demo E2B menu capabilities or compare 'themes'  see for ideas.

Thursday, 7 August 2014

Add graphics adapter resolution auto-detection into Easy2Boot

You may want to display your E2B menu in the highest/best resolution possible.
For instance, some odd systems may not support 800x600 mode.

I always advise you to use the most common display resolution so that the menu will appear correctly on all systems. However, you can arrange E2B so that it will cope with a variety of different systems.

You will need a range of wallpaper bitmaps for each resolution (though in some cases the largest bitmap may work for smaller resolution displays).

Auto-Detect highest resolution and use correct wallpaper

The code below can be used in a \_ISO\MyE2B.cfg menu to auto-detect the highest resolution available and then set the graphicsmode and wallpaper for that resolution. 

Note that the position of the menu will remain the same (unless you also add extra code - e.g. if "%GMODE%"=="1024 768 24" set rstart=5) and so will the text colours, etc. See the Sample MyE2B.cfg file for an example.

So each wallpaper bitmap should be similar in colour and content because the menu position and text colours will not change.

# allow vbeprobe command to output text
debug 1
# list all available BIOS graphics adpapter modes
vbeprobe > (md)0x220+5
# turn off text output for future commands
debug off
# look for 640, 800 and 1024 modes - be careful to only use x24 or x32 modes for full colour bitmaps
cat --locate=", 640x480x24"  (md)0x220+5 > nul && set GMODE=640 480 24 && set MYWBMPGZ=/_ISO/nice640.bmp.gz
cat --locate=", 800x600x24"  (md)0x220+5 > nul && set GMODE=800 600 24 && set MYWBMPGZ=/_ISO/nice800.bmp.gz
cat --locate=", 1024x768x24" (md)0x220+5 > nul && set GMODE=1024 768 24 && set MYWBMPGZ=/_ISO/nice1024.bmp.gz

cat (md)0x220+5

Add a Change Language menu entry to Easy2Boot

This Change_Language.mnu file will be in the Sample mnu Files folder in v1.55 and later versions.
It allows the user to temporarily change the language strings (until reboot).

Using this and the Change_Theme.mnu, you can demo E2B to your colleagues!

You can modify it by adding or removing languages or write it in a different language other than English (save the file as UTF-8 if using non ASCII characters).

title Change the E2B Language\n Change the standard E2B menus to a different language
echo Change Language
echo -e ===============
echo Only the standard E2B menu entries, headings and some prompts will change.
echo  Note: This does not change the E2B Header or the Footer help text
echo Please choose a language...
echo 1 English
echo 2 Spanish
echo 3 German
echo 4 Brazilian Portuguese
echo 5 Simplified Chinese
echo 6 Traditional Chinese
set ask=
set /p ask=Please enter a number : 
if "%ask%"=="2" set LANG=SPANISH
if "%ask%"=="3" set LANG=GERMAN
if "%ask%"=="4" set LANG=PORTU_BRAZIL
if "%ask%"=="5" set LANG=SIMP_CHINESE
if "%ask%"=="6" set LANG=TRAD_CHINESE

configfile /%grub%/Menu.lst

Note that you can set a default language in your \_ISO\MyE2B.cfg file, but it must be set using a line like this - otherwise the Change Language menu will not work:

if "%LANG%"=="" set LANG=SPANISH

Add a 'Change Theme' menu to Easy2Boot

It is fairly easy to add a .mnu file which allows the user to choose a different background wallpaper:

title Change Wallpaper\n Choose a new E2B menu background
call /%grub%/pickafile.g4b /_ISO .gz
if "%CHOSEN%"=="" configfile (md)0xa000+0x50
splashimage /_ISO/%CHOSEN%
configfile (md)0xa000+0x50

The .gz files must contain a bitmap of exactly the correct resolution size - e.g. 800x600  (801x588 will NOT work!). The actual existing menu text and border positions, etc. is not changed however, so the images that you use should work with the same settings used by E2B as the default (or as used in your \_ISO\MyE2B.cfg file). So you will need to pick your images carefully (plain colour ones work best).

Today, devdevadev asked me if he could have a menu to switch between themes. You can use this to demo E2B, e.g. switch backgrounds, language, font, colours, etc.

A menu would prompt you to pick a .cfg file as shown below:

Here is the .mnu file that I came up with:

# Place all MyE2B.cfg and wallpaper files in \_ISO\mythemes and all rename .cfg files (amd any message GFXBoot file if more than one)
# Edit each \_ISO\mythemes\xx.cfg file so background or GFX has correct path
# e.g. set MYWBMPGZ=/_ISO/mythemes/stripedflat.bmp.gz  OR set GFX=mythemes/message  (note: no /_ISO/ for GFX path)
# Rename \_ISO\Sample_MyE2B.cfg to \_ISO\MyE2B.cfg (must be >1KB and larger than largest xxx.cfg file)
# For the default E2B theme, make a \_ISO\mythemes\Default_Theme.cfg file with just !BAT on the first line
# \_ISO\MyE2B.cfg file must be contiguous due to bug in grub4dos!

title Change Theme\n Choose a new E2B Theme

if not exist /_ISO/MyE2B.cfg echo ERROR: Please create a large \_ISO\MyE2B.cfg file && pause && configfile (md)0xa000+0x50
errorcheck on
debug normal
graphicsmode 3
echo Pick a Theme...
call /%grub%/pickafile.g4b /_ISO/mythemes .cfg
if "%CHOSEN%"=="" set DONEMENU= && configfile ()/%grub%/menu.lst
echo Overwriting \_ISO\MyE2B.cfg file with \_ISO\mythemes\%CHOSEN%...
# fill (rd) with 0's , 0x82d0 is rd-base mem address, Fn24 is memset - fill memory  <addr> <string> <size>
map (md)0x300+200 (rd) > nul ;; read 0x82d0 > nul ;; call Fn.24  %@retval% 0x20  102400 > nul  
dd if=(rd)+1 of=()/_ISO/MYE2B.cfg > nul
if exist ()/_ISO/mythemes/%CHOSEN% dd if=()/_ISO/mythemes/%CHOSEN% of=()/_ISO/MyE2B.cfg > nul
if exist ()/_ISO/mythemes/%CHOSEN% chainloader /grldr

I tested this using these files in the E2B \_ISO\mythemes folder :

The 'graphicsmode 3switch is required only if you use GFX Boot menus such as the sample Jolene_GFX.mnu. You can delete it if you don't have any GFXBoot .cfg files. If you do use GFXBoot menus, you will also need to copy all the \_ISO\docs\GFXSubMenu Files .mnu files into \_ISO\MAINMENU or else some menu entries will be missing from the GFXBoot menu when selected (this applies to any GFXBoot menu).

Both .mnu files will be in the Sample mnu Files folder in v1.55 of E2B and I will also put them in the Alternate Download area for a while too.

v1.55 will have the mythemes folder and a selection of .cfg files to choose from. You will just need to copy a $Default E2B Menu.cfg file to \_ISO\MyE2B.cfg and the .mnu file to \_ISO\MAINMENU.

Notes: due to a bug I just discovered in grub4dos, make sure you run WinContig on the E2B drive to make all files contiguous. It seems there is a problem with grub4dos and NTFS volumes if this is not done (if the target file is fragmented, then only the first 8096 bytes are actually copied when using dd on some files!).

And due to another bug, the full path for the bitmap file needs to be kept shorter than approx 64 characters as the splashimage command cannot handle long pathnames!