从Fedora Silverblue 32升级到Fedora Silverblue 33

本简要指南将引导您完成从Fedora Silverblue 32升级到Fedora Silverblue 33的步骤。升级Fedora Silverblue非常简单,快捷! 它比其他传统的Linux桌面操作系统要快得多。 如果升级到最新版本后出现问题,我们可以轻松回滚到以前的工作版本。 现在让我们开始从Silverblue 32升级Silverblue 33。

在升级当前的Fedora Silveblue版本之前,请确保您已 备份所有重要数据 你承受不起损失。

更新Fedora Silverblue

检查当前安装的Fedora Silverblue版本:

$ cat /etc/fedora-release 
Fedora release 32 (Thirty Two)

检查Fedora Silverblue版本

如您在上面的输出中看到的,我当前正在使用Fedora Silverblue 32版本。

当通知栏中有新更新时,您将收到通知。 另外,您可以从命令行中检查更新,如下所示。

让我们检查可用更新,而无需使用命令下载它们:

$ rpm-ostree upgrade --check

样本输出:

1 metadata, 0 content objects fetched; 592 B transferred in 4 seconds; 0 bytes content written
Enabled rpm-md repositories: fedora-cisco-openh264 fedora updates
Updating metadata for 'fedora-cisco-openh264'... done
rpm-md repo 'fedora-cisco-openh264'; generated: 2020-08-25T19:05:18Z
Updating metadata for 'fedora'... done
rpm-md repo 'fedora'; generated: 2020-04-22T22:22:36Z
Updating metadata for 'updates'... done
rpm-md repo 'updates'; generated: 2020-12-26T01:07:01Z
Importing rpm-md... done
AvailableUpdate:
        Version: 32.20201226.0 (2020-12-26T00:49:11Z)
         Commit: ee54ef5c6ac567ea0f088ca9314794358def0ae0a544061a5a59342cb260ae04
   GPGSignature: Valid signature by 97A1AE57C3A2372CCA3A4ABA6C13026D12C944D0
  SecAdvisories: 4 unknown severity, 3 low, 12 moderate, 2 important
           Diff: 299 upgraded, 2 removed, 5 added

检查可用更新,而无需在Fedora Silverblue中下载它们

要更新Fedora Silverblue中的所有软件包,只需运行:

$ rpm-ostree upgrade

样本输出:

⠂ Receiving objects: 99% (2562/2570) 900.3 kB/s 173.8 MB 
Receiving objects: 99% (2562/2570) 900.3 kB/s 173.8 MB... done
Checking out tree ee54ef5... done
Enabled rpm-md repositories: fedora-cisco-openh264 fedora updates
Updating metadata for 'fedora-cisco-openh264'... done
rpm-md repo 'fedora-cisco-openh264'; generated: 2020-08-25T19:05:18Z
Updating metadata for 'fedora'... done
rpm-md repo 'fedora'; generated: 2020-04-22T22:22:36Z
Updating metadata for 'updates'... done
rpm-md repo 'updates'; generated: 2020-12-26T01:07:01Z
Importing rpm-md... done
Resolving dependencies... done
Will download: 1 package (314.9 kB)
Downloading from 'updates'... done
Importing packages... done
Relabeling... done
Checking out packages... done
Running pre scripts... done
Running post scripts... done
Running posttrans scripts... done
Writing rpmdb... done
Writing OSTree commit... done
Staging deployment... done
Freed: 831.1 MB (pkgcache branches: 1)
Upgraded:
  at-spi2-core 2.36.0-1.fc32 -> 2.36.1-1.fc32
  avahi 0.7-23.fc32 -> 0.7-24.fc32
  avahi-glib 0.7-23.fc32 -> 0.7-24.fc32
  avahi-libs 0.7-23.fc32 -> 0.7-24.fc32
.
.
.
xorg-x11-server-common 1.20.8-1.fc32 -> 1.20.10-1.fc32
  yelp 2:3.36.0-1.fc32 -> 2:3.36.2-1.fc32
  yelp-libs 2:3.36.0-1.fc32 -> 2:3.36.2-1.fc32
Removed:
  dbxtool-8-12.fc32.x86_64
  libidn-1.35-7.fc32.x86_64
Added:
  criu-libs-3.15-1.fc32.x86_64
  fwupd-plugin-flashrom-1.5.3-1.fc32.x86_64
  fwupd-plugin-modem-manager-1.5.3-1.fc32.x86_64
  inih-49-1.fc32.x86_64
  libva-2.7.1-1.fc32.x86_64
Run "systemctl reboot" to start a reboot

更新Fedora Silverblue中的所有软件包更新Fedora Silverblue中的所有软件包

重新启动系统以应用更新:

$ systemctl reboot 

从Fedora Silverblue 32升级到Fedora Silverblue 33

您可以通过以下任一方式升级到最新的Fedora Silverblue GNOME软件 或从命令行使用 ostree 命令。

