Someone actually reverse engineered the formatting and made a open source tool that does the equivalent on Linux: https://github.com/profi200/sdFormatLinux