0

On 18.04 I've made a bootable pen drive. Now I don't need it. I want to remove the iso9660 partition.

sudo cfdisk /dev/sdb

I tried to delete (it makes) but when I want to save the changes, it fails.

Failed to write disklabel"

It isn't write protected (read-only is 0)

What else should I try?

  • 2
    dd if=/dev/zero of=/path/to/usb – j-money Feb 19 '19 at 16:29
  • 1
    @j-money In my opinion, this should be an answer, as it does not require anything that is not already installed and is desktop environment agnostic. – Bruni Feb 20 '19 at 8:29
3

Use gnome-disks. That is the tool I use to remove, create and format partition in my USB drives.

You can easily install it with the command

sudo apt install gnome-disk-utility

| improve this answer | |
  • Welcome to AskUbuntu! You don't have to be running Gnome to use gnome-disk-utility. It's either pre-installed or available for all flavors of Ubuntu. – Elder Geek Feb 19 '19 at 19:35
3

Rather than installing any extra software (and if you're comfortable with the command line) I would suggest using the dd command.

To wipe your usb fire up the gnome terminal and type

sudo dd if=/dev/zero of=/path/to/usb

As was pointed out in the comments, you may be better off to only wipe the MBR so not to roast the usb

dd if=/dev/zero of=/dev/<path of data drive> bs=512 count=1 seek=0

Edit: Again as stated in comments MBR is in fact not 440 bytes :facepalm:

| improve this answer | |
2

You can use mkusb with a graphical user interface. You can select

  • 'restore to a Standard storage device', or
  • 'Wipe the first mibibyte'.

There are more details at the following links to Ubuntu help wiki pages

If mkusb cannot solve the problem, you can analyze it, and if you are lucky solve it, according to the following link

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.