shamelessly stolen from nixCraft on mastodon

    • azertyfun@sh.itjust.works
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      7 months ago

      Except the proposed alternative should not be cp or pv, but dd bs=4M oflag=direct,sync status=progress.

      I feel like I’m taking crazy pills with all the advice in this thread, because for USB keys you will otherwise end up instantly filling the write cache… which will block the apparent progress of the copy operation (so why even use pv since all you’re doing is measuring your RAM speed and available cache size) as well as heavily slow down (even potentially partially freeze in some circumstances) the rest of your system as the kernel is running out of free pages and can’t flush caches fast enough due to the slow-ass write speeds of usb keys.

      * (Alternatively there is a kernel setting somewhere to disable caching globally for a block device… but in most cases caching is good, just not when you’re flashing an ISO).