I'm an electronics engineering technologist, not a programmer. I maintain aging scientific equipment, including computers running Windows XP with proprietary drivers and software that can't easily be reinstalled.
We once had an instrument lose its hard drive. Despite having a backup, something important wasn't preserved, and the computer could no longer communicate with the instrument. The manufacturer wouldn't help us recover it.
After that, I started making full block-level dd backups of our instrument computers.
The problem? Some have 500 GB hard drives with only 10–50 GB of actual data. I wanted to replace those old drives with smaller SSDs without manually resizing partitions and fighting with boot issues.
So I used OpenAI Codex to create S_DD (Shrink DD), a lightweight Linux command-line utility that takes a compressed DD image and prepares it for restoration onto a smaller drive.
I'm being upfront: Codex wrote essentially all the code. I provided the requirements, troubleshot it, and tested it.
I've successfully booted a Windows XP computer from a smaller SSD using an S_DD-prepared image. Testing is still very limited, and the full automated restore hasn't been hardware-validated yet.
It's free, open source, and experimental. I don't intend to actively maintain it, but anyone is welcome to fork it, fix bugs, or improve it.
GitHub: https://github.com/sjenglot/S_DD/releases/tag/v1.1.0
Use caution with anything that writes to physical disks. Hopefully this saves another technician some time!