Follow

Every time I use dd I do:

$ sudo echo dd if=foo.img of=/dev/sdX

and then I double check that it was actually, really, truly right before I remove the echo

@mmu_man @cwebber cp doesn't have a progress bar, which GNU dd does if you use status=progress. Maybe rsync --in-place --progress could also work?

@mmu_man @cwebber @BrodieOnLinux oh, cat, not cp, my bad. yeah, that way you can pipe it through whatever. although rsync has the advantage of knowing how big the input is, but I guess you can just check that before you copy it.

@cwebber

Nice way to create your own "Are you sure you want to do this?"

@cwebber I try and get into the habit of using /dev/disk/by-path or similar instead of /dev/sdX - slightly harder to screwup.

@penguin42 @cwebber yesss, definitely do this.
also sometimes if you are doing some more complex operations it's safer to chown the device rather than running everything as root.

@cwebber There's the actual expansions of the keys, of course, but I notice that the usual heightened-nerves context of use may lend itself to the alternate expansions Important File and Obliterated File.

@cwebber It also really doesn't help that "i" and "o" are one key apart on a QWERTY keyboard. Now that I think of it, where else might that pairing be troublesome, I wonder?

@cwebber yes. I always tripple check the files to make sure I got the right paths.

@cwebber I do something similar when I run particularly large and potentially consequential rclone jobs. I include the --dry-run qualifier the first time.

Not as potentially devastating as a typo in a dd operation, but same idea.

Also..same for anything involving diskpart on Windows with "clean".

Sign in to participate in the conversation
Octodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!