(parted) unit s
(parted) print
Model: (file)
Disk /home/steve/tmpdir…/DISK1.img: 2457600s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 2048s 2457599s 2455552s primary fat32 lba
(Note that since you’re working on your own disk image, you don’t need sudo, you only need to specify the full path to parted and mkfs.vfat since they are in /sbin or /usr/sbin and therefore not on your PATH.)
If you don’t need a partition table in your image, you might find it easier to work with a file system image rather than a full disk image; you can do everything in one command with mkfs.vfat:
$ /sbin/mkfs.vfat -v -C DISK2.img $((1200*1024))
mkfs.fat 4.2 (2021-01-31)
Auto-selecting FAT32 for large filesystem
DISK2.img has 64 heads and 63 sectors per track,
hidden sectors 0x0000;
logical sector size is 512,
using 0xf8 media descriptor, with 2457567 sectors;
drive number 0x80;
filesystem has 2 32-bit FATs and 8 sectors per cluster.
FAT size is 2400 sectors, and provides 306591 clusters.
There are 32 reserved sectors.
Volume ID is a452a0bf, no volume label.