MakeWinPEMedia Fails for me

CooperBlue 26 Reputation points
2021-01-29T00:04:17.733+00:00

I frequently need to apply a Win10 image from my organization to laptops that come with an OEM image. To do this I need to clean the primary drive with DiskPart. I'd like to create a bootable USB WinPE drive, use the firmware boot menu to boot WinPE and apply my changes to primary drive of the new laptop before pulling my Win10 image from the servers. The Windows Hardware Developer section of Docs has a beautiful section on doing all this.

I've been stuck for a few days however simply trying to get the USB drive formatted. There is a bit of humor to it since the reason I need the bootable WinPE is to resolve such a similar issue.

More or less the final step in creating this bootable WinPE is to run the MakeWinPEMedia operation in the Deployment and Imaging Tools Environment from the ADK. In my case, like this:

MakeWinPEMedia /UFD C:\WinPE_amd64 D:

where the working files reside on C: and the USB flash stick is D: (the "technician PC" is 64 bit, hence the "amd64")

The process always fails with "DiskPart errorlevel -2147024809". I've been trying many things: I've turned off Secure Boot in the UEFI firmware. (I've repeated that with an extra reboot) I've cleaned the USB itself with DiskPart and tried it. I've cleaned the USB and partitioned and formatted it in about every way possible including all the suggestions from about every search out there. The technician PC is a new enough model that handles bootable USB drives well but I've tried different USB ports on it nonetheless. The technician PC is at 2004 (trying to push it to 20H2 as another thing to try.) Some of the searches showed discussions prior to Win10 where the flash drive was built up manually and the contents copied to it - perhaps I should be pursuing that?

Thanks for reading and would appreciate your thoughts and suggestions.

Windows 10 Setup
Windows 10 Setup
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,912 questions
0 comments No comments
{count} votes

Accepted answer
  1. Jenny Feng 14,081 Reputation points
    2021-01-29T06:53:55.803+00:00

    @CooperBlue
    Hi,
    It may related with USB's partition table. It should be MBR.
    Also, the size of the USB drive exceeds the maximum size of FAT32 by 32G, you may need a USB key that is between 512MB and 32GB.
    You could refer to the following link for solutions:
    https://social.technet.microsoft.com/Forums/en-US/541095fd-b1b9-4143-8c64-71f9e932bec4/winpe-error-failed-to-format-g-diskpart-errorlevel-2147024809-when-creating-an-usb-winpe-media?forum=win10itprosetup

    Hope above information can help you.

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. CooperBlue 26 Reputation points
    2021-02-01T15:10:18.19+00:00

    That link fixed me right up! I was able to successfully create my new WinPE USB tool and it is working perfectly. I'm really happy both having the USB tool and also retaining the knowledge of statements in diskpart needed to reproduce it in the future.

    In my case, that put me back on the trail of improving my sequence of disk manipulations to achieve a more fool-proof "target prep" of a drive that's going to receive an SCCM task sequence to install Win10 and whatever else the institution needs on a client machine being built.

    There are lots of things out there about that sort of prep but this weekend I found one page that kind of helped me the most with learning the problems:
    https://4sysops.com/archives/sccm-windows-deployment-troubleshooting-part-2-disk-related-issues/

    Its not comprehensive but it proved the best start in that direction.

    Thanks again for the Q&A help Jenny! --CooperBlue--

    1 person found this answer helpful.
    0 comments No comments

  2. CooperBlue 26 Reputation points
    2021-01-29T14:41:24.957+00:00

    OMG, What a good feeling we all get when another human shares our problem, even for a few moments! Thanks for responding Jenny. The USB I've been using is 16GB, on purpose after reading a similar post about 512MB to 32GB. BUT, I'm very excited that the link you've provided makes sense to me and stands a good chance of going right to the solution for me. The USB I'm using (indeed, most of the USBs lying around my build room) was previously used for Win10 installations of one sort or another. I don't think I've ever bothered to figure out exactly what is accomplished by the "Clean" directive in DiskPart. I probably just hoped it removed a previous use of GPT. The fix presented in the link sounds just like what I've often had to do in the past for various USB installers and I've just not been organized about noting the details.

    I will hopefully get a chance to get to my office and my build room and try this today or this weekend. I will definitely post here one way or the other.

    As a side note, this makes me even more determined to create a little "cheat sheet" I've always pictured showing "the stack" from the raw storage device on up through the various digital storage organizational layers alongside the utility commands that check and convert those storage device standardized abstractions.

    More relatively soon!