GNOME Bugzilla – Bug 625337
Label gets converted to uppercase
Last modified: 2011-12-13 17:39:42 UTC
This happens quite often, now it was a USB stick formatted as FAT32. I want to change the name to »USB-Knecht«, but after applying and reloading it is converted to »USB-KNECHT«. This is a small bug but rather annoying as it gets hard to read and looks ugly. Palimpsest does this as well, do I need to file a separate bug for that?
Sorry, forgot to mention that I use Ubuntu 10.04, Gparted 0.5.1-1ubuntu2 Also, I can confirm this with several other computers, including Ubuntu 10.10 development branch.
GParted uses several different tools to read and write labels. For FAT32 labels, GParted uses the mtools command mlabel. To read the label, GParted has three different tools it can use if available. These are: blkid vol_id mlabel Since blkid results are cached, GParted most often will use the blkid command if it is available. Many versions of blkid automatically upper case the label for display. This does not mean that the actual label written to the disk has been set to upper case. To confirm if your label has been set to upper case or not, you can try the following command: sudo vol_id /path-to-your-partition Where /path-to-your-partition is something like /dev/sda2
The vol_id command can neither be found nor can I find out how to install it. Either way, if the labels appear as upper case in Gparted and Palimpsest, they are also displayed as upper case in Nautilus, which seems to confirm that the label written to the disk has really been set to upper case.
If the vol_id command is unavailable, then the other command to try is the one that GParted uses to write (and also read) the label. To confirm if your label has been set to upper case or not, you can try the following commands: For this example we will assume the partition is /dev/sda1. Remember to execute these commands as root (e.g., sudo bash). sudo bash echo "drive H: file=\"/dev/sda1\"" > /tmp/mytempfile echo "mtools_skip_check=1" >> /tmp/mytempfile export MTOOLSRC=/tmp/mytempfile mlabel -s H: exit The last command should display the volume lable in normal case, and also in upper case within brackets. E.g., root@quad:~# mlabel -s H: Volume label is Hello There (abbr=HELLO THERE) root@quad:~#
Ok, this works: Volume label is Camera (abbr=CAMERA ) For another drive that shows up correctly, the output is: Volume label is storage And it was also formatted to FAT32 with Gparted. For me, it seems like this happens randomly. Is there anything special I need to do in order to not have it displayed as uppercase?
Displaying volume labels in upper case is something that harkens back to the days of DOS when 8.3 upper case only file names reigned supreme. :-) It is not random. Each tool and operating system uses specific code or libraries to display the volume label. The library libblkid displays FAT16 and FAT32 volume labels as upper case. GParted will set the label to the case you specify. Display of the label depends on the tools available and operating system used. For speed reasons, GParted tries to use blkid to display all volume labels because libblkid caches these results. Every disk read saved makes an application faster.
Forum user mwk wrote a detailed post regarding FAT file system volume labels and upper / lower case. See the following forum post: Partition Label: only capital letters? http://gparted-forum.surf4.info/viewtopic.php?pid=24646#p24646
Created attachment 200059 [details] [review] Diff file with update to change volume label tool read order
Jan-Christoph, I have attached a diff file that reverses the order of which tool to use to first try to read the volume label. To apply the diff to a git repository, use: git apply bug625337-label-converted-to-uppercase.diff If you are unfamiliar with git, you can learn the basics at: http://gparted.org/git.php Would you be able to test this on your computer?
Jan-Christoph, were you able to test fix mentioned in comment#9 ?
An enhancement to address this bug report has been included in GParted 0.11.0 released on Dec. 13, 2011.