# 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`.

## Mount the drive

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

    ```sh title="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:

    ```sh title="Create the mount point"
    sudo mkdir -p /media/usbdrive
    ```

3. Mount the partition. Replace `sda1` with whatever `lsblk` showed:

    ```sh title="Mount the USB partition"
    sudo mount /dev/sda1 /media/usbdrive
    ```

4. Verify the contents are visible:

    ```sh title="List files on the drive"
    ls /media/usbdrive
    ```

## Copy files off the drive

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

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

Copy a whole tree:

```sh title="Copy a directory recursively"
cp -r /media/usbdrive/scripts /home/pi/
```

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

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

:::caution[Watch out for line endings]
If the USB drive came from a Windows machine, shell scripts on it likely have CRLF line endings and will fail to run with a confusing "bad interpreter" error. See the [dos2unix guide](/guides/onlogic-fr201/dos2unix/) for how to fix that.
:::

## Unmount when you're done

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

```sh title="Unmount the drive"
sudo umount /media/usbdrive
```

## Mounting automatically on boot

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:

```text title="/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.