Hi there,
Quote:
Originally Posted by ghborrmann
Can anyone explain to me how to deal with the fact that there are at least two different volume labels for FAT systems on Usb Sticks?
|
I'm not sure, but I think that's a misunderstanding on your side. FAT file systems can have a volume label (but that's optional), and they have a volume serial number (which is mandatory). The volume serial number, introducewd with DOS 4.0, is a 32bit number chosen randomly when the file system is created. It's stored somewhere in the first 100 bytes of the partition's boot sector. Years ago, I used to know by heart where all that stuff is, but that useless knowledge has faded.
Quote:
Originally Posted by ghborrmann
One is displayed by blkid and dosfslabel, while the other shows up in gparted and cfdisk.
|
In my test case, dosfslabel and gparted display the same - the traditional DOS volume label which can be set and changed anytime, or an empty string if the partition has no volume label. However, gparted always displays the volume serial number, too.
Quote:
Originally Posted by ghborrmann
The second one is the one displayed in Windows7 under the disk's properties.
|
That would be the volume serial number, I guess.
Quote:
Originally Posted by ghborrmann
The fact that Linux is not consistent means that any time I need to use a volume label I can't be sure which one is required or how to create it.
|
For all I know, Linux uses the DOS volume label if one is assigned, and the volume serial number if not.
Quote:
Originally Posted by ghborrmann
I found where the first label is stored: it is in the first sector of the partition, just where it was on floppy disks many years ago.
|
That's only one place. It's also stored as a directory entry in the root directory with the "volume label" attribute set. Just like all DOS versions since 3.0 did it.
[X] Doc CPU