Wed, 17 Jan 2024
I have fine-tuned the USB gadget a little since I created the download image. If you built your own, the most recent instructions already incorporate this (as of 17 Jan 2025). But if you've got an existing one (either because you just downloaded the image, or you've been running it for awhile) and you want to update yours before I get around to creating a new image, here's how. It will cut down on the need for newusb
, and when you do need to repair the mount file, it won't wipe out all the files:
Log in to the Pi. If you have a preferred client already, use it, but if not: Open the SSH client (Termius), add a New Host (usbgadget.local), and log in as pi
with the password silverseams
(some versions use the standard raspberry
).
Create the scratch directory:
mkdir /pi/home/smb_share
If you've got files on the "USB" you want to keep, cp -r /mnt/usb_share/* /pi/home/smb_share/
.
Move the Samba share to the scratch directory:
sudo nano /etc/samba/smb.conf
and change the path to read:
path = /home/pi/smb_share
Now update the watchdog:
sudo nano /usr/local/share/usb_share.py
Hold down Ctrl-Y until the existing stuff is all gone, and copy the text from this file into it.
Now do a cleanstart
to reboot and load the new versions of everything, and you should be in business. (As always, contact me if you get stuck anywhere.)