SRU: fix FAT recognition after resizing

Bug #1820090 reported by Alkis Georgopoulos
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
parted (Ubuntu)
Fix Released
High
Unassigned
Bionic
Fix Released
Undecided
Unassigned

Bug Description

After resizing a FAT partition with any tool that uses libparted (parted, gparted) in Bionic, the file system is no longer recognizable by Microsoft Windows.

This fix has been applied in Cosmic+.
The Debian bug report is:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=840710
The patch applied upstream is:
http://git.savannah.gnu.org/cgit/parted.git/commit/?id=c0d394abac4d6d2ce35c98585b6ecb33aea48583

[Test case]
 * Use e.g. gparted to format a USB stick with MBR and a fat32 partition.
 * Verify that it's readable by Windows.
 * Check for correct output similar to this:
# file -s /dev/sdf1
/dev/sdf1: DOS/MBR boot sector, code offset 0x58+2, OEM-ID "mkfs.fat", sectors/cluster 16,
Media descriptor 0xf8, sectors/track 32, heads 64, hidden sectors 2048, sectors 30447616
(volumes > 32 MB), FAT (32 bit), sectors/FAT 14864, serial number 0x7a03dea6, label: "ASDF "
 * Resize it to e.g. 1 MB less.
 * Verify that it's no longer readable by Windows.
 * Check for wrong output similar to this:
# file -s /dev/sdf1
/dev/sdf1: DOS/MBR boot sector

[Regression Potential]
Minimal, the patch is an upstream one and already tested in Debian, in the Gparted live CD, and in newer Ubuntu releases.

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

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

Changed in parted (Ubuntu):
status: New → Confirmed
Thomas Ward (teward)
Changed in parted (Ubuntu):
importance: Undecided → High
importance: High → Medium
assignee: nobody → Thomas Ward (teward)
importance: Medium → High
Revision history for this message
Thomas Ward (teward) wrote :

Hello.

Attached is a debdiff containing a patch with the specified upstream commit included, for Bionic.

Revision history for this message
Simon Quigley (tsimonq2) wrote :

Sponsored, it is now in Bionic UNAPPROVED.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Closing for the current release since that's fixed there, a bionic line is going to be added once the SRU is reviewed/approved

Changed in parted (Ubuntu):
status: Confirmed → In Progress
status: In Progress → Fix Released
Thomas Ward (teward)
tags: added: bionic
Thomas Ward (teward)
Changed in parted (Ubuntu):
assignee: Thomas Ward (teward) → nobody
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Alkis, or anyone else affected,

Accepted parted into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/parted/3.2-20ubuntu0.2 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 on 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-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in parted (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-bionic
Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Hi, I verify that the proposed packages work as expected in bionic.
I created a 300 MB fat32 image, resized it with the updated packages, and it was still readable by "file -s /dev/loop5p1" and by MS Windows.

# dpkg -l '*parted*' | grep ^ii
ii gparted 0.30.0-3ubuntu2 amd64 GNOME partition editor
ii libparted-fs-resize0:amd64 3.2-20ubuntu0.2 amd64 disk partition manipulator - shared FS resizing library
ii libparted2:amd64 3.2-20ubuntu0.2 amd64 disk partition manipulator - shared library
ii parted 3.2-20ubuntu0.2 amd64 disk partition manipulator

tags: added: verification-done-bionic
removed: bionic verification-needed verification-needed-bionic
Thomas Ward (teward)
tags: added: verification-done
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package parted - 3.2-20ubuntu0.2

---------------
parted (3.2-20ubuntu0.2) bionic; urgency=medium

  * debian/patches/fix-windows-fat-recognition-after-resizing.patch:
    Apply upstream patch to fix FAT resizing so that FAT filesystems which
    are resized by libparted are recognizeable in Microsoft Windows.
    (LP: #1820090)

 -- Thomas Ward <email address hidden> Thu, 14 Mar 2019 13:05:58 -0400

Changed in parted (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Chris Halse Rogers (raof) wrote : Update Released

The verification of the Stable Release Update for parted 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 regressions.

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.