Sunday, September 20, 2015

Install Windows 10 on USB External Hard Disk on MAC/PC

As a matter of fact, Microsoft doesn't allow to install windows on USB external devices. If you try to install Windows on external disk drive, you'll get this error:

Windows cannot be installed to this disk. Setup does not support configuration of or installation to disks connected through a USB or IEEE 1394 port.
 But you can install Windows by creating and configuring custom UEFI/GPT-based partition scheme.

Note: In this tutorial, I'll teach you how to install Windows on UEFI/GPT-based hard drive partition because almost every PC and MACBOOK run on it. BIOS/MBR-based hard drive partition has become obsolete.

How to install Windows 10 Tutorial

Configuring Disk Partitions using Bootable Windows 10 USB

You have to create a Windows RE Tools partition, a system partition, an MSR partition, a Windows partition, and a recovery image partition. The following diagram shows this configuration:

Recommended UEFI/GPT drive partitions


After creating the partitions, you can apply the Windows image on the newly created partitions.

  1. Create a windows 10 USB bootable disk and boot from it.
  2. Once you're in the Setup program, select your language, time and currency format and input method, and click Next. Click the Install Now button. Enter/Skip your Windows key if prompted, and read and accept the software licence. In the next screen, press "SHIFT+F10" to open command prompt. Also connect your external hard disk.
  3. Now type diskpart and create the partition using the following script below:
list disk

select disk x (where x your disk number 0,1,2,3,... and so on)

clean (This will format the whole disk)

convert gpt

create partition primary size=350

format quick fs=ntfs label="Windows RE Tools"

assign letter="T"

set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"

gpt attributes=0x8000000000000001

create partition efi size=100
** NOTE: For Advanced Format 4Kn drives, change this value to size = 260 **

format quick fs=fat32 label="System"

assign letter="S"

create partition msr size=128

create partition primary size=256000
** NOTE: I've given 250GB Disk space to the drive where windows will be installed, change this value according to your disk size **

format quick fs=ntfs label="Windows"

assign letter="W"

create partition primary size=4096

format quick fs=ntfs label="Recovery Image"

assign letter="R"

set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"

gpt attributes=0x8000000000000001

**NOTE: I've a 500GB External hard disk and partitioned it accordingly. After this I get an unallocated disk space roughly say 245 GB which I can create a partition here using "create partition primary" or later after Windows installation using Disk Management. **

list volume

exit

Applying Windows, System, and Recovery Partitions by using Deployment Image Servicing and Management(DISM) Tool

Hope you didn't close the command prompt, if yes then again press SHIFT+F10 to open it.

Type C: and press enter.
Type Dir to check if it's your Windows 10 bootable pendrive. If not, use diskpart to verify your pendrive volume letter. list volume command in the above script shows the drive letter of your pendrive.
Now, type the following command in sequence:

md R:\RecoveryImage

copy C:\sources\install.wim R:\RecoveryImage\install.wim

cd X:\Windows\System32

dism /Apply-Image /ImageFile:R:\RecoveryImage\install.wim /Index:1 /ApplyDir:W:\

md T:\Recovery\WindowsRE

copy W:\Windows\System32\Recovery\winre.wim T:\Recovery\WindowsRE\winre.wim

bcdboot W:\Windows /s S: /f UEFI

W:\Windows\System32\reagentc /setosimage /path R:\RecoverImage /target W:\Windows /index 1

W:\Windows\System32\reagentc /setreimage /path T:\Recovery\WindowsRE /target W:\Windows

That's it! Exit the command prompt and close the Windows installation. Reboot and make sure external hard disk is your first priority on any Windows PC. If on Mac, reboot and keep pressing option/alt key until you get Boot Menu, select the EFI Boot and continue. It will reboot again so make sure to press option/alt key again as soon as the system starts and do the same.
And then after some more minutes you will be greeted to create your account!

Use BootCamp on Macintosh OS X to download drivers for Windows 10 which will be approximately 1.5 GB. Standalone/Offline driver download is not available as of now.  
Boot Camp Assistant
Boot Camp Assistant


That's all for today! If you stuck at any point, feel free to comment below! 

