I want to load Podman and configure Cgroup2 to mount during bootup.
How is it possible to do this without /etc/fstab ???
swupd bundle-add containers-basic
if no system dir there yet, create it
mkdir -p /etc/systemd/system
create new file
nano /etc/systemd/system/cgroup2.mount
add this to the new file :
[Unit]
Description=Mount cgroup2 filesystem
DefaultDependencies=no
Before=local-fs.target
[Mount]
What=cgroup2
Where=/sys/fs/cgroup
Type=cgroup2
Options=nsdelegate
[Install]
WantedBy=multi-user.target
save and close the file
systemctl daemon-reload
systemctl enable cgroup2.mount
Config Podman
mkdir -p /etc/containers
create new config file
nano /etc/containers/containers.conf
add this
[cgroup_manager]
cgroup_manager = "systemd"
[engine]
cgroup_manager = "systemd"
events_logger = "journald"
Create a new systemd service file
sudo nano /etc/systemd/system/podman.service
add this
[Unit]
Description=Podman API Service
Requires=cgroup2.mount
After=cgroup2.mount
[Service]
Type=simple
ExecStart=/usr/bin/podman system service
[Install]
WantedBy=multi-user.target
Save and close the file
systemctl daemon-reload
systemctl enable podman.service
reboot