3 ms·
I recently had to create a bootable USB drive, and tried following the instructions on the Arch wiki[1] to just use coreutils: # cat path/to/archlinux-versio
by nemetroid 5y ago
I recently had to create a bootable USB drive, and tried following the instructions on the Arch wiki[1] to just use coreutils:
# cat path/to/archlinux-version-x86_64.iso > /dev/sdx
or
# dd bs=4M if=path/to/archlinux-version-x86_64.iso of=/dev/sdx conv=fsync oflag=direct status=progress
However, this was ridiculously slow. I waited a long time for cat, but not long enough to figure out if it would ever finish. dd reported speeds of less than half a MB/s, gnome-disk-utility was about eight times faster.
I wonder if a different set of options to dd would have given better results. From what I can tell, gnome-disk-utility is just open() and write() (with suitable flags) in the end.
1: https://wiki.archlinux.org/title/USB_flash_installation_medium#Using_basic_command_line_utilities https://wiki.archlinux.org/title/USB_flash_installation_medi...
- MayeulC 5y agoYou sometimes have to use a bit of guesswork to find the best `bs` value, 8M is usually faster IME. I think gnome-disk benchmarks it? Now, you could also do without fsync, and call `sync` at the end, it could be faster.