天天看点

使用Ubuntu Live CD抢救损坏的旧CD

Your old CDs – especially ones you’ve burned yourself – degrade over time, to the point that they’re unreadable. We’ll show you how to squeeze as much data out of them as you can, before it’s too late!

您的旧CD,尤其是您自己刻录的CD,会随着时间的流逝而退化,以至于无法读取。 我们将向您展示如何从中提取尽可能多的数据,以免为时已晚!

The tool we’re going to use to do this is called ddrescue, which can be easily accessed from the Live CD environment. ddrescue can make .iso files out of your CDs, which can then either be burned to a more reliable CD, or can be mounted and accessed in all modern operating systems.

我们将用于执行此操作的工具称为ddrescue ,可以从Live CD环境轻松访问该工具。 ddrescue可以从CD中制作.iso文件,然后可以将其刻录到更可靠的CD中,也可以在所有现代操作系统中进行安装和访问。

使用Ubuntu Live CD抢救损坏的旧CD

Boot into the Ubuntu Live CD environment using a burnt CD or a prepared flash drive.

使用刻录的CD或准备好的闪存驱动器引导到Ubuntu Live CD环境。

First, we’ll install ddrescue. Open up the Synaptic Package Manager (System > Administration > Synaptic Package Manager).

首先,我们将安装ddrescue 。 打开Synaptic软件包管理器(系统>管理> Synaptic软件包管理器)。

In the Synaptic Package Manager window, click on Settings > Repositories.

在“ Synaptic软件包管理器”窗口中,单击设置>存储库。

使用Ubuntu Live CD抢救损坏的旧CD

Add a check in the box whose label ends with “universe” to enable Ubuntu’s universe repository. Click Close.

在标签以“ universe”结尾的框中添加一个复选框,以启用Ubuntu的Universe存储库。 单击关闭。

使用Ubuntu Live CD抢救损坏的旧CD

Back in the main Synaptic window, click the Reload button to reload the list of available packages.

返回Synaptic主窗口,单击“重新加载”按钮以重新加载可用软件包列表。

使用Ubuntu Live CD抢救损坏的旧CD

Once the search index has been rebuilt, enter “ddrescue” in the Quick search text field. Two different packages will come up; make sure that you choose “gddrescue” and not “ddrescue,” which operates slightly differently.

重建搜索索引后,在“快速搜索”文本字段中输入“ ddrescue”。 将出现两个不同的程序包; 确保选择的是“ gddrescue”,而不是“ ddrescue”,后者的操作略有不同。

使用Ubuntu Live CD抢救损坏的旧CD

Right click on “gddrescue” and select Mark for Installation. Click the Apply button, and follow the prompts to install ddrescue.

右键单击“ gddrescue”,然后选择“标记为安装”。 单击“应用”按钮,然后按照提示安装ddrescue 。

Next, we need to select a location to save the .iso file that will be produced by ddrescue. In our case, we’ll use an internal NTFS hard drive. To mount it, we’ll click on Places and then select the hard drive we want to use.

接下来,我们需要选择一个位置来保存ddrescue将生成的.iso文件。 在本例中,我们将使用内部NTFS硬盘驱动器。 要安装它,我们将单击“位置”,然后选择我们要使用的硬盘驱动器。

使用Ubuntu Live CD抢救损坏的旧CD

The rest of this guide will be done in a terminal window, so open one through Applications > Accessories > Terminal.

本指南的其余部分将在终端窗口中完成,因此请通过“应用程序”>“附件”>“终端”打开一个窗口。

Navigate to the location in which you will save the .iso file. In our case, it’s a newly mounted hard drive, so we’ll first change to the /media directory, and then use tab completion to change to the directory that represents our hard drive.

导航到您将保存.iso文件的位置。 在我们的例子中,它是一个新安装的硬盘驱动器,因此我们将首先更改为/ media目录,然后使用制表符完成功能更改为代表我们的硬盘驱动器的目录。

使用Ubuntu Live CD抢救损坏的旧CD

Once you’re in the right directory, you’re ready to run ddrescue! ddrescue is neat because you can try to pull data off of a CD multiple times, and each time it will add to the same image file whatever new data is manages to recover.

