This is how to 'recover' a failed USB drive on Linux

Often users use USB drives to store data securely. However in some cases the USB drive may be faulty or simply not work. If you are using a Linux operating system and you have a similar error on the USB drive, then you can use the commands to restore the USB drive.

Often users use USB drives to store data securely. However in some cases the USB drive may be faulty or simply not work. If you are using a Linux operating system and you have a similar error on the USB drive, then you can use the commands to restore the USB drive.

Picture 1 of This is how to 'recover' a failed USB drive on Linux

1. Remove the error files on the USB drive with fsck

The easiest way to recover a USB drive is to use the fsck tool. This is a great tool for removing corrupted files, and often these error files are the cause of the error.

To remove the error files on the USB drive, first open the terminal window and then enter the following command into: Lsblk

Note :

The user must find out what the USB drive name is on the system before proceeding. To do this enter the lsblk command, and the command will list all the drives on your system.

The lsblk command will list all the drives on the system, not just the USB drive, so you need to pay attention to output so that you don't mistake the hard drive name for the USB drive.

Picture 2 of This is how to 'recover' a failed USB drive on Linux

To remove all corrupted files, run the fsck command on a specific partition (for example, / dev / sdc1) or on the entire drive (eg / dev / sdc).

Once completed, the USB drive will partition new and work on Linux: sudo fsck / dev / sdc1

Note :

In this example, assume the USB drive is / dev / sdc (or / dev / sdc1). Users can use other names for their USB drives on the system.

Picture 3 of This is how to 'recover' a failed USB drive on Linux

2. Completely "clean" the USB drive

Sometimes the USB drive may not be able to read the data stored in it. If this happens, it is best to adjust the data to 'zero' and start again. The best tool to use in this case is dd .

First find the USB drive name using the lsblk command ( note that / dev / sdc1 is a partition and / dev / sdc is the entire device ).

sudo dd if = / dev / zero of = / dev / sdc

3. Create a new system file

Picture 4 of This is how to 'recover' a failed USB drive on Linux

After cleaning up the USB drive, the data on it will be completely useless, no longer valid. This means you will have to create a new data partition. Select a system file and run the command:

  1. Fat32:
  2. sudo mkfs.msdos -f 32 / dev / sdc1
  3. Ext4:
  4. sudo mkfs.ext4 -f / dev / sdc1
  5. NTFS:
  6. sudo mkfs.ntfs -f / dev / sdc1

Refer to some more articles below:

  1. Protect your Google account with USB "security key"
  1. Summary of some ways to fix USB Device Not Recognized on Windows 7, 8 and 10
  1. Want to know if your computer supports USB 3.0, read this article

Good luck!

Update 26 May 2019
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile