Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mkfs.fat -n "" generates file system with invalid label #54

pali opened this issue Jul 5, 2017 · 0 comments


None yet
1 participant
Copy link

commented Jul 5, 2017

If argument for -n (volume name) option is empty, then it is handled incorrectly and stores label as " " instead of "NO NAME " (which is correct way how to store empty label).

If -n is not specified then empty label is stored correctly.

pali added a commit to pali/dosfstools that referenced this issue Jul 5, 2017

mkfs: Handle -n "" correctly
When user specify empty argument for -n, then it is empty label and needs
to be transformed to NO_NAME. Also treat -n argument which starts with
character 0xE5 as empty because label is stored also in root FAT directory
and such entry is marked as deleted.

Fixes dosfstools#54

gnomesysadmins pushed a commit to GNOME/gparted that referenced this issue Jul 7, 2017

Fix setting empty label when creating FAT16/32 file systems (#784564)
A FAT file system label in the partition boot sector should be set to
"NO NAME    " when the label is empty [1][2].  mkdosfs/mkfs.fat always
sets this to the label specified on the command line, even when the
label is blank [3].  Fix by not specifying the label when it is blank.

[1] The FAT File System, BIOS Parameter Block and Extended BIOS
    Parameter Block
[2] FAT16 File System, Volume Label
[3] mkfs.fat -n "" generates file system with invalid label

Bug 784564 - GParted calls mkfs.fat incorrectly when user does not specify label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.