数据恢复方法--linux ubuntu--ddrescue

live cd :可以让Linux系统从光盘启动,用户可以方便的先对系统进行一次体验,觉得好用,再进行 硬盘安装

ubuntu live cd 版:就是可以直接光盘启动的 ubuntu系统 。Mr. Hou先让我下载这种ubuntu live cd, 下载地址:
下载后是一个ubuntu-18.04-desktop-amd64.iso文件(光盘映像文件我已经放在百度网盘computerTool中了),直接在win10中双击打开,会自动映射到一个盘,然后将里面所有的东东拷贝到一个空的FAT32格式化的U盘,然后,插入U盘,启动时通过F12选择从U盘启动,会进入Ubuntu系统(启动时碰到一个选择项,选择try ubntu without install),太棒了!
--------------------------

ddrescure是一款免费的数据恢复工具。
官方文档:

ddrescure的安装方法:
1)我直接用apt安装没有成功:  sudo apt-get install 软件名
2)官方文档提到,可以从网上下载安装文件,按照说明,自己编译,但是报错(可能时我的gcc版本问题)
3)江哥自己build了一个可执行文件发给我了:在163邮箱,2018.05.30收到的邮件里。可以用,运行方法:切换到可执行文件所在目录,然后./ddrescue parame1,parame2,,。

ddrescure(免费的数据恢复工具)的使用方法(网友整理):

step 1: Creating an image from a failing disk

在终端运行: lsblk -o name,label,size,fstype,model  该指令会列出当前电脑上的所有存储设备。这些设备的名字以sd开头,例如sda, sdb,(linux中的硬件设备一般以sd开头,在/dev/目录下面)。

(我的电脑的C盘(ssd)损坏了,启动windows时显示找不到分区表,运行这条指令后FSTYPE栏没有显示任何东西,应该就是找不到分区。)
上图,sda包括两部分sda1和sda2,应该就是在装系统时将一块硬盘分成了2个盘。

记下你想要恢复那个盘的数据,比如sda, 首先需要将sda整个搞成一个image file,然后将其存储到你的一个足够大的移动硬盘中,记下移动硬盘的名字。 注意:不要浏览你想恢复的盘的文件,当你恢复时。
然后,打开一个终端(ctrl+alt+t)cd 指令进入你想保存image file的移动硬盘。
然后,运行如下指令,将会生成image文件和log文件在当前目录下,(注意:运行指令前再查看一次各个盘的名字时sdax,因为重启系统后,名字有可能会变)。

# ddrescue -d -r3 /dev/sda test.img test.logfile
其中,
  • d tells ddrescue to use direct disk access and ignore the kernel’s cache
  • -r3 tells ddrescue to retry bad sectors 3 times before giving up. Note: On a failing drive you may want to eliminate this option the first time so as to not waste time hammering on bad sectors and risking drive failure. You can always use the logfile to go back and retry the bad sectors after you get an image from the first sweep.
  • /dev/sda is the drive we are rescuing…the whole disk. Naturally, if you just wanted a specific partition, you would use something like /dev/sda1 instead.
  • test.img is the name of the image file
  • test.logfile is the name of the logfile. Always use a logfile. This allows you to resume an interrupted image at the point you left off, or to retry bad sectors after an initial pass. Without a logfile, you will have to start over again!

This process will take a good while. It’s not uncommon for a large drive with lots of damage to take days to complete.

step 2: Restoring an image to a new disk & cloning directly to a new disk
.......
step 3: Working with the image files(将step1中生成的image file恢复数据)
.......




转载于:https://www.cnblogs.com/butterflybay/p/10347967.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值