Adding USB thumb drive to PiAware 3.5?


It seems not to be possible to add a USB thumbdrive to PiAware.

I have a Kingston 16Gb data traveler 2.0 and no matter what I try it is always mounted immediately, owned by root, and in root group. It is made read only. Obviously this means I can not back things up to the thumb drive, or have a database residing on it being updated.

If one writes often to an SD card then it will be destroyed by this process sooner or later. If the writes can be redirected to a USB stick then it’s an improvement since in the event of a problem the USB stick does not contain the OS and the whole unit is not rendered useless. As long as one backs up any valued data from the thumb drive fairly often then any destruction is going to be usefully limited.

A mate and I spent 4.5 hours one evening trying to persuade a PiAware install to cooperate, but we failed. We noted some command line commands that might have helped were missing, but of course they are missing, so we can’t be sure if they might have been able to help enough.

Making a thumbdrive read only by default rather defeats the point I would have thought. Making it available to the user to back things up seems more sensible. But what would I know? :wink:

Anyone happen know if there is a magic bullet for this problem? My friend’s reaction was to tell me not to be so silly, and of course now he knows how bad this problem really is too! :rofl:



This is to support loading config from a USB drive (mostly used on FlightFeeders). It’s only present on the piaware sdcard image.

See /lib/udev/rules.d/60-piaware-support.rules and /lib/udev/generate-usb-mount if you want to make it do something different.

(Or if you want a general-purpose system, you might want to start from a vanilla Raspbian image - the PiAware image is very specifically tailored to running piaware)


Thanks very much indeed, it looks rather promising for all I know just yet.

I’m after putting a basestation.sqb (can’t recall the exact name for this precise moment) on the USB drive, then having VRS update it as and when it needs. ie it will need to write to that file.

Does this sound like the sort of thing I could then do with that which is already there?

I am working from PiAware 3.5 image and I have not molested it very much at all. Added VRS, wrote a small script, got it to wait 20 seconds then run at reboots from the cron, nothing too heavy.

I’d have preferred to do it daemon style (so it run s like a service and can be started and stopped, no doubt much more tidy), but it’s way beyond my knowledge.

Any hints or help welcome of course! :wink:


If you expect a particular USB drive to always be present then probably the simplest thing to do is to disable the udev rule entirely and just specify your drive in /etc/fstab


I had a similar issue with auto-mounted USB drives with the piaware image. If you put a link to dev/null in /etc for this rule it will override the ones in /lib and stop the USB drive from automatically being mounted. You then have to mount it yourself of course.

Sudo ln -s /dev/null /etc/undev/rules.d/60-piaware-support.rules