我正在尝试将服务器升级到:kernel.x86_64 0:2.6.32-696.23.1.el6。
我收到消息:
Transaction Check Error:
installing package kernel-2.6.32-696.23.1.el6.x86_64 needs 29MB on the /boot filesystem
Error Summary
-------------
Disk Requirements:
At least 29MB more space needed on the /boot filesystem.
我们当前安装了两个内核:
rpm -q 内核
kernel-2.6.32-696.10.3.el6.x86_64
kernel-2.6.32-696.20.1.el6.x86_64
我们在 /boot 文件夹中找到旧版本的剩余软件包:
ls -lah /启动/2.6.32-504| NL
1 -rw-r--r-- 1 root root 104K Mar 10 2015 /boot/config-2.6.32-504.16.2.el6.x86_64
2 -rw-r--r-- 1 root root 104K May 29 2015 /boot/config-2.6.32-504.23.4.el6.x86_64
3 -rw-r--r-- 1 root root 104K Dec 19 2014 /boot/config-2.6.32-504.8.1.el6.x86_64
4 -rw------- 1 root root 18M May 6 2015 /boot/initramfs-2.6.32-504.16.2.el6.x86_64.img
5 -rw------- 1 root root 18M May 12 2016 /boot/initramfs-2.6.32-504.23.4.el6.x86_64.img
6 -rw------- 1 root root 18M May 12 2016 /boot/initramfs-2.6.32-504.23.4.el6.x86_64.img.bak
7 -rw------- 1 root root 18M Feb 4 2015 /boot/initramfs-2.6.32-504.8.1.el6.x86_64.img
8 -rw------- 1 root root 4.5M Sep 23 2016 /boot/initrd-2.6.32-504.23.4.el6.x86_64kdump.img
9 -rw-r--r-- 1 root root 196K Mar 10 2015 /boot/symvers-2.6.32-504.16.2.el6.x86_64.gz
10 -rw-r--r-- 1 root root 196K May 29 2015 /boot/symvers-2.6.32-504.23.4.el6.x86_64.gz
11 -rw-r--r-- 1 root root 196K Dec 19 2014 /boot/symvers-2.6.32-504.8.1.el6.x86_64.gz
12 -rw-r--r-- 1 root root 2.5M Mar 10 2015 /boot/System.map-2.6.32-504.16.2.el6.x86_64
13 -rw-r--r-- 1 root root 2.5M May 29 2015 /boot/System.map-2.6.32-504.23.4.el6.x86_64
14 -rw-r--r-- 1 root root 2.5M Dec 19 2014 /boot/System.map-2.6.32-504.8.1.el6.x86_64
15 -rwxr-xr-x 1 root root 4.0M Mar 10 2015 /boot/vmlinuz-2.6.32-504.16.2.el6.x86_64
16 -rwxr-xr-x 1 root root 4.0M May 29 2015 /boot/vmlinuz-2.6.32-504.23.4.el6.x86_64
17 -rwxr-xr-x 1 root root 4.0M Dec 19 2014 /boot/vmlinuz-2.6.32-504.8.1.el6.x86_64
所有删除文件的尝试均失败:
rm /boot/initramfs-2.6.32-504.23.4.el6.x86_64.img.bak
rm: remove regular file `/boot/initramfs-2.6.32-504.23.4.el6.x86_64.img.bak'? y
rm: cannot remove `/boot/initramfs-2.6.32-504.23.4.el6.x86_64.img.bak': Read-only file system
有解决问题的想法吗?
问候
答案1
安装yum-utils
软件包然后删除旧内核:
# package-cleanup --oldkernels --count=2
count=2
将仅保留 2 个内核。要保持正在运行的内核:
# package-cleanup --oldkernels --count=1
答案2
感谢您的帮助,/boot 已以 RO 模式安装,我通过以下方式更改了它:
mount -o remount,rw /boot
然后我删除了 /boot 文件夹中旧版本剩余的文件:
rm -fr $(ls | grep "2.6.32-504")
并且我有足够的空间来升级内核。
剩下的问题是,是否建议将 /boot 放回 RO 模式?
问候