Silverblue: Difference between revisions

From Halfface
Jump to navigation Jump to search
No edit summary
 
(22 intermediate revisions by the same user not shown)
Line 2: Line 2:
=ostree=
=ostree=


==Basic Commands==
=Basic Commands=
Update to latest
==Update to latest==
  rpm-ostree upgrade
  rpm-ostree upgrade
Get system status
==Get system status. Installed rpm:s are defined as LayeredPackages==
  rpm-ostree status
  rpm-ostree status
Find available updates
==Find available updates==
  rpm-ostree upgrade --check
  rpm-ostree upgrade --check
Switch to a different OS
==Find suitable repository.==
  rpm-ostree rebase <REMOTE>:<BRANCH>
ostree remote refs fedora | grep silverblue | grep x86_64
Replace
==Set repository. Switch os. Upgrade/downgrade==
rpm-ostree rebase fedora:fedora/rawhide/x86_64/silverblue
  rpm-ostree rebase fedora:fedora/41/x86_64/silverblue
 
==Replace==
  rpm-ostree override remove nfs-utils-coreos --install nfs-utils
  rpm-ostree override remove nfs-utils-coreos --install nfs-utils
==Remotes==
==list installed rpm-ostree installed packages==
Add a remote
rpm-ostree status --json | jq -r '.deployments[]|select(.booted==true)|"packages: " + ( .packages | join(" ") ),"removal: " + ( ."requested-base-removals" | join(" ") ),"localpackages: " + ( ."requested-local-packages" | join(" ") )'
 
==add repo==
sudo curl https://copr.fedorainfracloud.org/coprs/ojab/openvpn3/repo/fedora-40/ojab-openvpn3-fedora-40.repo -o /etc/yum.repos.d/openvpn3.repo
==add repo via dnf copr enable==
toolbox create
toolbox enter
dnf copr enable -y dsommers/openvpn3-devsnapshots
copy file under /etc/yum.repos.d/
Example
<pre>
cat > /etc/yum.repos.d/_copr:copr.fedorainfracloud.org:dsommers:openvpn3-devsnapshots.repo << 'EOF'
[copr:copr.fedorainfracloud.org:dsommers:openvpn3-devsnapshots]
name=Copr repo for openvpn3-devsnapshots owned by dsommers
baseurl=https://download.copr.fedorainfracloud.org/results/dsommers/openvpn3-devsnapshots/fedora-$releasever-$basearch/
type=rpm-md
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://download.copr.fedorainfracloud.org/results/dsommers/openvpn3-devsnapshots/pubkey.gpg
repo_gpgcheck=0
enabled=1
enabled_metadata=1
EOF
</pre>
 
=Remotes=
==Add a remote==
  ostree remote add <REMOTE> <URL>
  ostree remote add <REMOTE> <URL>
Remove a remote
==Remove a remote==
  ostree remote delete <REMOTE>
  ostree remote delete <REMOTE>
List configured remotes
==List configured remotes==
  ostree remote list
  ostree remote list
List remote contents
==List remote contents==
  ostree remote refs <REMOTE>
  ostree remote refs <REMOTE>
==Layered Packages==
==Layered Packages==
Uninstall a layered package
Uninstall a layered package
Line 27: Line 58:
Install a layered package
Install a layered package
  rpm-ostree install <PACKAGE>
  rpm-ostree install <PACKAGE>
==Debugging and Rollback==
Install without reboot
Remove the previous deployment
rpm-ostree install --apply-live <packages>
 
=Debugging and Rollback=
==Remove the previous deployment==
  rpm-ostree cleanup --rollback
  rpm-ostree cleanup --rollback
Download older commits
==Download older commits==
  ostree pull --commit-metadata-only --depth=<n> <REMOTE> <BRANCH>
  ostree pull --commit-metadata-only --depth=<n> <REMOTE> <BRANCH>
Make the previous deployment the default boot entry
==Make the previous deployment the default boot entry==
  rpm-ostree rollback
  rpm-ostree rollback