如果您喜欢图形方式,请从Dash打开GNOME软件应用程序,然后转到 更新 标签。 您将看到有一个新的Fedora版本可以升级。 单击下载按钮,然后按照屏幕上的说明进行操作。

Fedora 33升级通知窗口Fedora 33升级通知窗口

如果您更喜欢命令行方式,请打开终端并使用以下命令检查所有可用分支:

$ ostree remote refs fedora 

样本输出:

[...]
fedora:fedora/33/ppc64le/silverblue 
fedora:fedora/33/ppc64le/testing/silverblue 
fedora:fedora/33/ppc64le/updates/silverblue 
fedora:fedora/33/x86_64/silverblue 
fedora:fedora/33/x86_64/testing/silverblue 
fedora:fedora/33/x86_64/updates/silverblue
fedora:fedora/33/x86_64/silverblue
fedora:fedora/rawhide/aarch64/atomic-host
fedora:fedora/rawhide/aarch64/silverblue 
fedora:fedora/rawhide/ppc64le/atomic-host 
fedora:fedora/rawhide/ppc64le/silverblue 
fedora:fedora/rawhide/x86_64/atomic-host 
fedora:fedora/rawhide/x86_64/silverblue 
fedora:fedora/rawhide/x86_64/workstation 
fedora:fedora/x86_64/coreos/next 
fedora:fedora/x86_64/coreos/stable 
fedora:fedora/x86_64/coreos/testing 

是的,Fedora Silverblue 33分支可用。

现在,运行以下命令从Fedora Silverblue 32升级到Fedora Silverblue 33:

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

样本输出:

⠦ Receiving objects: 99% (40995/40996) 389.5 kB/s 1.1 GB 
Receiving objects: 99% (40995/40996) 389.5 kB/s 1.1 GB... done
Checking out tree fb397c6... done
Enabled rpm-md repositories: fedora-cisco-openh264 fedora updates
Updating metadata for 'fedora-cisco-openh264'... done
rpm-md repo 'fedora-cisco-openh264'; generated: 2020-08-25T19:10:34Z
Updating metadata for 'fedora'... done
rpm-md repo 'fedora'; generated: 2020-10-19T23:27:19Z
Updating metadata for 'updates'... done
rpm-md repo 'updates'; generated: 2020-12-26T00:57:48Z
Importing rpm-md... done
Resolving dependencies... done
Will download: 2 packages (324.2 kB)
Downloading from 'fedora'... done
Downloading from 'updates'... done
Importing packages... done
Checking out packages... done
Running pre scripts... done
Running post scripts... done
Running posttrans scripts... done
Writing rpmdb... done
Writing OSTree commit... done
Staging deployment... done
Freed: 43.6 MB (pkgcache branches: 0)
Upgraded:
  GConf2 3.2.6-27.fc31 -> 3.2.6-29.fc33
  ModemManager 1.12.8-1.fc32 -> 1.14.6-1.fc33
  ModemManager-glib 1.12.8-1.fc32 -> 1.14.6-1.fc33
.
.
.
  uresourced-0.3.0-1.fc33.x86_64
  zram-generator-0.2.0-4.fc33.x86_64
  zram-generator-defaults-0.2.0-4.fc33.noarch
Run "systemctl reboot" to start a reboot

从Fedora Silverblue 32升级到Fedora Silverblue 33从Fedora Silverblue 32升级到Fedora Silverblue 33

这与系统更新非常相似。 上面的命令将下载新的操作系统并将其安装在后台。

升级完成后,重新引导系统以登录到新升级的Fedora Silverblue 33桌面。

$ systemctl reboot

您可能已经注意到,我没有使用 sudo 权限在任何地方。 这很正常; 当您在安装程序中将自己设置为具有管理员权限的用户时,意味着您已配置为通过 rpm-ostree 不需要 sudo

登录到新升级的Fedora Silverblue 33版本后,只需检查其版本以确认操作系统是否已成功升级:

$ cat /etc/fedora-release 
Fedora release 33 (Thirty Three)

在Fedora中检查操作系统版本在Fedora中检查操作系统版本

是的,确实是Fedora 33 Silverblue。 您也可以在“设置”窗口中进行确认。 单击顶部栏上的向下箭头按钮,然后选择“设置”。

打开Fedora设置窗口打开Fedora设置窗口

在About部分中,您将看到Fedora OS名称以及其他详细信息:

检查Fedora桌面操作系统版本检查Fedora桌面操作系统版本

恭喜你! 您已成功升级到Fedora Silverblue 33。

降级Fedora Silverblue

如简介部分所述,如果升级到最新版本后有任何问题,则可以回滚到以前的版本。 要将Fedora Silverblue降级或回滚到以前的工作版本,请参考以下指南:

  • 如何将Fedora Silverblue回滚到以前的版本

资源:

相关阅读:

  • 如何在Fedora中加速DNF软件包管理器

FedoraFedora 33Fedora SilverblueLinuxLinux升级

Sidebar