Trouble installing Windows 10 IoT for Raspberry Pi 2 (Error: 126)

I usually always install Raspbian on my Raspberry Pi’s, but I have always been interested in testing Windows 10 IoT on the little device to see how it works. But that didn’t quite go as I planned, I was unable to write the image to the SD card with the tool Microsoft provided; “IoTCoreImageHelper”. I later found out it tries to run a program called “dism.exe” which get installed with the ImageHelper tool. While trying to run dism manually I can see an error code and a message for just a blink before the black window closes. I managed to see “Error: 126” and a very general error text. Copying the folder to another place didn’t help either.

dism_error_126So I went to my old friend Google and found a Japanese blog having the same problem and also found a solution for it ( The solution is called “ffu2img” and is a tiny python script. The project is hosted on GitHub and there are version made for both python 2.x.x and 3.x.x. (

The script converts Microsofts compressed ffu image to an uncompressed img image which you later can write to SD card with dd command or Win32 Disk Imager ( from Windows. Be aware that the size of the img will be much larger than the ffu file, my img became around 7,2GB.

The ffu image was copied with installation of the ImageHelper tool, you can navigate to the installation folder (C:\Program Files (x86)\Microsoft IoT) and find the image “flash.ffu” inside the folder ..\FFU\RaspberryPi2\.

You will need a linux computer, a virtual machine running linux or cygwin on your Windows machine for this script. I had a second laptop with Ubuntu and copied the script with the ffu image to the SD card I was going to use and plugged it into the laptop.

On my Ubuntu laptop I copied the files to the desktop and then opened the terminal. Use cd to navigate to your desktop and login as root (sudo su).

I made the script executable with this command:
# chmod +x

The syntax is simple, to convert to img just type:
# python flash.ffu flash.img

It will take a few minutes to complete and then you will have a image you can simply write with help of dd, or in my case I copied it back to my SD card, back to my Windows laptop and runned Win32DiskImager to write it to the SD card.

If the python script won’t work, check what version of python you have running. The author of the script has written notes on what version he has been testing it on. I used python 2.7.9.

# python -V

Good luck with your Windows 10 IoT Core!

Leave a Reply

Your email address will not be published. Required fields are marked *