Friday 21 March 2014

Easy2Boot 1.31 released

There are still a few issues with grub4dos 0.4.6a but I have decided to release E2B v1.30 (called 1.30A) due to the enhancements I have added in other areas.

v1.30A/1.31
  • Support E2B if on a logical partition of boot device
  • grub4dos 0.4.6a USB driver option in Main menu
  • .isoPUP file extension supported
  • .isoWB file extension supported
  • Better error recovery if bad ISO selected in menu
  • Allow longer XP ISO filenames (caused error in Setup if ISO filename was very long)
  • Allow for new format of latest 'Nightly builds' of XP dpms (the INI file format has been changed in the latest driverpack builds!) - in v1.31
  • Convert $HOME$ keyword in .txt files to the folder path 
  • Improve Make_E2B_USB_Drive.cmd script
  • Some more sample .mnu files added to docs folder (e.g. proxmox.mnu, Puppy_Slacko64_no_partnew.mnu, linuxmint-16-cinnamon-dvd-32bit_Persistent.mnu)
If you switch to grub4dos 0.4.6a, some ISOs may not boot. Grub4dos 0.4.6a supports the Joliet ISO 9660 format, but it has problems with 9660:1999 Joliet format. Also the USB controller detection in 0.4.6a is not fully working and some USB drives may not be detected by the usb --init command on some systems.

To remove the ' Switch to Grub4dos v0.4.6 (for USB Driver)' menu entry, delete the \_ISO\MAINMENU\ZGRUB_USB_046.mnu file.

Please let me know if you find any issues.
Note: One user found an issue with 'Looking for WINHELPER.USB' being very slow, so I have restored the older code for this and re-released it as v1.31.


Thursday 20 March 2014

Add ProxMox Install ISOs to a USB Easy2Boot drive


For ProxMox4-7 see end of this article

ProxMox 3
The ProxMox install ISOs don't 'just work' with Easy2Boot. The ISO shows a 'PROXMOX INSTALLER' splash screen and then seems to hang. However, if you press F2 or ESC to get to the linux command prompt, you can easily start the installer as follows:
1. Type
    fdisk -l
to find the USB 4th partition. This will usually be /dev/sdb4 on a single disk system.
2. Next type
    mount /dev/sdb4 /mnt
to mount the 4th partition (this will already contain the ISO file set up by E2B).
3. Finally type
    chroot /mnt sbin/unconfigured.sh
to start the installer (it takes a minute or two to load - be patient).

If you prefer, you can copy the ISO file to the \_ISO\MAINMENU\MNU folder and make a small .mnu file in the same folder to remind you of the commands that are required:

title ProxMox Installer ISO \n Use fdisk -l to find 4th partition\n mount /dev/sdb4 /mnt\n chroot /mnt sbin/unconfigured.sh
set ISO=proxmox-ve_3.2-1933730b-2.iso
/%grub%/qrun.g4b $HOME$/%ISO%
boot


P.S. If the E2B drive is an NTFS drive, the mount command fails (for some reason).

For NTFS E2B USB Drives


1. Create an empty folder on the Windows Desktop

2. Copy your PROXMOX.ISO file to the empty folder (do NOT extract the contents)

3. Drag-and-drop the folder onto the MPI_FAT32 Desktop icon and create a PROXMOX.imgPTN file on your NTFS E2B USB drive that is about double the size of the ISO file - e.g. 1400MB for a 665MB ISO.

4. Boot to E2B and select the PROXMOX.imgptn file to get to the CSM Menu - then Quit.

5.  Edit the \menu.lst file on the E2B USB drive (it should be the large CSM menu.lst and there should be a \e2b folder present also).

Add to the bottom of the menu:

title ProxMox Installer ISO \n Use fdisk -l to find 4th partition\n mount /dev/sdb4 /mnt\n chroot /mnt sbin/unconfigured.sh
partnew (hd0,3) 0 /proxmox.iso
map /proxmox.iso (0xff)
map --hook
root (0xff)

chainloader (0xff)

Note that the PROXMOX.ISO file inside the .imgPTN file needs to be contiguous - this is why we must choose a much larger size for the .imgPTN file than we need. If you get a 'not contiguous' error from the above menu, use WinContig to defrag the PROXMOX.ISO file on the E2B USB drive. If it is not possible, create a larger .imgPTN file and try again.


ProxMox 4/5/7

The file structure has changed with proxmox 4 and later versions.

Here is one way to get it to work:

1. Copy the .ISO file to \_ISO\LINUX on your E2B drive
2. Boot to the proxmox boot menu
3. Select the first install option in the menu and press e for edit
4. Add the string lvm2root=/dev/sdX4  where X is the drive letter for your USB drive (try sda4 first).
For instance, on a notebook with a single hard disk, add lvm2root=/dev/sdb4
Under a VM where the USB drive is the first drive in the system, use /dev/sda4
Also, on a notebook which had an internal hard drive, /dev/sda4 worked but /dev/sdb4 did not!

Add in lvm2root=/dev/sdX4  in the exact place shown  (the \ character at the end of the line in the screenshot just shows that the line continues)

5. Press F10 to boot.


E2B v1.B3 contains a sample .mnu file which uses this method to modify the grub.cfg file in the ISO so that you dont need to manually edit the menu. See ....

proxmox_v5.4_iso_with_patch.mnu

# MBR-boot from proxmox iso
# This assumes the \boot\grub\grub.cfg menuentry line inside the ISO file ends in 'quiet splash=silent'
# It loads the ISO contents into memory and then patches the grub.cfg menu entry
# You must pick the correct device - sometimes this is sda and sometimes it is as suggested
# Copy this .mnu file and the ISO file to \_ISO\LINUX folder

iftitle [if exist $HOME$/proxmox-ve_5.4-1.iso] ProxMox VE v5.4.1 Installer (patch ISO)\nTip: Try sda or sdb or sdc, etc.
set ISO=$HOME$/proxmox-ve_5.4-1.iso

# set DEV to the drive device number of the USB drive - e.g. a
#don't echo of values on screen
debug off
#make sure all drives are unmapped as this can change the count
#reset hdcount in BIOS to default
map --unhook
map --unmap=0:0xff
root (bd)
#set number of hard disks in system from BIOS location 475h
set /a HDCNT=*0x475 & 0xff > nul
# cannot install to E2B drive!
if %HDCNT%==1 pause --wait=3 ERROR: No internal hard disk detected && configfile (md)0x3000+0xA0
# add 0x60 so drive 1 = a, drive 2 = b
set /A ldisk=%HDCNT%+0x60 > nul
call echo -e sd\%ldisk:~1,4% | set ldisk=
echo %HDCNT% disks in system including USB drive
echo
echo -e      I guess the USB drive will be sda or $[0104]%ldisk%
echo
set /p ldisk=Enter linux device name for USB drive, e.g. sda or sdb (A=abort, ESC=%ldisk%) : 
echo
# must start with sd
if not "%ldisk:~0,2%"=="sd" pause --wait=3 ERROR: Must begin with "sd" && configfile (md)0x3000+0xA0
echo Will use /dev/%ldisk%4 for ISO file

set NOSUG=1
set redir=> nul
echo Loading ISO into memory and patching menuentry...
/%grub%/QRUN.g4b force.isomem %ISO%
root (0xff)
clear
echo
cat --locatei=menuentry --number=1 ()/boot/grub/grub.cfg > nul
set /a st=%?%
cat --skip=%st% --length=570  ()/boot/grub/grub.cfg
echo -e \n.......... NEW PATCHED MENU .............\n
cat --locatei=quiet    --replace=lvm2root=/dev/%ldisk%4\x20 ()/boot/grub/grub.cfg > nul
cat --locatei=lvm2root --replace=lvm2root=/dev/%ldisk%4\x20 ()/boot/grub/grub.cfg > nul
cat --locatei=\x20e\x20 --replace=\x20\x20 ()/boot/grub/grub.cfg > nul
#display menu
cat --skip=%st% --length=570 ()/boot/grub/grub.cfg
pause Press a key to boot...
chainloader (0xff)
boot


