support persistence on the boot drive for security reasons.
The new method (using partnew)
However, this tutorial shows another method of adding a linux ISO to your grub4dos multiboot USB drive
which will work with almost 100% of linux ISOs!
Yes, this method should work with almost ANY linux ISO file, even those that do not have a cheat code for post-loading of the ISO file!
The method described below was previously outlined by
cdob on reboot.pro
here. This method can be used with many linux ISOs but may be particularly useful if you have an NTFS boot partition but the linux version you want to boot to does not support the NTFS filesystem.
This method is used by Easy2Boot (a multiboot USB drive that will boot almost any boot able file just by copying it on!).
PLEASE NOTE: Your boot USB drive must not have more than 3 primary partitions. This procedure writes an entry in the the fourth partition entry in the partition table.
Tails is 'special' however, in that you can only use the method below on a USB Flash drive - it won't work on a USB HDD. However, 99% of most other linux livecd ISOs do work.
Introduction
The menu below can be used with most linux ISO files.
Method
This tutorial assumes that you already have a grub4dos multiboot USB drive. If you do not already have one, then make one using RMPrepUSB (follow steps 1 and 2 in
this tutorial)
Again, be aware that the new grub4dos menu will write a new partition table entry on your USB boot drive (a fourth entry) - this will destroy any existing partition entry that may already be in the fourth position!
Typically most bootable USB drives have only one or two partitions. You can check the four partition table entries on your USB drive using RMPrepUSB - Drive Info - 0.
Booting direct from an ISO also prevents any malware from changing any files in the ISO.
NOTE: Tails is 'special' and does not boot from a USB Hard Disk (FAT32 or NTFS) using the partnew method described below!
Step 1
Download a linux 'live' ISO and copy it to your grub4dos USB drive
Step 2
Edit the menu.lst file (press F4 in RMPrepUSB to load it into Notepad). Add the following text to your menu (make sure the set ISO= line has the exact same name as your ISO file)..
# GENERIC - BOOT ANY LINUX FROM ISO
# This menu can be used for to boot any linux iso file
# It is especially useful if your boot drive is NTFS but linux does not understand NTFS once it boots and so cannot boot further
# WARNING: permanently alters the boot device's partition table (adds a 4th ptn entry)!
# Use with care as it will obliterate ptn 4 on the boot device if it already exists!
iftitle [if exist /linux.iso] My linux (boot from ISO)
set ISO=linux.iso
# check and make an empty table entry in 4th position in ptn table
parttype (hd0,3) | set check=
set check=%check:~-5,4%
if "%check%"=="0x00" partnew (hd0,3) 0 0 0
if not "%check%"=="0x00" echo WARNING: PTN TABLE 4 IS ALREADY IN USE! && pause && configfile /menu.lst
ls (hd0,0)/%ISO% && partnew (hd0,3) 0x00 /%ISO%
Step 3
Test your menu entry on a REAL SYSTEM - it won't work under QEMU because disk writes will not work correctly under QEMU (unless you use the QEMU in RMPrepUSB)!
Note: Once the menu entry has been run, you will have a (nonsensical and overlapping) 4th partition entry (but of type 0 so Windows should not see it).
The new 4th partition will be set to start at a position just after the start of the ISO file and the partition length will be set to the length of the ISO file. It will look to linux as if there is a valid CDFS filesystem in partition 4 which linux will mount and then access for the rest of it's boot files (squashfs, etc.).
Running Ophcrack from an ISO
Ophcrack will boot from an ISO using this 'partnew' method (as used by
Easy2Boot), however it will be unable to find the \tables folder.
The easiest way to fix this is simply to extract the top \tables folder from the ophcrack ISO(s) and place it in the root of your USB drive (USB:\tables\xxxx).
Note that this does not work for an exFAT USB drive because the Ophcrack linux distro cannot read exFAT volumes.
e.g. for Easy2Boot you would have this folder structure: