1

At first I wanted to make me into a bootable Linux flash LTS 16.04, After the installation process is finished I want to restore my flash as before. when I checked, it turned my flash partitioned for making bootable "startup disk creator".

Disk management

when I want to delete the partition had made an 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)

and when I want to delete partitions also occurred error:

Eror Deleting Volume: Error deleting partition /dev/sdb1:
Command-line `parted --script "/dev/sdb" "rm 1"' exited with non-zero exit status 1:
Warning: The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes. (udisks-error-quark, 0)

What should I do?

David Foerster
  • 36,264
  • 56
  • 94
  • 147
BimoAN
  • 23

2 Answers2

10

Open terminal and issue the following:

fdisk -l

Here you will be able to see your flash drive number. Let's assume it is sdX

Now again issue the following in terminal:

sudo dd if=/dev/zero  of=/dev/sdX

It will take some time to execute this command

Now issue the following:

sudo gparted

A window will open

From top right drop down menu select sdX

Click on device tab --> Create partition table --> gpt --> Apply

Right click on the grey bar below and select New partition --> fat32 --> OK --> Apply.

Close gparted and unmount the flash drive before pulling it out

That's it

Severus Tux
  • 9,866
rancho
  • 4,036
  • 1
    I suspect that sudo dd if=/dev/zero of=/dev/sdX bs=1M count=1 would work equally well, and go a lot faster. – Rob Aug 17 '16 at 04:33
  • This is the only solution worked for me. Thanks!!!! – anilCSE Jun 18 '17 at 13:47
  • gparted cannot see my usb stick after "sudo dd if=/dev/zero of=/dev/sdX". I get "end of file while reading /dev/sdb" error and "The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes" – ampofila Aug 12 '17 at 07:11
  • Thanks but it is really really slow didnt tried Rob's whey..maybe it is faster.. next time.. – Nezir May 28 '18 at 23:02
  • You do not need to zero the whole partition. You'll waste your time. I personally use: sudo dd if=/dev/zero of=/dev/sdX bs=2048 count=32 – Laurent Jun 06 '18 at 21:43
5

If you want to reformat the entire USB device, here are steps. Source: a relevant user interface bug report.

  • Open the Disks application.
  • Select the USB device.
  • Use the hamburger menu in the top right of Disks and select "Format disk". This will allow you to format the entire disk, not just a partition of it.
nedjo
  • 51
  • 1
  • 1