/bootの容量が足りなくなったら、古いカーネルパッケージを消せばよい
手動で選んで消せばよいのだがまあ、一個前のが有ればよいというわけで
それを自動で一気にやってくれるコマンドをよく忘れるのでメモ
installing package kernel-2.6.32-279.9.1.el6.x86_64 needs 6MB on the /boot filesystem
[(‘installing package kernel-2.6.32-279.9.1.el6.x86_64 needs 6MB on the /boot filesystem’, (9, ‘/boot’, 5408768L))]
容量が足りないとこんな感じで文句を言われる。
そこで以下のコマンド
# package-cleanup –oldkernels
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
–> Running transaction check
—> Package kernel.x86_64 0:2.6.32-220.7.1.el6 will be erased
—> Package kernel-devel.x86_64 0:2.6.32-220.7.1.el6 will be erased
–> Finished Dependency ResolutionDependencies Resolved
=========================================
Package Arch Version Repository Size
=========================================
Removing:
kernel x86_64 2.6.32-220.7.1.el6 @sl-security 112 M
kernel-devel x86_64 2.6.32-220.7.1.el6 @sl-security 23 MTransaction Summary
=========================================
Remove 2 Package(s)Installed size: 135 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing : kernel-devel-2.6.32-220.7.1.el6.x86_64 1/2
Erasing : kernel-2.6.32-220.7.1.el6.x86_64 2/2Removed:
kernel.x86_64 0:2.6.32-220.7.1.el6 kernel-devel.x86_64 0:2.6.32-220.7.1.el6Complete!
こんな感じで一気に古いカーネルを消してくれる。
便利だなあ