'File Not Contiguous' and 'Too Many Fragments' Errors
Note: The text '(hd0,0)304+8,993472+232,16776+292624,311320+292864' shows that the file is split into four fragments.
Error 60: File for drive emulation must be in one contiguous disk area
Most (but not all) E2B payload files need to be contiguous (in sequential sectors/clusters on the disk). If you see this error reported by E2B, then that file may not boot or work correctly! This error most often occurs if you have been deleting and adding several files to the E2B drive and it is very full.
The easiest way to fix this error is to double-click on \MAKE_THIS_DRIVE_CONTIGUOUS.cmd on the E2B USB drive. This will run WinContig and make the files on the volume contiguous (the drive is not 'defragged', only the payload files on the E2B volume are defragmented).
Tip: Most Windows Installer .ISO files, .VHD and .WIM files do not need to be contiguous, but all .imgPTN files need to be contiguous.
When WinContig does not seem to work...
Not all files need to be contiguous - so try E2B anyway in case it works.
I recommend you install Piriform Defraggler - then you can right-click on an individual file in Windows Explorer to make it contiguous.
To consolidate all free space on the E2B USB drive use Defraggler - Action - Advanced - Defrag Freespace.
Click here to learn more about fragmented files.
Note: You can also receive this error if your BIOS has the 137GB USB bug. If your drive partition is over 137GB, the BIOS may not be able to access any file located past the 137GB (128GiB) point on the drive. If QEMU or VBox+VMUB works OK, but a real system gives an error - suspect that the BIOS has this bug! E2B should warn you when it boots that you have a buggy BIOS.
Under linux, try a defrag program such as defragfs for FAT32 or udefrag for NTFS (see \_ISO\docs\linux_utils folder) (other filesystems such as ext2/3/4 and exFAT may not defrag files properly under linux). Note that due to the nature of the file sytem itself, it is almost impossible to have contiguous files on an ext2/3/4 filesystem, so it is really not suitable for use with Easy2Boot USB drives.
WinContig doesn't work even though there is enough unused space?
WinContig requires contiguous free space. If the free space on the drive is scattered all over the drive, you must use defraggler Defrag Free Space option to consolidate the unused space - see the section further down for details.
Not enough free space available and/or WinContig is too slow?
If you need to add many ISO and other payload files onto your USB drive and make them all contiguous, simply add the payload files to the extracted E2B download folder on your Windows hard drive and then run the MAKE_E2B_USB_DRIVE.cmd script to make a new E2B USB drive. If you have a fragmented drive with little free space then this will be a lot faster than trying to run WinContig on the drive. if you are having problems with some large files then read my blog posts here and here.
Corrupt file or Read-only?
WARNING: If you are using Plop! to boot from the USB drive then you may see this error a lot. Plop! uses a read-only USB 2.0 driver and it is not compatible with E2B because E2B requires read/write access to the USB drive. If you need to use Plop! then please add a set GRUB_USB=Y line to \_ISO\MyE2B.cfg file. This will load grub4dos 0.4.6a and use it's own USB 2.0 driver to replace the Plop! USB driver, and it does support write operations to the USB drive. Alternatvely, hold down the SHIFT key as E2B boots, to load the grub4dos USB driver.
If you still get this error, even though you are sure it is contiguous - this error can also occur if the file is corrupt or if it is not of the correct type or if the E2B USB drive is read-only.
Tip: If the file is in a normal menu folder (e.g. MAINMENU or LINUX or AUTO, etc.) - you can hold down the CTRL+SHIFT keys whilst pressing ENTER to run the ISO and keep the SHIFT+CTRL keys held down - E2B will then calculate and display the CRC32 value of the ISO file for you and you can compare it with the original file's value.
Note: E2B may permanently modify Windows Install ISOs on the E2B drive, so that they do not ask the user to 'press a key to boot from CD\DVD' - therefore the checksums of these files may be different from the original files.
Check also that your BIOS does not have the 137GB USB bug!
Why are the files always fragmented whenever I copy them?
If you USB drive has had a lot of deleted files on it, the unused free space can become fragmented. When you copy over any file, it will be written to the unused areas of the volume and so will be fragmented.
Another reason for fragmentation is due to the copy program you may be using. Downloading files from the internet directly onto the USB drive can cause the file to be heavily fragmented. Also, some multi-threaded file copy programs (e.g. robocopy) can also fragment the files. I recommend you always download files onto your internal hard disk first and then use a single Explorer copy session to copy the files to the E2B USB drive. Do not use more than one Explorer copy session to the same USB drive at the same time - if the E2B USB drive has never been filled to capacity, the copied files will usually be contiguous.
What are contiguous files?
- In the diagram, FILE 4 is 1.3GB in size and is not contiguous.
- Since there is not 1.3GB of contiguous free space on the drive, WinContig cannot copy the file to an area of contiguous free space.
- If you copy a new 1.3GB 'FILE 6' file to this drive, it will have to occupy the unused free space and so FILE 6 will also be non-contiguous
Most ISO files will need to be contiguous for E2B to work. In most filesystems, files are stored in 'clusters'. So a single file can occupy for instance, clusters 234, 235 and 236 on a disk or it could occupy clusters 99, 278 and 1081 on the disk. In the first case (234-236) we have a contiguous file because all the clusters are sequential. In the second case (99,278,1081) the file is not contiguous as it is spread across the disk in 'chunks' with gaps inbetween. To make all files on your USB drive contiguous, run RMPrepUSB and select the USB drive in the drive list, then press Ctrl+F2 to run WinContig. Alternatively download and run WinContig.
Another very useful program is Piriform Defraggler - this shows you a 'cluster map' of fragmented and unfragmented files and you can select and defragment single files by clicking on a square on the map. This is really useful for showing you where the files are located on the drive. Defraggler can also consolidate free space too. See also the blog post here.
Under linux, the defragfs utility (see \_ISO\docs folder) is able to make files on a FAT32 volume contiguous, however it does not work on NTFS or ext2/3/4 volumes. Also, even if you use E2B on a freshly formatted ext2/3/4 volume, all the files seem to be non-contiguous (which is why I recommend FAT32 only for linux users - if there was a working file-defrag utility for linux, you could use NTFS).
WinContig fails to make all file(s) contiguous (use Defraggler)
Sometimes WinContig or Defraggler may be unable to make all the files contiguous. This is usually because there is not enough contiguous free space on the volume. At least as much free space as the size of the file being defragmented is required - e.g. a 5GB file will require at least 5GB of contiguous free disk space so that it can be copied to a contiguous space on the disk.
Note: Defraggler can make contiguous all the unused free blocks on a drive. Use the Action - Advanced - Defrag Freespace option in Defraggler to consolidate the free space before running WinContig.
In this case, you can either delete some large, unwanted files (e.g. \_ISO\CONTIG.ISO can be deleted) and run WinContig again OR it is often much quicker to:
1. Copy all files from you USB drive to an empty folder on your hard drive
2. Re-partition your USB drive and re-install grub4dos
3. Copy all the files back again (use Explorer but do not use multiple copy sessions at the same time)
Defraggler also adds a right-click function to Windows - select the file, right-click and select 'Defraggler - defrag' to defragment (make contiguous) a single file. This is quicker than having to run WinContig/RMPrepUSB.
You can also make a 'master folder' on your system disk by adding your payload files to the extracted E2B files, and then run MAKE_E2B_USB_DRIVE.cmd to make a fresh USB drive.
If this still doesn't work, make a new E2B USB drive, copy on your largest payload file and then run WinContig. Repeat this for the next largest files until you only have files <2GB. Then copy all the other files over.
Making files contiguous on a small NTFS drive
In some cases, if using NTFS, you may find that you cannot get a large ISO file to be contiguous on a smallish drive (e.g. a 6GB ISO file on an 8GB USB NTFS flash drive cannot be made contiguous!), even if you copy over the files to a freshly formatted NTFS USB Flash drive.
Here is how to make a bootable 8GB USB drive containing a 6GB contiguous file using the partitioning tool EaseUS Home Partition Master (EHPM):
1. Erase all partitions on the flash drive
2. Make a small 20MB NTFS PRIMARY partition using EHPM - or RMPrepUSB if you want a special bootloader
3. Re-size the partition using EHPM to ALMOST the full drive capacity - e.g. 7.8GB
4. Now add a small 2nd FAT PRIMARY partition (this is to improve boot compatibility with some BIOSes - the partition is not actually used)
5. Copy over your large file first and check it is contiguous using WinContig.
6. Use RMPrepUSB to install grub4dos to the MBR and PBR and copy over all the E2B files.
If you have Vista or Win7/8/10, then you can use Disk Manager instead of EaseUS Home Partition Master to resize the partition in Step 3.
More details on my blog post here.
Grub4dos bug with exFAT
Large files (over 4GB?) may be reported as 'not contiguous or corrupt' by E2B if they are on an exFAT E2B drive due to a bug in grub4dos. Please update to the latest version of E2B (easily done by double-clicking the UPDATE_E2B_DRIVE.CMD file in the new E2B download and specifying the drive letter of the E2B drive that you want to update).
Recommended for Easy2Boot (fastest flash drive!)
SanDisk Extreme SDCZ880-128G-G46
Fastest USB 3!
See Blog post