I'm trying to create a bootable disk, e.g. a virtual disk or SD card, with the FAT32 file system from a C# code. It fails on two reasons:
- Formatting FAT32 partition with the standard windows tools format.exe or diskpart.exe as well with the PowerShell is only possible up to 32 GB.
Diskpart.exe:
create vdisk file=<path to vdisk file> maximum=33000
attach vdisk
create part primary
format quick fs=fat32
active
assign letter=<available drive letter>
Format.exe:
Format /FS:FAT32 <disk drive letter>
Powershell:
Format-Volume -DriveLetter <disk drive letter> -FileSystem FAT32
All these commands failed with the error "partition is too big"
=> Is there a way to create a large FAT32 partition programmatically? I know, there are applications like Rufus or AOMEI, which can do it. So this means, it is some how possible.
- I use the command line tool BootSect.exe to make the disk bootable on the BIOS systems:
System.Diagnostics.Process.Start("cmd.exe", "bootsect.exe /nt60 <disk drive letter> /mbr");
This tool seems however to be available only on command line. When calling from the C# application, the tool BootSect.exe is not available for runtime.
=> Is there a way to call the BootSect.exe from the C# application?
Thank you for any reply.
Best regards Igor