2

Fedora 32 升级到 Fedora 33

 2 years ago
source link: https://ttys3.dev/post/fedora32-upgrade-to-fedora33/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

October 29, 2020

Fedora 33 在 10月27号准时发布。

官方公告见这儿: https://fedoramagazine.org/announcing-fedora-33/

从官方公告的HTML meta article:published_time 可看到, 文章发布时间为 2020-10-27T14:00:14+00:00, 也就是 CST 2020-10-27 22:00 左右。 老灯现在写文章的时候为 Thu Oct 29 01:03:39 AM CST 2020, 因此距离 Fedora 33正式发布已经整整一天多时间了。

如何从F32升级到F33

步骤基本上是一样的,参考我之前的文章 《 Fedora 31 升级到 Fedora 32

选择合适的镜像站

❯ date
Wed 28 Oct 2020 10:17:21 PM CST


--- mirrors.ustc.edu.cn ping statistics ---
100 packets transmitted, 100 received, 0% packet loss, time 99112ms
rtt min/avg/max/mdev = 33.822/46.199/287.057/43.688 ms


--- cdnmirrors.s.tuna.tsinghua.edu.cn ping statistics ---
100 packets transmitted, 86 received, 14% packet loss, time 100655ms
rtt min/avg/max/mdev = 54.097/65.754/270.979/35.645 ms


--- opentuna.cn ping statistics ---
100 packets transmitted, 100 received, 0% packet loss, time 99131ms
rtt min/avg/max/mdev = 7.345/17.239/266.296/38.896 ms

如果是看ping的结果的话, 看上去 opentuna.cn 是最佳选项。 但是 opentuna 没有 rpmfusion 源, 作为一个 Fedora 用户rpmfusion 源几乎是必须的。 因此,老灯这里直接pass掉opentuna 源。

其它源,同步不够及时或有其它问题,暂时还没法用于 Fedora 33:

比如上海交大的, 还没同步 F33 源。https://mirrors.sjtug.sjtu.edu.cn/fedora/linux/releases/33/ 直接404 ustc 的同步是有问题(或者不及时)的, https://mirrors.ustc.edu.cn/fedora/releases/33/Modular/x86_64/os/repodata/ 下面完全是空的。

