Files
oam/knowledge base/rpm-ostree.md
2023-07-09 20:48:18 +02:00

2.2 KiB

rpm-ostree

Name Base distribution
Kinoite Fedora KDE
Silverblue Fedora Workstation

Table of contents

  1. TL;DR
  2. Package layering
  3. Further readings

TL;DR

Changes to the base layer are executed in a new bootable filesystem root. This means that the system must be rebooted after a package has been layered.

# Check for available upgrades.
rpm-ostree upgrade --check

# Upgrade the system.
rpm-ostree upgrade

# Install packages.
rpm-ostree install kmod-nvidia xorg-x11-drv-nvidia

# Override packages.
rpm-ostree override replace \
  local/path/to/podman-3.1.2-1.fc34.x86_64.rpm \
  https://kojipkgs.fedoraproject.org/packages/podman/3.1.2/1.fc34/x86_64/podman-plugins-3.1.2-1.fc34.x86_64.rpm

# Remove packages.
# Packages will still exist in the undelying base layer, but will not appear
# in the booted root.
rpm-ostree override remove nano

# Rollback.
rpm-ostree rollback

# Make changes to the kernel's boot arguments.
rpm-ostree kargs \
  --append=rd.driver.blacklist=nouveau \
  --append=modprobe.blacklist=nouveau \
  --append=nvidia-drm.modeset=1

# Preview changes on the current filesystem.
rpm-ostree ex apply-live

Package layering

Package layering works by modifying your Silverblue installation by extending the packages from which Silverblue is composed.

Using package layering creates a new deployment, or bootable filesystem root which does not affect your current root. This means that the system must be rebooted after a package has been layered.

If you don't want to reboot your system to switch to the new deployment, you can use rpm-ostree ex apply-live to update the current filesystem and be able to see the changes from the new deployment. It's generally expected that you use package layering sparingly, and use flatpaks and toolbox.

Further readings