{"id":3820,"date":"2019-08-10T22:11:39","date_gmt":"2019-08-10T10:11:39","guid":{"rendered":"http:\/\/www.zoyinc.com\/?p=3820"},"modified":"2019-08-10T22:11:39","modified_gmt":"2019-08-10T10:11:39","slug":"low-disk-space-on-boot","status":"publish","type":"post","link":"http:\/\/www.zoyinc.com\/?p=3820","title":{"rendered":"Low Disk Space on &#8220;boot&#8221;"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3821\" src=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2019\/08\/LowDiskSpace01.jpg\" alt=\"\" width=\"501\" height=\"93\" srcset=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2019\/08\/LowDiskSpace01.jpg 501w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2019\/08\/LowDiskSpace01-150x28.jpg 150w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2019\/08\/LowDiskSpace01-300x56.jpg 300w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2019\/08\/LowDiskSpace01-500x93.jpg 500w\" sizes=\"auto, (max-width: 501px) 100vw, 501px\" \/><\/p>\n<p>If you have ever got this popup warning on CentOS\/RedHat 7 this post may help. This happened to me and when I looked at &#8220;\/boot&#8221; it looked like:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3822\" src=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2019\/08\/LowDiskSpace02.jpg\" alt=\"\" width=\"588\" height=\"262\" \/><\/p>\n<p>You can see there is the current kernel and three previous kernels to choose from:<\/p>\n<p style=\"padding-left: 30px;\">CentOS Linux (3.10.0-957.27.2.el7.x86_64) 7 (Core)<br \/>\nCentOS Linux (3.10.0-957.21.3.el7.x86_64) 7 (Core)<br \/>\nCentOS Linux (3.10.0-957.el7.x86_6) 7 (Core)<br \/>\nCentOS Linux (0-rescue-71c11ed5c0aa41ad909ab96d4c6ad395) 7 (Core)<\/p>\n<p>This aligns with the 4 options you have at boot:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3826\" src=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2019\/08\/LowDiskSpace03.jpg\" alt=\"\" width=\"719\" height=\"196\" srcset=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2019\/08\/LowDiskSpace03.jpg 719w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2019\/08\/LowDiskSpace03-150x41.jpg 150w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2019\/08\/LowDiskSpace03-300x82.jpg 300w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2019\/08\/LowDiskSpace03-500x136.jpg 500w\" sizes=\"auto, (max-width: 719px) 100vw, 719px\" \/><\/p>\n<p>Next check you have the RPM &#8220;yum-utils&#8221; installed. Then run the following which is included in yum-utils:<\/p>\n<p style=\"padding-left: 30px;\">package-cleanup &#8211;oldkernels &#8211;count=1<\/p>\n<p>This will automatically delete and free up space by erasing old kernels and leaving with the current one plus the &#8220;rescue&#8221; kernel. When this runs you will see something that includes the following:<\/p>\n<pre class=\"crayon:false;\">Downloading packages:\r\nRunning transaction check\r\nRunning transaction test\r\nTransaction test succeeded\r\nRunning transaction\r\n  Erasing    : kernel.x86_64                                                                                                                 1\/4 \r\n  Erasing    : kernel-devel.x86_64                                                                                                           2\/4 \r\n  Erasing    : kernel.x86_64                                                                                                                 3\/4 \r\n  Erasing    : kernel-devel.x86_64                                                                                                           4\/4 \r\n  Verifying  : kernel-devel-3.10.0-957.el7.x86_64                                                                                            1\/4 \r\n  Verifying  : kernel-3.10.0-957.el7.x86_64                                                                                                  2\/4 \r\n  Verifying  : kernel-devel-3.10.0-957.21.3.el7.x86_64                                                                                       3\/4 \r\n  Verifying  : kernel-3.10.0-957.21.3.el7.x86_64                                                                                             4\/4 \r\n\r\nRemoved:\r\n  kernel.x86_64 0:3.10.0-957.el7                     kernel.x86_64 0:3.10.0-957.21.3.el7          kernel-devel.x86_64 0:3.10.0-957.el7         \r\n  kernel-devel.x86_64 0:3.10.0-957.21.3.el7         \r\n\r\nComplete!<\/pre>\n<p>Now you should fine the &#8220;\/boot&#8221; is much emptier:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-3827\" src=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2019\/08\/LowDiskSpace04.jpg\" alt=\"\" width=\"592\" height=\"158\" \/><\/p>\n<p>So when you reboot, you likewise only get the two kernel boot options:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-3828\" src=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2019\/08\/LowDiskSpace05.jpg\" alt=\"\" width=\"719\" height=\"173\" srcset=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2019\/08\/LowDiskSpace05.jpg 719w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2019\/08\/LowDiskSpace05-150x36.jpg 150w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2019\/08\/LowDiskSpace05-300x72.jpg 300w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2019\/08\/LowDiskSpace05-500x120.jpg 500w\" sizes=\"auto, (max-width: 719px) 100vw, 719px\" \/><\/p>\n<h2>Permanent fix<\/h2>\n<p>To stop this happening edit the file &#8220;\/etc\/yum.conf&#8221; and look for the line:<\/p>\n<p style=\"padding-left: 30px;\">installonly_limit=5<\/p>\n<p>Change the number to the one you want. Note that if you put either 0 or 1 then it will be interpreted as unlimited. So <strong>for practical purposes the minimum is 2<\/strong>. I set mine to 2.<\/p>\n<h2>Resources<\/h2>\n<p>Linux Config: How to remove old unused kernels on CentOS Linux<br \/>\n<a  href=\"https:\/\/linuxconfig.org\/how-to-remove-old-unused-kernels-on-centos-linux\">https:\/\/linuxconfig.org\/how-to-remove-old-unused-kernels-on-centos-linux<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you have ever got this popup warning on CentOS\/RedHat 7 this post may help. This happened to me and when I looked at &#8220;\/boot&#8221; it looked like: You can see there is the current kernel and three previous kernels to choose from: CentOS Linux (3.10.0-957.27.2.el7.x86_64) 7 (Core) CentOS Linux (3.10.0-957.21.3.el7.x86_64) 7 (Core) CentOS Linux [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":3829,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[553,552],"tags":[567,555,568,295,566,569,554,6,570],"class_list":["post-3820","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","category-redhat","tag-boot-partition","tag-centos","tag-folder","tag-linux","tag-low-disk-space","tag-mounted","tag-red-hat","tag-redhat","tag-volume"],"_links":{"self":[{"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/posts\/3820","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3820"}],"version-history":[{"count":3,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/posts\/3820\/revisions"}],"predecessor-version":[{"id":3830,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/posts\/3820\/revisions\/3830"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/media\/3829"}],"wp:attachment":[{"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3820"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3820"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3820"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}