Fill a fake flash drive with a single partition that matches its real capacity

f3fix

  • Edit the partition table of a fake flash drive.
    See also `f3probe`, `f3write`, `f3read`.
    More information: <http://oss.digirati.com.br/f3/>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

sudo f3fix {{/dev/device_name}}

click the source code to copy install f3fix on any operating system with command-not-found.com