Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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_medi...



You 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: