SD Clean/Linux

This is an add-on section for completely recreating an SD card's filesystem using fdisk and mkfs. This should only be done if formatting does not fix your issue or is not possible for some reason.

This page is for Linux users only. If you are not on Linux, see the Windows and/or Mac pages instead.

Instructions

 * 1) Make sure your SD card is not inserted.
 * 2) Open a terminal window and type.
 * 3) Insert the SD card and watch for a new device appearing in lsblk.
 * 4) * Observe the output for the new device. It should match something like this:
 * 5) Take note of the name of the device that now appears. In our example above, it was.
 * 6) * If  is set to 1, make sure the lock switch is not slid down.
 * 7) Hit CTRL + C to exit the menu.
 * 8) For each partition of the disk, type.
 * 9) * Replace  with the partition number you are unmounting.
 * 10) Type.
 * 11) Enter , then enter   and go through all the resulting prompts without changing settings.
 * 12) * If it asks whether to remove a VFAT signature, choose to remove it.
 * 13) Once you are back at fdisk's main menu, enter   and then enter
 * 14) Enter   and then   - observe the output, and make sure the device is now formatted correctly.
 * 15) If there are no issues, enter   - this will save changes and exit the fdisk prompt.
 * 16) Type   to reformat the new partition.
 * 17) * If the SD card is over 32GB in size, change 64 to
 * 18) Type , then remove and reinsert the SD card.
 * 19) Copy your data back onto the SD card.