# Mounting an USB Stick

**URL:** <https://forum.farmbot.org/t/mounting-an-usb-stick/4688>\
**Category:** Farmware\
**Created:** [March 7, 2019, 12:13pm UTC](https://forum.farmbot.org/t/mounting-an-usb-stick/4688 "2019-03-07T12:13:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ascend](https://forum.farmbot.org/letter_avatar_proxy/v4/letter/a/a9adbd/32.png) [@Ascend](https://forum.farmbot.org/u/Ascend)\
**Post date:** [March 7, 2019, 12:13pm UTC](https://forum.farmbot.org/t/mounting-an-usb-stick/4688/1 "2019-03-07T12:13:44Z")

</div>

Hello everyone,

we just tried to plug a USB stick into the raspberry to save images with a farmware. The USB drive got detected and is shown at /dev/sda. We tried to mount the drive as we learned in standard Linux systems by sending a bash command like this: `os.system("mount /dev/sda /media/usb1/")`.

Obviously that didn’t work as we expected. Would it even be possible to mount a drive with a farmware? Is it being mounted by the OS already in a path, that i didn’t find? Would the SSH console (I’m not familiar with Iex yet) help in this case?

Please note that I am not asking for detailed training or a working script. We’re just stuck and hoping that anyone can share his knowledge to keep us from running against the wall anymore 🙂

---

<div class="post-metadata">

**Author:** ![connor](https://forum.farmbot.org/user_avatar/forum.farmbot.org/connor/32/622_2.png) [@connor](https://forum.farmbot.org/u/connor)\
**Post date:** [March 7, 2019, 6:38pm UTC](https://forum.farmbot.org/t/mounting-an-usb-stick/4688/2 "2019-03-07T18:38:27Z")

</div>

What is the error you are seeing? a farmware should be able to mount a USB stick easily. That said your mount command is incorrect.

1. You want to use the partition number, not the entire device. IE `/dev/sda1`
2. you didn’t supply the filesystem. I know Farmbot at least will support `ext2`, `ext3` and `ext4` along with `fat16` and `fat32`. It will not support `exfat` and `ntfs` (and never will)
3. the path you are mounting too (`/media/usb1`) almost certainly doesn’t exist unless you created it. You should use something on `/tmp` IE `mkdir -p /tmp/usb/1`

you will want something like this (bash)

```bash
mkdir -p /tmp/usb/1
mount -t vfat /dev/sda1 /tmp/usb/1

```

---

<div class="post-metadata">

**Author:** ![Ascend](https://forum.farmbot.org/letter_avatar_proxy/v4/letter/a/a9adbd/32.png) [@Ascend](https://forum.farmbot.org/u/Ascend)\
**Post date:** [March 8, 2019, 11:25am UTC](https://forum.farmbot.org/t/mounting-an-usb-stick/4688/3 "2019-03-08T11:25:30Z")

</div>

Thanks connor, you saved the day.

> [@connor](#):
>
> mount -t vfat /dev/sda1 /tmp/usb/1

I forgot to add the filesystem type and also the partition number. Now I’m back on the track 👍
