https://bugs.kde.org/show_bug.cgi?id=466994

            Bug ID: 466994
           Summary: KDE Partition Manager cannot change the label on a
                    FAT32 partition
    Classification: Applications
           Product: partitionmanager
           Version: 22.12.3
          Platform: Debian unstable
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: andr...@stikonas.eu
          Reporter: ilikef...@waterisgone.com
  Target Milestone: ---

Created attachment 157077
  --> https://bugs.kde.org/attachment.cgi?id=157077&action=edit
The label not being editable in the Properties window on a FAT32 partition and
how the label looked like before being edited from the terminal with the
fatlabel command

SUMMARY
KDE Partition Manager cannot change the label on a FAT32 partition


STEPS TO REPRODUCE
1. Open KDE Partition Manager
2. Create or use a GPT partition table on some disk
3. Create or use a FAT32 partition with a label
4. Open from the the context menu, on that partition, the Properties window

OBSERVED RESULT
While the text in the label field is selectable and copyable, which is great,
there's no cursor there to allow you to edit that text and change it to
something else or leave it empty, which should be similar to the state where no
label exists, like before one was added.


EXPECTED RESULT
1. I expect to be able to edit the label on a FAT32 partition like I can do for
other partition types.
2. I expect also that if I delete whatever text was there, so leave it empty,
to be like I deleted it, in a similar state as if I never added it, if there's
such a difference
3. I expect to be able to edit the name of a FAT32 partition too, but a text
field should be added for that first, which maybe will be done when another bug
will be fixed:
https://bugs.kde.org/show_bug.cgi?id=466992

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: 5.27.2 
KDE Frameworks Version: 5.103
Qt Version: 5.15.8

ADDITIONAL INFORMATION
I discovered this bug because I created a few partitions with GParted before
installing my OS, including a small FAT32 one for EFI files.
Since I like to be a bit organized and I wanted to better understand where all
partitions are mounted and used, I filled in the names and labels for them,
including this small one, where I've put:

Name: EFI-name
Label: EFI-label

To my surprise, the only label that wasn't exactly like I typed was on this
small FAT32 partion, which ended up as "EFI-LABEL" for some reason.

I thought that maybe the FAT32 is too old and didn't support lowercase or
mixedcase in labels, but today I searched and found out that this is actually
not the case as FAT32 supports lowercase or mixed case in labels.
It's just Gparted and Windows that doesn't support them.

Since I don't dual-boot and have Windows on my computer anymore, I decided to
edit it and make it as I wanted, which I couldn't, hence this bug report.


 Then I decided to try this answer, from where I found out that it should work,
on my FAT32 EFI partition:
https://superuser.com/a/1575427
With this command:
sudo fatlabel /dev/nvme0n1p1 "EFI-label"
And its output was:

fatlabel: warning - lowercase labels might not work properly on some systems
There are differences between boot sector and its backup.
This is mostly harmless. Differences: (offset:original/backup)
  65:01/00
  Not automatically fixing this.

I then did a "Refresh devices" in both KDE Partition manager and Gparted, that
I had opened before running the command and in both of them the FAT32 EFI
partition shows now a label of "EFI-label", exactly how I wanted from the
beginning and in a similar patter with the labels of the other partitions

So, it's definitely possible to:
1. Set / edit the label of a FAT32 partition.
2. Set / edit the label of a FAT32 partition even if that partition is
currently mounted (on /boot/efi, in my case).
3. Lowercase or mixedcase for the label of a FAT32 partition is allowed.
4. The fatlabel command is already installed, at least on my Debian 12
(unstable repository) that I used.

BTW, can anyone please check if this bug is related:
https://bugs.kde.org/show_bug.cgi?id=255831
I find the the second comment a bit confusing or outdated because:
 1. "View -> File System Support" is now "Tools -> File System Support".
2. "so the behaviour you describe is expected" is not expected anymore, as the
file system support shows now for FAT32,
that both read and write label are supported, provided by dosfstools package,
which at least on my Debian 12 is installed by default.
3. "Note that you cannot change the label as long as the file system is
mounted."

I just did change the label the the FAT32 EFI partition being mounted on
/boot/efi.

I also seen that a bug not allowing to set the label on a FAT32 partition was
once fixed:
https://bugs.kde.org/show_bug.cgi?id=254212
If you can add a label, it doesn't make much sense to not be able to delete or
edit one too.
A way to return to the previous state, before adding the label should be
possible.
And if it's possible to create a new partition with a label let's call it
"Test-label", it should be possible too to arrive at that partition label from
a partition that had it as "Other-label" without having to delete the partition
and create it again with the label as "Test-label" at creation time.

Looking at the  command:
man fatlabel
I see that fatlabel is part of the dosfstools package, which KDE Partition
Manager says it uses, where the read and write label is supported for the FAT32
file system.

Since I tested the fatlabel o my system and both KDE Partition Manager and
GParted show successfully the new label, I see no reason anymore why KDE
Partition manager would not allow editing the label in the Properties window.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to