Re: [PATCH] scripts:prune-kernel:remove old kernels and modules dir from system

From: J. Bruce Fields
Date: Wed Nov 06 2019 - 14:30:12 EST


On Wed, Nov 06, 2019 at 10:12:26AM +0530, Bhaskar Chowdhury wrote:
> On 23:31 Tue 05 Nov 2019, J. Bruce Fields wrote:
> >On Wed, Nov 06, 2019 at 11:53:28AM +0900, Masahiro Yamada wrote:
> >>BTW.
> >>Bruce,
> >>Does the current script expect RHEL or something?
> >>I do not see 'new-kernel-pkg' on my Ubuntu machine.
> >
> >I test on Fedora. Looks like on recent Fedora that's only provided by
> >an rpm "grubby-deprecated", which is an inauspicious name....
> >
> >I think maybe you're supposed to use "grubby" itself now. Do you have
> >that?
> >
> >>It would still work with 'new-kernel-pkg: command not found'
> >>warning.
> >>
> >>We could bypass it if we like.
> >>
> >>command -v new-kernel-pkg && new-kernel-pkg --remove $f
> >
> >Looks like it's what updates the grub configuration, which is probably a
> >nice thing to do if you can.
> >
> >--b.
>
> Bruce,
>
> Two things,
>
> If the system doesn't run grub , how the fallback policy???
>
> This binary "new-kernel-pkg" also missing in other systems too...I can
> confirm that... i.e gentoo,slackware,
>
> So , you are only targeting the rpm based system????

It's just what I happen to use. If someone wants to make it work
elsewhere that'd be great, as long as we don't break what already works.

I think Debian uses grub2-mkconfig? Might be OK for Fedora too, I
dunno.

--b.