Introduction
A messy SD card can be a source of frustration, especially when you cannot access important files due to a corrupted partition table. In such cases, wiping the partition table is an effective solution. However, if you have already tried using Windows DiskPart and encountered an error, this article will guide you through the process of wiping the SD card's partition table like a pro using Linux.
Prerequisites
Before we begin, ensure that you have the following:
- An SD card reader
- A Linux system (Ubuntu is used in this example)
- Root access
Warning
Wiping the partition table will erase all data on the SD card. Make sure to back up any important files before proceeding.
Installing GParted
To wipe the partition table, we will use the GParted partition editor. If it is not already installed, follow these steps:
sudo add-apt-repository ppa:gparted-team/gparted
sudo apt update
sudo apt install gparted
Connecting SD Card
Insert the SD card into the reader and connect it to the Linux system.
Identifying SD Card
Use the following command to identify the SD card:
sudo fdisk -l
Locate the SD card in the output and remember its device name (e.g., /dev/sdb).
Wiping Partition Table
Use the following command to wipe the partition table:
sudo gparted /dev/
Replace
Verifying Partition Table
Use the following command to verify that the partition table has been wiped:
sudo fdisk -l
The output should not show any partitions for the SD card.
Creating New Partition
Use the following command to create a new partition:
sudo gparted /dev/
Click on the unallocated space and create a new partition. Set the file system type and size according to your requirements.
Mounting New Partition
Use the following command to mount the new partition:
sudo mkdir /media/
sudo mount /dev/ /media/
Replace