Alternative for Proxmox 4\5

Or you can use a .mnu file to automate the process (but you need to check the suggested /dev/sdx device is correct for that system)...

# place ISO and this .mnu file in \_ISO\LINUX\MNU folder.
# vga=791 is required or will get Installation aborted error.
# lvm2root must be set the the E2B USB drive partition which is mapped to the ISO

iftitle [if exist $HOME$/proxmox-ve_4.4-eb2d6f1e-2.iso] proxmox 4.4\n You must enter the correct USB name.
set ISO=proxmox-ve_4.4-eb2d6f1e-2.iso

#don't echo of values on screen
debug off
#make sure all drives are unmapped as this can change the count
#reset hdcount in BIOS to default
map --unhook
map --unmap=0:0xff
root (bd)
#set number of hard disks in system from BIOS location 475h
set /a HDCNT=*0x475 & 0xff > nul
# cannot install to E2B drive!
if %HDCNT%==1 pause --wait=3 ERROR: No internal hard disk detected && configfile (md)0x3000+0x50
# add 0x60 so drive 1 = a, drive 2 = b
set /A ldisk=%HDCNT%+0x60 > nul
call echo -e sd\%ldisk:~1,4% | set ldisk=
echo %HDCNT% disks in system including USB drive
echo
echo -e      I guess the USB drive will be $[0104]%ldisk%
echo
set /p ldisk=Enter linux device name for USB drive, e.g. sdb or sdc (A=abort, ESC=%ldisk%) : 
echo
# must start with sd
if not "%ldisk:~0,2%"=="sd" pause --wait=3 ERROR: Must begin with "sd" && configfile (md)0x3000+0x50
pause --wait=3 Will use /dev/%ldisk%4 for ISO file
set NOSUG=1
set redir=> nul
/%grub%/QRUN.g4b $HOME$/%ISO%
kernel /boot/linux26 ro ramdisk_size=16777216 lvm2root=/dev/%ldisk%4 vga=791 rw quiet splash=silent
initrd /boot/initrd.img
boot


Note: proxmox 5.4 seems to be broken. It won't even boot if I dd the ISO to a USB drive.

proxmox 5.4.1 UEFI booting

This seems to not 'just work' for USB drives. Here is a workaround.

1. Make a FAT32 .imgPTN file from the ISO
2. Copy it to the E2B drive and switch-in the .imgPTN file
3. UEFI boot - it will fail and it will land you at the grub rescue prompt
(note VirtualBox will try to boot the MAC EFI boot file and it will hang in VBox - so rename the \System folder to \SystemXX).
4. At the grub rescue prompt, type set to see the variables.
Type ls to determine the USB drive number.

We need to fix the root and prefix variables, so type
set root=hd0,msdos1
set prefix=(hd0,msdos1)/boot/grub
5. Now we need to load the normal module from the $prefix config folder which could not be loaded before and boot, so type
insmod normal
normal



6. At the proxmox boot screen, select the first menu entry 'Install proxmox VE' but press e instead of ENTER so you can edit the menu and add lvm2root=/dev/sdX1  where X will be the USB drive letter (this may depend on how many drives are in the system).



P.S. This doesn't seem to work on ProxMox 6.3.1 !!! :-(  Mass Storage USB drivers appear to be missing from the ProxMox grub2 so it does not even see the USB drive.




Tuesday 18 March 2014

Easy2Boot 'discovered' by LinuxVoice magazine

Listen to the podcast  (E2B mentioned at approx. 31:40).
Tip: Turn off AdBlock if you have trouble playing via the audio control.

Friday 14 March 2014

.isoWB file extension in E2B

I have added .isoWB file extension support to Easy2Boot_v1.30b_TESTONLY.zip.

So there is no need to create and edit a .mnu file for each ISO.

1. Copy the .INI file used by your WinBuilder ISO to the root of the E2B USB drive - this file is found in the same folder as the ISO when made by WinBuilder. e.g. \Win7PESE.ini. The contents of the file are not important, but the file name is critical.

2. Add extra characters to the .ini file to make it over 1000 bytes (1KB) in size (1KB is only required if your E2B USB drive is formatted as NTFS). Any extra characters will do (the contents are erased and re-written by E2B)

3. Copy your WinBuilder PE .ISO file to the desired menu payload folder (2nd level deep)  (e.g. \_ISO\MAINMENU or \_ISO\WINPE)

4. Rename it as .isoWB (e.g. \_ISO\MAINMENU\WBPE.isoWB)

5. Make a subfolder called WB (e.g. \_ISO\MAINMENU\WB)

6. Create a text file in the WB folder with the same name as the .isoWB file but with a .WB file extension - e.g. \_ISO\MAINMENU\WB\WBPE.WB)

The contents of the .WB file should contain two lines (the text in red should be changed to match the name of the .INI file used by your WinBuilder ISO):

!BAT
set IniName=Win7PESE.ini


7. (optional) Create a .txt file for the .isoWB file so that the menu entry is not just displayed as the filename, e.g. \_ISO\MAINMENU\WBPE.txt:

title My WinPE ISO\n Boot the ISO using Easy2Boot

Tuesday 11 March 2014

Easy2Boot - better support for multiple WinBuilder WinPE ISO files

Most WinBuilder WinPE ISOs have special support for booting directly from ISOs. When the WinPE ISO boots, a WinBuilder script looks on the root of all drives for a special INI file which contains the name and path of the ISO file that it booted from. Once it knows where to find the WinPE ISO, the script then loads that ISO file as a virtual drive. It can then access any file or folder on the virtual drive and in this way gets access to the extra programs and utilities that  are 'inside' the ISO.

This is great because it means you can just add the INI file to the root of your E2B USB drive and when you boot from a WinBuilder WinPE ISO, it will get the name of the ISO from inside that INI file.

The problem is, what if you have more than one WinBuilder WinPE ISO on your E2B drive? When they boot, they all will look for the same INI file (e.g. \Win7PESE.ini) but they each require their ISO file name and path to be inside it.

I have solved this problem with a new .mnu file which will be in the release version of E2B v1.30.

The new .mnu file will write the name and path of the ISO file into the INI file before booting the WinPE ISO.

If you want to test it now, you can download a sample of the new .mnu file from the easy2boot website Download page - WinBuilder_PE_Multiple_ISOs.zip (click on the 'alternate download' icon).



P.S. You will be able to do a similar thing using the new .isoWB file extension (Easy2Boot_v1.30b_TESTONLY.zip and release version). So there is no need to create and edit a .mnu file for each ISO.

1. Copy the .INI file used by your WinBuilder ISO to the root of the E2B USB drive - this file is found in the same folder as the ISO when made by WinBuilder. e.g. \Win7PESE.ini. The contents of the file are not important, but the file name is critical.

2. Add extra characters to the .ini file to make it over 1000 bytes (1KB) in size (only required if your E2B USB drive is formatted as NTFS). Any extra characters will do (contents are erased by E2B later)

3. Copy your WinBuilder PE .ISO file to the desired menu folder (e.g. \_ISO\MAINMENU or \_ISO\WINPE)

4. Rename it as .isoWB (e.g. \_ISO\MAINMENU\WBPE.isoWB)