35 comments:

  1. Someone who need windows product key you can go site http://www.vanskeys.comto get. It's great works and provide 100% genuine key. The price is cheap and their good service. Recommend to you.

    ReplyDelete
  2. I can't find the file "install.win" in sources but I find install.ESD in the CD of windows 10

    ReplyDelete
    Replies
    1. You have to convert it from .ESD to .WIM. google how to do it.

      Delete
    2. so I have done everything you told us to do, and right now my laptop getting ready.

      Delete
    3. AND.......................... IT WORKS!!!!!!!

      I CAN'T THANK YOU ENOUGH!!

      Delete
  3. Worked for me. I had to extract the install.wim file and put it on a separate external drive because the windows installer actually HIDES the install.wim file from its boot. I don't remember why exactly but I also had to use Windows 10 version 1803. I think its because the latest Windows 10 installer (1809) doesn't have a install.wim file at all.
    There is also a typo: As of 20190326, you misspelled the "RecoveryImage" folder in the 2nd to last command line in the last black border box.
    Overall, extremely useful. Thank you for your help.

    ReplyDelete
  4. Wanted also to mention that my "winre.wim" file was 367,240,179 bytes which meant it wouldn't fit on a formatted size of 350MB.. so I made the T partition 368MB instead to have it fit.

    ReplyDelete
  5. Perfect Steps. I am so grateful. It worked like charms for both Normal PCs and Windows on Mac.

    God bless you.

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. I think i found the problem. The EFI partition never got assign a letter. Trying again. Will report outcome of second try.

      Delete
  7. When i get to "copy C:\sources\install.wim R:\RecoveryImage\install.wim" it tells me that "the volume does not contain a recognised file system. Please make sure that all the required file system drivers are loaded and that the volume is not corrupted." Help please.

    ReplyDelete
  8. Wooow it worked! I had to change the partition sizes but amazing I still can't believe it

    ReplyDelete
  9. when i get to “ copy C:\sources\install.wim R:\RecoveryImage\install.wim” it says “ the system cannot find the path specified”. help?

    ReplyDelete
    Replies
    1. the C: is just an example, make sure to put the correct letter from the list volume command

      Delete
  10. Big hug for you bro, worked like a Charm :*)
    Notes:
    1. install.esd works fine by itself, no need to convert it to wim
    2. Also needed to extend T: size to fit winre.wim
    3. Typo in path of second last command, its supposed to be RecoveryImage not RecoverImage ;)

    ReplyDelete
  11. Im having error "REAGENTC.EXE: The index of the recovery image (WIM) file must be specified."

    When doing /setosimage. Any idea?

    ReplyDelete
  12. When I type in D:\sources\install.wim R:\RecoveryImage\install.wim

    It says there is not enough space.

    How do I fix it??

    ReplyDelete
  13. We have to create the above partition in our external hard drive Or in laptop hardrive

    ReplyDelete
  14. I get an error during dism it stops at 80% error:433
    A device which does not exist was specified. Any ideas?

    ReplyDelete
  15. Error 87

    The apply-image/imagefile option is unknown.

    Please help..

    ReplyDelete
    Replies
    1. /apply-image Is a command. /Imagefile is another command. Just insert a space !!!

      Delete
    2. Mate I got the same problem even with the space, is there anything else I am missing?

      Delete
  16. Can anyone help me get past the "Reagent.exe is not compatible with the version of Windows you're running" message? I'm installing 64-bit Win 10 on a USB hard drive and currently have no operating system so finding/copying/moving files has to be done in the command prompt. I have just enough tech knowledge to be feared by tech experts far and wide, so any assistance would be greatly appreciated.

    ReplyDelete
  17. How do I know whether mine is an Advanced Format 4Kn drive?

    ReplyDelete
  18. On the line "W:\Windows\System32\reagentc /setosimage /path R:\RecoverImage /target W:\Windows /index 1" there's a typo, and needs to read "W:\Windows\System32\reagentc /setosimage /path R:\RecoveryImage /target W:\Windows /index 1

    Very minor; but, wanted to let you know.

    ReplyDelete
    Replies
    1. Basically just missing the 'y' in Recovery

      Delete
    2. Also, since Windows 10 is so big these days, I recommend bumping up the file sizes.

      Delete
  19. Please am using the latest win 10 pro how do i get install.wim
    Please help I really need this help

    ReplyDelete
  20. Great! I just installed windows 11 on an iMac 2017 external ssd
    T must be 500 and R 4800, maybe little less
    It even skipped the hardware limitations block

    ReplyDelete
    Replies
    1. Only glitch is, if the external SSD is connected, always boots from it, even after selecting an other partition with Option key

      Delete
  21. Where Can Buy Best LaCie 5TB Hard Drive in Uae, Porsche Design Hard Drive in Uae, USB 3.0 Type-C External Hard Drive in Uae
    https://gccgamers.com/drives-storage/external-hard-drives/lacie-5tb-porsche-design-usb-3-0-type-c-mobile-drive-external-hard-drive-silver-stfd5000400.html

    ReplyDelete
  22. This comment has been removed by the author.

    ReplyDelete
  23. How can I add Windows 11 as well side by side with the same way on the external hard disk? Thanks in advance

    ReplyDelete
  24. Error: 87
    The apply-image/imagefile option is unkown,
    For more information,refer to the help by running DISM.exe/?.
    The DISM log file can be found at X:\windows\logs\DISM\dism.log


    Please help

    ReplyDelete

Give opinion & ask your queries here!