Linux HOWTOs

About | Home | Search

HOWTO: ddrescue
Description: Data recovery tool
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything

# GNU ddrescue 1.8
# ================
# This is apparently not the same thing as dd_rescue

test -f installed/ddrescue-1.8.tar.bz2 &&
 mv installed/ddrescue-1.8.tar.bz2 .
test ! -f ddrescue-1.8.tar.bz2 &&

# Verify tarball w/ md5sum:
# (this came from my gpg-verified tarball)
echo "51451893ea96a5f9943523743a6a35ae  ddrescue-1.8.tar.bz2" | md5sum -c

# Verify tarball w/ sha1sum:
# (this also came from my gpg-verified tarball)
echo "eefe5aaf47fd3e854d74f4877caf29110e3e88f6  ddrescue-1.8.tar.bz2" | \
 sha1sum -c

# Verify tarball w/ gpg:
( gpg --list-keys 132D7742 > /dev/null 2>&1 || gpg --recv-keys 132D7742 ) &&
 wget -nc &&
  gpg --verify ddrescue-1.8.tar.bz2.sig && rm ddrescue-1.8.tar.bz2.sig

mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "ddrescue-*" -exec rm -r {} \;
tar xjvf ~/ddrescue-1.8.tar.bz2
cd ddrescue-1.8
test $UID = 0 && chown -R root:root .

# FYI, this configure is not a "real" (autoconf) configure

./configure -datadir=/usr/local

# Become root to install it

make install-strip
make install-man

# Become yourself again

mkdir -p -m 0700 installed
rm -f installed/ddrescue-*.tar.*
mv ddrescue-1.8.tar.bz2 installed/

# Read 'info ddrescue' and/or 'man ddrescue' and/or run 'ddrescue --help'
# for usage info

# If you ever want to uninstall ddrescue, this should do it:
test -d src/ddrescue-* && ( cd src/ddrescue-* ; make uninstall )
rm -f /usr/local/bin/ddrescue /usr/local/info/ \
find ~/src -maxdepth 1 -type d -name "ddrescue-*" -exec rm -r {} \;
rm -f ~/installed/ddrescue-*.tar.*

Back to the list

Last updated: Wed, 29 Apr 2020 22:04:50 -0400
Jason Englander <jason at englanders dot us>