centos8删除开机菜单选项
升级内核后开机界面出现多个菜单选项,我的第一个选项并不能进入系统,须删除。
原因是:CentOS更新后不会自动删除旧内核。
首先查看内核版本:
(base) [root@localhost ~]# uname -a Linux localhost.localdomain 4.18.0-80.11.2.el8_0.x86_64 #1 SMP Tue Sep 24 11:32:19 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
查看系统中全部的内核RPM包
(base) [root@localhost ~]# rpm -qa|grep kernel kernel-modules-4.18.0-80.el8.x86_64 kernel-4.18.0-80.el8.x86_64 kernel-core-4.18.0-80.11.2.el8_0.x86_64 kernel-debug-devel-4.18.0-80.el8.x86_64 kernel-core-4.18.0-147.5.1.el8_1.x86_64 kernel-headers-4.18.0-147.5.1.el8_1.x86_64 abrt-addon-kerneloops-2.10.9-10.el8.x86_64 kernel-devel-4.18.0-80.el8.x86_64 kernel-modules-4.18.0-147.5.1.el8_1.x86_64 kernel-modules-4.18.0-80.11.2.el8_0.x86_64 kernel-devel-4.18.0-147.5.1.el8_1.x86_64 kernel-4.18.0-80.11.2.el8_0.x86_64 kernel-devel-4.18.0-80.11.2.el8_0.x86_64 kernel-tools-libs-4.18.0-147.5.1.el8_1.x86_64 kernel-tools-4.18.0-147.5.1.el8_1.x86_64 kernel-debug-devel-4.18.0-147.5.1.el8_1.x86_64 kernel-core-4.18.0-80.el8.x86_64 kernel-debug-devel-4.18.0-80.11.2.el8_0.x86_64
删除旧内核的RPM包
(base) [root@localhost ~]# yum remove kernel-modules-4.18.0-80.el8 Repository epel is listed more than once in the configuration 依赖关系解决。 ================================================================================ 软件包 架构 版本 仓库 大小 ================================================================================ 移除: kernel-modules x86_64 4.18.0-80.el8 @anaconda 19 M 事务概要 ================================================================================ 移除 1 软件包 将会释放空间:19 M 确定吗?[y/N]: y 运行事务检查 事务检查成功。 运行事务测试 事务测试成功。 运行事务 准备中 : 1/1 删除 : kernel-modules-4.18.0-80.el8.x86_64 1/1 运行脚本 : kernel-modules-4.18.0-80.el8.x86_64 1/1 验证 : kernel-modules-4.18.0-80.el8.x86_64 1/1 已移除: kernel-modules-4.18.0-80.el8.x86_64 完毕!
有些是不能随便删除的,比如下面的,4.3G的删了我就哭了
(base) [root@localhost ~]# yum remove kernel-headers-4.18.0-147.5.1.el8_1 Repository epel is listed more than once in the configuration 依赖关系解决。 ================================================================================ 软件包 架构 版本 仓库 大小 ================================================================================ 移除: kernel-headers x86_64 4.18.0-147.5.1.el8_1 @BaseOS 4.6 M 移除依赖的软件包: cuda x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 0 cuda-drivers x86_64 440.33.01-1 @cuda-10-2-local-10.2.89-440.33.01 0 gcc-gdb-plugin x86_64 8.3.1-4.5.el8 @AppStream 335 k gcc-gfortran x86_64 8.3.1-4.5.el8 @AppStream 30 M libtool x86_64 2.4.6-25.el8 @AppStream 2.6 M nvidia-driver-NVML x86_64 3:440.33.01-1.el8 @cuda-10-2-local-10.2.89-440.33.01 1.4 M pcp-testsuite x86_64 4.3.0-3.el8 @AppStream 108 M qt5-qtbase-gui x86_64 5.11.1-5.el8 @AppStream 20 M qt5-qtsvg x86_64 5.11.1-2.el8 @AppStream 677 k systemtap x86_64 4.1-6.el8 @AppStream 0 清除未被使用的依赖关系: bcc x86_64 0.7.0-5.el8 @AppStream 52 M bcc-tools x86_64 0.7.0-5.el8 @AppStream 1.4 M clang-libs x86_64 7.0.1-1.module_el8.0.0+12+30b38a9a @AppStream 100 M cmake x86_64 3.11.4-3.el8 @AppStream 27 M cmake-data noarch 3.11.4-3.el8 @AppStream 4.6 M cmake-filesystem x86_64 3.11.4-3.el8 @AppStream 0 cmake-rpm-macros noarch 3.11.4-3.el8 @AppStream 6.5 k compiler-rt x86_64 7.0.1-1.module_el8.0.0+12+30b38a9a @AppStream 28 M cpp x86_64 8.3.1-4.5.el8 @AppStream 28 M cuda-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 0 cuda-command-line-tools-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 0 cuda-compiler-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 0 cuda-cudart-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 497 k cuda-cudart-dev-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 2.2 M cuda-cufft-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 147 M cuda-cufft-dev-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 306 M cuda-cuobjdump-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 207 k cuda-cupti-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 52 M cuda-curand-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 57 M cuda-curand-dev-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 58 M cuda-cusolver-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 299 M cuda-cusolver-dev-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 111 M cuda-cusparse-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 122 M cuda-cusparse-dev-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 254 M cuda-demo-suite-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 11 M cuda-documentation-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 324 M cuda-gdb-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 9.6 M cuda-libraries-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 0 cuda-libraries-dev-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 0 cuda-memcheck-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 388 k cuda-misc-headers-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 15 M cuda-npp-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 140 M cuda-npp-dev-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 162 M cuda-nsight-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 288 M cuda-nsight-compute-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 5.3 k cuda-nsight-systems-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 1.5 k cuda-nvcc-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 115 M cuda-nvdisasm-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 22 M cuda-nvgraph-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 162 M cuda-nvgraph-dev-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 184 M cuda-nvjpeg-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 3.5 M cuda-nvjpeg-dev-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 4.8 M cuda-nvprof-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 7.8 M cuda-nvprune-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 95 k cuda-nvrtc-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 26 M cuda-nvrtc-dev-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 24 k cuda-nvtx-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 339 k cuda-nvvp-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 127 M cuda-runtime-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 0 cuda-samples-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 211 M cuda-sanitizer-api-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 5.6 M cuda-toolkit-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 0 cuda-tools-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 0 cuda-visual-tools-10-2 x86_64 10.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 0 dkms noarch 2.7.1-2.el8 @epel 219 k dnf-plugin-nvidia noarch 1.1-1.el8 @cuda-10-2-local-10.2.89-440.33.01 2.8 k elfutils-libelf-devel x86_64 0.174-6.el8 @BaseOS 32 k freeglut x86_64 3.0.0-8.el8 @AppStream 664 k freeglut-devel x86_64 3.0.0-8.el8 @AppStream 112 k gcc x86_64 8.3.1-4.5.el8 @AppStream 59 M gcc-c++ x86_64 8.3.1-4.5.el8 @AppStream 31 M gl-manpages noarch 1.1-15.20161227.el8 @AppStream 1.0 M glibc-devel x86_64 2.28-72.el8_1.1 @BaseOS 1.3 M glibc-headers x86_64 2.28-72.el8_1.1 @BaseOS 1.9 M isl x86_64 0.16.1-6.el8 @AppStream 3.1 M java-1.8.0-openjdk x86_64 1:1.8.0.232.b09-0.el8_0 @AppStream 719 k kmod-nvidia-latest-dkms x86_64 3:440.33.01-1.el8 @cuda-10-2-local-10.2.89-440.33.01 32 M libICE-devel x86_64 1.0.9-13.el8 @AppStream 262 k libSM-devel x86_64 1.2.3-1.el8 @AppStream 19 k libXdamage-devel x86_64 1.1.4-14.el8 @AppStream 2.5 k libXmu-devel x86_64 1.1.2-12.el8 @AppStream 66 k libXt-devel x86_64 1.1.5-8.el8 @AppStream 1.6 M libXxf86vm-devel x86_64 1.1.4-9.el8 @AppStream 12 k libatomic x86_64 8.2.1-3.5.el8 @anaconda 28 k libcublas-devel x86_64 10.2.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 109 M libcublas10 x86_64 10.2.2.89-1 @cuda-10-2-local-10.2.89-440.33.01 94 M libdrm-devel x86_64 2.4.96-2.el8 @AppStream 540 k libgfortran x86_64 8.3.1-4.5.el8 @BaseOS 2.5 M libglvnd-core-devel x86_64 1:1.0.1-0.9.git5baa1e5.el8 @AppStream 40 k libglvnd-devel x86_64 1:1.0.1-0.9.git5baa1e5.el8 @AppStream 0 libomp x86_64 7.0.1-1.module_el8.0.0+12+30b38a9a @AppStream 901 k libpq x86_64 10.5-1.el8 @AppStream 704 k libquadmath x86_64 8.3.1-4.5.el8 @BaseOS 299 k libquadmath-devel x86_64 8.3.1-4.5.el8 @AppStream 19 k libstdc++-devel x86_64 8.3.1-4.5.el8 @AppStream 11 M libvarlink x86_64 16-1.el8 @anaconda 92 k libxcrypt-devel x86_64 4.1.1-4.el8 @anaconda 24 k mesa-khr-devel x86_64 18.3.1-5.el8_0 @AppStream 10 k mesa-libEGL-devel x86_64 18.3.1-5.el8_0 @AppStream 89 k mesa-libGL-devel x86_64 18.3.1-5.el8_0 @AppStream 1.6 M mesa-libGLU-devel x86_64 9.0.0-15.el8 @AppStream 20 k nsight-systems-2019.5.2 x86_64 2019.5.2.16_b54ef97-0 @cuda-10-2-local-10.2.89-440.33.01 312 M nvidia-driver x86_64 3:440.33.01-1.el8 @cuda-10-2-local-10.2.89-440.33.01 21 M nvidia-kmod-common noarch 3:440.33.01-1.el8 @cuda-10-2-local-10.2.89-440.33.01 1.8 k nvidia-libXNVCtrl x86_64 3:440.33.01-1.el8 @cuda-10-2-local-10.2.89-440.33.01 134 k nvidia-libXNVCtrl-devel x86_64 3:440.33.01-1.el8 @cuda-10-2-local-10.2.89-440.33.01 254 k nvidia-modprobe x86_64 3:440.33.01-1.el8 @cuda-10-2-local-10.2.89-440.33.01 183 k nvidia-settings x86_64 3:440.33.01-1.el8 @cuda-10-2-local-10.2.89-440.33.01 5.5 M nvidia-xconfig x86_64 3:440.33.01-1.el8 @cuda-10-2-local-10.2.89-440.33.01 869 k pcp-pmda-bcc x86_64 4.3.0-3.el8 @AppStream 249 k pcp-pmda-podman x86_64 4.3.0-3.el8 @AppStream 69 k pcp-pmda-postgresql x86_64 4.3.0-3.el8 @AppStream 72 k python3-bcc x86_64 0.7.0-5.el8 @AppStream 189 k python3-netaddr noarch 0.7.19-8.el8 @AppStream 8.4 M python3-psycopg2 x86_64 2.7.5-7.el8 @AppStream 545 k qt5-qtbase-devel x86_64 5.11.1-5.el8 @AppStream 27 M qt5-rpm-macros noarch 5.11.1-2.el8 @AppStream 1.5 k systemtap-client x86_64 4.1-6.el8 @AppStream 11 M systemtap-devel x86_64 4.1-6.el8 @AppStream 9.2 M ttmkfdir x86_64 3.0.9-54.el8 @AppStream 140 k xcb-util-image x86_64 0.4.0-9.el8 @AppStream 22 k xcb-util-keysyms x86_64 0.4.0-7.el8 @AppStream 13 k xcb-util-renderutil x86_64 0.3.9-10.el8 @AppStream 21 k xcb-util-wm x86_64 0.4.1-12.el8 @AppStream 78 k xorg-x11-fonts-Type1 noarch 7.5-19.el8 @AppStream 863 k 事务概要 ================================================================================ 移除 126 软件包 将会释放空间:4.3 G 确定吗?[y/N]: n 操作中止。