Adding files into hassos (Adding support for MOXA USB to Serial)

Hi Guys,

This may be a “stupid question” but bear with me.
I would like to add some drivers for my USB to Serial converter more specifically I wish to add the raspberry pi stock drivers located under /lib/firmware/moxa/. into HassOS but when I login to HassOS it complains that the file system is read only when trying to copy them there from a USB stick.

What is the best way to go about this?


Install and configure SSH and Samba addon.
Mount the Hass OS Samba shares on your computer. Use it to copy what you want.

You need to understand that HASS OS and HA Core both use Docker containers and the filesystem inside is not matched by the filesystem of the host. You can however overlay parts of the containers filesystem by “binding” a local file or directory into the container, using the “-v” argument of Docker. Simple for HA Core and for Home Assistant OS the call to Docker must be part on some start scripts.

Additionally, parts of the host’s filesystem are automatically mapped into HASS OS. See for details.

Hi All,

I wanted to share my steps here so that anyone in the need of similar can use this as a guide:

I wanted to add the moxa driver library (in RPI normally found here: lib/firmware/moxa) to the homeassistant OS image

I took my SD-CARD out of the RPI3 and put it in my ubuntu PC where I noticed that the partition with the linux file system got mounted as /sdb3

I then ran “unsquashfs /dev/sdb3” to unpack the read-only file system locally on my pc.
I copied the missing moxa folder into the unpacked lib/firmware directory
I compressed the file system using: “mksquashfs squashfs-root/ live.squashfs -noappend- always-use-fragments”
I unmounted dev/sdb3 by calling “umount /dev/sdb3”
I copied my new filesystem over by calling “cat live.squashfs > /dev/sdb3”

Voila now I have a working USB to RS485 converter

Yours truly

1 Like