Bug 856369 - Using usb key with GPT in Fedora results in corruption, makes key unmountable
Summary: Using usb key with GPT in Fedora results in corruption, makes key unmountable
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 17
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-11 22:02 UTC by reescf
Modified: 2013-03-28 14:03 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-28 14:03:42 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description reescf 2012-09-11 22:02:19 UTC
Using a USB key with a GPT partition table on Fedora results in corruption and renders partitions unmountable. OS reports errors with file systems, misidentifies file systems etc. Disk tools show that the GPT partition table has been damaged.

Note that I'm not at all certain which component of the OS is responsible. I am sorry but I only installed Fedora yesterday and am not yet familiar with it.


I have not attempted to reproduce this bug. Given that Fedora's installer seemed not at all happy about a GPT disk and installed Fedora but left it unbootable, and that I'd already lost what was on one USB key, I was not really inclined to test further. If the bug is not reproducible for you, let me know and I will deliberately try to reproduce it and provide further details of the conditions triggering it. 


Steps to Reproduce:
1. Insert a USB key. I used a machine running Arch.
2. Format a USB key using a GPT partition table. I used gdisk. 
3. Create a single, FAT 32 partition on the key. I used gdisk to make the partition and mkfs.msdos -F32 to write a file system to it.
4. Mount the partition. I used pmount.
5. Write some data to the key. I copied a public key generated by ssh-keygen. There was already an .iso on the key.
6. Unmount the partition and eject the key. I used pumount.
7. Mount the partition on a machine running Fedora 17. I used pmount.
8. I did not write anything to the key so I don't think this is necessary. I just catted the ssh key, directing the output to the appropriate file in ~/.ssh.
9. Unmount the partition. I used pumount.
10. Try to remount the partition on the original machine using pmount (as user); or mount -t vfat (as root).
11. Examine key with gdisk.
  
Actual results:

It is impossible to mount the partition again. The system complains of errors with the file system saying that it can only deal with fat 1 or 2, not 133. (I forget the exact wording of this message).

gdisk shows that the partition map has been damaged.

Expected results:

The OS should not damage the GPT partition map but should handle devices with GPT maps correctly. Failing this, it should refuse to mount partitions from the device at all and should tell the user that it cannot handle GPT devices without corrupting the table and causing loss of data.

Additional info:

Repeating the same procedure with a MBR partition map on the same USB key with, again, a single FAT 32 partition results in no errors.

Windows 7 and Arch Linux both handled the GPT partition map on the key fine. Windows XP does not but it simply refuses to recognise it - the data and partition map are not damaged and the key can be successfully used on a suitably configured machine without further interruption.

Comment 1 Josh Boyer 2013-03-12 20:27:07 UTC
Are you still seeing this with 3.7.9 or 3.8.2 in updates-testing?

Comment 2 Josh Boyer 2013-03-28 14:03:42 UTC
This bug is being closed with INSUFFICIENT_DATA as there has not been a
response in 2 weeks.  If you are still experiencing this issue,
please reopen and attach the relevant data from the latest kernel you are
running and any data that might have been requested previously.


Note You need to log in before you can comment on or make changes to this bug.