5. Make a subfolder called WB (e.g. \_ISO\MAINMENU\WB)

6. Create a text file in the WB folder with the same name as the .isoWB file but with a .WB file extension - e.g. \_ISO\MAINMENU\WB\WBPE.WB)

The contents of the .WB file should contain two lines (the text in red should be changed to match the name of the .INI file used by your WinBuilder ISO):

!BAT

set IniName=Win7PESE.ini


7. (optional) Create a .txt file for the .isoWB file so that the menu entry is not just displayed as the filename, e.g.

title My WinPE ISO\n Boot the ISO using Easy2Boot

Monday 10 March 2014

Easy2Boot Introduction - en France!

Bulk duplication of USB drive images

Let us suppose that you have a 32GB Corsair Voyager GT multiboot USB Flash drive (e.g. containing Easy2Boot) which contains all of your boot files and utilities and now your 12 colleagues each want to have the same files on their USB Flash drives.

Now you obviously cannot just do an 'image copy' from one USB stick to another because they will be of slightly different makes, models and sizes. A 32GB Patriot XT USB stick may be up to 500MB smaller than a 32GB Corsair Voyager flash drive for instance. Here is what RMPrepUSB - Drive Info reports for these two 32GB drives:

"Corsair Voyager GT 3.0" (32,054,968,320 bytes)
Reported size 32,054,968,320 bytes (29.8535GiB)  Last LBA 62,607,359

"Patriot Memory" (32,019,316,736 bytes)
Reported size 32,019,316,736 bytes (29.8203GiB)  Last LBA 62,537,727

So if you tried to copy an image of the Corsair Voyager onto the Patriot XT stick, you would get an error. Even if you ignored the error, the last 300MB on the partition would not exist and the user would get a problem if he/she tried to fill up the drive.

What you may not realise is that even if all the USB sticks were of the same make, model and revision, they can vary in reported size! This is because the manufacturer will map out any bad 'pages' of memory if they fail during factory testing.

How to bulk duplicate USB drives

Step 1. Find the smallest USB drive that you will need to copy the image to - use RMPrepUSB - Drive Info to do this. e.g.

                               Reported size 32,019,316,736 bytes (29.8203GiB)  Last LBA 62,537,727

If you don't know the smallest size, then guess 'under' - e.g. if 16GB is the smallest size anyone has, choose 15250MiB (16,000,000,000 / 1024*1024).

Flash drive manufacturers always advertise drive capacity in GB not GiB
1GB = 1000x1000x1000 = 1000000000 bytes.
1Gib = 1024x1024x1024 = 1073741824 bytes.
1MB = 1000x1000 = 1000000 bytes
1MiB = 1024x1024 = 1048576 bytes
so:
32GB = 30517MiB   32GiB = 34359738368 bytes
16GB = 15258MiB   16GiB = 17179869184 bytes

So a '32GB drive' is 32 thousand million bytes or 29.8023GiB. That is why Windows reports it as 29.8GB (it really means 29.8GiB!).
Note that a 32GB drive will have 32GiB of memory inside it. This leaves up to 2.359 GB of 'spare' memory which the manufacturer can use for bad memory management, page swapping, etc. and still have a 32GB drive available for the user.

Step 2. Prepare your USB drive using the 'smallest' partition size - let us assume 15250MiB if the smallest drive is going to be 16GB. We can use RMPrepUSB and put 15258 in the Size field (use 30517 for 32GB drives).

If you don't want to prepare a new drive. Use Easeus Partition Master to shrink the partition so that it ends at  15258MiB.

Step 3. Use RMPrepUSB - Drive Info to check that the partition ends at the correct place.

This example shows the End of the last partition at 32,019,316,736 bytes which is 19MB larger than the smallest possible 32GB drive, so it is slightly too large and needs to be reduced by 19MB:

P1   Start=63 (32,256 bytes) End=62,537,727 (32,019,316,224 bytes)
P2   Start=62,537,728 (32,019,316,736 bytes) End=62,537,790 (32,019,348,480 bytes)

Step 4. Now make an image of all partitions using:

RMPrepUSB - Drive->File
  • Name = myimage.bin
  • Drive Sector Start = 0
  • Length = PALL
  • File Start Byte Position = 0
This will only capture up to the end of the last partition and not the whole drive.

5. Now download and install PassMark's ImageUSB utility (free). You can now plug in all your USB drives to all your USB ports and write the image to all of them at the same time.

ImageUSB is a free utility which lets you write an image concurrently to multiple USB Flash Drives. Capable of creating exact bit-level copies of USB Flash Drive (UFDs), ImageUSB is an extremely effective tool for the mass duplication of UFDs. ImageUSB also supports writing of an ISO file byte by byte directly to an USB drive




Note: ImageUSB cannot be used for image capture because it saves all physical sectors of a USB drive and so can only reliably write the image that is created by it to identically sized or larger flash drives.

Tip 1: Use a powered USB 3.0 hub - these are generally much faster than USB 2.0 hubs

Tip 2: If you just want to write to one USB Flash drive at a time, you can use the RMPrepUSB - File->Drive button instead of using ImageUSB.

6. If, for instance, you put a 32GB image on a 64GB USB Flash drive, you can expand the partition using Easeus Partition Master. This should not affect it's bootability but check it boots afterwards just to be sure!

Note: A 'free for home use' Easeus Partition Master version is also available.

P.S. Although you can duplicate most USB boot drives in this way, you cannot duplicate HitMan Pro USB Flash drives unless the 'target' USB drive has EXACTLY the same reported size as the original drive (check using RMPrepUSB - Drive Info) and you make an image of the whole drive and not just the drive partitions. HitMan Pro writes code to the very end of the drive.


Sunday 9 March 2014

Not enough room to defragment files? Try Refresher.cmd

Easy2Boot and many grub4dos bootable USB drives require that the ISO files are contiguous (i.e. the ISO file occupies sequential clusters on the drive).

If your Flash drive is almost full, you may find that you cannot defragment a large ISO that you have just copied over to it. This is because there is not enough free space left on the drive.

By the way: If there is enough free space on an NTFS drive and you still cannot make a very large file contiguous, see my previous blog post here.

For instance, if you have a 16GB USB Flash drive with 3GB of free space, you cannot defragment and make contiguous a file that is larger than 3GB.

Even if there was enough free space, the defrag of the ISO file could take a very long time.
If your USB Flash drive has reached this stage, it is best and quickest to reformat it. If you want to keep all the files on it, then you obviously need to make a backup first.

You also stand a better chance of having all files contiguus, if you copy over the large ISOs first, before the rest of the smaller files.

To simplify this process, I wrote a Windows batch file to automate this. Just drag-and-drop your USB drive icon onto the Refresher.cmd file (keep it on your Desktop for convenience) and it will guide you through process of:

1. Backing up all files
2. Formatting the USB volume (choose NTFS or FAT32)
3. Copying back to the USB drive all the large >500MB files first
4. Copying back to the USB drive the rest (<500MB) of the files
5. Copying back the empty folders
6. Comparing the file count in Step 1 with that of the USB drive now.
7. Deleting the backup folder

If a folder is chosen instead of a drive, then instead of formatting the drive volume, the Windows 'rd' command is used to delete the folder and all sub-folders, and then the original files are copied back. In practise, this rarely defragments the files however. You will be far more successful if you reformat the whole drive by choosing the Drive icon as shown above.

