In my experience, Windows usually does see all the partitions. I don't know what happens if it runs out of letters.
sfdisk is more oriented to doing what you want, although parted may offer some usability advantage.
The script you are using is writing the partition info twicw to the same partition.
If you want 2 partitions then you need /dev/sda1 and /dev/sda2. /dev/sda is the *whole* device.
The partition table is in the first 512 bytes(one sector or block) of the whole disk. Partition info there will point to the assigned partitions.
Some pendrives come with a bogus partition table which makes them show up as /dev/sda with no partition at all. This will be overwritten by whichever tool you use to create two separate partitions (sda1,sda2)
|