It is easy to install Windows 7 or Windows 8 from a USB flash drive. You just have to find any 4 GB or more USB flash drive, start the command line with the administrator privileges and run several commands.
However, having tried this operation with Windows 8.1 Enterprise x64, it turned out that the installation files don’t fit the 4 GB flash drive. It lacks just a hundred megabytes. Today we show how to solve this problem
How to fit Windows 8.1 distribution to a 4 GB USB flash drive?
You have a 4 GB or more USB flash drive. An ISO file with a Windows distribution and an operation system Windows Vista, Windows 7 or Windows 8 (also, Windows Server 2008 or higher).
Insert the USB drive into your computer.
First of all, if you have an 8 GB or more USB flash drive, you can try to use a Microsoft tool to create a bootable flash drive – Windows 7 USB/DVD download tool. If you can’t create a bootable flash drive with this tool, see below what to do.
Run cmd.exe as administrator. In this window, enter the command diskpart, to start Diskpart tool.
Now you need to find out what number was assigned to the USB flash drive. Enter list disk and look through the list of available disks
DISKPART> list disk
Disk ### Status Size Free Dyn Gpt
——– ————- ——- ——- — —
Disk 0 Online 30 GB 1024 KB
Disk 1 Online 4098 MB 1984 KB
Disk 2 Online 10 GB 1024 KB
Find a USB flash drive by the disk size and select it for further work. In my case, it is Disk 1 so I run the command select disk 1. Now follow these steps one after another:
DISKPART> select disk 1
Disk 1 is now the selected disk.
DiskPart succeeded in cleaning the disk.
DISKPART> create partition primary
DiskPart succeeded in creating the specified partition.
DISKPART> select partition 1
Partition 1 is now the selected partition.
DiskPart marked the current partition as active.
DISKPART> format fs=ntfs quick compress unit=512
100 percent completed
DiskPart successfully formatted the volume.
DiskPart successfully assigned the drive letter or mount point.
Pay attention to the text highlighted in red. In the line select disk 1 it is a number of the USB flash drive. In the second case, in the command FORMAT FS=NTFS QUICK COMPRESS UNIT=512 it is the difference from other manuals on how to create bootable USB flash drives.
COMPRESS means that compression will be applied to the NTFS files on the USB drive.
UNIT=512 sets the cluster size to 512 bytes. The default cluster size is 4 KB. However, there are a lot of small files in the distribution of Win 8.1, so we’ll make the data placement denser.
If you have a USB flash drive with the size of 8 GB or more, you’d better not specify the COMPRESS and UNIT=512 parameters, because it takes more time to copy your files to the USB flash drive when you are using them.
Now you have to extract files from ISO images of Windows 8.1 distribution to your USB flash drive. In Windows Vista and Windows 7, you’ll have to use third-party utilities, such as WinRar, 7Zip, Far Manager, etc. to extract the files.
In Windows 8 and 8.1, ISO files are mounted as virtual CD / DVD drives and the files can be copied using Windows explorer.
If you have formatted your USB flash drive with COMPRESS, you have to move to it in Windows explorer, right-click bootmgr and bootmgr.efi, select Other and uncheck Compress contents to save disk space.
If this is not done, while booting from a flash drive, you will see an error:
BOOTMGR is compressed
Press Ctrl+Alt+Del to restart
Now, return to the command line and run:
1 2 3
C:\Windows\system32>f: F:\>cd boot F:\boot>BOOTSECT.EXE/NT60 F:
Where F: is the drive letter of your USB drive.
Now that’s all about creating a bootable USB flash drive. You can restart your computer/laptop and boot from the USB drive.
This version of f:\boot\bootsect.exe is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher.
Then you have to extract only the boot folder from Windows Installation Disk (ISO) containing files for the same platform as you are currently running (in our case, it is x86) to the C: drive. Run the following commands:
C:\Windows\system32>cd C:\boot C:\boot>BOOTSECT.EXE/NT60 F: