Views:
28,479
Votes: 2
Tags:
hard-drive
data-recovery
dd
Link:
🔍 See Original Answer on Ask Ubuntu ⧉ 🔗
URL:
https://askubuntu.com/q/996828
Title:
Accidentally did dd /dev/sda
ID:
/2018/01/17/Accidentally-did-dd-_dev_sda
Created:
January 17, 2018
Edited: June 12, 2020
Upload:
November 23, 2025
Layout: post
TOC:
false
Navigation: false
Copy to clipboard: false
Testdisk to the rescue
I can personally vouch for Testdisk which saved my data after I was repeatedly copying and pasting instructions for /dev/sdb and changing it to /dev/sdd which was my USB. Only one time I forgot to change it and there went my /dev/sdb into the dustbin.
Setup your system to never write to /dev/sda
I strongly recommend creating a wrapper script: Prevent dd from destroying SSD or HDD. This ensures dd never writes to /dev/sda or possibly /dev/sdb or any other of your mass storage devices.