Eu criei um dispositivo de loop para testes:
dd if=/dev/zero of=tmp.img bs=1M count=100
modprobe loop
dd if=/dev/zero of=tmp.img bs=1M count=100
losetup /dev/loop0 tmp.img
E então:
# parted --script /dev/loop0 unit s mklabel msdos \
mkpart primary fat32 1 2048 mkpart primary fat32 2049 4096 print
Warning: The resulting partition is not properly aligned for best performance.
Warning: The resulting partition is not properly aligned for best performance.
Model: Loopback device (loopback)
Disk /dev/loop0: 204800s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1s 2048s 2048s primary lba, type=0c
2 2049s 4096s 2048s primary lba, type=0c
formatação
mkfs.vfat -F 32 /dev/sdb1