前言:今天由于误操作把linux的 “/”分区删除了,结果重启后系统无法启动了。当时那个头大啊,还好 google 一下发现了testdisk这个强大的工具,赶紧拿出来分享一下。
linux下超帅的分区表修复软件.以前用过n多的windows的分区表修复软件,没想到linux中有这么好用这么方便的修复软件,速度那叫一个快啊。。没有见到这个分区表修复软件以前我都白活了。。。。。 好了,这个软件叫testdisk.很帅的。。 如果你是使用修复光碟,就下载一个这个软件到电脑中,如果是恢复usb的disk直接 #sudo apt-get install testdisk 使用的话先sudo testdisk 1.选择Create来进行分析 Use arrow keys to select, then press Enter key: 2.然后选择testdisk中你要修复的硬盘,回车 Select a media (use Arrow keys, then press Enter):
Please select the partition table type, press Enter when done. 4.使用testdisk分析,现在选择Analyse进行分析 [ Analyse ] Analyse current partition structure and search for lost partitions 5.见到了没,基本所有的分区都出来了,直接回车就好了,默认直接回车是快速扫描. *=Primary bootable P=Primary L=Logical E=Extended D=Deleted 然后因为没用vista,所以选择n。 Should TestDisk search for partition created under Vista ? [Y/N] (answer Yes if 6.进入,见到你的表区表了吧。 Disk /dev/sda - 160 GB / 149 GiB - CHS 19457 255 63 Structure: Ok. Use Up/Down Arrow keys to select partition.
我进入到这个地方时,基本找出来了,不需要在修改什么了,如果和你的分区不一样,那可能还需要使用Deeper search的功能.我的成功修复了,所以直接按write直接进行写到分区表中修复. |
转载于:https://blog.51cto.com/kuku7sui/900945