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中,也可以在所有現代作業系統中進行安裝和通路。
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軟體包管理器”視窗中,單擊設定>存儲庫。
Add a check in the box whose label ends with “universe” to enable Ubuntu’s universe repository. Click Close.
在标簽以“ universe”結尾的框中添加一個複選框,以啟用Ubuntu的Universe存儲庫。 單擊關閉。
Back in the main Synaptic window, click the Reload button to reload the list of available packages.
傳回Synaptic主視窗,單擊“重新加載”按鈕以重新加載可用軟體包清單。
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”,後者的操作略有不同。
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硬碟驅動器。 要安裝它,我們将單擊“位置”,然後選擇我們要使用的硬碟驅動器。
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目錄,然後使用制表符完成功能更改為代表我們的硬碟驅動器的目錄。
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。
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将完成,可能會出現一些錯誤。
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檔案> <日志檔案>
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運作一整夜,然後在早晨…
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/