Skip to content

Mount a USB drive

Raspberry Pi OS Lite doesn’t auto-mount USB drives. When you plug a stick into the FR201 to copy a configuration file or an installer script, you have to mount it yourself. It’s a one-time setup; after that, copying is plain cp.

  1. List block devices to find the USB stick. The drive that just appeared, with the size you expect, is the one you want:

    List block devices
    lsblk

    USB sticks typically show up as sda (or sdb if you have other storage attached), and the partition you want to mount is usually sda1.

  2. Create a mount point. /media/usbdrive is a good convention but the name doesn’t matter:

    Create the mount point
    sudo mkdir -p /media/usbdrive
  3. Mount the partition. Replace sda1 with whatever lsblk showed:

    Mount the USB partition
    sudo mount /dev/sda1 /media/usbdrive
  4. Verify the contents are visible:

    List files on the drive
    ls /media/usbdrive

Once mounted, the USB stick is a regular directory. Copy files with cp:

Copy a single file to the home directory
cp /media/usbdrive/install.sh /home/pi/

Copy a whole tree:

Copy a directory recursively
cp -r /media/usbdrive/scripts /home/pi/

If you copied a shell script, mark it executable before running:

Run an installer from the USB stick
cp /media/usbdrive/install.sh /home/pi/
chmod +x /home/pi/install.sh
/home/pi/install.sh

Always unmount before pulling the drive — yanking it without unmounting can corrupt the filesystem:

Unmount the drive
sudo umount /media/usbdrive

If the same USB drive is always present (for example, the FR201 has a permanent thumb drive holding logs or configuration), add it to /etc/fstab so it mounts at boot. Look up the drive’s UUID with sudo blkid, then add a line like:

/etc/fstab
UUID=1234-ABCD /media/usbdrive vfat defaults,nofail 0 0

The nofail option keeps the system from hanging on boot if the drive is missing.