mlabel: renaming USB stick appends "nA" to name

Bug #887446 reported by Daniel Kullmann
84
This bug affects 16 people
Affects Status Importance Assigned to Milestone
OEM Priority Project
Fix Released
Medium
James M. Leddy
Precise
Fix Released
Medium
James M. Leddy
mtools (Ubuntu)
Fix Released
Medium
James M. Leddy
Precise
Fix Released
Medium
James M. Leddy

Bug Description

[Impact]

 * Users can not rename their disks properly.

 * HP BIOS looks for a partition named HP_TOOLS for their recovery key.

 * Because we don't have an mlabel that works, the recovery key does not work on HP laptops. Thus, it is impossible for an end user to recover their system if they somehow manage to break the main install.

[Test Case]

 * Use mlabel to label a partition

 * Observe the name is not exactly as intended

[Regression Potential]

 * Low, this fix has already been upstream for a few releases.

 * Additionally, at 20 additional lines of code, it isn't that large of a change.

[Original Description]

I try to rename a usb stick using mlabel (gparted shows the same erroneous behaviour). The rename works, but the string "nA" is appended to the name (it is less than 11 characters). The appended string is right-justified, and spaces are inserted in the middle between my name and the "nA", resulting in a new label like "new-name nA". This behaviour only takes place with names that are at least 8 characters long.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mtools (Ubuntu):
status: New → Confirmed
Revision history for this message
Jan Rathmann (kaiserclaudius) wrote :

I have just seen the same strange behaviour when trying to rename the FAT32 partition on my USB flash drive. I'm currently on Oneiric amd64 and I will check if Precise is also affected.

Revision history for this message
Joe Pearson (secretcode343) wrote :

Confirmed with gparted on Kubuntu Oneiric amd64.

(KDE Partition Editor refuses to label fat32 volumes at all!)

Partial, ugly workaround ... append hyphens or underscores to pad to 11 characters, e.g. 'new-name___'.

Revision history for this message
Daniel Kullmann (daniel-kullmann) wrote :

I finally took the time to look at the bug. It seems that there is an issue with a call to memset. I attached a patch.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "fix for bug" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Jan Rathmann (kaiserclaudius) wrote :

Also present in Precise.

tags: added: iso-testing
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote : ISO tracker notification

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/887446

tags: added: precise
Revision history for this message
Chris Van Hoof (vanhoof) wrote :

I can confirm that after rebuilding mtools with the patch in Comment #4 on a fully updated Precise machine I can now set device labels properly:

$ sudo mlabel -i /dev/sdb1 ::FWTS_LIVE
$ sudo mlabel -s -i /dev/sdb1 ::
 Volume label is FWTS_LIVE nA

[ after a rebuild of mtools ]

$ sudo mlabel -s -i /dev/sdb1 ::
 Volume label is FWTS_LIVE nA
$ sudo mlabel -i /dev/sdb1 ::FWTS_LIVE
$sudo mlabel -s -i /dev/sdb1 ::
 Volume label is FWTS_LIVE

Changed in mtools (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Medium
Revision history for this message
Jan (jankanis) wrote :

I can confirm that the patch of comment #4 solves the problem.
Ubuntu 12.04

Revision history for this message
epictete (p-latreyte) wrote :

This bug is still present in 12.04 LTS with all updates applied.

Revision history for this message
Pascal Mons (anton+) wrote :

Still present in Precise 12.04.1 LTS. It looks like the Ubuntu folks did however correct the issue in the mtools package for Quental & Raring ...

Your best option is to download the mtools package (verson 4.0.17) from either Quentalor Raring as it's the same version.

http://packages.ubuntu.com/quantal/mtools

And install it with Ubuntu Software Center or Synaptic, then the problem is confirmed as solved.

Changed in oem-priority:
importance: Undecided → Medium
Revision history for this message
James M. Leddy (jm-leddy) wrote :

This is a more complete patch that reflects the fix that went upstream.

Changed in oem-priority:
assignee: nobody → James M. Leddy (jm-leddy)
Changed in mtools (Ubuntu):
assignee: nobody → James M. Leddy (jm-leddy)
Steve Magoun (smagoun)
Changed in oem-priority:
status: New → Triaged
Revision history for this message
James M. Leddy (jm-leddy) wrote :

Added the proper debdiff for sponsors.

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Hi! Thanks for the debdiff. Could you please correct some issues with it?:

1- The launchpad bug reference in the changelog needs to be formatted properly: (LP: #887446)
2- Please target "precise-proposed" as the release, and not "UNRELEASED"
3- Please use version "4.0.12-1ubuntu0.12.04.1"
4- The debdiff adds two patches to the debian/patches directory. Please remove the one that isn't used.
5- The patch is not tagged properly. Please tag according to http://dep.debian.net/deps/dep3/

I'm unsubscribing ubuntu-sponsors for now. Please re-subscribe the group once an updated debdiff has been attached. Thanks!

Revision history for this message
James M. Leddy (jm-leddy) wrote :

Hello Sponsors,

I have fixed up the debdiff. Please use this one instead.

description: updated
Changed in mtools (Ubuntu Precise):
assignee: nobody → James M. Leddy (jm-leddy)
importance: Undecided → Medium
status: New → Triaged
Changed in mtools (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Adam Conrad (adconrad) wrote : Please test proposed package

Hello Daniel, or anyone else affected,

Accepted mtools into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/mtools/4.0.12-1ubuntu0.12.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in mtools (Ubuntu Precise):
status: Triaged → Fix Committed
tags: added: verification-needed
Revision history for this message
James M. Leddy (jm-leddy) wrote :

I've verified that this version of the package fixes the problem.

tags: added: verification-done
removed: verification-needed
Revision history for this message
James M. Leddy (jm-leddy) wrote :

root@neptune:~# mlabel -i /dev/sdb1 ::FWTS_LIVE
root@neptune:~# mlabel -s -i /dev/sdb1 ::
 Volume label is FWTS_LIVE

Changed in oem-priority:
status: Triaged → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mtools - 4.0.12-1ubuntu0.12.04.1

---------------
mtools (4.0.12-1ubuntu0.12.04.1) precise-proposed; urgency=low

  * Add debian/patches/12-fix-mlabel.patch:
    Update mlabel so that we don't have weird characters at the end of
    volume labels. (LP: #887446)
 -- James M Leddy <email address hidden> Mon, 15 Apr 2013 16:25:01 -0400

Changed in mtools (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Adam Conrad (adconrad) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.