[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Needed - a byte perfect image of an entire partition



On Mon, Dec 18, 2017 at 08:06:07AM -0600, Richard Owlett wrote:
Background:
I did my first Debian install with Jessie.
I then went on to multi-boot a variety of versions and preferences.
There was always an install of current "old-stable" present.

Current problem:
I intend to wipe everything from dev /sda and do a fresh install using configurations and partitioning that I've discovered that meet my individualist requirements.

Preserving content of most partitions can be done with Clonezilla.

However one partition was corrupted. I found some data retrieval tools which recovered most, but not all, data. I want a byte perfect copy of that partition such that in the future I can attempt to retrieve more data.

If you suspect the disk is damaged, take a look at ddrescue (debian package: gddrescue). This can perform various "tricks" on a damaged disk (jumping over a failing sector, reading forwards and backwards around the damage, etc) in order to extract as much useful data as possible.

If the disk is fine, though, you'll find that standard tools (dd, cat, etc) are just as quick. All of this tends to rely on the kernel to do the actual reading. Usually, the kernel <-> disk interface is reliable - that is, if the kernel reports that a byte was 0xab, then you can trust that it was 0xab. But if you don't trust the interface (perhaps the disk controller is introducing noise, resulting in bit errors), then I'm not sure what you can do. You could try copying several times and performing a checksum to look for changes; if the noise IS random, then the checksum will change. Finding two copies with identical checksums SHOULD indicate a valid copy.


Suggestions?
TIA



--
For more information, please reread.

Attachment: signature.asc
Description: PGP signature


Reply to: