openEuler学习05-kernel升级
周末没事,尝试下openEuler的kernel升级
[root@localhost ~]# more /etc/os-release
NAME="openEuler"
VERSION="20.03 (LTS-SP3)"
ID="openEuler"
VERSION_ID="20.03"
PRETTY_NAME="openEuler 20.03 (LTS-SP3)"
ANSI_COLOR="0;31"
[root@db253 ~]# uname -r
4.19.90-2112.8.0.0131.oe1.x86_64
查看当前机器已安装的内核版本及启动顺序
[root@localhost ~]# awk -F\' '$1=="menuentry " {print $2}' /etc/grub2-efi.cfg
0 : openEuler (4.19.90-2112.8.0.0131.oe1.x86_64) 20.03 (LTS-SP3)
1 : openEuler (0-rescue-1cdbb66cf8f8450b8345d313a329ea00) 20.03 (LTS-SP3)
[root@localhost ~]# yum list kernel
Last metadata expiration check: 0:54:47 ago on Sat 09 Dec 2023 09:18:50 AM CST.
Installed Packages
kernel.x86_64????????????????????????????????????????????????????????????? 4.19.90-2112.8.0.0131.oe1?????????????????????????????????????????????????????????????? @anaconda
Available Packages
kernel.src???????????????????????????????????????????????????????????????? 4.19.90-2112.8.0.0131.oe1?????????????????????????????????????????????????????????????? source? ?
kernel.x86_64 ?
??????????????????????????????????????????????????????????? 4.19.90-2312.1.0.0229.oe1?????????????????????????????????????????????????????????????? update? ?
[root@localhost ~]# yum -y install kernel
Last metadata expiration check: 0:56:05 ago on Sat 09 Dec 2023 09:18:50 AM CST.
Package kernel-4.19.90-2112.8.0.0131.oe1.x86_64 is already installed.
Dependencies resolved.
============================================================================================================================================================================
?Package???????????????????????????? Architecture??????????????????????? Version????????????????????????????????????????????????? Repository?????????????????????????? Size
============================================================================================================================================================================
Installing:
?kernel????????????????????????????? x86_64????????????????????????????? 4.19.90-2312.1.0.0229.oe1??????????????????????????????? update?????????????????????????????? 42 M
Transaction Summary
============================================================================================================================================================================
Install? 1 Package
Total download size: 42 M
Installed size: 211 M
Downloading Packages:
[MIRROR] kernel-4.19.90-2312.1.0.0229.oe1.x86_64.rpm: Curl error (18): Transferred a partial file for http://repo.openeuler.org/openEuler-20.03-LTS-SP3/update/x86_64/Packages/kernel-4.19.90-2312.1.0.0229.oe1.x86_64.rpm [transfer closed with 38673887 bytes remaining to read]
kernel-4.19.90-2312.1.0.0229.oe1.x86_64.rpm????????????????????????????????????????????????????????????????????????????????????????????????? 47 kB/s |? 42 MB???? 15:33?? ?
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? 47 kB/s |? 42 MB???? 15:33??? ?
update?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? 30 kB/s | 2.1 kB???? 00:00?? ?
Importing GPG key 0xB25E7F66:
?Userid???? : "private OBS (key without passphrase) <defaultkey@localobs>"
?Fingerprint: 12EA 74AC 9DF4 8D46 C69C A0BE D557 065E B25E 7F66
?From?????? : http://repo.openeuler.org/openEuler-20.03-LTS-SP3/OS/x86_64/RPM-GPG-KEY-openEuler
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
? Preparing??????? :??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? 1/1
? Installing?????? : kernel-4.19.90-2312.1.0.0229.oe1.x86_64??????????????????????????????????????????????????????????????????????????????????????????????????????????? 1/1
? Running scriptlet: kernel-4.19.90-2312.1.0.0229.oe1.x86_64??????????????????????????????????????????????????????????????????????????????????????????????????????????? 1/1
? Verifying??????? : kernel-4.19.90-2312.1.0.0229.oe1.x86_64??????????????????????????????????????????????????????????????????????????????????????????????????????????? 1/1
Installed:
? kernel-4.19.90-2312.1.0.0229.oe1.x86_64????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ?
Complete!
安装后 查看机器已安装的内核版本及启动顺序
[root@localhost ~]# awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2-efi.cfg
0 : openEuler (4.19.90-2312.1.0.0229.oe1.x86_64) 20.03 (LTS-SP3)
1 : openEuler (4.19.90-2112.8.0.0131.oe1.x86_64) 20.03 (LTS-SP3)
2 : openEuler (0-rescue-1cdbb66cf8f8450b8345d313a329ea00) 20.03 (LTS-SP3)
[root@localhost ~]#? reboot
Connection closing...Socket close.
Connection closed by foreign host.
Disconnected from remote host(0000-172.16.55.253) at 10:50:22.
Type `help' to learn how to use Xshell prompt.
[C:\~]$
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.
Authorized users only. All activities may be monitored and reported.
WARNING! The remote SSH server rejected X11 forwarding request.
Authorized users only. All activities may be monitored and reported.
Welcome to 4.19.90-2312.1.0.0229.oe1.x86_64
System information as of time: ??
System load: ?? ?0.29
Processes: ?? ?198
Memory used: ?? ?1.4%
Swap used: ?? ?0%
Usage On: ?? ?5%
Users online: ?? ?2
[root@localhost ~]# uname -a
Linux localhost.localdomain 4.19.90-2312.1.0.0229.oe1.x86_64 #1 SMP Wed Dec 6 03:11:49 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]#
升级的第2个方法,rpm安装kernel 下载kernel到/opt目录下
[root@localhost opt]#? curl -# -O http://repo.openeuler.org/openEuler-20.03-LTS-SP3/update/x86_64/Packages/kernel-4.19.90-2312.1.0.0229.oe1.x86_64.rpm --output? kernel-4.19.90-2312.1.0.0229.oe1.x86_64.rpm
或者
[root@localhost opt]# wget http://repo.openeuler.org/openEuler-20.03-LTS-SP3/update/x86_64/Packages/kernel-4.19.90-2312.1.0.0229.oe1.x86_64.rpm
--2023-12-09 10:18:30--? http://repo.openeuler.org/openEuler-20.03-LTS-SP3/update/x86_64/Packages/kernel-4.19.90-2312.1.0.0229.oe1.x86_64.rpm
Resolving repo.openeuler.org (repo.openeuler.org)... 49.0.230.196
Connecting to repo.openeuler.org (repo.openeuler.org)|49.0.230.196|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 44442120 (42M) [application/x-redhat-package-manager]
Saving to: ‘kernel-4.19.90-2312.1.0.0229.oe1.x86_64.rpm’
kernel-4.19.90-2312.1.0.0229.oe1.x86_64.rp 100%[========================================================================================>]? 42.38M? 44.5KB/s??? in 15m 2s ?
2023-12-09 10:33:32 (48.1 KB/s) - ‘kernel-4.19.90-2312.1.0.0229.oe1.x86_64.rpm’ saved [44442120/44442120]
[root@localhost opt]#
[root@localhost opt]# more /etc/os-release
NAME="openEuler"
VERSION="20.03 (LTS-SP3)"
ID="openEuler"
VERSION_ID="20.03"
PRETTY_NAME="openEuler 20.03 (LTS-SP3)"
ANSI_COLOR="0;31"
[root@localhost ~]# uname -r
4.19.90-2112.8.0.0131.oe1.x86_64
[root@localhost ~]#? awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2-efi.cfg
0 : openEuler (4.19.90-2112.8.0.0131.oe1.x86_64) 20.03 (LTS-SP3)
1 : openEuler (0-rescue-1cdbb66cf8f8450b8345d313a329ea00) 20.03 (LTS-SP3)
[root@localhost ~]# cd /opt/
[root@localhost opt]# rpm -ivh kernel-4.19.90-2312.1.0.0229.oe1.x86_64.rpm
Verifying...????????????????????????? ################################# [100%]
Preparing...????????????????????????? ################################# [100%]
Updating / installing...
?? 1:kernel-4.19.90-2312.1.0.0229.oe1 ################################# [100%]
[root@localhost opt]# awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2-efi.cfg
0 : openEuler (4.19.90-2312.1.0.0229.oe1.x86_64) 20.03 (LTS-SP3)
1 : openEuler (4.19.90-2112.8.0.0131.oe1.x86_64) 20.03 (LTS-SP3)
2 : openEuler (0-rescue-1cdbb66cf8f8450b8345d313a329ea00) 20.03 (LTS-SP3)
[root@localhost opt]#
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!