How do I re-format a usb drive that i used to make a bootable ubuntu drive?

Ubuntu Support Template

Ubuntu Version:
26.04 LTS

Desktop Environment (if applicable):
GNOME

Problem Description:
i used Balena etcher to make a bootable thumbdrive, and now i can’t re-format it because it says its write protected. can anyone tell me how to put the drive back into a state where i am able to re-format to use it for something else?

1 Like

How did you try reformatting it?

Gnome Disks should be able to do this.

Make sure you select the correct drive and then first unmount it then from the gear icon you should have an option to Format Partition.

Unless you really need the USB stick, it is always a good idea to have a spare bootable one around in case you ever need it to boot the computer and perform repairs or the like.

5 Likes

This usually happens after flashing a Linux ISO with tools like Etcher. The drive isn’t actually write-protected - it’s using an ISO9660 filesystem, which is read-only by design.

Because of that, normal formatting tools often fail or only try to format a single partition while leaving the original layout intact.

Using GNOME Disks is a good suggestion, but you you need to recreate the entire partition table, not just format a partition.

The proper fix is to completely wipe the existing signatures and start fresh. For example on Linux:

sudo wipefs -all /dev/sdX

(Replace /dev/sdX with your actual USB device (you can identify it using lsblk — look for the correct size and removable drive)

After that, create a new partition table (MBR or GPT) and format it normally (e.g. FAT32). Tools like GNOME Disks, GParted, or fdisk can do this.

If wiping fails and the device is still read-only at the block level, then it may be a hardware issue (some USB controllers lock themselves to read-only when they start failing).

3 Likes

If still have Windows you may be able to write a new MBR and blow the partition out, then setup. As others have said gparted should be able to sort it for you. You could also use dd in a terminal to zero out the USB file system

1 Like

How to create a partition table, partitions and file systems

In Ubuntu you can use several tools for this purpose, to create a partition table, partitions and file systems, tools that understand what needs to be done. Some tools are easier are safer to use. I would recommend tools that provide a final checkpoint, where you can make sure that you are targeting the correct device (to reduce the risk of destroying valuable data on some other device).

  • GNOME Disks is already mentioned in previous answers.

  • Gparted has also been mentioned. It has a good graphical user interface.

  • mkusb is a tool, that I created in order to manage USB devices (making USB drives bootable (to run live systems, persistent live systems and to install Ubuntu or other operating systems) and restoring the USB devices to data devices).

    If you cannot or don’t want to use the ppa contents, you can install components of mkusb via a tarball from github: click on the green button and download a zip file, extract its content, extract the content from one or more tarballs …

If it still does not work, you can analyze the problem according to this link and if you are lucky, find a solution.

2 Likes

This ↑

It’s a mistake many have made in the past including myself. The “measure twice,cut once” rule applies here.

6 Likes

sdc 8:32 1 7.5G 0 disk
├─sdc1 8:33 1 6.1G 0 part /run/media/prem/Ubuntu 26.04 amd64
├─sdc2 8:34 1 5M 0 part
└─sdc3 8:35 1 300K 0 part
prem@prem-MacBookPro11-3:~/Desktop$ sudo wipefs -all/sdc
wipefs: invalid option – ‘l’
Try ‘wipefs --help’ for more information.

this is the USB drive I’m trying to wipe, and re-format.

I tried your suggestion, but got back an error msg.

how should I write this, to get it to select the correct partitions to clean the entire drive?

You forgot to add a space between –all and /sdc… you will also need to use /dev/sdc not just /sdc

2 Likes

sudo wipefs -all /dev/sdc
[sudo: authenticate] Password:
wipefs: invalid option – ‘l’
Try ‘wipefs --help’ for more information.

ok, I tried that, and am getting this msg now. why is it telling me invalid option?

The option for wipefs should either be -a or --all.

2 Likes

now you forgot a dash - … all takes two of them …

2 Likes

~/Desktop$ sudo wipefs --all /dev/sdc
wipefs: error: /dev/sdc: probing initialization failed: Device or resource busy

ok, now I’m getting this msg.

what did I do wrong this time?

1 Like

Your device seems to still be mounted (used by the system), you need to unmount it first or alternatively use the –force option additionally to –all in your wipefs command

1 Like

sudo wipefs --all /dev/sdc
/dev/sdc: 5 bytes were erased at offset 0x00008001 (iso9660): 43 44 30 30 31
/dev/sdc: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
/dev/sdc: 8 bytes were erased at offset 0x1dd7ffe00 (gpt): 45 46 49 20 50 41 52 54
/dev/sdc: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa
/dev/sdc: calling ioctl to re-read partition table: Success

ok, I unmounted it and ran the command again. worked this time.

next step is to go back to GParted, and format?

2 Likes

Can use gparted. Can use fdisk then mkfs. Choice is yours. If you redisplay the file systems you should have a disk with no file systems configured.

If you run:
sudo parted -l

You’ll see what’s going on

1 Like

Ok, thx.

I’ll be back later, after I try it.

1 Like

this is what it’s telling me now,

prem@prem-MacBookPro11-3:~/Desktop$ sudo parted -l
[sudo: authenticate] Password:
Model: ATA APPLE SSD SM1024 (scsi)
Disk /dev/sda: 1001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 1128MB 1127MB fat32 boot, esp
2 1128MB 1001GB 999GB ext4

Error: /dev/sdc: unrecognised disk label
Model: Kingston DT 101 G2 (scsi)
Disk /dev/sdc: 8011MB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:

what do I need to run, to make it recognizable with windows disk management tool?

I want to format it with windows 11 disk management tool, to exFAT

I guess this is the wrong forum for questions on Windows. But did you try plugging the thumbdrive in while running Windows? Maybe Windows CLI tool diskpart is of some help.

yes, I know , not the right place for windows questions.

But, I was trying to use linux to resolve the problem, and didn’t want to start another discussion for the ongoing issue I’m experiencing with this current USB drive.

I will try using diskpart, and see if I have any luck with it.

There are options within Linux to format with exFAT.

  • Gnome Disks
  • GParted
  • command line with mkfs

Prerequisite:

I have not tested with GParted but to format as exFAT you will need to add exfatprogs before proceeding.

sudo apt install exfatprogs

Then it will work in Disks or from the command line.

Which one you use depends, I suppose, on your comfort level.

Is the USB stick now formatted with a partition table?

If this is the USB, then the answer appears to be no.

You need to first create the partition table and then format it to whichever filesystem you want to use.