本文を読み飛ばす

ARM SBC: install mqtt server with rootless podman

install MQTT server to SBC.

  • at this time, this MQTT server does not encrypt the communications. we need the TLS encryption for it.

make the configuration file::

cat >> mqtt.conf <<EOF
allow_anonymous false
listener 1883
listener 9001
protocol websockets
persistence true
password_file        /srv/mqtt/mqtt.pwfile
persistence_file     mqtt.db
persistence_location /srv/mqtt/data/

user root  # for podman rootless
EOF

points:
- persistence_file is the relative path from `persistence_location`
- a rootless podman needs `root user` as the running user,
    containers `mqtt` user does not have any permissions to mounted points.

create the container file::

```bash
mkdir app.mqtt; cd app.mqtt
cat > Containerfile <<EOF
FROM debian:12.11-slim

RUN apt update -y
RUN apt install -y mosquitte

RUN mkdir -p /srv/mqtt
RUN mosquitte_passwd -c -b /root/mqtt.pwfile admin ??????
RUN mosquitte_passwd    -b /root/mqtt.pwfile sensor1 ?????
RUN mosquitte_passwd    -b /root/mqtt.pwfile sensor2 ?????
RUN mosquitte_passwd    -b /root/mqtt.pwfile viewer  ?????

COPY mqtt.conf /srv/mqtt/mqtt.conf
CMD ["mosquitte", "-c", "/srv/mqtt/mqtt.conf"]
EOF

build the container::

podman build -t mqtt-server

up the container::

ext=/mnt/external/mqtt
podman run -v /srv/mqtt/data:$ext/data \
           -v /srv/mqtt/log:$ext/log \
           -p 1883 -p 9001 \
           -d mqtt-server

釣果: 2025

合計 ? desc.
07.24 15 敦賀新港 (グレx2、カサゴx3、ギンポx1、〇〇x1、小タイx3) + 1タイ + 2フグ
06.28 12
06.14 7 なぎさ、1かめ

ARM SBC: podman install

My experience in the debian armhf. To install podman, according to https://wiki.debian.org/Podman.

it is need to enable the registory at search::

sudo apt install podman
echo 'unqualified-search-registries=["quay.io"]' > /tmp/registries.conf
CONTAINERS_REGISTRIES_CONF=/tmp/registries.conf podman search podman

move cache directory to an external drive,

sudo mkdir -o /nmt/external/containers.$USER
sudo chown $USER:$USER /nmt/external/containers.$USER
sudo mount -o bind /mnt/external/containers.$USER ~/.local/share/containers

thanks podman github .

I want to build the application from a debian image.

podman pull debian:12.11-slim

build the application.

mkdir app; cd app
echo "FROM debian:12.11-slim" > Containerfile
podman build

install the network program:

sudo apt install uidmap
sudo apt install slirp4netns

thanks github issue .

then run the container:

podman run

ARM SBC: overlayfs error -2

overlayfs errors had began from 2025/05/25, since the SBC was launched at 2024/09/23::

zram-config stop 2025-02-25-08:00:44-JST
ztab remove log /zram1 /var/log /opt/zram/log.bind
serviceConfiguration: Stopping services that interfere with zram device configuration.
removeZdir: Beginning removal of device /dev/zram1.
umount: /var/log (overlay1) unmounted
mergeOverlay: Beginning merge of /opt/zram/opt/zram/log.bind.
ls: /opt/zram/zram1/upper: Input/output error
/opt/zram:
ls: /opt/zram/zram1: Input/output error

I think, it is worth to use overlayfs and zram-config at the sametime, then the overlayfs cannot mount at boot::

kernel: overlayfs: "xino" feature enabled using 2 upper inode
kernel: overlayfs: failed to verify origin (/, ino=12,
kernel: overlayfs: failed to verify upper root origin

to fix it, disable the features of overlayfs at mount. by::

index=off,metacopy=off

here is my fstab.

overlay /var/log overlay noauto,index=off,metacopy=off,workdir=/mnt/external/var-log.tmp,lowerdir=/var/log,upperdir=/mnt/external/var-log 0 0

thanks for arch linux BBS

overlayfsにエラー発生して、以後書き込みができなくなっていた。

その後、再起動してもマウントできなくなった。

あまり起こらないエラーのようで
対処法がなかった。

上のようにすると回避はできた。

何の機能でどういうメリットがあるのかは
調べていないが...

宣伝: