Clone a deployment

I have fedora coreos 41 running fine with current deployment.
Now I want to test some changes in /etc and grub which are risky to brick the box.
So I would like to proceed safer:

  1. clone current deployemnt to deployment-test
  2. boot from deployment-test
  3. do changes
  4. reboot and test changes
  5. if all ok make deployment-test default else scrap it and go back to original deployment.

I need help how to perform step 1)

root@mostro:/boot# rpm-ostree status
State: idle
Deployments:
● fedora:fedora/x86_64/coreos/stable
Version: 41.20241109.3.0 (2024-11-25T02:09:37Z)
Commit: 870e2c8fd02e81652b30bc9a33b5da9d47de66c8bc2bae0a3739ecf38f652660
GPGSignature: Valid signature by 466CF2D8B60BC3057AA9453ED0622462E99D6AD1
Pinned: yes

Since you have already pinned your current deployment, it will not be deleted until you unpin it. To temporarily boot the previous OS deployment, hold down Shift during the OS boot process. When the bootloader menu appears, select the relevant OS entry in the menu. To permanently revert to the previous OS deployment, log into the target node and run the sudo rpm-ostree rollback command.

These are possible workarounds on Silverblue, I assume they work on CoreOS too:

  • run the tests on a newer deployment (obtained with rpm-ostree upgrade), if it is not required to perform the tests on that specific deployment mentioned;
    or
  • layer an insignificant package on the existing deployment, to create a new one with (almost) the same structure.

The point is that atm I have only one deployement, that is why I am asking how to clone it to keep a back

As far as I know, there is no command to “clone” a Fedora CoreOS deployment. As already suggested, you can try the following command to see if it will create a new deployment.

sudo rpm-ostree upgrade --bypass-driver

1 Like

You should be able to create a copy of the current deployment by adding a (random, ignored) kernel argument with rpm-ostree kargs ....