How to Install Windows 10 From Hard Drive

Created On: 2016-06-11 Updated On: 2020-09-15

There are two ways to prepare the disk.

I have used the first way successfully. This is recommended on newer system that supports UEFI. Note that under BIOS/MBR, max partition size is 2TB.

Steps:

  1. Make sure booting from UEFI is supported by motherboard and enabled in BIOS.
  2. Convert disk to use GPT partition.
  3. Prepare partitions for installing Windows 10.

    There are two ways of preparing partitions. One, leave some unallocated continuous free space and let Windows 10 installer handle partition creation and decide partition size. Two, create some (or all) of required partitions before installing Windows 10 using Windows PE or gparted.

    The recommended partition layout for Windows:

    EFI System Partition (ESP)         512MiB   FAT32
    Microsoft Reserved Partition (MSR) 128MiB
    Windows (C:)                       >60GiB   NTFS
    Recovery Image (optional)           10GiB   NTFS
    

    Partition layout for hosting Windows 10 installer files.

    Windows 10 Installer FAT32           8GiB   FAT32
    Windows 10 Installer NTFS           10GiB   NTFS
    

    If installer partition is created in the same disk, put it after Windows and Recovery Image partition. Installer partition can also be created in different hard disk or external usb flash drive.

    Prepare partitions to host Windows 10 installer files. Depending on the size of sources\install.wim, you may need one FAT32 partition or one FAT32 partition and a NTFS partition. In Windows 10 1903 and later, sources\install.wim size is greater than 4GiB, you have to use FAT32 + NTFS partition, because FAT32 file system doesn't support files larger than 4GiB.

  4. Copy files from Windows 10 installer ISO to hard drive.

    If using one FAT32 partition, just copy all files in the ISO to the partition.

    If using one FAT32 partition and one NTFS partition. The FAT32 partition is used to boot the installer, then installer will try to find install.wim and other files on a NTFS partition. It is important that FAT32 partition sources\ dir only have boot.wim and no other files.

    • Copy all files except sources\ dir from ISO to FAT32 partition, then create empty dir sources\, and copy sources\boot.wim from ISO to sources\ dir.
    • Copy all files from ISO to NTFS partition, then create sources\ei.cfg file with this content:

      [CHANNEL]
      Retail
      

      Windows 10 installer will use this file to locate the installer files. To learn more about ei.cfg file, see Windows Setup Edition Configuration and Product ID Files (EI.cfg and PID.txt).

    Here is how you may do the above from Windows powershell. Suppose win 10 installer ISO is mounted at X:, FAT32 partition is mounted at E:, NTFS partition is mounted at F:.

    robocopy /s /xd:Sources X: E:
    md E:\Sources
    copy X:\Sources\boot.wim E:\Sources\
    robocopy /s X: F:
    # `n means new line in powershell
    echo "[CHANNEL]`nRetail" > F:\Sources\ei.cfg
    

    Here is how you may do the above from linux. Suppose win 10 installer ISO is mounted at /media/cdrom/, FAT32 partition is mounted at /media/sylecn/UFAT32/, NTFS partition is mounted at /media/sylecn/UNTFS/.

    # mount file systems
    
    rsync -ai --exclude='sources/' /media/cdrom/ /media/sylecn/UFAT32/
    mkdir /media/sylecn/UFAT32/sources
    cp /media/cdrom/sources/boot.wim /media/sylecn/UFAT32/sources/
    rsync -ai /media/cdrom/ /media/sylecn/UNTFS/
    echo -e "[CHANNEL]\nRetail" > /media/sylecn/UNTFS/sources/ei.cfg
    
    # ensure data is written to disk.
    sync -f /media/sylecn/UFAT32/sources/boot.wim /media/sylecn/UNTFS/sources/ei.cfg
    
    # umount file systems
    

    Step 2 to 4 can be done using gparted live CD or flash drive.

  5. Reboot computer, choose boot device from boot menu.

    The disk containing the FAT32 file system should appear in the list, choose it.

  6. The Windows 10 installer will appear soon. Follow the instructions.
Is this post helpful?