I used dd to burn arch linux image to usb stick, but now I need to store additional files on the same usb stick. The usb stick is read-only after dd so I decided to format it manually. The stick was recognized as bootable but the arch failed to load the system since it was looking for a disk labeled "ARCH_201912". As far as I know I can use -n flag with mkfs.fat command like this:
mkfs.fat -F 32 -n "$label" "$partition"
I just do not want to type it manually as it changes every month (I am writing bash function). And dd somehow knows what the label should be and correctly set it to usb device. I thought there is a file storing this value, so I issued:
$ grep --directories=recurse ARCH_201912 .
./arch/boot/syslinux/archiso_pxe.cfg:APPEND archisobasedir=arch archisolabel=ARCH_201912 archiso_nbd_srv=${pxeserver}
./arch/boot/syslinux/archiso_sys.cfg:APPEND archisobasedir=arch archisolabel=ARCH_201912
Binary file ./EFI/archiso/efiboot.img matches
./loader/entries/archiso-x86_64.conf:options archisobasedir=arch archisolabel=ARCH_201912
Is there a way to get this label without parsing the file (as it seems that archisolabel is specific for arch linux)? I want this method work both for linux and windows. Though I am not sure if windows 10 require proper label set.