silverblue-zfs/build.sh

26 lines
906 B
Bash
Raw Normal View History

2024-06-05 16:45:35 +03:00
#!/bin/bash
set -ouex pipefail
RELEASE="$(rpm -E %fedora)"
### Install packages
# Packages can be installed from any enabled yum repo on the image.
# RPMfusion repos are available by default in ublue main images
# List of rpmfusion packages can be found here:
# https://mirrors.rpmfusion.org/mirrorlist?path=free/fedora/updates/39/x86_64/repoview/index.html&protocol=https&redirect=1
rpm-ostree install \
/zfs/*.$(rpm -qa kernel --queryformat '%{ARCH}').rpm && \
# Auto-load ZFS module
depmod -a "$(rpm -qa kernel --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')" && \
echo "zfs" > /etc/modules-load.d/zfs.conf && \
# we don't want any files on /var
rm -rf /var/lib/pcp
2024-06-05 16:45:35 +03:00
#### Example for enabling a System Unit File
## Just in case, according to https://openzfs.github.io/openzfs-docs/Getting%20Started/Fedora/index.html#installation
echo 'zfs' > /etc/dnf/protected.d/zfs.conf