ubuntu 20.04升级到22.04中遇到的问题(by quqi99)

Posted quqi99

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ubuntu 20.04升级到22.04中遇到的问题(by quqi99)相关的知识,希望对你有一定的参考价值。

作者:张华 发表于:2022-04-23
版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本版权声明
( http://blog.csdn.net/quqi99 )

昨天通过’sudo do-release-upgrade -d’将ubuntu 20.04升级到了ubuntu 22.04 (注:从LTS版本升级到LTS版本一般得等8月份第1个小版本出来才会正式将22.04标为LTS,在此之前应加-d参数).

autofs与sssd冲突的问题

升级之后,今天发现一个问题,autofs不好使了.通过下列命令调试时看到了sssd字眼.

sudo systemdctl stop autofs
sudo automount --debug -f

发现sssd无法启动,将sssd删除之后(apt purge sssd) autofs就恢复正常了.

nfsv4不work的问题

还有一个问题,在升级之后nfs4不work了(mount -t nfs -s -o nfsvers=4,rw,rsize=32768,wsize=32768 nas:/Public /nas),待查,先不得不降到nfs3

$ cat /etc/auto.direct
/nas    -fstype=nfs,nfsvers=3,rw,rsize=32768,wsize=32768     nas:/Public
$ cat /etc/auto.direct
/nas    -fstype=nfs,nfsvers=3,rw,rsize=32768,wsize=32768     nas:/Public

使用下列方法debug nfs(也可使用:rpcdebug -m nfs -s all), 并看到下列错误,似乎是kernel 5.15与nfsv4(nfs-common)不work - https://bugzilla.redhat.com/show_bug.cgi?id=1719903

# https://www.serverstack.com/blog/2012/11/21/debugging-nfs-file-access-on-server-and-client-side/index.html
sudo rpcdebug -m nfs -s proc
sudo tail -f /var/log/syslog
sudo mount -t nfs -o nfsvers=4 nas:/Public /mnt/tmp

Apr 24 09:07:13 t440p kernel: [84981.523081] nfs41_sequence_process: Error 0 free the slot 
Apr 24 09:07:13 t440p kernel: [84981.523102] nfs4_proc_get_locations: FSID 52706b7bf323e1f3:0 on "nas"
Apr 24 09:07:13 t440p kernel: [84981.523106] nfs4_proc_get_locations at 000000006bf14052 is 28 bytes, crc: 0x83e7aee1:
Apr 24 09:07:13 t440p kernel: [84981.523109]  01000700 01007204 00000000 52706b7b
Apr 24 09:07:13 t440p kernel: [84981.523111]  f323e1f3 00000000 00000000
Apr 24 09:07:13 t440p kernel: [84981.523115] --> nfs41_call_sync_prepare data->seq_server 00000000209ff6e2

正常的切换到ubuntu 18.04,nfsv4正常并有下列日志:

Apr 24 09:15:52 node1 kernel: [  113.578775] NFS call  setclientid auth=UNIX, 'Linux NFSv4.0 node1/192.168.99.238'
Apr 24 09:15:52 node1 kernel: [  113.579047] NFS reply setclientid: 0
Apr 24 09:15:52 node1 kernel: [  113.579048] NFS call  setclientid_confirm auth=UNIX, (client ID 1de13162db060000)
Apr 24 09:15:52 node1 kernel: [  113.579636] NFS reply setclientid_confirm: 0
Apr 24 09:15:52 node1 kernel: [  113.579681] NFS call  setclientid auth=UNIX, 'Linux NFSv4.0 node1/192.168.99.238'
Apr 24 09:15:52 node1 kernel: [  113.580082] NFS reply setclientid: 0
Apr 24 09:15:52 node1 kernel: [  113.580083] NFS call  setclientid_confirm auth=UNIX, (client ID 1de13162db060000)
Apr 24 09:15:52 node1 kernel: [  113.580702] NFS reply setclientid_confirm: 0
Apr 24 09:15:52 node1 kernel: [  113.580714] --> nfs4_get_lease_time_prepare
Apr 24 09:15:52 node1 kernel: [  113.580715] <-- nfs4_get_lease_time_prepare
Apr 24 09:15:52 node1 kernel: [  113.581092] --> nfs4_get_lease_time_done
Apr 24 09:15:52 node1 kernel: [  113.581094] <-- nfs4_get_lease_time_done
Apr 24 09:15:52 node1 kernel: [  113.583488] NFS call  lookup Public
Apr 24 09:15:52 node1 kernel: [  113.583709] NFS reply lookup: 0
Apr 24 09:15:52 node1 kernel: [  113.583712] NFS call  lookup Public
Apr 24 09:15:52 node1 kernel: [  113.584106] NFS reply lookup: 0

无法ssh到dropbear的问题

另外,还遇到一个ssh问题,报:no matching host key type found. Their offer: ssh-rsa, 通过下列方法解决:

$ tail -n3 /etc/ssh/ssh_config
    KexAlgorithms +diffie-hellman-group1-sha1
    HostkeyAlgorithms +ssh-dss,ssh-rsa
    PubkeyAcceptedKeyTypes +ssh-dss,ssh-rsa

gnome lunar-calendar插件无法显示中文的问题

升级到ubuntu 22.04之后,发现我之前在20.04下一直使用的一些gnome插件消失了(如跨时区显示时间,如天气,截屏, 具体见: https://extensions.gnome.org/local/ ). 在运行下列命令并重启机器之后截屏恢复了,但天气和跨时区显示时间的还是未恢复.

sudo apt install gnome-shell-extensions gnome-tweaks gnome-shell-extension-manager chrome-gnome-shell -y
then need to reboot the machine
sudo systemctl status display-manager

另外,发现之前安装的农历日历无论怎么弄也无法显示中文了,只好临时禁用掉 - https://extensions.gnome.org/extension/675/lunar-calendar/

其他设置

也做了其他一些设置:

# avoid: update-notifier.desktop[132410]: Cannot stat file /proc/3829/fd/1023: Permission denied
sudo apt purge update-notifier update-notifier-common -y

# avoid: /usr/lib/systemd/system-generators/netplan failed with exit status 1.
sudo mv /etc/netplan/01-network-manager-all.yaml /etc/netplan/01-network-manager-all.yaml_bak
sudo netplan apply

# fwupd-refresh.service: Main process exited
# https://github.com/fwupd/fwupd/issues/2058
fwupdmgr refresh -v
fwupdtool get-updatessudo 
sudo systemctl disable fwupd-refresh

以上是关于ubuntu 20.04升级到22.04中遇到的问题(by quqi99)的主要内容,如果未能解决你的问题,请参考以下文章

ubuntu 20.04升级到22.04中遇到的问题(by quqi99)

Ubuntu 20.04 Ubuntu 22.04 系统创建用户并授权sudo权限

ubuntu18.04/20.04/22.04安装显卡驱动与显卡信息查询

Ubuntu22.04 LTS 正式发布及新功能

Ubuntu22.04 LTS 正式发布及新功能

从 Ubuntu 19.10 升级到 20.04 后缺少 Distutils 文件夹的问题