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 786467 - Can't format USB sticks with GPT partition tables
Can't format USB sticks with GPT partition tables
Status: RESOLVED DUPLICATE of bug 768031
Product: nautilus
Classification: Core
Component: general
3.24.x
Other All
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-08-18 15:07 UTC by Debarshi Ray
Modified: 2017-08-23 10:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Debarshi Ray 2017-08-18 15:07:15 UTC
This is probably a problem with Disks, but I'll start from Files.

Steps to reproduce:
(a) Use dd to copy a Fedora Workstation ISO to a USB stick.
(b) Insert the USB stick, open Files, right-click on sidebar, and select "Format ..."
(c) Formatting fails with a udisks error.

It might be because the USB stick has a GPT partition table once the Fedora image is written to it. Note the "Partition Table: mac" line below:

[rishi@svoboda ~]$ sudo parted /dev/sdb
[sudo] password for rishi: 
GNU Parted 3.2
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p                                                                
Warning: The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.
Ignore/Cancel? i                                                         
Model: Kingston DataTraveler 2.0 (scsi)
Disk /dev/sdb: 124GB
Sector size (logical/physical): 2048B/512B
Partition Table: mac
Disk Flags: 

Number  Start   End     Size    File system  Name   Flags
 1      2048B   10.2kB  8192B                Apple
 2      53.6MB  60.3MB  6658kB               EFI
 3      60.3MB  74.7MB  14.4MB               EFI

(parted)


To workaround:

(parted) mklabel msdos                                                    
(parted) p                                                                
Model: Kingston DataTraveler 2.0 (scsi)
Disk /dev/sdb: 31.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start  End  Size  Type  File system  Flags

(parted)
Comment 1 Ondrej Holy 2017-08-21 06:43:53 UTC
What udisks error? But I suppose you see:
This partition cannot be modified because it contains a partition table. (udisks-error-quark, 11)

The problem is that live media are kinda special and partition table is inside of the first partition. It is expected, that you can't format the partition, unfortunately. The problem is that Nautilus is "partition-oriented", so "Format..." in the sidebar just means formatting the one partition and not the whole device...

See also:
https://bugs.freedesktop.org/show_bug.cgi?id=76178

Workaround:
1/ open GNOME Disks
2/ select correct disk in the sidebar
3/ click the hamburger menu in titlebar
4/ Format Disk...
Comment 2 Ondrej Holy 2017-08-21 06:44:33 UTC
Hmm, this is probably duplicate of Bug 768031.
Comment 3 Carlos Soriano 2017-08-21 07:51:22 UTC
Ah yes, this we had a whole bug report discussing how to make the disk visible, instead of partitions, for this same reason and also for ejecting which ejects the whole disk including other partitions and that makes it confusing. But I cannot find it now...
Comment 4 António Fernandes 2017-08-21 08:54:31 UTC
(In reply to Ondrej Holy from comment #2)
> Hmm, this is probably duplicate of Bug 768031.

Yes, also bug 778821 too.
(In reply to Carlos Soriano from comment #3)
> But I cannot find it now...
I can't find it either, but the discussion in bug 768031 comes very close to that.
Comment 5 Debarshi Ray 2017-08-23 09:46:05 UTC
Thanks for the pointers!

(In reply to Ondrej Holy from comment #1)
> What udisks error? But I suppose you see:
> This partition cannot be modified because it contains a partition table.
> (udisks-error-quark, 11)

Yes, I think it was error code 11.

> The problem is that live media are kinda special and partition table is
> inside of the first partition. It is expected, that you can't format the
> partition, unfortunately. The problem is that Nautilus is
> "partition-oriented", so "Format..." in the sidebar just means formatting
> the one partition and not the whole device...

I see. I didn't know that the partition table is inside the first partition.

> Workaround:
> 1/ open GNOME Disks
> 2/ select correct disk in the sidebar
> 3/ click the hamburger menu in titlebar
> 4/ Format Disk...

Ok, I'll try that next time.

Feel free to mark this as a duplicate of whichever bug you think is most relevant.
Comment 6 António Fernandes 2017-08-23 10:35:03 UTC

*** This bug has been marked as a duplicate of bug 768031 ***