最好老灯测试,只有 tuna 的源(https://mirrors.tuna.tsinghua.edu.cn/fedora)是同步OK的。

老灯把所有源(Fedora 和 rpmfusion)都换成 tuna 的 (因为截止到当前时间, ustc和sjtug的源还没法用于F33):

cd /etc/yum.repos.d
sed -i 's|mirrors.ustc.edu.cn|mirrors.tuna.tsinghua.edu.cn|g' `rg -l mirrors.ustc.edu.cn`

升级系统到F33

升级过程还是非常顺利的,基本上参数官方文档: https://docs.fedoraproject.org/en-US/quick-docs/dnf-system-upgrade/

# 首先确保系统更新到F31当前最新版
sudo dnf upgrade --refresh

# 安装dnf system-upgrade 插件(如果没有安装过的话)
sudo dnf install dnf-plugin-system-upgrade
# 下载升级文件, 注意这里的--releasever=32, 下次如果要升级到33, 只需要改动这里 --releasever=33 即可
sudo dnf system-upgrade download --refresh --releasever=32

# 确认前面的操作都进行OK了,就可以执行以下命令开始升级
sudo dnf system-upgrade reboot

我在升级过程中还是遇到点小问题的,不过有惊无险:

/etc/yum.repos.d root@8700k 3m 40s
❯ dnf system-upgrade download --refresh --releasever=33
Ignoring repositories: copr:copr.fedorainfracloud.org:prince781:vala-language-server, scootersoftware
No match for group package "lsvpd"
No match for group package "xorg-x11-drv-armsoc"
No match for group package "k3b-extras-freeworld"
No match for group package "powerpc-utils"
No match for group package "gstreamer1-plugins-bad-nonfree"
No match for group package "cvsgraph"
...
No match for group package "fedora-user-agent-chrome"
No match for group package "google-croscore-cousine-fonts"
Error: 
 Problem: package gstreamer1-plugins-ugly-free-devel-1.16.2-2.fc32.x86_64 requires gstreamer1-plugins-ugly-free = 1.16.2-2.fc32, but none of the providers can be installed
  - gstreamer1-plugins-ugly-free-1.16.2-2.fc32.x86_64 does not belong to a distupgrade repository
  - problem with installed package gstreamer1-plugins-ugly-free-devel-1.16.2-2.fc32.x86_64
(try to add '--skip-broken' to skip uninstallable packages)

前面的 No match 其实可以通过--skip-broken参数解决,但是这个Error是要人工介入处理的。 错误信息已经提示我们了,因此直接移除掉gstreamer1-plugins-ugly-free-devel就好了:

dnf remove gstreamer1-plugins-ugly-free-devel

然后继续接着下载:

dnf system-upgrade download --refresh --releasever=33 --skip-broken

输出大概如下:

/etc/yum.repos.d root@8700k
❯ dnf system-upgrade download --refresh --releasever=33 --skip-broken
Before you continue ensure that your system is fully upgraded by running "dnf --refresh upgrade". Do you want to continue [y/N]: y
...
Ignoring repositories: copr:copr.fedorainfracloud.org:prince781:vala-language-server
No match for group package "lsvpd"
No match for group package "k3b-extras-freeworld"
No match for group package "xorg-x11-drv-armsoc"
No match for group package "powerpc-utils"
...
No match for group package "tharlon-fonts"
No match for group package "oflb-icelandic-fonts"
Dependencies resolved.
==============================================================================================================================================================================================================================================
 Package                                                                  Architecture                        Version                                                                Repository                                          Size
==============================================================================================================================================================================================================================================
Installing:
 kernel                                                                   x86_64                              5.8.16-300.fc33                                                        updates                                            6.9 k
 kernel-core                                                              x86_64                              5.8.16-300.fc33                                                        updates                                             33 M
 kernel-devel                                                             x86_64                              5.8.16-300.fc33                                                        updates                                             13 M
 kernel-modules                                                           x86_64                              5.8.16-300.fc33                                                        updates                                             30 M
 kernel-modules-extra                                                     x86_64                              5.8.16-300.fc33                                                        updates                                            2.0 M
Upgrading:
 GConf2                                                                   x86_64                              3.2.6-29.fc33                                                          fedora                                             1.0 M
 GeoIP                                                                    x86_64                              1.6.12-8.fc33                                                          fedora                                             121 k
 GeoIP-GeoLite-data                                                       noarch                              2018.06-6.fc33                                                         fedora                                             681 k
 GeoIP-devel                                                              x86_64                              1.6.12-8.fc33                                                          fedora                                              12 k
 GraphicsMagick                                                           x86_64                              1.3.35-3.fc33                                                          fedora                                             1.5 M
 GraphicsMagick-devel                                                     x86_64                              1.3.35-3.fc33                                                          fedora                                              71 k
 ...
 python3-libdnf                                                           x86_64                              0.54.2-2.fc33                                                          updates                                            775 k
 qbittorrent                                                              x86_64                              1:4.2.5-4.fc33                                                         fedora                                             5.7 M
 yum                                                                      noarch                              4.4.0-2.fc33                                                           updates                                             43 k
Upgrading Groups:
 Anaconda tools                                                                                                                                                                                                                              
 base-x                                                                                                                                                                                                                                      
 C Development Tools and Libraries                                                                                                                                                                                                           
 Container Management                                                                                                                                                                                                                        
 Development Tools                                                                                                                                                                                                                           
 Firefox Web Browser                                                                                                                                                                                                                         
 Guest Desktop Agents                                                                                                                                                                                                                        
 LibreOffice                                                                                                                                                                                                                                 
 Common NetworkManager Submodules                                                                                                                                                                                                            
 Printing Support                                                                                                                                                                                                                            
 Fedora Workstation product core                                                                                                                                                                                                             
 x86 Baremetal Tools                                                                                                                                                                                                                         
 GNOME Desktop Environment                                                                                                                                                                                                                   
 Multimedia                                                                                                                                                                                                                                  
 Core                                                                                                                                                                                                                                        
 Fonts                                                                                                                                                                                                                                       
 Hardware Support                                                                                                                                                                                                                            
 Sound and Video                                                                                                                                                                                                                             

Transaction Summary
==============================================================================================================================================================================================================================================
Install     187 Packages
Upgrade    2537 Packages
Remove        8 Packages
Downgrade    24 Packages

Total download size: 3.0 G
DNF will only download packages, install gpg keys, and check the transaction.
Is this ok [y/N]: 

y 回车后就开始下载. 大概下载了 3GB 的文件:

(2748/2748): xorg-x11-drv-nvidia-libs-455.28-1.fc33.x86_64.rpm                                                                                                                                                6.2 MB/s |  78 MB     00:12    
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                         3.3 MB/s | 3.0 GB     15:18     
warning: /var/lib/dnf/system-upgrade/updates-236f50538cae036d/packages/cpp-10.2.1-5.fc33.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 9570ff31: NOKEY
Fedora 33 - x86_64 - Updates                                                                                                                                                                                  1.6 MB/s | 1.6 kB     00:00    
Importing GPG key 0x9570FF31:
 Userid     : "Fedora (33) <[email protected]>"
 Fingerprint: 963A 2BEB 0200 9608 FE67 EA42 49FD 7749 9570 FF31
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-33-x86_64
Is this ok [y/N]: y
Key imported successfully
warning: /var/lib/dnf/system-upgrade/rpmfusion-free-83022c35002eaaf4/packages/svt-hevc-libs-1.5.0-2.fc33.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID d651ff2e: NOKEY
RPM Fusion for Fedora 33 - Free                                                                                                                                                                               1.6 MB/s | 1.7 kB     00:00    
Importing GPG key 0xD651FF2E:
 Userid     : "RPM Fusion free repository for Fedora (2020) <[email protected]>"
 Fingerprint: E9A4 91A3 DE24 7814 E7E0 67EA E06F 8ECD D651 FF2E
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-33
Is this ok [y/N]: y
Key imported successfully
warning: /var/lib/dnf/system-upgrade/rpmfusion-nonfree-09983ab4040af696/packages/akmod-nvidia-455.28-1.fc33.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID 94843c65: NOKEY
RPM Fusion for Fedora 33 - Nonfree                                                                                                                                                                            1.6 MB/s | 1.7 kB     00:00    
Importing GPG key 0x94843C65:
 Userid     : "RPM Fusion nonfree repository for Fedora (2020) <[email protected]>"
 Fingerprint: 79BD B88F 9BBF 7391 0FD4 095B 6A2A F961 9484 3C65
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-nonfree-fedora-33
Is this ok [y/N]: y
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Complete!
Download complete! Use 'dnf system-upgrade reboot' to start the upgrade.
To remove cached metadata and transaction use 'dnf system-upgrade clean'
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.

执行 dnf system-upgrade reboot 后,系统卡了1分钟左右(黑屏状态)才显示console, 然后成功重启。

重启成功后,GRUB 菜单还是 F32 的选项的,因为更新还没安装嘛。进入之后,整个屏是黑的,有个光标在闪,怀疑是N卡显卡驱动问题。 不过实际上是在进行升级安装过程的,我怎么知道的?我是后面才知道的。 黑屏了,我并没有马上强制按电源键关机再启动。而是出去抽了根烟,然后等了个几分钟再回来看。发现还是黑屏。 于是我按电源键强制关机了,再启动的时候,发现熟悉的 Fedora 33 Grub启动项。

本次升级, 没有翻车。

但是有点后怕,这种情况黑屏的时候,还应该等待久一些(比如给它20分钟或30分钟的时间)再关机会更保险,毕竟看不到console不好判断系统升级是否正常结束。

安装完之后,需要进入 https://extensions.gnome.org/local/ 升级一下 GNOME 扩展。 升级完GNOME扩展有些会默认显示ERROR不工作, 要退出登录再登录一下。

F33 的改变

不得不说, Fedora 每次发版本都会带来新鲜玩意, 改动大刀阔斧,有时甚至能带来惊喜。

内核版本基本上和 F32 一样:

Linux 8700k.localhost 5.8.16-200.fc32.x86_64 #1 SMP Mon Oct 19 14:17:16 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Linux 8700k.localhost 5.8.16-300.fc33.x86_64 #1 SMP Mon Oct 19 13:18:33 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

官方默认是 GNOME3, 其它 DE 的可从 spins https://spins.fedoraproject.org/en/ 下载到。

GNOME 升级到 3.38 https://www.gnome.org/news/2020/09/gnome-3-38-released/

btrfs 作为默认的文件系统 https://fedoramagazine.org/btrfs-coming-to-fedora-33/

Network Time Security (NTS) 支持, 但是要注意: The default NTP client in Fedora is chrony. Chrony added NTS support in version 4.0. The default configuration hasn’t changed. Chrony still uses public servers from the pool.ntp.org project and NTS is not enabled by default.

参考 https://fedoramagazine.org/secure-ntp-with-nts/

除了 x86_64 架构的,alternate architectures: ARM AArch64, Power, and S390x 也可在 https://alt.fedoraproject.org/alt/ 下载到。 改进了对 Pine64,NVidia Jetson 64, Rockchip SoC(如Rock960, RockPro64, and Rock64等)的支持。

提供专门的 IoT 版本下载, 采用 OSTree技术, 目前支持的架构有 aarch64armhfpx86_64

系统底层库升级,如 Binutils 2.34, GNU C Library 2.32, Update the system JDK in Fedora from java-1.8.0-openjdk to java-11-openjdk, LLVM 11, GNU make 4.3,RPM 4.16, Sqlite RpmDB(Change format of the RPM database from Berkeley DB to a new Sqlite format.), swap on zram, systemd-resolved, Enable systemd-resolved by default. glibc will perform name resolution using nss-resolve rather than nss-dns.

编程语言库升级,包括 Python 3.9, Node.js 14.x, Ruby on Rails 6.0, and Perl 5.32, Golang 1.15 等

EarlyOOM 服务 (earlyoom.service) 默认开启可改善内存不足时的用户体验。

nano 被设置成了 系统默认的编辑器, 这一点老灯承认, 明智之举。因为会Vim的人会自己配置 EDITOR=vim, 不会Vim的人才会用默认的 nano.

完整的列表请见官方文档: https://fedoraproject.org/wiki/Releases/33/ChangeSet

其它参考资料

https://fedoraproject.org/wiki/Releases/33/ChangeSet

https://docs.fedoraproject.org/en-US/quick-docs/dnf-system-upgrade/

https://www.fosslinux.com/43968/fedora-33-whats-new-and-how-to-upgrade.htm

https://www.cyberciti.biz/faq/upgrade-fedora-31-to-fedora-32-using-the-cli/

https://fedorapeople.org/groups/schedule/f-33/f-33-key-tasks.html


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK