5

I used a bunch of SD cards and USB along the years to install several Ubuntu in different computers, and now I would like to recover those cards to use them for normal storage. I can't seem to find any way to do it online.

Can someone help?

10

Just format it, bootable USB is nothing more than a setup utility for an operating system, it'll revert back to its original function (act as data storage) after you format it, same goes for MicroSD.

To handle the job I personally recommend the GParted tools, you can download it using below command.

sudo apt-get install gparted

Select your devices, navigate to Device → Create Partition Table to overwrite the data— don't forget to unmount any partition first.

Usually USB have /dev/sdb or /dev/sdc as a device names, meanwhile MicroSD has /dev/mmcblk.

| improve this answer | |
  • that worked! thanks – Daniel Serfaty Apr 2 at 10:56
  • 4
    Your approach is correct, but it is not "formatting" as you call it. "Formatting" as it is understood today would mean to create a new filesystem to overwrite the old one in an existing partition. Your approach instead wipes not just all file system contents, but also all partitions and starts blank. – Dreamer Apr 3 at 8:23
4

Use disks (gnome-disk-utility).

  1. On the left side, choose your USB drive.

  2. Then, on the right side you see 2 or three partitions. Select and remove them with the - button below until the stick is covered with "Free Space".

  3. Select the Free Space and press the + button below to create a new partition and format it with the preferred file system. Done.

disks USB

| improve this answer | |
4

GParted vs ISO9660

GParted is not too good at ISO9660 file systems. To reformat a flash drive that has been used by Startup Disk Creator, I use Disks to unmount any partitions. I then use GParted - Device/Create Partition Table, to create a new partition table, (usually msdos). Then I use GParted to create a new FAT32 or NTFS partition.

One advantage of the above method is that I can boot the Live USB toram and then use it to format itself.

| improve this answer | |
2

First alternative

In most cases you can use Disks alias gnome-disks or gparted.

I think gparted is easier to use. It is available in Ubuntu live (in an SD card or USB pendrive), and you can install it into installed Ubuntu systems with

sudo apt update
sudo apt install gparted

Second alternative

In some cases it might not work with Disks or gparted. Then you can

  • wipe the first mibibyte with mkusb in order to remove data that make those tools confused,
  • or directly 'Restore the card or pendrive to a standard storage device' (with mkusb).

Third alternative

If there are still problems you can analyze it according to the following links and links from them,

Can't format my usb drive. I have already tried with mkdosfs and gparted

help.ubuntu.com/community/Installation/FromUSBStick/post

| improve this answer | |
  • 1
    To tell the truth, your second alternative is usually my first alternative. – C.S.Cameron Apr 3 at 9:18
1

You can reformat them in Linux or Windows to whatever filesystem you prefer (exFat, NTFS, ext4, etc..) and they will be useable as regular removable storage again.

Just be aware that it’ll delete whatever data you have on there as formats do.

| improve this answer | |
  • As you have multiple partitions usually, simple format won't be enough. – pLumo Apr 2 at 7:40
  • 1
    This does not answer the question as it doesn't explain how to accomplish this – StrabagISS_Krall Apr 2 at 7:47
1

If you are planning to use the devices in Windows next, Windows make formatting very easy. However, it too is confused. So this is a very quick way:

On Linux: dd if=/dev/zero of=/dev/sdc bs=1M count=1 (make sure sdc matches your USB/SD drive`

Now take it to Windows and plug it in. Windows will ask if you want to format it, and click OK, then Format. Now it's all good!

| 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.