22 - How to boot PCLINUX (and most other 'difficult' linux versions) without using a 'flat-file' structure
Some linux distributions just refuse to boot from an ISO file on a USB drive. The most common method to get around this is to extract the contents of the ISO file onto the USB pen and then use grub4dos to boot from the initrd file (see the Ophcrack tutorial as an example here). However, in some cases you may have more than one ISO file which needs to use this 'flat file' method - and then you have a problem!
There is a way however to get around the problem of non-working linux ISO files without having to use a 'flat-file' structure. basically you create multiple partitions on a USB drive and then extract the binary contents of the ISO file data to a 'spare' partition, so that it looks like an ISO-mountable volume to grub4dos.
RMPrepUSB cannot create multiple partition USB drives, however it can create a 2 partition drive by using the Boot as HDD (2PTNS) option. The second partition is however hidden and also very small. This tutorial shows how you can create a 2-partition USB drive with a large 2nd partition and place the PCLinux ISO file on that 2nd partition.
The following instructions will not alter or harm your Windows Hard Disk drive, it will only affect your USB drive (if carried out correctly!).
(Note: it is also possible to boot PCLinux directly from an ISO file too - see the Addendum at the bottom of the page!)
1. Prepare a USB stick as follows
- 1. SIZE - set the size of the partition to at least 500MB less than the size of your USB flash drive (you need to leave room for the ISO file that you will add later)
(e.g. if you have a 2GB USB drive, set the size to 1000MB). If you use a different ISO, you must subtract the size of the ISO file from the total size of the USB drive in this step).
- 2. VOL LABEL = PCLINUX (for instance)
- 3. BOOT OPTIONS - MSDOS (actually anything will do!)
- 4. FILESYSTEM and OVERRIDES - FAT32 only (do not tick any overrides, do not tick Boot as HDD 2PTNs)
- 5. untick the Copy Files box as we will copy file(s) over later
- 6. Click on Prepare Drive to format your USB drive
2. Now install grub4dos using the Install grub4dos button in RMPrepUSB - choose Yes when prompted and copy over grldr file when prompted.
3. Now exit from RMPrepUSB and make a menu.lst file on the USB drive - my contents for menu.lst for PCLinux is:
WARNING: The following instructions could damage your Hard Disk if not correctly followed - make sure you choose the correct drive (i.e. your USB drive)!
4. Now we need to make a 2nd hidden partition on the USB drive for the ISO file to be copied to. Run the free version of EaSeus All-in-One Partition Manager Home Edition , right-click on the empty space on your USB drive (Drive 2 in the screenshot below) and select Create then create a PRIMARY ext2 partition (do not create a Logical partition as this is not supported by RMPrepUSB) to fill the remaining portion of the disk (which should be at least as large as the ISO file - e.g. 500K).
Now click on the Apply button (top left - tick icon) to create the partition and commit the changes.
5. Now run RMPrepUSB again and click on File --> USB - select the PCLINUX.ISO file (choose *.* filter - if asked if you want to convert to .RAW format say 'No')) and then choose
FILE START = 0
USB START = P2 (for start of 2nd partition)
length = 0 (for max length)
wait for RMPrepUSB to copy the iso data over to the new partition.
The USB drive should now be bootable and should boot to PCLinux. You should be able to use this method with any linux distro.
If you require more USB partitions, you can create up to 2 more partitions using EaSeus and then use P3 or P4 in step 5 as appropriate (note: RMPrepUSB FIle-->USB does not support logical partitions so you can only have ISO files in P2, P3 and P4).
For a discussion about this method of booting see the Boot-Land forum here.
For a discussion on booting PCLinux from an ISO see here.
YOU CAN BOOT PCLinux DIRECTLY FROM AN ISO FILE ON A USB DRIVE!
Use this grub4dos menu entry (change the name of the iso in all three places to match your iso name):
Note: make sure the 'cheat code' fromusb is present and also the bootfromiso path to the iso file on the USB drive starts with a forward slash /