CentOS的/boot 目录满了
我想要运行一下yum update, 但是遇到了报错:
Transaction check error:
installing package kernel-3.10.0-1127.8.2.el7.x86_64 needs 28MB on the /boot filesystemError Summary
-------------
Disk Requirements:
At least 28MB more space needed on the /boot filesystem.
检查磁盘状态:
[root@localhost]~# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 1.9G 53M 1.8G 3% /run
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/sda3 18G 6.6G 12G 37% /
/dev/sda1 297M 292M 4.9M 99% /boot
tmpfs 378M 4.0K 378M 1% /run/user/42
tmpfs 378M 36K 378M 1% /run/user/0
嗯,/dev/sda1 ,即boot分区好像的确是满了。
找到了一篇帖子,照着做,问题解决了。
具体使用到的命令列出如下:
[root@localhost]~# vi /etc/yum.conf # 修改:installonly_limit=2
[root@localhost]~# yum install yum-utils
[root@localhost]~# package-cleanup --oldkernels --count=2
[root@localhost]~# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 1.9G 53M 1.8G 3% /run
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/sda3 18G 6.4G 12G 37% /
/dev/sda1 297M 196M 102M 66% /boot
tmpfs 378M 4.0K 378M 1% /run/user/42
tmpfs 378M 36K 378M 1% /run/user/0
参考资料
===============
boot partition is almost full in CentOS
https://unix.stackexchange.com/questions/105026/boot-partition-is-almost-full-in-centos