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.
So I went to my old friend Google and found a Japanese blog having the same problem and also found a solution for it (http://yoshi1966.hateblo.jp/entry/2015/08/29/134814). 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. (https://github.com/t0x0/random)
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 (http://sourceforge.net/projects/win32diskimager/) 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 ffu2img.py
The syntax is simple, to convert to img just type:
# python ffu2img.py 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!
Categories: Software Projects