Merge pull request #7099 from Drshu/master

[Translating by Drshu]20171114 Restore Corrupted USB Drive To Original State In Linux
This commit is contained in:
Xingyu.Wang 2018-01-11 07:04:54 +08:00 committed by GitHub
commit 2f0523af74
2 changed files with 100 additions and 86 deletions

View File

@ -1,86 +0,0 @@
Restore Corrupted USB Drive To Original State In Linux
======
![](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/restore-corrupted-usb-drive-to-original-state-in-linux_orig.jpg)
Many times our storage devices like sd cards and Pen drives get corrupted and unusable due to one or other reasons.
It may be because of making a bootable media with that device , formatting via wrong platforms or creating partitions in that device.
### Restore Corrupted USB Drive to Original state
[![linux system disk manager](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/published/usb.png?1510665746)][1]
Warning : The following procedure will format all your data from your device
Whatever the reason, the final outcome is that we are not able to use that device.
So here is a solution to restoring a corrupted usb drive or sd card to its original working state.
Most of the times a simple format via the file browser solves the problem, But for extreme cases where the file manager isnt helpful and you need your device working, you can follow this guide.
We will be using a small tool called mkusb for this purpose. The installation is easy.
Add the repository tor mkusb.
sudo apt add repository ppa:mkusb/ppa
Now, Update your package lists.
sudo apt-get update
Install mkusb
sudo apt-get install mkusb
Now launch mkusb. You will get this prompt, click Yes.
[![run mkusb dus](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/editor/run-mkusb.png?1510498592)][2]
Now mkusb will ask you one last time if you wish to proceed with the formatting of the data, Stop will be selected by default. You now select Go and click OK.
[![linux mkusb](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/editor/final-checkpoint_1.png?1510499627)][3]
The window will close and your terminal will look like this.
[![mkusb usb console](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/editor/mkusb.png?1510499982)][4]
In a few seconds, the process will be completed and you will get a window popup like this.
[![restore corrupted usb drive](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/editor/usb_1.png?1510500412)][5]
You need to now remove the device from the system and plug it back in. Your device is Restored to a normal device and it will function properly like before.
[![linux disk manager](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/editor/usb_2.png?1510500457)][6]
Now I know all of these could have been done via terminal commands, gparted or some other software etc. But that would require some level of knowledge about partition management.
So its always good to have a small tool like this to automate the boring work for you.
### Conclusion
**mkusb**
is a fairly easy to use program that can help you repair your usb storage devices and sd cards. It is available through the mkusb ppa as mkusb. All operations on mkusb will require superuser permissions and all your data on that device will be formatted.
Once the operation is completed You will have to reattach the device to make it work.
If you have any queries feel free to post them in the comments section below.
--------------------------------------------------------------------------------
via: http://www.linuxandubuntu.com/home/restore-corrupted-usb-drive-to-original-state-in-linux
作者:[LINUXANDUBUNTU][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://www.linuxandubuntu.com
[1]:http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/edited/usb.png
[2]:http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/edited/run-mkusb.png
[3]:http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/edited/final-checkpoint_1.png
[4]:http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/edited/mkusb.png
[5]:http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/edited/usb_1.png
[6]:http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/edited/usb_2.png

View File

@ -0,0 +1,100 @@
在 Linux 上恢复一个损坏的 USB 设备至初始状态
======
![](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/restore-corrupted-usb-drive-to-original-state-in-linux_orig.jpg)
很多时候我们诸如 SD 卡和 U 盘这样的储存器可能会被损坏,并且因此或其他原因不能继续使用。
这可能是因为使用这个设备创建了一个引导媒体或者是通过错误的平台格式化亦或是创建了一个新的分区在这个设备上。
### 恢复损坏的 USB 设备至初始状态
[![Linux 系统磁盘管理器](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/published/usb.png?1510665746)][1]
警告:接下来的操作会将你设备上的所有数据格式化
无论什么原因,最终的结果是我们无法继续使用这个设备。
所以这里是一个恢复一个 USB 设备或者是 SD 卡到出厂状态的方法。
大多数时候通过文件浏览器进行一次简单格式化可以解决问题,但是在一些极端情况下,比如文件管理器没有作用,而你又需要你的设备可以继续工作时,你可以使用下面的指导:
我们将会使用一个叫做 mkusb 的小工具来实现目标,这个工具的安装非常简单。
1. 添加 mkusb 的仓库
`sudo apt add repository ppa:mkusb/ppa`
2. 现在更新你的包列表
`sudo apt-get update`
3. 安装 mkusb
`sudo apt-get install mkusb`
现在运行 mkusb 你将会看到这个提示,点击 Yes
[![运行 mkusb dus](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/editor/run-mkusb.png?1510498592)][2]
现在 mkusb 将会最后一次询问你是否希望继续格式化你的数据Stop是被默认选择的你现在选择 Go并点击OK
[![Linux mkusb](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/editor/final-checkpoint_1.png?1510499627)][3]
窗口将会关闭,摒弃人此时你的终端看起来是这样的。
[![mkusb usb 控制台](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/editor/mkusb.png?1510499982)][4]
在几秒钟之后,整个过程将会完成,并且你将看到一个这样的弹出窗口。
[![恢复损坏的 USB 设备](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/editor/usb_1.png?1510500412)][5]
你现在需要把你的设备从系统推出,然后再重新插进去。你的设备将被恢复成为一个普通设备而且还能像原来一样的工作。
[![Linux 磁盘管理器](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/editor/usb_2.png?1510500457)][6]
我们现在所做的操作本可以通过终端命令或是 gparted 或者其他的软件来完成,但是那将会需要一些关于分区管理的知识。
所以有一个像这样可以自动解决专一问题的小工具总是一个好事。
### 结论
**mkusb**
是一个很容易使用的程序,它可以修复你的 USB 储存设备和 SD 卡。mkusb通过 mkusb 的 PPA 来下载。所有在 mkusb 上的操作都需要超级管理员的权限,并且你在这个设备上的所有数据将会被格式化。
一旦操作完成,你将会重置这个设备并让它继续工作。
如果你感到任何疑惑,你可以在下面的评论栏里免费发表。
--------------------------------------------------------------------------------
via: http://www.linuxandubuntu.com/home/restore-corrupted-usb-drive-to-original-state-in-linux
作者:[LINUXANDUBUNTU][a]
译者:[Drshu](https://github.com/Drshu)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:http://www.linuxandubuntu.com
[1]:http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/edited/usb.png
[2]:http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/edited/run-mkusb.png
[3]:http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/edited/final-checkpoint_1.png
[4]:http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/edited/mkusb.png
[5]:http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/edited/usb_1.png
[6]:http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/edited/usb_2.png