Skip to content

Gadgets

Dan Mons edited this page Jan 30, 2024 · 3 revisions

Introduction

The Linux kernel provides a "gadget" mode a device (e.g. rpi zero) can be turned into an On-The-Go (OTG) device emulating a serial, ethernet or mass storage device. This can be useful for adding additional support to systems easily.

The device with RetroNAS will need to support OTG mode, refer to the Vendor documentation for how to configure it.

Usage

Gadget support is generally baked into linux, so there is not additional installation to use the functionality. RetroNAS provides some script to easy setup of gadgets and these script do need to be installed; Use the Install options from the linux-gadgets menu item

Run the Mass Storage option, you will be presented with a listing of available disks (block devices), partitions and roms on the system.

WARNING selecting the wrong disk here may nuke your installation on reboot WARNING

Once you have select the correct disk, systemd units will be created to mount these at boot time using the gadget. The disks will no longer be available to the OS.

Configure any Vendor specific requirements to enable OTG mode on your device

Plug the device in OTG mode and you the block storage will be made available. You can combine this with iSCSI support to enable access to Network Attached Storage for devices that may not support it.

Devices

Known devices with OTG support

  • RPI Zero(W) (USB2.0)
  • RPI 4B (USB2.0)
  • RockPI 4B (USB3.0)

Troubleshooting

  • dwc2 module may crash on rpi
    • There is no fix for this, rpi need to move to dwc3 or fix the broken support

References

Home

Getting started:

Contributing

Multi-system protocols:

Specific system configurations:

Services:

Tools:

Physical Media:

On-Device Management:

Advanced storage options:

  • BtrFS RAID, Snapshots, Compression, Deduplication
  • FAT Advanced guide to using FAT loopback mounts for EtherDFS
  • TBA
    • SMR Shingled Magnetic Recording hard drives (TBA)
    • NTFS Advanced guide for NTFS formatted disks
    • SMB Loopback Mounting an existing SMB NAS
    • NFS Loopback Mounting an existing NFS NAS
    • MDRAID (TBA)
    • LVM (TBA)
    • iSCSI Configuring iSCSI

Other:

Clone this wiki locally