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

Re: using ddrescue on the root partition - boot with / as read-only



On 14/09/2023 19:48, Michael Kjörling wrote:
On 14 Sep 2023 12:17 +0200, from vincent@vinc17.net (Vincent Lefevre):
badblocks says that there are 25252 bad blocks.

I'm using ddrescue before doing anything else (mainly in case things
would go worse), but I would essentially be interested in knowing
which files are affected.

There's always the brute-force way; for each ordinary file, try to cat
it to /dev/null, and log the name of the file if that fails.

ddrescue should be a better way to recover data from failing disk. It tries to minimize seeks and may reiterate over fragments failed during earlier passes. It may write session/log file to track data recovered during previous runs.

Not only the root partition should be mounted read-only. No partitions from this disk should be mounted at all. Even reads may cause more severe damage. Boot from a live media and run ddrescue from it. Check that no partitions are automatically mounted or used as swap.

It is better to postpone badblocks till disk image will be created.

If data are really precious then seek for a specialized service.


Reply to: