siderolabs / go-blockdevice

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vfat: support probing for FAT12 and FAT16 filesystem labels

flokli opened this issue · comments

With #56 I'm able to discover partitions with certain filesystem labels, but in the case of FAT, only for FAT32.

mkfs.vfat man page says:

       -F FAT-SIZE
           Specifies  the type of file allocation tables used (12, 16 or 32 bit).  If nothing is specified, mkfs.fat will automatically select between 12, 16 and 32 bit,
           whatever fits better for the filesystem size.

This means, if you just issue a mkfs.vfat -n my-label /dev/path/to-device, it won't discover.

You need to explicitly pass -F 32 to mkfs.vfat.

It'd be nice if go-blockdevice could support this, too.