大网数据广告活动
服务器运维问答

CentOS /boot is full even after removing previous kernel

· 52CE 我爱测

During several months before every update system action I need to clean up /boot directory because it is full. I had removed old kernels as described here ( How to free up space on RHEL6 /boot safely? ). But every time after upda…

问题原文

原帖链接 · Sergey Serov · CC BY-SA 3.0

During several months before every update system action I need to clean up /boot directory because it is full. I had removed old kernels as described here (How to free up space on RHEL6 /boot safely?).

But every time after update - /boot is full again.
Today even after removing previous kernel is NOT enough space for yum update.

root@CentOS-70-64-minimal:/boot ============================================ [18:05:08]
> l
total 429M
dr-xr-xr-x.  5 root root 5.0K Jan 12 18:04 ./
drwxr-xr-x. 19 root root 4.0K Jan 12 03:16 ../
-rw-r--r--.  1 root root 121K Nov  3 20:18 config-3.10.0-229.20.1.el7.x86_64
drwxr-xr-x.  2 root root 1.0K Nov  1 23:50 grub/
drwxr-xr-x.  6 root root 1.0K Jan 12 18:04 grub2/
-rw-------.  1 root root  39M Nov  1 23:52 initramfs-0-rescue-36bcd6a9e7104f21b1fffdc70a2410ad.img
-rw-------.  1 root root  39M Jun 25  2015 initramfs-0-rescue-3f69b67d93ab47efad188530c7620ce7.img
-rw-------.  1 root root  36M Dec  6  2014 initramfs-0-rescue-5ada9d2ff7154b7d992458e573f12812.img
-rw-------.  1 root root  38M Mar 31  2015 initramfs-0-rescue-6cb1c41831054f7d8c5f96f86852974a.img
-rw-------.  1 root root  39M Aug  8 10:18 initramfs-0-rescue-6d4eff407451426bb985a283f8a50b73.img
-rw-r--r--.  1 root root  25M Jul 10  2014 initramfs-0-rescue-74f877a555c841639922c44507d67b89.img
-rw-------.  1 root root  39M May 13  2015 initramfs-0-rescue-9dcee4fd9cc94410990561ec753679d4.img
-rw-------.  1 root root  18M Nov 14 19:42 initramfs-0-rescue-c3547f9231df4524867357ebcfa979e8.img
-rw-------.  1 root root  36M Dec 16  2014 initramfs-0-rescue-cddab3440a1f487dad750c2d85b023a9.img
-rw-------.  1 root root  36M Feb  2  2015 initramfs-0-rescue-dcfb8dbba18442ce83382fe302f8e256.img
-rw-------.  1 root root  38M Nov 14 19:41 initramfs-3.10.0-229.20.1.el7.x86_64.img
-rw-------.  1 root root    0 Nov 15 03:16 initramfs-3.10.0-229.20.1.el7.x86_64kdump.img
-rw-r--r--.  1 root root 576K Mar 31  2015 initrd-plymouth.img
drwx------.  2 root root  12K Dec  6  2014 lost+found/
-rw-r--r--.  1 root root 235K Nov  3 20:21 symvers-3.10.0-229.20.1.el7.x86_64.gz
-rw-------.  1 root root 2.8M Nov  3 20:18 System.map-3.10.0-229.20.1.el7.x86_64
-rwxr-xr-x.  1 root root 4.8M Nov  1 23:52 vmlinuz-0-rescue-36bcd6a9e7104f21b1fffdc70a2410ad*
-rwxr-xr-x.  1 root root 4.8M Jun 25  2015 vmlinuz-0-rescue-3f69b67d93ab47efad188530c7620ce7*
-rwxr-xr-x.  1 root root 4.7M Dec  6  2014 vmlinuz-0-rescue-5ada9d2ff7154b7d992458e573f12812*
-rwxr-xr-x.  1 root root 4.8M Mar 31  2015 vmlinuz-0-rescue-6cb1c41831054f7d8c5f96f86852974a*
-rwxr-xr-x.  1 root root 4.8M Aug  8 10:18 vmlinuz-0-rescue-6d4eff407451426bb985a283f8a50b73*
-rwxr-xr-x.  1 root root 4.7M Jul 10  2014 vmlinuz-0-rescue-74f877a555c841639922c44507d67b89*
-rwxr-xr-x.  1 root root 4.8M May 13  2015 vmlinuz-0-rescue-9dcee4fd9cc94410990561ec753679d4*
-rwxr-xr-x.  1 root root    0 Nov 14 19:42 vmlinuz-0-rescue-c3547f9231df4524867357ebcfa979e8*
-rwxr-xr-x.  1 root root 4.7M Dec 16  2014 vmlinuz-0-rescue-cddab3440a1f487dad750c2d85b023a9*
-rwxr-xr-x.  1 root root 4.7M Feb  2  2015 vmlinuz-0-rescue-dcfb8dbba18442ce83382fe302f8e256*
-rwxr-xr-x.  1 root root 4.8M Nov  3 20:18 vmlinuz-3.10.0-229.20.1.el7.x86_64*
-rw-r--r--.  1 root root  171 Nov  3 20:18 .vmlinuz-3.10.0-229.20.1.el7.x86_64.hmac

root@CentOS-70-64-minimal:/boot ============================================ [18:05:11]
> df
Filesystem      Size  Used Avail Use% Mounted on
/dev/md2       1008G   96G  862G  10% /
devtmpfs        7.6G     0  7.6G   0% /dev
tmpfs           7.7G     0  7.7G   0% /dev/shm
tmpfs           7.7G   17M  7.6G   1% /run
tmpfs           7.7G     0  7.7G   0% /sys/fs/cgroup
/dev/md1        488M  439M   25M  95% /boot
/dev/md3        1.7T  1.7T     0 100% /home

已采纳解答

原帖链接 · Logan · CC BY-SA 3.0

If your machine boots correctly now, I'd move the rescue kernels out of /boot into your home directory (or any other place really) and reboot, make sure it works and then remove them and then rerun yum update. You shouldn't need that many rescue kernels or any if your machine boots correctly

Edit:

Now, the fun part is if it doesn't boot correctly after moving the rescue kernels. Boot it into a live environment and then move each rescue kernel back into place one by one until you find the one that is being used.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-01-12)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。