如何在 Silverblue 上变基到 Fedora 33？
Silverblue
![](/data/attachment/album/202012/02/232440exewdbwdhde4mqhv.jpg)


Silverblue 是[一个建立在 Fedora 之上的桌面操作系统](https://docs.fedoraproject.org/en-US/fedora-silverblue/)。它非常适合日常使用、开发和基于容器的工作流程。它提供了[众多的优势](https://fedoramagazine.org/give-fedora-silverblue-a-test-drive/)，例如在出现任何问题时能够回滚。如果你想在你的 Silverblue 系统上更新到 Fedora 33，这篇文章会告诉你如何做。它不仅告诉你该怎么做，还告诉你如果发生了不可预见的事情时该如何回退。


在实际做变基到 Fedora 33 之前，你应该应用任何挂起的更新。在终端中输入以下内容：



```
$ rpm-ostree update

```

或通过 GNOME 软件中心安装更新并重启。


### 使用 GNOME 软件中心变基


GNOME 软件中心会在更新界面显示有新版本的 Fedora 可用。


![Fedora 33 is available](/data/attachment/album/202012/02/232543jp115s1eocp5p5ji.png)


首先你需要做的是下载新镜像，点击 “Download” 按钮。这将需要一些时间，完成后你会看到更新已经准备好安装了。


![Fedora 33 is ready for installation](/data/attachment/album/202012/02/232544ng5rgzpakwffgezc.png)


点击 “Install” 按钮。这一步只需要几分钟，然后会提示你重启电脑。


![Restart is needed to rebase to Fedora 33 Silverblue](/data/attachment/album/202012/02/232545pzcngqqnquknqd77.png)


点击 “Restart” 按钮就可以了。重启后，你将进入新的 Fedora 33 版本。很简单，不是吗？


### 使用终端变基


如果你喜欢在终端上做所有的事情，那么接下来的指南就适合你。


使用终端变基到 Fedora 33 很简单。首先，检查 33 版本分支是否可用：



```
$ ostree remote refs fedora

```

你应该在输出中看到以下内容：



```
fedora:fedora/33/x86_64/silverblue

```

接下来，将你的系统变基到 Fedora 33 分支。



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

```

最后要做的是重启你的电脑并启动到 Fedora 33。


### 如何回滚


如果有什么不好的事情发生。例如，如果你无法启动到 Fedora 33，那很容易回滚回去。在启动时选择 GRUB 菜单中的前一个条目，你的系统就会以切换到 Fedora 33 之前的状态启动。要使这一改变永久化，请使用以下命令：



```
$ rpm-ostree rollback

```

就是这样了。现在你知道如何将 Silverblue 变基为 Fedora 33 并回滚了。那为什么不在今天就做呢？




---


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


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


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


OK
Silverblue is [an operating system for your desktop built on Fedora](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 to Fedora 33 on your 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.

Prior to actually doing the rebase to Fedora 33, 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

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

![](https://fedoramagazine.org/wp-content/uploads/2020/10/Screenshot-from-2020-10-29-12-53-37-1024x725.png)

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

![](https://fedoramagazine.org/wp-content/uploads/2020/10/Screenshot-from-2020-10-29-13-00-15-1024x722.png)

Click on the *Install* button. This step will take only a few moments and then you will be prompted to restart your computer.

![](https://fedoramagazine.org/wp-content/uploads/2020/10/Screenshot-from-2020-10-29-13-01-32-1024x727.png)

Click on *Restart* button and you are done. After restart you will end up in new and shiny release of Fedora 33. Easy, isn’t it?

## Rebasing using terminal

If you prefer to do everything in a terminal, than this next guide is for you.

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

$ ostree remote refs fedora

You should see the following in the output:

fedora:fedora/33/x86_64/silverblue

Next, rebase your system to the Fedora 33 branch.

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

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

## How to roll back

If anything bad happens—for instance, if you can’t boot to Fedora 33 at all—it’s easy to go back. Pick the previous entry in the GRUB menu at boot, and your system will start in its previous state before switching to Fedora 33. To make this change permanent, use the following command:

$ rpm-ostree rollback

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

## Juanje Ojeda

Thanks for the article. I upgraded yesterday and it was very smooth, but I had to remove the rpmfusion to be able to do the rebase:

rpm-ostree rebase fedora:fedora/33/x86_64/silverblue –uninstall=rpmfusion-nonfree-release-32-1.noarch –uninstall=rpmfusion-free-release-32-1.noarch

Using those parameters, everything was fine.

## Juanje Ojeda

Sorry, the parameters ‘uninstall’ have two dashes (‘–uninstall’) but, for some reason, they don’t show at comment.

## Si Dao

You save my ass, thanks

## Kyra

And then you can also install the next rpmfusion version at the same time!

https://twitter.com/unlambda/status/1328135774093647873

## Dmitriy

$ ostree remote refs fedora

do not work for me:

ostree remote refs fedora

Usage:

ostree remote refs [OPTION…] NAME

List remote refs

Help Options:

-h, –help Show help options

Application Options:

–repo=PATH Path to OSTree repository (defaults to current directory or /sysroot/ostree/repo)

–cache-dir Use custom cache dir

-v, –verbose Print debug information during command processing

–version Print version information and exit

error: Command requires a –repo argument

Any help?

## Michal Konečný

It looks like your fedora remote is named differently.

Could you try

?

## Dmitriy

Thanks but no:

ostree remote list

Usage:

ostree remote list [OPTION…]

List remote repository names

Help Options:

-h, –help Show help options

Application Options:

–repo=PATH Path to OSTree repository (defaults to current directory or /sysroot/ostree/repo)

-u, –show-urls Show remote URLs in list

-v, –verbose Print debug information during command processing

–version Print version information and exit

error: Command requires a –repo argument

## Michal Konečný

Look in the

You should find the remotes available there.

Could you also try running

to check what version of Fedora you are exactly running.

## leslie Satenstein

Nice explanation about work done. Thank you

## Ian

Apologies for the stupid question, I’m not a techhead. I’m assuming this process does not convert any ext4 partitions to btrfs? Is there a way to do that, other than a clean install?

Thanks,

## Stephen Snow

When I converted my Silverblue system to BTRFS, I chose rsync to backup my home to an external storage device. I then did a fresh install and used rsync to restore my home. There is an ext4 to btrfs conversion tool included with the btrfs utilities, but it is currently considered experimental and the general consensus I found was it would be a bad idea.