Not sure why you’re getting the readonly filesystem. I’ll describe my installation in case someone uses a similar setup.
First off, I run homeassistant supervised inside WSL2 using a “genie bottle”. This runs all systemd services which wsl doesn’t support natively. I used this guide.
To autostart the VM with Windows, I added a task in Windows Task Scheduler to run at startup.
This starts the WSL VM, and executes the script detailed below. The command for task scheduler is:
wsl ~/startup.sh
The script runs the bottle, but now to fix this error, it runs the 3 commands discussed above that recreate /dev/shm:
#!/bin/bash
sleep 20
sudo rm -r /dev/shm
sudo mkdir /dev/shm
sudo chmod 777 /dev/shm
sleep 15
genie -s
I also have some USB auto mounting to passthrough deconz and wyzesense in this script, but I kept them out here since they’re out of the scope of this discussion.