After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 625337 - Label gets converted to uppercase
Label gets converted to uppercase
Status: RESOLVED FIXED
Product: gparted
Classification: Other
Component: application
0.5.1
Other Linux
: Normal normal
: ---
Assigned To: gparted maintainers alias
gparted maintainers alias
Depends on:
Blocks:
 
 
Reported: 2010-07-26 16:47 UTC by hey
Modified: 2011-12-13 17:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Diff file with update to change volume label tool read order (830 bytes, patch)
2011-10-26 20:30 UTC, Curtis Gedak
none Details | Review

Description hey 2010-07-26 16:47:50 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?
Comment 1 hey 2010-07-26 16:49:01 UTC
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.
Comment 2 Curtis Gedak 2010-07-29 19:23:38 UTC
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
Comment 3 hey 2010-07-30 09:48:28 UTC
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.
Comment 4 Curtis Gedak 2010-07-30 20:58:46 UTC
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:~#
Comment 5 hey 2010-07-31 08:36:31 UTC
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?
Comment 6 Curtis Gedak 2010-07-31 15:36:48 UTC
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.
Comment 7 Curtis Gedak 2010-12-10 20:57:39 UTC
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
Comment 8 Curtis Gedak 2011-10-26 20:30:42 UTC
Created attachment 200059 [details] [review]
Diff file with update to change volume label tool read order
Comment 9 Curtis Gedak 2011-10-26 20:32:40 UTC
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?
Comment 10 Akhil Laddha 2011-12-08 09:18:08 UTC
Jan-Christoph, were you able to test fix mentioned in comment#9 ?
Comment 11 Curtis Gedak 2011-12-13 17:39:42 UTC
An enhancement to address this bug report has been included in GParted 0.11.0 released on Dec. 13, 2011.