Skip to content

Instantly share code, notes, and snippets.

@scttnlsn
Created March 10, 2018 21:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scttnlsn/83c1283fad0b02e8f32c674e6e2c111c to your computer and use it in GitHub Desktop.
Save scttnlsn/83c1283fad0b02e8f32c674e6e2c111c to your computer and use it in GitHub Desktop.
Enable USB mass storage on Raspberry Pi Zero

Create new filesystem:

sudo dd if=/dev/zero of=/usb.bin bs=512 count=51200
sudo mkdosfs /usb.bin
  • Add dwc2 to /etc/modules-load.d/modules.conf
  • Add dtoverlay=dwc2 to /boot/config.txt
  • reboot
  • sudo modprobe g_mass_storage file=/usb.bin stall=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment