Make Linux installer USB

1970 + 1706310176

Copy content of .iso to disk

Copy bytes from .iso file (don't use partition path). The fdatasync ensures last bytes are really written before the finish report. For macOS use fsync instead.

sudo dd if=linux.iso of=/dev/diskXX status=progress conv=fdatasync

Check disk for flip bits

On macOS check the SHA256 on USB drive (the stat on the .iso file checks the file byte length to limit SHA256 check on USB drive instead of testing bytes of the whole drive):

sudo head -c $(stat -f '%z' linux.iso) /dev/diskXX | shasum -a 256

On Linux the stat command looks different (because of the Darwin Kernel stat version on macOS):

sudo head -c $(stat -c '%s' linux.iso) /dev/diskXX | shasum -a 256

Calculate SHA256 for .iso file

The SHA256 needs to be calculated separately for the .iso file to compare:

shasum -a 256 Linux.iso

More posts