进入正确的目录后,就可以运行ddrescue了 ! ddrescue很整洁,因为您可以尝试多次从CD中提取数据,并且每次将新数据设法恢复时,它都会添加到同一映像文件中。

Because of that, for the first pass, it’s best to start with recovering the easy parts first, and then drilling down into problem areas later.

因此,对于第一步,最好首先恢复简单的零件,然后再深入研究问题区域。

For the first pass, the terminal command is:

对于第一遍,terminal命令是:

ddrescue –n –b 2048 /dev/cdrom <ISO file> <log file>

ddrescue –n –b 2048 / dev / cdrom <ISO文件> <日志文件>

In our case, the CD we’re trying to recover is a 13 year old CD with Red Hat Linux 4.2 on it, so we’re going to call the image RedHat.iso, and the log file RedHat.log.

在我们的例子中,我们要恢复的CD是一张13岁的CD,上面装有Red Hat Linux 4.2,因此我们将其称为映像RedHat.iso和日志文件RedHat.log。

使用Ubuntu Live CD抢救损坏的旧CD

The “-n” flag ensures that this first pass won’t take too long, but will still recover the easy-to-read parts of the CD. The “-b” flag is important because CDs have block sizes of 2048 bytes.

“ -n”标志可确保第一次通过不会花费太长时间,但仍将恢复CD易于读取的部分。 “ -b”标志很重要,因为CD的块大小为2048字节。

Eventually ddrescue will finish, possibly with some errors.

最终ddrescue将完成,可能会出现一些错误。

使用Ubuntu Live CD抢救损坏的旧CD

In our case, there were around 80 MB of data that were not recovered due to errors. Let’s try a second, more in-depth run to try to recover as much data as possible.

在我们的案例中,大约有80 MB的数据由于错误而无法恢复。 让我们尝试第二次更深入的运行,以尝试恢复尽可能多的数据。

The terminal command for this second run is very similar to the first, except that instead of using the “-n” flag we will use the “-d” flag to tell ddrescue to go into direct mode and read as much data from the CD as possible. For more information about command line parameters ddrescue recognizes, see its manual.

第二次运行的终端命令与第一次运行非常相似,除了使用“ -d”标志而不是使用“ -n”标志来告诉ddrescue进入直接模式并从CD读取尽可能多的数据之外,尽可能。 有关ddrescue可以识别的命令行参数的更多信息,请参见其手册 。

ddrescue –d –b 2048 /dev/cdrom <ISO file> <log file>

ddrescue –d –b 2048 / dev / cdrom <ISO文件> <日志文件>

使用Ubuntu Live CD抢救损坏的旧CD

Make sure that the .iso and .log files are the same as you used in the first step.

确保.iso和.log文件与第一步中使用的文件相同。

We let ddrescue run overnight, and in the morning…

我们让ddrescue运行一整夜,然后在早晨…

使用Ubuntu Live CD抢救损坏的旧CD

we had recovered over 55 MB of the data we hadn’t recovered before! If we left it longer, we may have been able to recover even more.

我们已经恢复了超过55 MB的数据,我们之前从未恢复过! 如果我们将其保留更长的时间,我们也许能够恢复更多。

It’s a good idea to try to save your CDs now, before they degrade any further. Hard drive space is cheap; buying an external drive is small investment if it means you can save your old CDs (and then you can throw them away to save some space on your shelves).

最好立即保存CD,然后再对其进行进一步降级。 硬盘空间便宜; 如果购买外部驱动器意味着您可以保存旧的CD(然后可以将它们丢弃以节省架子上的空间),则是一笔小投资。

And while ddrescue is a great tool for doing this, it can also be used to pull data from other devices like hard drives and floppy disks. If you tried to make a drive image with dd and it gave you errors, then give ddrescue a try instead!

尽管ddrescue是执行此操作的好工具,但它也可以用于从其他设备(如硬盘驱动器和软盘)中提取数据。 如果您尝试使用dd制作驱动器映像,但它给您带来错误,请尝试尝试ddrescue !

翻译自: https://www.howtogeek.com/howto/21876/rescue-old-damaged-cds-with-an-ubuntu-live-cd/