Files
oam/knowledge base/raspberry pi os.md
2022-09-27 23:32:35 +02:00

1.9 KiB

Raspberry Pi OS

  1. Store files on the SD even when the overlay file system is active
  2. Make it able to run containers
    1. Kernel containerization features
    2. Firewall settings
  3. Sources

Store files on the SD even when the overlay file system is active

The files just need to be stored on a different file system from /. You can partition the SD and use that, or create a file and mount it as a virtual file system:

truncate -s '6G' 'file'
mkfs.ext4 'file'
mkdir 'mount/point'
sudo mount -t 'ext4' -o 'loop' 'file' 'mount/point'
sudo chown 'user':'group' 'mount/point'
touch 'mount/point/new-file'

Make it able to run containers

Kernel containerization features

Enable containerization features in the kernel to be able to run containers as intended.

Add the following properties at the end of the line in /boot/cmdline.txt:

cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory

Firewall settings

Switch Debian firewall to legacy config:

update-alternatives --set iptables  /usr/sbin/iptables-legacy
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy

Sources