Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to repair the USB disk drive by Linux

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Most people do not understand the knowledge points of this article "Linux how to repair U disk drive", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "how to repair U disk drive with Linux" article.

Use fsck to remove bad blocks from USB drives

The easiest way to repair flash drives or other types of drives in Linux is to use the fsck tool, which is a powerful tool for removing bad blocks, solving "unreadable" problems, and fixing most file system problems. Before that, however, you need to use the lsblk command to determine the U disk, which lists all the disks connected to the current Linux system.

To delete bad file blocks, execute the fsck command on a specific partition (such as / dev/sdc1) or an entire disk (such as / dev/sdc), and once done, you will get a healthy Linux partition.

Clear USB drive

When it appears that the U drive is completely unreadable and the data in it is worthless, the best way to fix it is to use the dd command to completely zero the U drive.

Similarly, use the lsblk command to find the U disk, and then use a command similar to the following to clear the zero:

Sudo dd if=/dev/zero of=/dev/sdb

After the zeroing operation is completed, you need to repartition the disk with fdisk or other tools, and then select the following command to format it for normal use:

FAT32

Sudo mkfs.msdos-f 32 / dev/sdb1

EXT4

Sudo mkfs.ext4-f / dev/sdb1

NTFS

The above sudo mkfs.ntfs-f / dev/sdb1 is about the content of this article on "how to repair USB drives in Linux". I believe we all have some understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report