Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unrecognized disk label prevents partition deletion with Disks utility #460

Open
KloudKoder opened this issue Mar 2, 2019 · 5 comments
Open

Comments

@KloudKoder
Copy link

Distribution (run cat /etc/os-release):

All

Related Application and/or Package Version (run apt policy $PACKAGE NAME):

Disks

Issue/Bug Description:

If you try to delete a "special" partition, like one containing an ISO or an OS image, you get this:

Error deleting partition /dev/whatever: Filed to read partition table on device '/dev/whatever' (/dev/whatever: unrecognized disk label) (udisks-error-quark, 0)

I have no idea why this is happening, unless it has something to do with running Disks as a user (but then the error message could be better).

Steps to reproduce (if you know):

Burn an ISO a USB stick. Then open Disks and try to delete it or format it.

Expected behavior:

Let the user delete the partition as normal.

Other Notes:

A workaround is to use dd to transfer a garbage file to the drive (obviously don't try this with "garbage" containing sensitive information, which is going to be written to the target drive), in order to corrupt its header. Then restart Disks and you'll be allowed to format. Way awkward and somewhat hazardous if you don't pay close attention to the target device name, but it works.

@mmstick
Copy link
Member

mmstick commented Mar 2, 2019

The partition in an ISO partition table cannot be deleted, but you should still be able to reformat the entire drive, which executes wipefs -a $device to erase any existing signatures on the device.

@KloudKoder
Copy link
Author

Thanks but I've never been able to do that in Disks. Can't format, can't delete. Need to revert to commandline hacks.

@mmstick
Copy link
Member

mmstick commented Mar 5, 2019

When formatting, did you format with the Format Disk (Ctrl + F) option? Or did you select Format Partition?

@mmstick
Copy link
Member

mmstick commented Mar 5, 2019

This is what I get

peek 2019-03-05 12-16

@KloudKoder
Copy link
Author

Bonus points for your animated instructions. But yes, I tried both "-" to delete the partion, as well as formatting. I've seen this on many distros and multiple machines. I can't readily explain why it works for you but not for me. Perhaps try burning PopOS ISO to a USB stick using dd, then eject and reinsert it, and try to format it with Disks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants