Created
May 4, 2023 03:51
-
-
Save turicas/a3ebfb14f08e97d1cf6d527f8d79da49 to your computer and use it in GitHub Desktop.
Copy all the possible files from a failing disk (I/O error)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# XXX: replace /dev/sdb1 with the partition you'd like to rescue | |
sudo apt update && sudo apt install -y gddrescue | |
sudo time ddrescue /dev/sdb1 /path/to/file.raw /path/to/ddrescue.log --try-again --force --verbose | |
sudo mkdir -p /mnt/rescued | |
sudo mount -o ro,loop /path/to/file.raw /mnt/rescued | |
cd /mnt/rescued # enjoy :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment