赞
踩
原文链接:统信UOS桌面操作系统1060上将4.19内核升级到5.10内核
hello,大家好啊,今天给大家带来一篇在统信UOS桌面操作系统1060上将4.19内核升级到5.10内核的文章,操作相对比较简单,但是请具有Linux专业知识人员进行操作。请您知悉:升级内核对于Linux而言具有很大的风险,可能会导致系统奔溃等多种问题,切勿盲目操作,本文为您提供一种内核升级的思路,不对您的任何操作负责,请您知悉。切记:谨慎操作,非必要不操作。
0、首先给大家介绍在新系统安装时,如何选择安装5.10内核的系统
0.1、在页面跳转到grub界面后,选择Other options
0.2、选择Install UOS Desktop 20 (with kernel 5.10)
0.3、安装完成查看系统信息
uos@uos-PC:~/Desktop$ uname -a
Linux uos-PC 5.10.0-arm64-desktop #20.00.60.20-release SMP Wed Jun 7 16:37:02 CST 2023 aarch64 GNU/Linux
uos@uos-PC:~/Desktop$ cat /etc/os-version
[Version]
SystemName=UOS Desktop
SystemName[zh_CN]=统信桌面操作系统
ProductType=Desktop
ProductType[zh_CN]=桌面
EditionName=Professional
EditionName[zh_CN]=专业版
MajorVersion=20
MinorVersion=1060
OsBuild=11014.100.100
uos@uos-PC:~/Desktop$
1、查看系统的信息,内核是4.19
uos@uos-PC:~/Desktop$ uname -a
Linux uos-PC 4.19.0-arm64-desktop #6030 SMP Tue Jun 27 15:28:10 CST 2023 aarch64 GNU/Linux
uos@uos-PC:~/Desktop$ cat /etc/os-version
[Version]
SystemName=UOS Desktop
SystemName[zh_CN]=统信桌面操作系统
ProductType=Desktop
ProductType[zh_CN]=桌面
EditionName=Professional
EditionName[zh_CN]=专业版
MajorVersion=20
MinorVersion=1060
OsBuild=11014.100.100
uos@uos-PC:~/Desktop$
2、查看linux-image-4.19.0-arm64-desktop及linux-headers-4.19.0-arm64-desktop安装包版本
uos@uos-PC:~/Desktop$ apt policy linux-image-4.19.0-arm64-desktop linux-image-4.19.0-arm64-desktop: 已安装:4.19.90-6030 候选: 4.19.90-6030 版本列表: *** 4.19.90-6030 500 500 https://professional-packages.chinauos.com/desktop-professional eagle/non-free arm64 Packages 100 /usr/lib/dpkg-db/status 4.19.90-4204 500 500 https://professional-packages.chinauos.com/desktop-professional eagle/main arm64 Packages uos@uos-PC:~/Desktop$ apt policy linux-headers-4.19.0-arm64-desktop linux-headers-4.19.0-arm64-desktop: 已安装:4.19.90-6030 候选: 4.19.90-6030 版本列表: *** 4.19.90-6030 500 500 https://professional-packages.chinauos.com/desktop-professional eagle/non-free arm64 Packages 100 /usr/lib/dpkg-db/status 4.19.90-4204 500 500 https://professional-packages.chinauos.com/desktop-professional eagle/main arm64 Packages uos@uos-PC:~/Desktop$
3、如果可以连接公网,使用apt install在线安装linux-image-5.10.0-arm64-desktop linux-headers-5.10.0-arm64-desktop
uos@uos-PC:~/Desktop$ sudo apt install linux-image-5.10.0-arm64-desktop linux-headers-5.10.0-arm64-desktop -y 请输入密码: 验证成功 正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信息... 完成 下列软件包是自动安装的并且现在不需要了: libutempter0 squashfs-tools x11-apps x11-session-utils xbitmaps xinit 使用'sudo apt autoremove'来卸载它(它们)。 下列【新】软件包将被安装: linux-headers-5.10.0-arm64-desktop linux-image-5.10.0-arm64-desktop 升级了 0 个软件包,新安装了 2 个软件包,要卸载 0 个软件包,有 27 个软件包未被升级。 需要下载 57.9 MB 的归档。 解压缩后会消耗 287 MB 的额外空间。 获取:1 https://professional-packages.chinauos.com/desktop-professional eagle/non-free arm64 linux-headers-5.10.0-arm64-desktop arm64 20.00.60.20-release [7,665 kB] 获取:2 https://professional-packages.chinauos.com/desktop-professional eagle/non-free arm64 linux-image-5.10.0-arm64-desktop arm64 20.00.60.20-release [50.2 MB] 已下载 57.9 MB,耗时 11秒 (5,114 kB/s) 正在选中未选择的软件包 linux-headers-5.10.0-arm64-desktop。 (正在读取数据库 ... 系统当前共安装有 198266 个文件和目录。) 准备解压 .../linux-headers-5.10.0-arm64-desktop_20.00.60.20-release_arm64.deb ... 正在解压 linux-headers-5.10.0-arm64-desktop (20.00.60.20-release) ... /var/cache/apt/archives/linux-headers-5.10.0-arm64-desktop_20.00.60.20-release_arm64.deb 正在选中未选择的软件包 linux-image-5.10.0-arm64-desktop。 准备解压 .../linux-image-5.10.0-arm64-desktop_20.00.60.20-release_arm64.deb ... 正在解压 linux-image-5.10.0-arm64-desktop (20.00.60.20-release) ... /var/cache/apt/archives/linux-image-5.10.0-arm64-desktop_20.00.60.20-release_arm64.deb 正在设置 linux-headers-5.10.0-arm64-desktop (20.00.60.20-release) ... 正在设置 linux-image-5.10.0-arm64-desktop (20.00.60.20-release) ... Error! The dkms.conf for this module includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch. This indicates that it should not be built. update-initramfs: Generating /boot/initrd.img-5.10.0-arm64-desktop cryptsetup: WARNING: The initramfs image may not contain cryptsetup binaries nor crypto modules. If that's on purpose, you may want to uninstall the 'cryptsetup-initramfs' package in order to disable the cryptsetup initramfs integration and avoid this warning. setupcon is missing. Please install the 'console-setup' package. W: plymouth: The plugin label.so is missing, the selected theme might not work as expected. W: plymouth: You might want to install the plymouth-themes package to fix this. I: The initramfs will attempt to resume from /dev/dm-0 I: (/dev/mapper/group1-SWAP) I: Set the RESUME variable to override this. live-boot: core filesystems devices utils udev blockdev dns. Adding IMA binaries fix systemd/logind config 正在生成 grub 配置文件 ... Found theme: /boot/grub/themes/deepin-fallback/theme.txt Found background image: /boot/grub/themes/deepin-fallback/background.jpg Found linux image: /boot/vmlinuz-5.10.0-arm64-desktop Found initrd image: /boot/initrd.img-5.10.0-arm64-desktop Found linux image: /boot/vmlinuz-4.19.0-arm64-desktop Found initrd image: /boot/initrd.img-4.19.0-arm64-desktop Found image: /boot/vmlinuz-5.10.0-arm64-desktop Found initrd image: /boot/initrd.img-5.10.0-arm64-desktop Adding boot menu entry for EFI firmware configuration done uos@uos-PC:~/Desktop$
4、重启系统
uos@uos-PC:~/Desktop$ reboot
5、查看linux-headers-5.10.0-arm64-desktop及linux-headers-5.10.0-arm64-desktop安装包
uos@uos-PC:~/Desktop$ apt policy linux-headers-5.10.0-arm64-desktop linux-headers-5.10.0-arm64-desktop: 已安装:20.00.60.20-release 候选: 20.00.60.20-release 版本列表: *** 20.00.60.20-release 500 500 https://professional-packages.chinauos.com/desktop-professional eagle/non-free arm64 Packages 100 /usr/lib/dpkg-db/status uos@uos-PC:~/Desktop$ apt policy linux-headers-5.10.0-arm64-desktop linux-headers-5.10.0-arm64-desktop: 已安装:20.00.60.20-release 候选: 20.00.60.20-release 版本列表: *** 20.00.60.20-release 500 500 https://professional-packages.chinauos.com/desktop-professional eagle/non-free arm64 Packages 100 /usr/lib/dpkg-db/status uos@uos-PC:~/Desktop$
6、查看当前系统信息,目前内核已经是5.10
uos@uos-PC:~/Desktop$ uname -a
Linux uos-PC 5.10.0-arm64-desktop #20.00.60.20-release SMP Wed Jun 7 16:37:02 CST 2023 aarch64 GNU/Linux
uos@uos-PC:~/Desktop$ cat /etc/os-version
[Version]
SystemName=UOS Desktop
SystemName[zh_CN]=统信桌面操作系统
ProductType=Desktop
ProductType[zh_CN]=桌面
EditionName=Professional
EditionName[zh_CN]=专业版
MajorVersion=20
MinorVersion=1060
OsBuild=11014.100.100
uos@uos-PC:~/Desktop$
7、如果需要升级的系统是内网环境无法连接公网,可以在能够连接公网的机器上下载离线包
root@uos-PC:/var/cache/apt/archives# apt install -d linux-headers-5.10.0-arm64-desktop 正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信息... 完成 下列软件包是自动安装的并且现在不需要了: libutempter0 squashfs-tools x11-apps x11-session-utils xbitmaps xinit 使用'apt autoremove'来卸载它(它们)。 下列【新】软件包将被安装: linux-headers-5.10.0-arm64-desktop 升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 75 个软件包未被升级。 需要下载 7,665 kB 的归档。 解压缩后会消耗 48.8 MB 的额外空间。 获取:1 https://professional-packages.chinauos.com/desktop-professional eagle/non-free arm64 linux-headers-5.10.0-arm64-desktop arm64 20.00.60.20-release [7,665 kB] 已下载 7,665 kB,耗时 7秒 (1,106 kB/s) 于“仅下载”模式中下载完毕 root@uos-PC:/var/cache/apt/archives# apt install -d linux-image-5.10.0-arm64-desktop -y 正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信息... 完成 下列软件包是自动安装的并且现在不需要了: libutempter0 squashfs-tools x11-apps x11-session-utils xbitmaps xinit 使用'apt autoremove'来卸载它(它们)。 下列【新】软件包将被安装: linux-image-5.10.0-arm64-desktop 升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 75 个软件包未被升级。 需要下载 50.2 MB 的归档。 解压缩后会消耗 238 MB 的额外空间。 获取:1 https://professional-packages.chinauos.com/desktop-professional eagle/non-free arm64 linux-image-5.10.0-arm64-desktop arm64 20.00.60.20-release [50.2 MB] 已下载 50.2 MB,耗时 5秒 (10.5 MB/s) 于“仅下载”模式中下载完毕 root@uos-PC:/var/cache/apt/archives#
8、将下载好的离线包导入到内网中需要升级内核的系统上
9、使用dpkg命令安装离线包
uos@uos-PC:~/Desktop$ sudo dpkg -i linux-* 正在选中未选择的软件包 linux-headers-5.10.0-arm64-desktop。 (正在读取数据库 ... 系统当前共安装有 198224 个文件和目录。) 准备解压 linux-headers-5.10.0-arm64-desktop_20.00.60.20-release_arm64.deb ... 正在解压 linux-headers-5.10.0-arm64-desktop (20.00.60.20-release) ... /home/uos/Desktop/linux-headers-5.10.0-arm64-desktop_20.00.60.20-release_arm64.deb 正在选中未选择的软件包 linux-image-5.10.0-arm64-desktop。 准备解压 linux-image-5.10.0-arm64-desktop_20.00.60.20-release_arm64.deb ... 正在解压 linux-image-5.10.0-arm64-desktop (20.00.60.20-release) ... /home/uos/Desktop/linux-image-5.10.0-arm64-desktop_20.00.60.20-release_arm64.deb 正在设置 linux-headers-5.10.0-arm64-desktop (20.00.60.20-release) ... 正在设置 linux-image-5.10.0-arm64-desktop (20.00.60.20-release) ... Error! The dkms.conf for this module includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch. This indicates that it should not be built. update-initramfs: Generating /boot/initrd.img-5.10.0-arm64-desktop cryptsetup: WARNING: The initramfs image may not contain cryptsetup binaries nor crypto modules. If that's on purpose, you may want to uninstall the 'cryptsetup-initramfs' package in order to disable the cryptsetup initramfs integration and avoid this warning. setupcon is missing. Please install the 'console-setup' package. W: plymouth: The plugin label.so is missing, the selected theme might not work as expected. W: plymouth: You might want to install the plymouth-themes package to fix this. I: The initramfs will attempt to resume from /dev/sda3 I: (UUID=16a444b6-c950-48f0-b2dc-e39d19e0c842) I: Set the RESUME variable to override this. live-boot: core filesystems devices utils udev blockdev dns. Adding IMA binaries fix systemd/logind config 正在生成 grub 配置文件 ... Found theme: /boot/grub/themes/deepin-fallback/theme.txt Found background image: /boot/grub/themes/deepin-fallback/background.jpg Found linux image: /boot/vmlinuz-5.10.0-arm64-desktop Found initrd image: /boot/initrd.img-5.10.0-arm64-desktop Found linux image: /boot/vmlinuz-4.19.0-arm64-desktop Found initrd image: /boot/initrd.img-4.19.0-arm64-desktop Found image: /boot/vmlinuz-5.10.0-arm64-desktop Found initrd image: /boot/initrd.img-5.10.0-arm64-desktop Adding boot menu entry for EFI firmware configuration done uos@uos-PC:~/Desktop$
10、查看linux-headers-5.10.0-arm64-desktop及linux-headers-5.10.0-arm64-desktop安装包
uos@uos-PC:~/Desktop$ apt policy linux-image-5.10.0-arm64-desktop linux-image-5.10.0-arm64-desktop: 已安装:20.00.60.20-release 候选: 20.00.60.20-release 版本列表: *** 20.00.60.20-release 500 500 https://professional-packages.chinauos.com/desktop-professional eagle/non-free arm64 Packages 100 /usr/lib/dpkg-db/status uos@uos-PC:~/Desktop$ apt policy linux-headers-5.10.0-arm64-desktop linux-headers-5.10.0-arm64-desktop: 已安装:20.00.60.20-release 候选: 20.00.60.20-release 版本列表: *** 20.00.60.20-release 500 500 https://professional-packages.chinauos.com/desktop-professional eagle/non-free arm64 Packages 100 /usr/lib/dpkg-db/status uos@uos-PC:~/Desktop$ reboot
11、查看当前系统信息,目前内核已经是5.10
uos@uos-PC:~/Desktop$ uname -a
Linux uos-PC 5.10.0-arm64-desktop #20.00.60.20-release SMP Wed Jun 7 16:37:02 CST 2023 aarch64 GNU/Linux
uos@uos-PC:~/Desktop$ cat /etc/os-version
[Version]
SystemName=UOS Desktop
SystemName[zh_CN]=统信桌面操作系统
ProductType=Desktop
ProductType[zh_CN]=桌面
EditionName=Professional
EditionName[zh_CN]=专业版
MajorVersion=20
MinorVersion=1060
OsBuild=11014.100.100
uos@uos-PC:~/Desktop$
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。