How to Format a Bootable USB to Normal
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.
- Open a terminal window.
- Type the following command to list all connected drives:
lsblk
- 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.
- If you see that the USB drive is mounted, unmount it using:
Replacesudo umount /dev/sdX1
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.
- Use the following command to wipe the USB drive:
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.sudo dd if=/dev/zero of=/dev/sdX bs=4M status=progress
Step 4: Create a New Partition Table
After wiping the USB drive, you need to create a new partition table.
- Start
fdisk
with your USB drive:sudo fdisk /dev/sdX
- 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 exitfdisk
.
- Press
Step 5: Format the USB Drive
Now that you have created a new partition, you can format it.
- Format the new partition using the following command:
This will format the USB drive with the FAT32 filesystem, which is widely compatible.sudo mkfs.vfat /dev/sdX1
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.