I consider the existence of Balena Etcher an Ozymandian emblem of the failures of all of modern computing.
I have a .img file. I want to write it to an SD card, plugged into my Mac.
1. I open the built-in Disk Utility and attempt to use the Restore function. This gives a cryptic error that after internet research, is because it doesn't support regular .img files. This is ridiculous and very true to Apple. Totally arbitrary limitation on functionality for a commonly used standard, because it's not their one.
2. I open Balena Etcher to try there. It fails cryptically. Research reveals that's because of a Catalina security restriction. Fine. I update Etcher. Now it gives a sketchy non-system dialog box demanding my user password, that could be doing anything with it. Not a fucking chance. Uninstall Etcher.
3. Hey, I use the terminal enough. Just because everyone has a dd horror story doesn't mean it's impossible to use right, right??
$ man dd
[ Massive unreadable pile of unbroken text including no usage examples or even basic guide to argument placement ] Okay, fuck the man entry then, --help is usually more concise.
$ dd -h (& dd --help)
ARE YOU FUCKING KIDDING ME
I am at the point of having to spend multiple minutes using an internet search engine just to look up how to correctly coaxing this command that is older than me into working, without accidentally wiping anything else, just to image a disk
@steph I am literally too upset at computers to trust myself running a potentially destructive command rn.
@steph so I calmed down and tried it and my dd just inexplicably wouldn't take a bs argument, it said illegal numeric value. I am moving to live in a hut on a glacier in Greenland. Anyone caught nearby with technology more complex than a snare will be chased off with a hatchet
@steph do people genuinely think it's okay for programs that spend many minutes, maybe hours, doing an operation, to not output any progress information. In the year 2020.
Imagine what we could achieve if computers weren't like this
@null oh yeah, I used the command line utility for that bit. Of course, that involved trying
$ diskutil --list
$ diskutil -list
$ diskutil list
because the modern command line is a joke
@s0 idk if Apple stuff has this, but on #Linux a very good practice is to always always ALWAYS use /dev/disk/by-<something> to identify your disk. never ever /dev/sdX.
once you've identified the block device (which is either the whole disk or a partition of it) you just dd if=$input_file of=$target_block status=progress (to see how it's progressing)
(maybe play with block size too, but i trust it to figure it out on its own)
@s0 fwiw “cat” is fine for writing disk images. The crucial part (for cat or dd) is targeting the correct device name.
@s0 Dirty secret they don't tell you: In most use-cases you can just use `cat` instead of `dd`. I have successfully used cat to burn USB liveboots without issue. Save yourself the dd BS
@s0 another option (are you tired of these yet? (: ) - dcfldd, a forensics dd - which could possibly be in homebrew? (I did not check, as I no longer use osX.)
I used to use this before I learned of the status=progress option to the latest versions of dd.
dcfldd if=[image file] of=[disk device] sizeprobe=if
(which presents the progress while writing.)
also has verify, and hashing (for creating hash checksums, like when posting your image to someone else to verify that the checksum is identical - without needing to run sha256sum or similar on the output file separately.)
Is, sadly, basically the same format for the input and output type things - if and of - input file, output file - which is odd.
--help is not as obtuse, but is still for forensics, so is a bit heavy on the "do everything" side.