![]() this seems to be the case with the lsblk utility widely used in most Linux/Unix systems. ![]() Interestingly, it's said that Microsoft & IBM created the VSN to keep up with an early innovation by Apple!Īs you've suggested, it seems that the the label UUID is used in some systems instead of VSN - e.g. This Wikipedia article indicates the FAT VSN is based on the RTC in the system used to create or format the disk. There may be a way to format the output of the dd command with hexdump to avoid the rest of the compound command, however, I didn't want to take the time to figure it out and chose to use parameter expansion and shell arithmetic instead for the final formatting. Interesting Reading: Volume Serial Numbers With FAT32 volumes, the Volume Serial Number is stored in the Boot Sector at offset 67 ( 0x43), and is four bytes long. ![]() I confirmed this with the vol command in Windows and the blkid command in Linux, and the output of vol and blkid matched the output of the example compound command above. For a FAT32 formatted disk, in Terminal, the following example compound command will output its volume serial number: var="$(sudo dd if=/dev/diskNs1 skip=67 bs=1 count=4 2>/dev/null | hexdump -e '4/4 "%X"')" echo "$"įor my test disk, a USB flash drive formatted FAT32, the output was: 18E4-4FA7 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |