[Yum] Keep just one specific kernel version

Gerry Reno greno at verizon.net
Fri Apr 10 02:17:13 UTC 2009


Nifty nifty.hat Mitch wrote:
> On Thu, Apr 09, 2009 at 03:05:15PM -0400, Gerry Reno wrote:
>   
>> I ran into a situation where we needed to boot into rescue mode to  
>> repair an older F7 system.  Once in rescue mode I chrooted into  
>> /mnt/sysimage and tried starting rpcbind and nfs.  I was greeted with  
>> errors about couldn't find kernel lib modules.  Then it dawned on me  
>> that this system had been updating the kernel so it no longer had the  
>> original kernel available that would match the kernel from the rescue  
>> disk. 
>>
>> So is there a way to keep the original kernel and still allow the system  
>> to update to newer kernels?  I just want to keep the one original kernel  
>> version so that it will match rescue mode.  Otherwise the system should  
>> be free to update the kernel if it wishes and only keep two most recent  
>> kernels (plus the one original kernel).
>>
>>     
>
> Look at 
>    installonly_limit=
> in /etc/yum.conf.
>
> If you set the limit large enough all kernels will
> be kept.   If your /boot/... device is small you 
> will need to use "rpm" and erase specific extra kernels....
>
> Since the old kernel is gone you may need to 
> search about on the installation media and
> find the original RPM to install so that your 
> rescue goals are met.
>
> Of interest most non kernel packages are installed "rpm -Uvh"
> Kernel packages are installed "rpm -ivh"...
>
> For sure cache to CDROM or some place all the F7 package RPMs you can get if you intend
> to keep that system live for very long.  Old distros do vanish on the net.
>
> For newer fedora distros it is almost easy to build a USB boot key
> that your can use to repair things.  The default setup will 
> pull the 'latest' rpms onto the USB key or CDROM....
>
> I recently saw a 2GB USB key for $10 -- more than enough for basic rescue.
> Or just download the most recent 'live' CDROM once in a while.
>
>
>   
Hi Tom,
Yes, I looked at installonly_limit and if you set it to 0(zero) it 
should keep everything which would solve the issue and we could remove 
those kernels that we didn't want to keep. The archive.fedoraproject.org 
seems to still have F7 rpms. Hopefully they will keep these for all the 
old Fedora distros. And I've been building some more of those USB 
recovery boot drives. Handy little things (except when you can't find 
them :-)


Regards,
Gerry



More information about the Yum mailing list