To use Refresher.cmd, copy the Refresher.cmd file to your Windows Desktop, then drag-and-drop the drive icon of your USB drive onto the Refresher.cmd Desktop icon (or type Refresh N: from a Windows command prompt console if you need Admin rights). Then just choose either NTFS or FAT32 to reformat the drive when prompted. At this point you can reformat using RMPrepUSB if you wish and just Skip the Windows format. Note that RMPrepUSB partitions and formats, it is not a format-only tool. If you have a multi-partition USB Hard disk, you will have to use the Windows format tool as the contents of only one drive volume letter is backed up by Refresher.cmd.

User input shown in red squares.

WARNING: As this is quite a powerful batch file, please take care when using it. If the contents of the drive being 'Refreshed' are very valuable, make a backup first (you should have one anyway!). The batch file assumes you will press CTRL+C if you see anything wrong. The temporary backup folder will be in the same folder as the Refresher.cmd file, so make sure there is enough room on the hard disk. A new backup folder is made (and deleted) each time.

Note that Windows format will remove the grub4dos boot loader from the Partition Boot Record (PBR). If you find that the USB drive no longer boots after running Refresher.cmd, use RMPrepUSB - grub4dos Install and choose 'No' for a PBR install of grub4dos. This should fix the boot problem. Then test that it boots using QEMU or VBox or test on a real system. To avoid losing the PBR code each time you use Refresher.cmd, install grub4dos to the MBR instead.

Download Refresh.zip




Saturday 8 March 2014

Notes on text 'screengrabbing' and data collection in the grub4dos console

Sometimes you may be asked for debug information using the grub4dos shell/console.


The problem is how do you get all this information to the grub4dos developer if this needs to run on a real system and not a Virtual Machine? Normally, you would take a photograph with your digital camera or cell-phone, download the pictures onto your computer and then upload them or email them to the developer.

However, you can use my grab.g4b batch file to capture the screen instead:

1. Download and extract the contents of the Grab.zip file to the root of your grub4dos drive
2. Boot to grub4dos and get to the grub4dos command console
3. Type graphicsmode 3 to get into text mode
4. Execute any debug commands so that the results are displayed on the screen (80chars x 24 lines)
5. Type /grab.g4b to capture the text into the file grab.txt.
6. If you want to capture another screen to a different file, use /grab.g4b 1  to capture the screen text to the file grab1.txt.
      grab.txt, grab1.txt, grab2.txt...grab8.txt are provided in the download. They must exist before the command is executed.
7. You files can now be sent to the developer.


Capturing memory data


If you are asked to send the results of a cat command - e.g.

cat --hex (md)0x4e+3

This will display quite a lot of data - far more than one screen full. You can redirect the output to an existing file using:

cat --hex (md)0xe4+3 > /myfile.txt

as long as myfile.txt exists and is big enough. Note: If using an NTFS filesystem, the file must be at least 1K or more or the writes won't work.

Unfortunately you cannot use more than 3 sectors as the grub4dos redirection buffer appears to be limited to just 8192 bytes - e.g. cat /file1.txt > file2.txt will only work for the first 8192 bytes.

If you need to collect more than 3 sectors of hex data ouput, you can use the mdcat.g4b batch file included in the download.

/mdcat.gb4 0x4e

The results will be in /mdcat.txt - use NotePad++ to open it (not Windows NotePad).








Easy2Boot v1.30 Trial version available

