如何将 Silverblue 重定位到 Fedora Linux 39
Silverblue Fedora
![](/data/attachment/album/202311/11/152119r6nv12c115vntzp4.png)


[Fedora Silverblue](https://docs.fedoraproject.org/en-US/fedora-silverblue/) 是 一款基于 Fedora Linux 构建的面向桌面的操作系统。这款操作系统非常适合日常使用、开发和容器化的工作流程。它有 [许多优势](https://fedoramagazine.org/give-fedora-silverblue-a-test-drive/)，例如可以在发生问题时轻松回滚操作。如果你想在 Fedora Silverblue 系统上更新或将系统 <ruby> 重定位 <rt>  rebase </rt></ruby> 到 Fedora Linux 39，本文会提供帮助。文章不仅会指导你执行操作，还会教你如何在遇到意外情况时撤销操作。


### 更新你目前的系统


在实际重定位至 Fedora Linux 39 前，你需要先安装所有待处理的更新。你可以在终端中使用下面的命令：



```
$ rpm-ostree update

```

或者你也可以通过 GNOME “软件”应用安装更新，然后重新启动系统。


### 使用 GNOME “软件” 重定位


在 GNOME “软件”应用的更新页面上，你可以看到 Fedora Linux 的新版本已经可以使用。


首先，你需要点击 “<ruby> 下载 <rt>  Download </rt></ruby>” 按钮来下载新的操作系统镜像。这个过程可能需要一些时间。完成后，你会发现更新已经准备好进行安装。


接下来，点击 “<ruby> 重新启动 &amp; 升级 <rt>  Restart &amp; Upgrade </rt></ruby>” 按钮。这个过程只需要几分钟，一旦更新完成，计算机将会重新启动。重启后，你会看到崭新的 Fedora Linux 39 的系统环境，看起来很简单，是吧？


### 使用终端进行重定位


如果你更喜欢在终端操作，那么这部分指南就是为你准备的。


首先你需要确认 39 版本是否已经可以使用：



```
$ ostree remote refs fedora

```

在命令输出中你应该看到如下内容：



```
fedora:fedora/39/x86_64/silverblue

```

如果你想保留当前的部署（这意味着这个部署将会持续在 GRUB 中显示为一个选项，直到你手动移除它），你可以通过运行下面的命令实现：



```
# 0 是在 rpm-ostree 状态中的条目位置
$ sudo ostree admin pin 0

```

如果你想移除已经固定的部署，你可以使用下面的命令：



```
# 2 是在 rpm-ostree 状态中的条目位置
$ sudo ostree admin pin --unpin 2

```

然后，将你的系统重定位至 Fedora Linux 39 镜像。



```
$ rpm-ostree rebase fedora:fedora/39/x86_64/silverblue

```

最后，重启你的电脑，启动进入 Fedora Linux 39 版本。


### 如何进行回滚


如果遇到任何问题（例如，如果你无法启动 Fedora Linux 39），回滚是非常容易的。在系统启动时，在 GRUB 菜单中选择 Fedora Linux 39 之前的版本，然后你的系统就会启动这个更早的版本而非 Fedora Linux 39。如果你在启动过程中看不到 GRUB 菜单，那么在启动时尝试按下 `ESC` 键。如果你想让更早版本的选择永久生效，你可以使用下面的命令：



```
$ rpm-ostree rollback

```

现在，你已经了解如何将 Fedora Silverblue 系统重定位到 Fedora Linux 39，以及如何进行系统回滚了。那么何不今天就试试看呢？


### 常见问题解答


在每篇关于重定位 Silverblue 到新版本的文章的评论中，总会有相似的问题，因此我会在这个部分尝试解答这些问题。


**问题：在 Fedora 的重定位过程中我能跳过某些版本吗？例如直接从 Fedora 37 Silverblue 更新到 Fedora 39 Silverblue。**


答案：虽然有时可能可以在重定位过程中跳过某些版本，但并不推荐这样操作。你应当始终更新到紧邻的新版本（例如从 38 更新到 39），以避免不必要的错误。


**问题：我安装了 [rpm-fusion](https://rpmfusion.org/) ，在重定位过程中出现错误，我应当怎样进行重定位？**


答案：如果你在 Silverblue 安装上加入了 [rpm-fusion](https://rpmfusion.org/)，你在重定位前应当执行以下操作：



```
rpm-ostree update \
    --uninstall rpmfusion-free-release \
    --uninstall rpmfusion-nonfree-release \
    --install rpmfusion-free-release \
    --install rpmfusion-nonfree-release

```

执行完上述操作后，你可以按照本篇博文的步骤完成重定位过程。


**问题：这个指南是否适用于其他的 ostree 版本（例如 Kinoite， Sericea）？**


答案：是的，你可以照着本指南的 *使用终端进行重定位* 部分的操作来完成所有的 Fedora ostree 版本的重定位过程。只需要使用对应的分支即可。例如对于 Kinoite，你可以使用



```
fedora:fedora/39/x86_64/kinoite

```

而非



```
fedora:fedora/39/x86_64/silverblue

```

*（题图：MJ/71150afc-ae44-48f3-8689-e86758e07b1e）*




---


via: <https://fedoramagazine.org/how-to-rebase-to-fedora-linux-39-on-silverblue/>


作者：[Michal Konečný](https://fedoramagazine.org/author/zlopez/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[ChatGPT](https://linux.cn/lctt/ChatGPT) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
Fedora Silverblue is [an operating system for your desktop built on Fedora Linux](https://docs.fedoraproject.org/en-US/fedora-silverblue/). It’s excellent for daily use, development, and container-based workflows. It offers [numerous advantages](https://fedoramagazine.org/give-fedora-silverblue-a-test-drive/) such as being able to roll back in case of any problems. If you want to update or rebase to Fedora Linux 39 on your Fedora Silverblue system, this article tells you how. It not only shows you what to do, but also how to revert things if something unforeseen happens.

## Update your existing system

Prior to actually doing the rebase to Fedora Linux 39, you should apply any pending updates. Enter the following in the terminal:

$ rpm-ostree update

or install updates through GNOME Software and reboot.

## Rebasing using GNOME Software

GNOME Software shows you that there is new version of Fedora Linux available on the Updates screen.

First thing you need to do is download the new image, so click on the *Download* button. This will take some time. When it’s done you will see that the update is ready to install.

Click on the *Restart & Upgrade* button. This step will take only a few moments and the computer will be restarted when the update is completed. After the restart you will end up in new and shiny release of Fedora Linux 39. Easy, isn’t it?

## Rebasing using terminal

If you prefer to do everything in a terminal, then this part of the guide is for you.

Rebasing to Fedora Linux 39 using the terminal is easy. First, check if the 39 branch is available:

$ ostree remote refs fedora

You should see the following in the output:

fedora:fedora/39/x86_64/silverblue

If you want to pin the current deployment (meaning that this deployment will stay as an option in GRUB until you remove it), you can do it by running:

# 0 is entry position in rpm-ostree status $ sudo ostree admin pin 0

To remove the pinned deployment use the following command:

# 2 is entry position in rpm-ostree status $ sudo ostree admin pin --unpin 2

Next, rebase your system to the Fedora Linux 39 branch.

$ rpm-ostree rebase fedora:fedora/39/x86_64/silverblue

Finally, the last thing to do is restart your computer and boot to Fedora Linux 39.

## How to roll back

If anything bad happens (for instance, if you can’t boot to Fedora Linux 39 at all) it’s easy to go back. At boot time, pick the entry in the GRUB menu for the version prior to Fedora Linux 39 and your system will start in that previous version rather than Fedora Linux 39. If you don’t see the GRUB menu, try to press ESC during boot. To make the change to the previous version permanent, use the following command:

$ rpm-ostree rollback

That’s it. Now you know how to rebase Fedora Silverblue to Fedora Linux 39 and roll back. So why not do it today?

## FAQ

Because there are similar questions in comments for each article about rebasing to newer version of Silverblue I will try to answer them in this section.

**Question: Can I skip versions during rebase of Fedora? For example from Fedora 37 Silverblue to Fedora 39 Silverblue?**

Answer: Although it could be sometimes possible to skip versions during rebase, it is not recommended. You should always update to one version above (38->39 for example) to avoid unnecessary errors.

**Question: I have rpm-fusion layered and I got errors during rebase. How should I do the rebase?**

Answer: If you have [rpm-fusion](https://rpmfusion.org/) layered on your Silverblue installation, you should do the following before rebase (this is a single line command, beware the wrapping):

rpm-ostree update --uninstall rpmfusion-free-release --uninstall rpmfusion-nonfree-release --install rpmfusion-free-release --install rpmfusion-nonfree-release

After doing this you can follow the guide in this blog post.

**Question: Could this guide be used for another ostree editions (Kinoite, Sericea)?**

Yes, you can follow the *Rebasing using the terminal* part of this guide for every ostree edition of Fedora. Just use the corresponding branch. For example for Kinoite use

## Steven

It was an easy upgrade in GNOME Software. Thanks to all!

## Lennart Jern

Nice, easy upgrade, as usual!

One weird thing though: my terminal is now light/white colored even though I use dark theme everywhere. Anyone else having this issue?

## SuperTux

Is it possible to rebase to kinoite or other variations when using silverblue ?

## TopDAW

Thank you very much! The update did not show up in GNOME software so I rebased manually. This did not initially work until I saw your tip about rpm-fusion.

All good now – brilliant!

## Brant

Hi SuperTux,

You can actually, I didn’t have any issues upon testing Silverblue -> Kinoite but upon rolling back Gnome’s default file icons seem bugged (.config file errors). So I can’t say how reliable going back and forth would be natively. Also you’ll likely have leftover desktop environment files in your .config so you may need to look for them and delete them. This will also likely fix any bugs between switching back and forth.

Good luck and enjoy. Can always test on Gnome Boxes too!

## Grandpa Leslie Satenstein

I have 3 other partitions, including 2 other backup partitions.

How do I get these into a clean silver-blue installation?

## Ashberian

Using Silverblue-Kinoite and just upgraded to v39.

Run into some issues upgrading through Discover, had to remove rpmfusion-free &non-free repos before upgrading, for that i used the single line uninstall/install command from this article however it didn’t work… until i just used two single line commands to uninstall both repos, one after another. Then i finally proceeded to update/rebase without noticeable issues.

Now on Kinoite 39 trying to reinstall both repos, however it always show the same error:

“error: Packages not found: rpmfusion-free-release, rpmfusion-nonfree-release”

## Norman

Thank you Michal Konečný for writing your article “How to rebase to Fedora Linux 39 on Silverblue”.