List downloaded commits
==List downloaded commits==
  ostree log <REMOTE>:<BRANCH>
  ostree log <REMOTE>:<BRANCH>
=make rpm available strait away=
rpm-ostree install --apply-live <rpm>
=remove rpm=
rpm-ostree uninstall <rpm>


=Replace rpm=
=Replace rpm=
  rpm-ostree override replace <path to package>
  rpm-ostree override replace <path to package>
=ostree-remote - Control remote repository configuration=
Find suitable repository.
ostree remote refs fedora | grep silverblue | grep x86_64
Set repository. Switch os.
rpm-ostree rebase fedora:fedora/rawhide/x86_64/silverblue
=Display the status of the currently running deployment=
Installed rpm:s are defined as LayeredPackages
rpm-ostree status
=pin a deployment so that you do not lose it=
=pin a deployment so that you do not lose it=
  ostree admin pin 0
  ostree admin pin 0
Unpin
Unpin
  ostree admin pin --unpin 0
  ostree admin pin --unpin 0

Latest revision as of 12:55, 11 November 2024

Fedora Silverblue's immutable design.

ostree

Basic Commands

Update to latest

rpm-ostree upgrade

Get system status. Installed rpm:s are defined as LayeredPackages

rpm-ostree status

Find available updates

rpm-ostree upgrade --check

Find suitable repository.

ostree remote refs fedora | grep silverblue | grep x86_64

Set repository. Switch os. Upgrade/downgrade

rpm-ostree rebase fedora:fedora/rawhide/x86_64/silverblue
rpm-ostree rebase fedora:fedora/41/x86_64/silverblue

Replace

rpm-ostree override remove nfs-utils-coreos --install nfs-utils

list installed rpm-ostree installed packages

rpm-ostree status --json | jq -r '.deployments[]|select(.booted==true)|"packages: " + ( .packages | join(" ") ),"removal: " + ( ."requested-base-removals" | join(" ") ),"localpackages: " + ( ."requested-local-packages" | join(" ") )'

add repo

sudo curl https://copr.fedorainfracloud.org/coprs/ojab/openvpn3/repo/fedora-40/ojab-openvpn3-fedora-40.repo -o /etc/yum.repos.d/openvpn3.repo

add repo via dnf copr enable

toolbox create
toolbox enter
dnf copr enable -y dsommers/openvpn3-devsnapshots
copy file under /etc/yum.repos.d/

Example

cat > /etc/yum.repos.d/_copr:copr.fedorainfracloud.org:dsommers:openvpn3-devsnapshots.repo << 'EOF'
[copr:copr.fedorainfracloud.org:dsommers:openvpn3-devsnapshots]
name=Copr repo for openvpn3-devsnapshots owned by dsommers
baseurl=https://download.copr.fedorainfracloud.org/results/dsommers/openvpn3-devsnapshots/fedora-$releasever-$basearch/
type=rpm-md
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://download.copr.fedorainfracloud.org/results/dsommers/openvpn3-devsnapshots/pubkey.gpg
repo_gpgcheck=0
enabled=1
enabled_metadata=1
EOF

Remotes

Add a remote

ostree remote add <REMOTE> <URL>

Remove a remote

ostree remote delete <REMOTE>

List configured remotes

ostree remote list

List remote contents

ostree remote refs <REMOTE>

Layered Packages

Uninstall a layered package

rpm-ostree uninstall <PACKAGE>

Install a layered package

rpm-ostree install <PACKAGE>

Install without reboot

rpm-ostree install --apply-live <packages>

Debugging and Rollback

Remove the previous deployment

rpm-ostree cleanup --rollback

Download older commits

ostree pull --commit-metadata-only --depth=<n> <REMOTE> <BRANCH>

Make the previous deployment the default boot entry

rpm-ostree rollback

List downloaded commits

ostree log <REMOTE>:<BRANCH>

Replace rpm

rpm-ostree override replace <path to package>

pin a deployment so that you do not lose it

ostree admin pin 0

Unpin

ostree admin pin --unpin 0