SD card / U disk partition bad how to do? To tell you a simple method of recovery

Preface:

Previous work process often take students to use U disk to developers, but also to wait until the results came back and found that the available disk space U becomes very small, but obviously plugged into the computer disk found in it did not file, format after the discovery still does not work, puzzling ~~

Internet study waited a long time to solve, and now it will be before the U disk damage recovery methods are summarized below, for reference, ha ha ha ~

[The following SD card to recover, for example, similar to the U-disk recovery method]

Method / Step:

1, unmount the SD card partition

Before using fdisk command, use the following command to uninstall the boot partition and rootfs partitions:

Host# umount /media/boot

Host# umount /media/rootfs

2. Make sure the SD card node name

Host#    sudo fdisk -l

Confirm the size of the confirmed node name for sdd. As shown below:

 You can see the SD card node is sdd, which has two partitions, respectively sdd1 and sdd2. SD card is variable node name, plug several times or use a different card are likely to lead to changes in the node.

 3, delete SD card partition

Run the following command to start the SD card operation:

Host# sudo fdisk /dev/sdd

 

 4, the input m, see all fdisk command operation instruction, as shown below:

 

5, has inputs d and 1, you can delete the first partition. D Enter again to delete another partition. As shown below:

 

 6, add a new partition

Sequentially input "n-> p-> 1-> ENTER -> ENTER", i.e. a new partition, as shown below:

 

 7, an input w, saving partition modification, as shown below:

 

 8, normal SD card format formatted partition command is as follows:

Host#    sudo mkfs.vfat /dev/sdd1

 

 

Note: The recovery partition will damage the original data, be sure to remember to make a backup of the original data and information. .

 

Guess you like

Origin www.cnblogs.com/zaochajun/p/12048903.html