I am trying to write a script to reformat a dashcam SD card, as is recommended by the manufacturer. I can do this on a windows system with a simple python script, a snippet here:...fm = windll.LoadLibrary('fmifs.dll')FMT_CB_FUNC = WINFUNCTYPE(c_int, c_int, c_int, c_void_p)FMIFS_UNKNOWN = 0clustersize = c_int(32768) # 32K cluster sizefm.FormatEx(c_wchar_p(Drive), FMIFS_UNKNOWN, c_wchar_p(Format),            c_wchar_p(Title), True, clustersize, FMT_CB_FUNC(myFmtCallback))...So, this is using some windows DLL and formats, and it works. The full script can be found hereNow I want to basically do the same on a Ubuntu system. I am trying to use mkdosfs, and I use system calls, here the command line:mkdosfs -f 2 -F 32 -s 64 -S 512 /dev/sdb1This formats the SD card, but when unplugging the camera from my laptop and switching it on to start recording, it seems to crash, presumably because the expected file system on the SD card is not quite right.I should of course mention that in both cases of the MS windows and the ubuntu case, I do add a few directories that are expected (/DCIM/100MEDIA) and also add a file time.txt with a time stamp the camera reads on start-up to reset the internal clock that is added as a time-stamp to the video.The camera I use is a Roadhawk Bullet Ride, and the specs only say to use a FAT32 file system with 32k cluster size. I have compared the output I get from dosfdsk, both after formatting the card on windows and ubuntu, and I can't see what would be the significant difference, I get 512 byes per sector, 32768 bytes per cluster, 2 FATs, 32 bit entries, etc. I am not sure how important numbers, like 'reserved sectors' and all the other information dosfdsk delivers, are.Thanks for any help or tip you can provide.
mkdosfs to format dashcam SD card FAT32 with 32kb cluster size
ubuntu;filesystems;python