Mounting an USB Stick

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 :slight_smile:

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)

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

Thanks connor, you saved the day.

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