Changes:
  • New file extension .isopup supported for Puppy linux ISOs (no persistence)
  • E2B can now be in a Logical partition on the USB HDD boot drive
  • grub4dos 0.4.6 with USB driver menu option in Utilities menu
  • Option in MyE2B.cfg to use grub4dos 0.4.6 USB driver on start-up of E2B
  • If CheckAccess fails on start-up due to buggy BIOS, the grub4dos 0.4.6 USB drivers are used automatically.
  • Make_E2B_USB_Drive.cmd script improved (Grubinst on an NTFS formatted drive didn't always work + switch to root folder). Now moved to the \_ISO\docs\Make_E2B_USB_Drive folder.
  • Change detection code of WINHELPER.USB file on 'Helper' Flash drive
  • .isoWB file extension (Easy2Boot_v1.30b_TESTONLY.zip)
This version should be considered experimental and can be found via the Alternate Download link on the Easy2Boot.com download page here.

grub4dos 0.4.6a USB driver

Using the grub4dos USB driver helps in cases where some BIOSes contain bugs in their USB driver code, and as a result you may find that one or two 'special' systems will not boot to certain payload/ISO files unless you use the new grub4dos USB driver. See my previous blog for details.

The Main menu in E2B v1.30 now has a new menu entry which has two functions. When you first boot E2B, you will see an entry to 'Switch to grub4dos v0.4.6'. If you select this, E2B will reload E2B using grub4dos 0.4.6 (the file is in \_ISO\e2b\grub\grub_46a).

When the the Main menu reloads, you will now see a Main menu entry 'Install Grub4DOS USB Driver'. If you run this the internal grub4dos USB driver will run and will replace the BIOS USB driver. The Main menu will reload and the the 'Install Grub4DOS USB Driver' menu entry will no longer be present; thus if you don't see this menu entry, it means that the grub4dos USB drivers are already loaded.

If you don't want this new menu entry, simply delete the \_ISO\MAINMENU\ZGrub_USB_046.mnu file.

I have not replaced grub4dos v0.4.5 with grub4dos v0.4.6 because there are still a few problems with it. e.g. running usb --init to load the USB drivers twice under VBox/VMWare seems to cause it to hang; does not detect USB drives on Dell Inspiron 530, does not work very well on reboot - best if run from power on.

Note, when you load the grub4dos USB driver, you will see a brief message about how many USB drives were detected. If it does not detect your USB drive, then the BIOS will still be used to access the USB drive. If you have any systems which don't detect your USB drive (always test from power on, not a reboot), please report it to chenal here. Give give details of the grub4dos version you are using as 0.4.6a Date=20140306 Size=281,839 bytes and the make and model of your system and USB drive.

Wednesday 5 March 2014

Buggy USB support in BIOSes

Most BIOSes can boot from a USB drive these days, but they don't always work well.

For instance, my Asus EeepC 904HA netbook has buggy USB boot code in the BIOS. If I boot to Easy2Boot from my 2TB USB hard disk, when CheckAccess.g4b runs (which checks access to the end of the last partition on the USB boot drive), it reports loads of read errors. This is because the USB code in the BIOS cannot access any sector past 137GB on the USB drive (although the BIOS can access all sectors on the internal hard disk).

For another example of buggy USB BIOS support, see here. In this case Leolo had a system with an AsRock P4i65G board which would not boot successfully to WinPE (Win7 install) from a USB drive - but only the AsRock system - all other systems booted fine.

In the past, one way of getting around this type of buggy BIOS was to use Plop! This loads it's own USB USB 2.0 driver and so does not use the BIOS USB driver. The problem with Plop! is that the driver is read-only. This is OK for primitive booting but not for boot managers which need read/write access to the USB drive (such as Easy2Boot).

In both these cases, using the new grub4dos v0.4.6a  fixes the problem. This version of grub4dos contains a USB 2.0 driver but it is not active by default. You need to issue a command to initialise the USB driver:
      usb --init

The USB driver in grub4dos 0.4.6a still has a few bugs, but the latest (developer) version is looking much better.

When it is robust enough, I will add it in to Easy2Boot. If the CheckAccess.g4b fails, E2B will ask if you want to switch to v0.4.6a. There will also be a variable in the MyE2B.cfg file to use the new version and USB driver, as well as a new Main menu entry (determined by a .mnu file which you can remove if you don't want it).

If you have a system with a 'bad' BIOS that boots to Easy2Boot but no further, you can try the new version with Easy2Boot as follows:

1. Extract the grldr file from here (this is a new, developer test version 5th March 2014 - check here for a later version) and overwrite the grldr file in the root of your E2B drive.

2. Edit the \menu.lst file in the root of the E2B drive and add
usb --init
as the first line, or try 
set /p ask=Use grub4dos USB driver (Y/N) : 
if /i "%ask%"=="Y" usb --init
if you want the option to install the USB drivers.


Tuesday 4 March 2014

Easy2Boot downloads now at www.easy2boot.com

It seems DropBox got upset with me using my DropBox Public folder for others to download E2B+DPMS.zip and so they have suspended my Public folder as there was too much traffic!

So I have now moved the Downloads to the new www.easy2boot.com site.

Saturday 1 March 2014

New Easy2Boot website

I have started a new website dedicated to Easy2Boot at www.easy2boot.com

It should be faster to load and more attractive than the rmprepusb.com site.

Please give me your feedback (my web design skills are sadly lacking, as you may have noticed!)

cheers
Steve

Friday 28 February 2014

Easy2Boot v1.29 now available

V1.29 changes are:

  • New grldr grub4dos file - now shows the case of file names and folder names correctly on FAT32 volumes when in grub4dos console.
  • New .isomemF01 and .isofira01 file extensions added (use .isomemF01 for ERD 2005 XP ISOs)
  • Sample .mnu files added or modified (Porteus-v2.0-i486.mnu, FD0-konboot-v2.1.mnu, dft32_v416_b00_install.mnu, BIOS Detect and Run.mnu, Porteus-generic-persistent.mnu, Win7_8_Install_Auto64_32.mnu, RedHat.mnu, RedHat_NTFS.mnu, 64Bit_Auto_Detect_ISO.mnu, WinBuilderPE_ISO.mnu, ERD5_DPMS.mnu, ERD2005.mnu, ERD5_FIRA.mnu)
  • "E2B TXT Maker" and "E2B MNU Maker" batch files available in \_ISO\docs\E2B Utilities folder. See blog post here for details.

Download from Tutorial 72a here.

Add Microsoft ERD Commander and MSDart Windows Recovery ISOs to Easy2Boot


Microsoft Diagnostics and Recovery Toolset (Microsoft DaRT) allows you diagnose and repair a Windows system that has problems starting or has other issues.


Using Easy2Boot you can even boot directly from an MSDaRT 5.0 XP PE based ISO and repair a SATA Windows XP hard disk even though the MSDaRT ISO does not contain any AHCI mass storage drivers!

You can also boot via UEFI too (see below for details).

DaRT is not available from Microsoft as an .iso file. Instead, you use a program that creates an ISO file, which is based on Windows Recovery Environment (WinRE) and a set of tools that DaRT provides. This boot media starts the Windows RE, from which you can start ERD Commander. ERD Commander provides a launch platform for the DaRT tools.

Note: MediCat contains Win10/8/7 MSDaRT ISOs, just copy it to your E2B USB drive (keep extension as .iso) ;-)

Typically, you use something like the ERD Commander Boot Media Wizard to create the ERD Commander ISO (although this can vary depending on the version you are trying to create). It is easiest to create the ISO on the same type of OS that it was designed for (e.g. you cannot create a Dart 5.0 ISO using a 64-bit Win7 system).

.isoPE01
DaRT 8.1 supports Windows 8.1 and Windows Server 2012 R2.
DaRT 8.0 supports Windows 8 and Windows Server 2012.
DaRT 7.0 supports Windows 7 and Windows Server 2008 R2.
DaRT 6.5 supports Windows 7 and Windows Server 2008 R2.
DaRT 6.0 supports Windows Vista and Windows Server 2008.

.isomemF01 or .isomemwinv
DaRT 5.0 supports Windows 2000, Windows XP, and Windows Server 2003.
ERD Commander 2005 supports Windows NT 4.0 (Service Pack 4 or later required), Windows 2000, Windows XP and Windows Server 2003. There is also an ERD Commander 2007.

Tip: If you download an .msi file which won't run under Win x64, try extracting the .ISO file from it using 7zip.

If your ISO is based on Vista, Win7 or Win8 PE (DaRT6 and above), then simply rename the .ISO file to .isope01 and copy it to a suitable folder (e.g. \_ISO\MAINMENU). You can also add a .txt file if you want to define the menu entry text and help text.


XP-based ISOs

If you have an XP-based ERD/MSDaRT ISO (DaRT5 or ERD Commander 2005), try using the file extension .isomemF01 or .isomemwinv.

To determine which E2B file extension works best, rename the .ISO files to .ISOask, and then you will be able to choose from a variety of different methods (see below).



For XP-based Recovery PE ISOs, you can also try using one of the .mnu files. In E2B \_ISO\docs\Sample menu files - there are three .mnu files you can try:
  1. ERD5_FIRA.mnu    - this uses FiraDisk
  2. ERD2005.mnu         - this uses WinVBlock to load the ISO
  3. ERD5_DPMS.mnu   - this uses FiraDisk+WinVBlock+DPMS (recommended)
Typically, #1 or #2 will work for most systems. However, if you try to boot an XP PE ISO which does not contain AHCI mass storage drivers, once the Windows Recovery OS has booted, it will not be able to see your internal hard disks or may even BSOD.

To overcome this, use E2B+DPMS which has lots of internal mass storage drivers and use the ERD5_DPMS.mnu file (read the instructions inside it) . This mimics the same process as if you were booting from an XP Install ISO file and it will try to identify and load the correct mass-storage driver for the system. This will allow you to boot from an ERD v5 ISO on a SATA/RAID Windows XP 32-bit system and then repair it.

I would recommend that you use the ERD5_DPMS.mnu for any XP-based Recovery ISOs. You can modify the .mnu file as required.

# Use for MSDaRT 5 XP-based ISOs (use DPMS2 version of Easy2Boot for AHCI drivers)
# Make new empty folder, e.g. \_ISO\MAINMENU\MSDART5
# Copy this .mnu file and the single ERD or PE ISO file to the empty folder (one .iso file per folder)

title XP MSDart ERD (DPMS)\n If DPMS is not installed\n Remember to select an AHCI driver\n AND the FiraDisk driver (using F6).
set MFOLDER=$HOME$
pause --wait=3 Press ENTER 3 times to boot...
/%grub%/XPStep1.g4b
boot

Note: E2B v1.A7 and later versions support the .isoDPMS file extension so you don't need to use this .mnu file.

Note that Easy2Boot+DPMS only contains Windows XP 32-bit mass storage drivers (which may or may not work for Windows 2003). If your DaRT is XP 64-bit based, then DPMS will not work. You can still use F6 to load the FiraDisk 64-bit driver for IDE systems (note: the ISO file name must contain the characters '64' so that E2B will not automatically use 32-bit DPMS drivers).


UEFI booting

You can add any number of MSDaRT (or other) images to an E2B drive and boot from each image in both MBR\CSM mode and UEFI mode (if the image supports UEFI booting - so not XP or Vista 32-bit!). The process is as follows:

1. Run MakePartImage.cmd to make a FAT32 partition image file from your DaRT ISO (or from a working MSDaRT USB Flash drive if you have already made one). It is easiest to just drag-and-drop the ISO onto the Windows MPI_FAT32 Desktop shortcut.
2. Copy the .imgPTN file to your E2B USB drive (ensure it has the .imgPTN file extension or try .imgPTNLBAa for better 'bootability')
3. Run WinContig to make sure the file is contiguous (e.g. \Make_this_drive_contiguous.cmd)

For more details visit the www.easy2boot.com site and look for MakePartImage.




Thursday 27 February 2014

How to quickly make Easy2Boot .txt and .mnu files

The next version of E2B will be v1.29. and will include two script (.cmd) files in the \_ISO\docs\E2B Utilities folder:

E2B TXT Maker.cmd    - generates an Easy2Boot .txt file
E2B MNU Maker.cmd  - generates an Easy2Boot .mnu file
Make SubMenu.cmd     - generates a SubMenu .mnu file

New! E2B v1.78 now includes \_ISO\TXT_Maker.exe.

This may prove useful if you want to make .txt files or .mnu files for all your payload files.

The easiest way to use these files is to first copy them to your Windows Desktop.

Now to make a .txt file or .mnu file for any payload file on your E2B USB drive, simply Drag-and-Drop the payload file onto the E2B TXT Maker.cmd icon or the E2B MNU Maker.cmd icon on your Windows Desktop.

The script will then ask you what menu text and help text you want and then make a new .mnu or .txt file (in the same folder as the payload file) on your E2B USB drive.

You can specify a hotkey key by using ^^ before the keyname (^^ will be translated into ^ when the file is made).

Here are some screenshots of them in action:
E2B TXT Maker (red boxes show user entries)

E2B MNU Maker (no help text was entered in this example)

The E2B MNU Maker assumes that the payload (ISO) file will always be in the same folder as the .mnu file. You can edit the .mnu file after it has been generated. By default, the .mnu file simply runs QRUN and forces the file extension to be the same as it already is, using this line of grub4dos code:

      /%grub%/qrun.g4b force.iso $HOME$/rhel-server-5.7-i386-dvd.iso 

However, you can change this to force the file extension to be something different, e.g. to run a Microsoft Windows 7 Recovery ISO as if it had an .ISO01 file extension, use:

      /%grub%/qrun.g4b force.iso01 $HOME$/ERD6.iso

Or you can add in your own grub4dos menu.

N.B. For the MNU Maker script to work, the E2B payload file name must not contain spaces!


If you want to make a new SubMenu folder:
1. Create a new folder under \_ISO (spaces not allowed) - e.g.  \_ISO\RESCUE_WIN
2. Drag-and-drop the new \_ISO\RESCUE_WIN folder onto the Make SubMenu.cmd file and answer the questions.

This will make a new .mnu file in the \_ISO\MAINMENU folder for \_ISO\RESCUE_WIN.
Now put your ISO files, etc. in \_ISO\RESCUE_WIN and you will see the new menu entry in the Main Menu.


Wednesday 26 February 2014

Adding WinBuilder PE and WinFE ISOs to Easy2Boot

WinFE ISO

Today I made a WinFE ISO based on a Win7PESE WinBuilder Project. To make the ISO, I followed the instructions on the Hacking Exposed website here.

Because I wanted to add lots of WinBuilder Win7SEPE ISOs to my E2B USB drive, I added the ISO file to my Easy2Boot NTFS Flash drive using this .mnu file.

title WinFE \n Note: Mount the E2B boot drive to use all applications
/%grub%/qrun.g4b force.iso01 /Win7PE_x86.iso
boot

The WinBuilder ISO file must NOT be renamed and must be copied the root of the E2B drive so that the MountPEmedia.exe utility will find it and mount it as drive Y:. The name and path of the ISO file is pre-defined in the \Windows\System32\MountPEmedia.ini. This is written by WinBuilder when the ISO is created (the .ini file is inside the \sources\boot.wim file image).

It is important to ensure there is no \Win7PESE.ini file or \CdUSB.y file (which you may have extracted from a WinBuilder ISO previously) in the root of any drive as this could 'confuse' the MountPEmedia utility.

When the WinFE Write Protect Tool automatically launches after WinFE boots, you need to select the E2B USB drive and click the Mount button, otherwise the Y: drive (the mounted ISO file) will be inaccessible and you won't be able to run many of the utilities from the Desktop.

Other ways of adding WinBuilder PE ISOs and other PE ISOs to E2B can be found in the E2B Tutorial here.

Tuesday 25 February 2014

Some folders/filenames are not displayed correctly on FAT32 volumes under grub4dos



This seems to be a 'feature' of grub4dos from at least 2009 onwards (and probably from the year dot!).
You may have noticed that grub4dos does not always list all file names and folder names in the correct case.

e.g. under Windows or linux, we can list these files on a FAT32 volume:

AA
bb
Cc
CCC.txt
ddd.TXT
ANTIVIRUS
ANTIVIRU


but the same files are listed by grub4dos in the console as:

aa
bb
Cc
ccc.txt
ddd.txt
ANTIVIRUS
antiviru


I have reported the bug to chenall and suggested a fix which I have tested and it seems to work.


Sunday 23 February 2014

Adding RedHat Install ISOs to Easy2Boot

[Edit] To install RedHat from an ISO, it is easier to just convert the ISO file to a .imgPTN file using the MPI_FAT32 Desktop shortcut. The notes below are now outdated...[/Edit]

I tried to add the RedHat ISO rhel-server-5.7-i386-dvd.iso today to my Easy2Boot NTFS USB drive, so that I could install RedHat to the 2nd partition of my notebook, but found that the RedHat installer failed to find any source 'packages'. The ISO was mounted on /dev/sdb4 as a CDFS filesystem by E2B, but it couldn't access it for some reason! This was odd, as it must have used it to boot in protected mode, but once booted to linux, the installer does not seem to find it (not even on /dev/sdb4).
The next thing I tried was to specify the source of the packages as a HDD and point it to /dev/sdb1  (the USB drive) and the /_ISO/MAINMENU folder. This worked, but only if the Easy2Boot USB drive was formatted as a FAT32 volume! It seems the RedHat installer environment cannot read NTFS volumes.
The next problem I hit was that the installer wanted to install RedHat linux to my hard disk (which I wanted) but only gave me the option of installing the grub bootloader to the /dev/sdb MBR (i.e. the E2B USB drive) or, using advanced options, it would install grub to the partition sectors of /dev/sda2  (the partition I was installing RedHat to). I wanted to install grub to the MBR of my hard disk (/dev/sda) but this choice was not offered! It seems I needed to swap over the USB boot disk with the internal hard disk.

Anyway, to cut a long story short, here is how to add RedHat to E2B:

1. Ensure that you E2B drive is formatted as FAT32
2. Copy the rhel-server-5.7-i386-dvd.iso file to the \_ISO\MAINMENU\MNU folder
3. Make a new rhel-server-5.7-i386-dvd.mnu text file in the \_ISO\MAINMENU\MNU folder with the following contents:
title REDHAT Installer ISO \n When prompted, specify Hard Disk, /dev/sdb1\n and $HOME$ for the path
set ISO=rhel-server-5.7-i386-dvd.iso
/%grub%/qrun.g4b force.iso01 $HOME$/%ISO%
boot
4. Boot from the E2B USB drive on the target system and run RedHat from the menu entry
5. When prompted for a Package source, choose Hard Drive option and then use:
/dev/sdb1                                       - the E2B USB drive
/_ISO/MAINMENU/MNU                  - the path to the ISO file


Using an NTFS E2B USB drive

OK, but what if my E2B drive is formatted as NTFS? Well, I haven't found a nice way round this. There is no point extracting the files from the ISO if RedHat cannot read the E2B NTFS volume!
One solution is that you make a 2nd FAT32 partition on your E2B USB drive and copy the rhel-server-5.7-i386-dvd.iso file to a new\_ISO\MAINMENU\MNU folder on that partition.

Then you can then modify the .mnu file like this:
/%grub%/qrun.g4b force.iso01 (hd0,1)$HOME$/%ISO%
and point the installer at /dev/sdb2 which will be the USB drive's 2nd FAT32 volume, instead of /dev/sdb1. This worked for me :-)

# FOR NTFS E2B USB DRIVE - e.g.
# PTN0 = NTFS    /_ISO/MAINMENU/MNU  contains .mnu file
# PTN1 = FAT32  /_ISO/MAINMENU/MNU  contains the iso file

Another way to get round the problem is to make a hard disk image of a FAT32 partition which contains the ISO file and then map that FAT32 volume to a partition on the E2B USB drive - the .mnu file for this is shown below (it requires a spare USB flash drive just to make the image file):

# This can be used if your E2B drive is NTFS (or FAT32)
# Format a spare USB Flash/HDD as FAT32, 1 partition, SIZE=(size of Redhat ISO) + 100MB (e.g. if ISO is 3149MB, format USB flash drive as 3250) - Use RMPrepUSB for this.
# Copy redhat ISO onto the root of the FAT32 USB drive
# Use RMPrepUSB - Drive->File, Filename=REDHATPTN.IMG, start=P1, size=P1, filestart=0 to make an image of the USB drive partition
# Copy REDHATPTN.IMG and this .mnu file to \_ISO\MAINMENU\MNU folder (or any \_ISO\xxxxxx\MNU folder) on E2B NTFS drive
# change rhel-server-5.7-i386-dvd to match your ISO filename
# See http://rmprepusb.blogspot.co.uk/2014/02/adding-redhat-install-isos-to-easy2boot.html for more info

title REDHAT FOR NTFS\n To install, choose Hard Drive, sdb4 and /
set IMG=REDHATPTN.IMG
set ISO=/rhel-server-5.7-i386-dvd.iso
if "%E2BDEV%"=="" set E2BDEV=hd0 && pause E2BDEV forced to hd0!
if exist CD echo WARNING: Cannot use partnew command! && pause && configfile (bd)/menu.lst
debug on
parttype (%E2BDEV%,3) | set check=
debug off
set check=%check:~-5,4%
if "%check%"=="0x00" partnew (%E2BDEV%,3) 0 0 0
if not "%check%"=="0x00" echo WARNING: PARTITION TABLE 4 IS ALREADY IN USE! (%E2BDEV%,3)=%check% && pause && configfile (bd)/menu.lst
debug 1
if "%check%"=="0x00" partnew (%E2BDEV%,3) 0x0 $HOME$/%IMG% || pause ERROR: $HOME$/%IMG% NOT CONTIGUOUS? && configfile (bd)/menu.lst
map (hd0) (hd1)
map (hd1) (hd0)
map --hook
# set root as new FAT32 partition on E2B drive
root (hd1,3)
map %ISO% (0xff)
map --hook
root (0xff)
chainloader (0xff)
# replace FAT32 partition number C or B with 0 as linux doesn't need it (E2B USB drive is hd1 now)
cat --locate=\x0c --number=1 --length=1 --skip=0x1f2 --replace=\x00 (hd1)+1
cat --locate=\x0b --number=1 --length=1 --skip=0x1f2 --replace=\x00 (hd1)+1

I have added Tutorial #120 which includes these details.

This will only work if the ISO file is <4GB in size however. You could format the spare USB Flash drive as ext2/3 instead of FAT32, but the last two lines of the mnu file would need to be changed to match the ext2/3 partition type number and the ISO file would need to be made contiguous.

Any other suggestions are welcome...

Saturday 22 February 2014

Add Tablet PC and Media Centre Edition (XP) installs to Easy2Boot

If you want to install Windows XP  Tablet PC or Media Centre Edition using Easy2Boot, you will find there is a slight problem. These versions of Windows XP Professional require an additional CD which contains the extra software components requested during the GUI mode install stage. This means that half-way through the GUI install stage, you will be asked to insert CD #2 (which is difficult when you have booted from a single ISO!).



The two CDs used to install Tablet PC 2005 are (MCE is similar):
CD #1 : Windows XP Professional SP2 (this is identical to the standard SP2 ISO)
CD #2:  Windows XP Tablet PC Edition  CD2 (contains a \CMPNENTS folder)

It is important to note that the Product Key that you enter when prompted during the install, determines whether Windows XP Pro, Tablet PC 2005 or Media Center is installed. Therefore, to install Tablet PC, you need to enter a valid Tablet PC Product Key (usually found on the Certificate of Authenticity label on the reverse of the Tablet PC).

What we need to do is combine the two CDs. To do this you need an ISO editing tool such as Daemon Tools (though other utilities such as Magic ISO, UltraISO or WinISO may also work). Whatever ISO editing tool you pick, it is important that the ISO retains it's boot code after editing it and also, if you are using a modified/edited ISO containing filenames that are longer than the standard 8.3 filename length, that it does not convert these filenames to 8.3 when you save the new ISO file.

Using Daemon Tools Pro, to combine the two ISOs is quite simple:
1. Extract the \CMPNENTS folder from the CD #2 and copy whole folder to a temporary folder on your hard disk.
2. Load the CD #1 (XP Pro SP2) ISO in the Daemon Tools Pro Editor
3. Drag and drop the \CMPNENTS folder to the root (i.e. at the same level as the i386 folder)
4. Save the ISO with a new name (e.g. XP_TABLET_PC_1_2.iso)

Now simply copy the new ISO file to the \_ISO\WINDOWS\XP folder of your Easy2Boot USB drive (and make sure it is contiguous using RMPrepUSB - Ctrl+F2 or WinContig, as usual).
Now just install it as you would a normal XP ISO (use the DPMS version of E2B if installing to a SATA hard disk) - just remember to use a Tablet PC Product Key or else you will end up with Windows XP Professional instead of Tablet PC 2005! Also, note that because the ISO is now larger, you will need more memory in the system than if you were installing from two real CDs.

Tip: If you have BSOD or reboot/crash problems using the E2B Step 2 (512MB+) option, try the Step 2 (Low RAM) option instead.

P.S. I found that I had to install under VirtualBox with Virtual Technology CPU enhancements OFF for both the first (textmode) and second (GUI mode) install stages, otherwise it crashed!

Service Pack 3
You may be aware that there is no SP3 version of Tablet PC or MCE; you will have to run the SP3 update after installing the SP2 version. However, there are instructions here on how to prepare an SP3 Tablet PC ISO (actually an SP2 ISO which auto-updates to SP3). I suggest you use nLite to make this new ISO if you run into trouble with 8.3 filename conversion (check the \$OEM$\$$\Microsoft.NET folder name looks correct and is not 'MICROSOF' before saving the ISO file!).

Don't forget to delete the original \i386\SVCPACK.IN_ file and add (or edit) a new \i386\SVCPACK.INF file. I used this for the new SVCPACK.INF file:

;Windows XP
[Version] 
Signature="$Windows NT$"
MajorVersion=5
MinorVersion=1
BuildNumber=2600

[SetupData]
CatalogSubDir="\i386\SVCPACK"

[ProductCatalogsToInstall]

[SetupHotfixesToRun]
NETFX.CMD
ULTIMATE.BAT

Tip: If you are installing a Tablet PC from a Volume Licence version of XP Pro SP2 32-bit, you will need to enter the correct VL Tablet PC key for your establishment. I found one beginning with KT3Q2 got me past the install stage (though it may not be valid to use or activate correctly).





Friday 14 February 2014

Build your own Porteus ISO and run it with persistence using Easy2Booot

Porteus is a linux distro that is quick to boot and you can be running a browser within 30 seconds from selecting the menu entry in the E2B menu. Porteus is a complete linux operating system that is optimized to run from a USB flash drive. It's small (under 300MB) and fast which allows you to start up and get online while most other operating systems are left spitting dust.

You can also configure and build your own ISO online in just a few seconds too!

To download the ISO of your choice, click on the Download button on the top of the page at www.porteus.org. This will take you to a page that walks you through selecting and downloading your ISO. Users with 64-bit hardware can use either version, but users with 32-bit hardware can only use the 32-bit (i486) version so I suggest you stick with the 32-bit version.

You can make a Desktop Edition or a Kiosk Edition. The Kiosk Edition has been restricted to only allow public users access the web browser. It is ideal to boot to if you just want to quickly boot to a browser from another system. Furthermore, the browser has been locked down to prevent users from tampering with system settings. The kiosk edition will run on both 32-bit (i486 or greater) and 64-bit (x86_64) systems and is extremely lightweight in terms of size and used resources. Default kiosk image size is under 50 MB while your custom kiosk ISO size will depend on your choice of adding extra components like flash, java, additional fonts, end even what home page you want, etc. When the kiosk boots it automatically opens firefox to the home page. When firefox is restarted all caches are cleared and browser reopens automatically with a clean session. By adding Flash and Java, I could play YouTube videos with sound on my Asus EeePC with no problem.

For your first ISO, I suggest you start with the Desktop 32-bit - GUI - KDE4 version. Just select your options from build.porteus.org, choose a browser (choice of Firefox, Chrome or Opera), a Word Processor (AbiWord or LibreOffice), Skype and Development tools (binutils, gcc, make, etc.), video card drivers (nVidia, Radeon, Linux OpenSource) and Printer Support (as desired) and click on the large BUILD button. Within a few seconds your ISO will be ready to download and copy to your E2B drive!

The Kiosk version is worth checking out also, just to see what configuration options you have in the Kiosk build wizard!

MBR-boot Porteus with persistence on E2B from ISO

To run Porteus from Easy2Boot with persistence, use the correct Porteus-xxx-persistent.mnu file or Porteus_generic_persistence.mnu  (in the \_ISO\docs\Sample mnu files folder of E2B). Instructions are inside the .mnu file.

1. Add generic .mnu file to \_ISO\LINUX\MNU folder
2. Add ISO to \_ISO\LINUX\MNU folder
3. Create \porteus persistence file on USB drive (see .mnu file for instructions)
4. Run \Make_this_file_contiguous.cmd

See also here for more details or you can follow the instructions in Tutorial 73.

UEFI-booting with persistence

Using agFM (legacy and UEFI64)

Create a .cfg file using the text below.
Then follow the instructions on the commented lines. The same /porteus  persistence file can be used for both E2B and agFM if you wish.


# agFM .cfg file for Porteus 4 x64 iso boot with persistence
# For UEFI and legacy
# Place this .cfg file in \_ISO\LINUX folder, place ISO file in \_ISO\LINUX\MNU folder
# Use Make_Ext.exe to create persistence file \porteus  with volume name of porteus in root of USB drive
# make all files contiguous
# NO SPACES in filenames or paths
# If you get a 'spawning too fast' error, just reboot. It is a known issue (maybe to do with NTFS filesystem and dirty shutdown?)

# Only show menu if 64-bit CPU:
if [ "$CPU" = "64" ] ; then
menuentry "Porteus 4 64-bit with persistence" --unrestricted --class ubuntu {
# WARNING: partnew will write a new partition entry
   set "grubfm_per=(${grubfm_device})/porteus"
   
   set "grubfm_path=/_ISO/LINUX/MNU/Porteus-CINNAMON-v4.0-x86_64.iso"
   
    set "grubfm_file=(${grubfm_device})${grubfm_path}"
if [ ! -e "${grubfm_per}" ] ; then 
echo ERROR ${grubfm_per} does not exist on (${grubfm_device}) ; read ; fi
if [ ! -e "${grubfm_file}" ] ; then 
echo ERROR ${grubfm_file} does not exist on (${grubfm_device}) ; read ; fi
if [ ! -e "(${grubfm_device})${grubfm_path}" ] ; then 
echo ERROR (${grubfm_device})${grubfm_path} does not exist on (${grubfm_device}) ; read ; fi
# check files are contiguous
set x=0
set NC=0
stat -c -q -s x "${grubfm_per}"
if [ ! "${x}" = "1" ] ; then 
echo ERROR: ${grubfm_per} is not contiguous or does not exist!
sleep 5
set NC=2
fi

   if test -d (${grubfm_disk},4) ; then echo ERROR: Partition 4 in use ; sleep 5 ; set NC=5; fi

if [ "${NC}" = "0" ] ; then 
   if ! test -d (${grubfm_disk},4) ; then partnew --type=0x00 --file="${grubfm_per}"  (${grubfm_disk}) 4 ; fi
   loopback loop "${grubfm_file}"
   set root=(loop)
   set gfxpayload=keep
   linux /boot/syslinux/vmlinuz from=${grubfm_path}  changes=LABEL:porteus/
   initrd /boot/syslinux/initrd.xz
   boot
fi

}
fi

menuentry "Back" {
grubfm "${grubfm_current_path}"
}


Using .imgPTN


Porteus uses rEFInd for UEFI-booting. I used Porteus-XFCE-v3.2rc5-x86_64.iso.

1. Convert the ISO file to a FAT32 .imgPTN file. Increase the suggested size to allow for a persistence file (e.g.  add 300 MB extra).

2. Switch to the .imgPTN file

3. Edit the \EFI\BOOT\refind.conf file as below:

menuentry "Porteus GUI mode" {
volume KERNELS
icon EFI/BOOT/icons/os_porteus.png
loader boot/syslinux/vmlinuz
initrd boot/syslinux/initrd.xz
options ""
submenuentry "Save changes" {
add_options "changes=/porteus/porteussave.dat"


4. Edit the \boot\syslinux\porteus.cfg file as below for MBR booting:

LABEL GRAPHICAL
MENU LABEL Graphics mode
KERNEL vmlinuz
APPEND initrd=initrd.xz changes=/porteus/porteussave.dat
TEXT HELP
    Run Porteus the best way we can.
    Try to autoconfigure graphics
    card and use the maximum
    allowed resolution
ENDTEXT

5. Boot to Porteus and use the Systems - Porteus Save File Manager   (password=toor) to create a \porteus\porteussave.dat file on the E2B USB drive. Set the size so that it uses all the free space available.

You may get some error messages on first boot but these can be ignored.

Tip: Use CTRL-S to pause the boot messages and CTRL-Q to resume, so you can see if the persistence file was accepted as valid or not.

Login using  root (pwd-toor) and type startx to start the Desktop GUI if any problems.

Now you should be able to UEFI (press F2 in rEFInd menu and choose 'Save changes' menu entry - see below) or MBR boot with persistence.


Porteus 3.2

The latest builds of Porteus come as straight ISO files (the Porteus Build Wizard has been discontinued).

If you make a FAT32 .imgPTN file from the ISO (I used Porteus-MATE-v3.2.2-x86_64.iso), then you can also download any of the .xzm modules (e.g. palemoon-27.2.1-x86_64-1.xzm) and copy them into the \porteus\modules empty folder which is already present.

When you next boot to Porteus from the .imgPTN file, the modules will be automatically added (e.g. Applications - Internet - PaleMoon).

Tip: Create the persistence file as detailed above only after you have added all the modules that you want. If you add modules afterwards, it may prevent Porteus from running startx and booting to the Desktop GUI.


Note: To boot with persistence via UEFI - press Insert or F2 in the rEFInd menu and choose the 'Save changes' boot option.

Thanks to Ed.P for the info about adding modules.