Fred Smith
2016-Sep-03 02:52 UTC
[CentOS] hacking grub to control number of retained kernels.
I've recently had this problem on two C7 systems, wherein when doing "yum update", I get a warning about /boot being low on space. both systems were installed using the partition size recommended by Anaconda, right now "df -h" shows /boot as 494M, with 79M free. I don't store unrelated crap on /boot, I assume that yum and/or grub will manage it for me. So, why, after over a year, is it running low on space on two different systems? Is there some location in /boot where junk piles up, but shouldn't, that I have to know about so I can clean it out? I see EIGHT initramfs files in /boot, two per kernel, same name but one has a kdump just before the .img suffix. do I need those for old kernels that I may or may not ever boot? (they're 30 to 50 MB each). For the moment I've edited /etc/grub.conf and changed installonly_limit from 4 to 3. (related question: do I need to manually remove the oldest kernel, having done this, or will yum/grub clean it up the next time there's a kernel to install?) thanks! Fred -- ---- Fred Smith -- fredex at fcshome.stoneham.ma.us ----------------------------- I can do all things through Christ who strengthens me. ------------------------------ Philippians 4:13 -------------------------------
Jon LaBadie
2016-Sep-03 03:30 UTC
[CentOS] hacking grub to control number of retained kernels.
On Fri, Sep 02, 2016 at 10:52:05PM -0400, Fred Smith wrote:> I've recently had this problem on two C7 systems, wherein when doing "yum > update", I get a warning about /boot being low on space. > > both systems were installed using the partition size recommended by > Anaconda, right now "df -h" shows /boot as 494M, with 79M free. > > I don't store unrelated crap on /boot, I assume that yum and/or grub > will manage it for me. So, why, after over a year, is it running low > on space on two different systems? > > Is there some location in /boot where junk piles up, but shouldn't, > that I have to know about so I can clean it out? > > I see EIGHT initramfs files in /boot, two per kernel, same name but > one has a kdump just before the .img suffix. do I need those for old > kernels that I may or may not ever boot? (they're 30 to 50 MB each). > > For the moment I've edited /etc/grub.conf and changed installonly_limit > from 4 to 3. (related question: do I need to manually remove the > oldest kernel, having done this, or will yum/grub clean it up the > next time there's a kernel to install?) >I may be off-base here, but isn't that more a yum configuation issue? What is the installonly_limit in /etc/yum.conf? Jon -- Jon H. LaBadie jon at jgcomp.com 11226 South Shore Rd. (703) 787-0688 (H) Reston, VA 20190 (703) 935-6720 (C)
Fred Smith
2016-Sep-03 04:06 UTC
[CentOS] hacking grub to control number of retained kernels.
On Fri, Sep 02, 2016 at 11:30:17PM -0400, Jon LaBadie wrote:> On Fri, Sep 02, 2016 at 10:52:05PM -0400, Fred Smith wrote: > > I've recently had this problem on two C7 systems, wherein when doing "yum > > update", I get a warning about /boot being low on space. > > > > both systems were installed using the partition size recommended by > > Anaconda, right now "df -h" shows /boot as 494M, with 79M free. > > > > I don't store unrelated crap on /boot, I assume that yum and/or grub > > will manage it for me. So, why, after over a year, is it running low > > on space on two different systems? > > > > Is there some location in /boot where junk piles up, but shouldn't, > > that I have to know about so I can clean it out? > > > > I see EIGHT initramfs files in /boot, two per kernel, same name but > > one has a kdump just before the .img suffix. do I need those for old > > kernels that I may or may not ever boot? (they're 30 to 50 MB each). > > > > For the moment I've edited /etc/grub.conf and changed installonly_limit > > from 4 to 3. (related question: do I need to manually remove the > > oldest kernel, having done this, or will yum/grub clean it up the > > next time there's a kernel to install?) > > > > I may be off-base here, but isn't that more a yum configuation issue? > What is the installonly_limit in /etc/yum.conf?Oh, senior moment... that actually is the file I changed. :( (getting old ain't that much fun sometimes...) -- ---- Fred Smith -- fredex at fcshome.stoneham.ma.us ----------------------------- I can do all things through Christ who strengthens me. ------------------------------ Philippians 4:13 -------------------------------
Liam O'Toole
2016-Sep-03 15:18 UTC
[CentOS] hacking grub to control number of retained kernels.
On 2016-09-03, Fred Smith <fredex at fcshome.stoneham.ma.us> wrote:> I've recently had this problem on two C7 systems, wherein when doing > "yum update", I get a warning about /boot being low on space. > > both systems were installed using the partition size recommended by > Anaconda, right now "df -h" shows /boot as 494M, with 79M free. > > I don't store unrelated crap on /boot, I assume that yum and/or grub > will manage it for me. So, why, after over a year, is it running low > on space on two different systems? > > Is there some location in /boot where junk piles up, but shouldn't, > that I have to know about so I can clean it out? > > I see EIGHT initramfs files in /boot, two per kernel, same name but > one has a kdump just before the .img suffix. do I need those for old > kernels that I may or may not ever boot? (they're 30 to 50 MB each). > > For the moment I've edited /etc/grub.conf and changed > installonly_limit from 4 to 3. (related question: do I need to > manually remove the oldest kernel, having done this, or will yum/grub > clean it up the next time there's a kernel to install?) > > thanks! > > FredI recommend the package-cleanup command from the yum-utils package. See the '--oldkernels' option in particular; it will remove obsolete kernels, i.e., those which are no longer installable from your yum repositories. -- Liam
Chris Murphy
2016-Sep-06 03:28 UTC
[CentOS] hacking grub to control number of retained kernels.
On Fri, Sep 2, 2016, 8:52 PM Fred Smith <fredex at fcshome.stoneham.ma.us> wrote:> I've recently had this problem on two C7 systems, wherein when doing "yum > update", I get a warning about /boot being low on space. > > both systems were installed using the partition size recommended by > Anaconda, right now "df -h" shows /boot as 494M, with 79M free. > > I don't store unrelated crap on /boot, I assume that yum and/or grub > will manage it for me. So, why, after over a year, is it running low > on space on two different systems? > > Is there some location in /boot where junk piles up, but shouldn't, > that I have to know about so I can clean it out? > > I see EIGHT initramfs files in /boot, two per kernel, same name but > one has a kdump just before the .img suffix. do I need those for old > kernels that I may or may not ever boot? (they're 30 to 50 MB each). >I think jump using /boot is a bad idea. I wonder if that's really necessary? Anyway, long term solution from the anaconda list is increasing /boot size to 1GiB. Chris Murphy