How to Format a Bootable USB to Normal

3 min read 4 hours ago
Published on Oct 13, 2024 This response is partially generated with the help of AI. It may contain inaccuracies.

Table of Contents

Introduction

This tutorial will guide you through the process of restoring a bootable USB drive to its normal state on a Linux system. After creating a bootable USB, you may find that it cannot be formatted or behaves incorrectly. This guide will help you completely wipe the USB, create a new partition table, and format it properly.

Step 1: Identify the USB Drive

Before proceeding, you need to identify the USB drive you want to format.

  1. Open a terminal window.
  2. Type the following command to list all connected drives:
    lsblk
    
  3. Look for your USB drive in the list. It will typically be listed as /dev/sdX (where X is a letter, e.g., /dev/sdb). Make sure to note this as you will need it in the following steps.

Step 2: Unmount the USB Drive

Ensure that the USB drive is not mounted before proceeding with formatting.

  1. If you see that the USB drive is mounted, unmount it using:
    sudo umount /dev/sdX1
    
    Replace sdX1 with the correct partition of your USB drive.

Step 3: Wipe the USB Drive

To completely remove all information from the USB drive, you will need to wipe it.

  1. Use the following command to wipe the USB drive:
    sudo dd if=/dev/zero of=/dev/sdX bs=4M status=progress
    
    This command writes zeros to the entire drive, effectively erasing all data. Be very careful with this command as it will erase everything on the specified drive.

Step 4: Create a New Partition Table

After wiping the USB drive, you need to create a new partition table.

  1. Start fdisk with your USB drive:
    sudo fdisk /dev/sdX
    
  2. Inside fdisk, type the following commands:
    • Press o to create a new empty DOS partition table.
    • Press n to create a new partition.
    • Select the default values for the partition number, first sector, and last sector by pressing Enter.
    • Press w to write the changes and exit fdisk.

Step 5: Format the USB Drive

Now that you have created a new partition, you can format it.

  1. Format the new partition using the following command:
    sudo mkfs.vfat /dev/sdX1
    
    This will format the USB drive with the FAT32 filesystem, which is widely compatible.

Conclusion

You have successfully restored your bootable USB drive to its normal state. By following the steps to identify, wipe, create a new partition table, and format the drive, you can now use it for regular storage or create new bootable media. If you encounter any issues, double-check that you have the correct drive selected and that it is unmounted before performing any operations.