GNOME Bugzilla – Bug 768031
Impossible to format a partition which contains a partition table (notably distro live USBs) -- confusing user interface (especially from nautilus)
Last modified: 2021-06-18 15:53:32 UTC
When you try to format a bootable USB you have the following error : This partition cannot be modified because it contains a partition table; please reinitialize layout of the whole device. (udisks-error-quark, 11) and it's impossible to format. I think it's related to this bug : https://bugs.freedesktop.org/show_bug.cgi?id=76178 Here another bug details and temporary solution : http://askubuntu.com/questions/758219/how-can-i-delete-all-partion-of-my-pen-drive-and-create-a-single-volume
(In reply to Hangman from comment #0) > When you try to format a bootable USB you have the following error : > > This partition cannot be modified because it contains a partition table; > please reinitialize layout of the whole device. (udisks-error-quark, 11) > > and it's impossible to format. How did you create the bootable USB? The error message says you have a partition table *inside* the partition you're trying to delete. That's really weird; I didn't realize it was even possible. You will have to format the entire device (using the hamburger menu in the top-right) rather than attempting to format that particular partition. I don't see a bug here (except in the Ask Ubuntu question I see there was some other error formatting the entire device, which looks like a bug).
I've created it whith Etcher. After trying to format the entire device included in hamburger menu it's working well. It would be great if error message could ask for this option instead of having no option...
That's exactly what the error message told you to do. :) I'm afraid the nature of any disk partitioning tool is that some knowledge of partitioning is required to use it....
I understand but this message comes after a simple "right click / format" on usb drive in nautilus, so I think a beginner won't be able to solve this simple problem because it's quite hard to find correct solution (I wasn't able to do it...). It's a suggestion but a simple click box that offers format whole drive option would be more convenient.
(In reply to Hangman from comment #4) > I understand but this message comes after a simple "right click / format" on > usb drive in nautilus, so I think a beginner won't be able to solve this > simple problem because it's quite hard to find correct solution (I wasn't > able to do it...). OK, I see your point... I didn't realize you could format the partition directly from nautilus, and from there it's much less clear how to handle the error. We can expect Disks users to understand such an issue, but we can't expect nautilus users to even know what a partition is, much less why formatting a single partition is different from formatting the entire USB stick. I'm not sure what can be done about this, though. Probably the best option is to just hide the Format option, but that probably won't be easy....
Thanks for your answer. As I said an option in error dialog would be great. // This partition cannot be modified because it contains a partition table. (udisks-error-quark, 11) Do you want to format whole disk instead ? [Format whole disk] [Cancel] // It happens whith a bootable usb so user may not know what Etcher/Unetbootin does to his disk, so for him format whole drive is that what he wants
Hi. I created a bootable usb for gpart to shrink the Disk. Now, I am not able to format the USB. It gives the same error. Error formatting volume. This partition cannot be modified because it contains a partition table; please reinitialize layout of the whole device. (udisks-error-quark, 11) Let me know if you want me to provide any other details.
(In reply to Prashant from comment #7) > Hi. I created a bootable usb for gpart to shrink the Disk. Now, I am not > able to format the USB. It gives the same error. > Error formatting volume. > This partition cannot be modified because it contains a partition table; > please reinitialize layout of the whole device. (udisks-error-quark, 11) > > Let me know if you want me to provide any other details. I'll repeat what we already discussed above -- no new information here -- but try to explain more cleanly: You need to format the entire device, not a particular partition. Use the hamburger menu in the top right of Disks, not the partition menu in the center of the app nor from the nautilus sidebar. The bug is that the user interface in the nautilus sidebar is very confusing, because you see only a single partition there with no way to see the device, and naturally think it's the entire device -- but refusing to format is correct behavior: if you have a partition table inside a partition (needed to make live USBs reliable on different OSes) then formatting just that partition would break other partitions, so it only makes sense to format the entire device. It's hard to think of how to improve the UI, because this is an important safety feature and we don't want to just remove it, but perhaps we could catch this particular error when encountered in the nautilus sidebar and display an explanation. I'm not actually sure if that's a Disks bug or GTK+ bug or a nautilus bug, though.
csoriano: mcatanzaro: the format menu item is done by nautilus, and it calls disk-utility on the command line --> nautilus. Formatting a partition that contains a partition table is expected to fail.
I had the same experience as Hangman. So I tried the method described in Comment 8. Now my system does not recognize the USB drive. Here is what I did: From Nautilus, right click USB device > click the hamburger menu in the top right of Disks > Format Disk Partitioning: Compatible with all systems (DOS). Click format (the blue rectangle format appeared to be successful). Close the partitioning menu. From Nautilus, click up arrow to unmount USB drive. Then pull the USB drive out and plug it back in. The USB drive does not show up in Nautilus.
(In reply to wolf_volpi from comment #10) > I had the same experience as Hangman. So I tried the method described in > Comment 8. Now my system does not recognize the USB drive. You need to create a partition in order to store files on the USB drive again. In GNOME Disks, in the volumes grid, you should see the entire drive as free after having formatted it. It will say "Free Space" and show the size of the drive underneath. Look on the bottom left; there will be a plus button next to a icon with gears. If you hover over the plus button, it should display the tooltip "Create partition in unallocated space". Click that, then click "Create" in the bottom right (the defaults are probably fine for you). Now you should be able to save files on the USB drive again.
(In reply to Michael Catanzaro from comment #11) > (In reply to wolf_volpi from comment #10) > > I had the same experience as Hangman. So I tried the method described in > > Comment 8. Now my system does not recognize the USB drive. > > You need to create a partition in order to store files on the USB drive > again. In GNOME Disks, in the volumes grid, you should see the entire drive > as free after having formatted it. It will say "Free Space" and show the > size of the drive underneath. Look on the bottom left; there will be a plus > button next to a icon with gears. If you hover over the plus button, it > should display the tooltip "Create partition in unallocated space". Click > that, then click "Create" in the bottom right (the defaults are probably > fine for you). Now you should be able to save files on the USB drive again. Thanks for the quick response Catanzaro. But GNOME Disk does not see the USB drive. I closed the GNOME Disks window after the entire drive was made free. Then I pulled the USB drive out and plug it back in. Now the USB drive does not show up in Nautilus nor GNOME Disks. Is there some other way GNOME Disks can access the USB drive? Thanks.
I don't know how to help with that, sorry. I would ask the udisks developers at https://github.com/storaged-project/udisks. Let's keep this bug report focused on the confusing nautilus sidebar.
(In reply to Michael Catanzaro from comment #13) > I don't know how to help with that, sorry. I would ask the udisks developers > at https://github.com/storaged-project/udisks. Let's keep this bug report > focused on the confusing nautilus sidebar. I submitted an issue at https://github.com/storaged-project/udisks/issues/207 I inserted the USB drive in Chrome OS, and it recognized and reformatted the USB drive. Then I put the USB drive in Fedora 25 PC again and it worked with GNOME Disk without incident.
*** Bug 786467 has been marked as a duplicate of this bug. ***
*** Bug 778821 has been marked as a duplicate of this bug. ***
Several times I got an error when I tried format bootable pen drives using nautilus. I did not know how to solve the issue until read comment 1 from bug 786467. Suggestion from comment 6 looks good to improve usability.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version of Files (nautilus), then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/nautilus/-/issues/ Thank you for your understanding and your help.