Welcome

Hi everyone!

I'd like to share one of my current projects with you: my "Multi-USB Flash Drive."

WHAT IS IT

It's essentially a Raspberry Pi Zero 2 with a small OLED screen, some buttons, and a custom HAT. It uses USB gadget mode to make the Pi behave like a flash drive with different images. These images can be mounted as read/write, read-only, or even accessed over the network.

WHY

I was getting tired of carrying multiple USB drives with me-one for Windows 7, 8, 10, 11, Windows Server 2019, 2022, and so on. I also ran into issues with Ventoy (it doesn't work reliably on all UEFI machines), which meant I still had to carry extra flash drives. Another goal was to have a convenient way to bring movies along for my daughter to watch in the car-without using Wi-Fi/cellular data and without filling up our iPads (which are older devices and not very compatible with modern apps, except VLC).

THE DEVICE

Here's what I ended up with:

Main menu


Mount menu


Network share


Hotspot option


Config mode

FEATURES

  • Can hold multiple flash images (DD format) or ISO files.
  • Images can be mounted read/write or read-only (useful when you're not sure about the security of the host computer or if you don't want files deleted by antivirus software).
  • Images can also be mounted over the network via Samba or FTP. In this mode, a subdirectory is created for each partition, so you can access everything inside the image.
  • Includes a lightweight DLNA server (minidlna) that streams videos from the "DLNA" folder of the first partition.
  • If no Wi-Fi is available (or not yet configured), the device can enable a hotspot mode, creating an access point so you can still connect and access the mounted drive over the network.

ADDITIONAL DETAILS

  • To simplify management, the device uses a shared storage file. This can be exposed either to the host PC (in Config Mode) or internally accessed by the Pi while running.
  • The shared storage contains:
    • Wi-Fi configuration (simple text file with SSID + password)
    • The main script (easy to update)
    • All the mountable drive images
    • On boot, the device reads the Wi-Fi config from the shared storage (no need for an on-screen keyboard).
  • A background script listens for a button press (unused by the main program). When pressed, it cleanly unmounts everything and exposes the shared storage over USB.
  • Includes a simple screensaver that moves the program name and version around the OLED after 5 minutes of inactivity.

HOW TO USE

  1. In Config Mode, create an empty file (I use fsutil file createnew) for the flash drive.
  2. Mount the new file in read/write mode on the device.
  3. From Windows, create a partition and format it. Done!
  4. To update Wi-Fi settings, enter Config Mode and edit a simple text file.
  5. To enable Hotspot Mode, select it directly from the device menu.

COMPATIBILITY


Design by dcarter