Centos 5.x
Why could this be? After I loaded a xen kernel (by mistake), yum seemed to lose its knowledge of my CentOS version. I had that fixed by "yum install centos-release" (I had first to fix the repo addresses for this to succeed).
But after that, I noticed that yum did not remember anymore, what packages were already installed. It seems that the something happens to the rpm databases. I think this is connected to kernel upgrades - that is, every time I update the kernel, the rpm databases are spoiled... (or something).
Right now both of these commands: yum list installed rpm --query -a
...produce identical results (for practical purposes). Neither list contains for example amavisd-new, which I'm sure I have installed.
Does someone know a way to prevent the "memory loss" from happening again?
- Jussi
-- Jussi Hirvi * Green Spot Topeliuksenkatu 15 C * 00250 Helsinki * Finland Tel. & fax +358 9 493 981 * Mobile +358 40 771 2098 (only sms) jussi.hirvi@greenspot.fi * http://www.greenspot.fi
On Mon, Nov 3, 2008 at 7:51 AM, Jussi Hirvi greenspot@greenspot.fi wrote:
Centos 5.x
Why could this be? After I loaded a xen kernel (by mistake), yum seemed to lose its knowledge of my CentOS version. I had that fixed by "yum install centos-release" (I had first to fix the repo addresses for this to succeed).
But after that, I noticed that yum did not remember anymore, what packages were already installed. It seems that the something happens to the rpm databases. I think this is connected to kernel upgrades - that is, every time I update the kernel, the rpm databases are spoiled... (or something).
Right now both of these commands: yum list installed rpm --query -a
Never seen this sort of 'forgetfulness'. Could you provide a bit more detail as to which version of centos5 you're running, and the full output of 'rpm -V yum centos-release' and the outpuf of 'uname -a'
Jim Perrin (jperrin@gmail.com) kirjoitteli (3.11.2008 16:18):
Never seen this sort of 'forgetfulness'. Could you provide a bit more detail as to which version of centos5 you're running, and the full output of 'rpm -V yum centos-release' and the outpuf of 'uname -a'
Hm, my CentOS 5 is pretty recent, I believe 5.2, but cannot find this stated... Hope this helps:
[root@mail ~]# cat /etc/issue CentOS release 5 (Final) Kernel \r on an \m
[root@mail ~]# cat /etc/redhat-release CentOS release 5.2 (Final)
[root@mail ~]# rpm -V yum centos-release .......T c /etc/logrotate.d/yum S.5....T c /etc/yum.conf S.5....T c /etc/issue S.5....T c /etc/issue.net .......T c /etc/sysconfig/rhn/sources S.5....T c /etc/yum.repos.d/CentOS-Base.repo S.5....T c /etc/yum.repos.d/CentOS-Media.repo
[root@mail ~]# uname -a Linux mail.greenspot.fi 2.6.18-53.1.21.el5 #1 SMP Tue May 20 09:34:18 EDT 2008 i686 i686 i386 GNU/Linux
Regards, Jussi
-- Jussi Hirvi * Green Spot Topeliuksenkatu 15 C * 00250 Helsinki * Finland Tel. & fax +358 9 493 981 * Mobile +358 40 771 2098 (only sms) jussi.hirvi@greenspot.fi * http://www.greenspot.fi
On Tue, Nov 4, 2008 at 5:20 AM, Jussi Hirvi greenspot@greenspot.fi wrote:
Jussi Hirvi (greenspot@greenspot.fi) kirjoitteli (4.11.2008 12:17):
Hm, my CentOS 5 is pretty recent, I believe 5.2, but cannot find this stated... Hope this helps:
Sorry, I just found that "5.2", as is apparent from my previous email. :-)
You (and your /etc/redhat-release) say 5.2, but your kernel says 5.1 (5.2 shipped with 2.6.18-92)
Also, you seem to have made several modifications to the yum components of the centos-release package as well as other bits. What did you change? It's possible that these changes may be partly responsible for your issue.
Jim Perrin (jperrin@gmail.com) kirjoitteli (4.11.2008 15:23):
You (and your /etc/redhat-release) say 5.2, but your kernel says 5.1 (5.2 shipped with 2.6.18-92)
Hm, ok.
"yum update kernel" did not see anything to update (that's just because the present problem: kernel was not listed in the rpm dbs). So I did "yum list kernel" and based on that, "yum install kernel.i686".
This time the kernel update did not erase the rpm db's (or whatever happened, on two kernel updates before this).
So it seems that my system is now cured, at least for now... Don't know why. :-)
Regards, Jussi
-- Jussi Hirvi * Green Spot Topeliuksenkatu 15 C * 00250 Helsinki * Finland Tel. & fax +358 9 493 981 * Mobile +358 40 771 2098 (only sms) jussi.hirvi@greenspot.fi * http://www.greenspot.fi
Jussi Hirvi wrote:
Jim Perrin (jperrin@gmail.com) kirjoitteli (4.11.2008 15:23):
You (and your /etc/redhat-release) say 5.2, but your kernel says 5.1 (5.2 shipped with 2.6.18-92)
Hm, ok.
"yum update kernel" did not see anything to update (that's just because the present problem: kernel was not listed in the rpm dbs). So I did "yum list kernel" and based on that, "yum install kernel.i686".
This time the kernel update did not erase the rpm db's (or whatever happened, on two kernel updates before this).
So it seems that my system is now cured, at least for now... Don't know why. :-)
Sounds like your RPM database was corrupted. If so, there may well be other problems lurking. I'd try:
rm /var/lib/rpm/__* rpm --rebuilddb yum update
Should not hurt, and may well help avoid other problems.
Phil
Phil Schaffner (Philip.R.Schaffner@NASA.gov) kirjoitteli (5.11.2008 15:09):
Sounds like your RPM database was corrupted. If so, there may well be other problems lurking. I'd try:
rm /var/lib/rpm/__* rpm --rebuilddb yum update
Should not hurt, and may well help avoid other problems.
You're right, I may now have packages that yum does not "see" and thus cannot update.
I rebuilt the dbs as you suggested, but nothing seemed to change - there is nothing new for yum to update. We'll see...
- Jussi
-- Jussi Hirvi * Green Spot Topeliuksenkatu 15 C * 00250 Helsinki * Finland Tel. & fax +358 9 493 981 * Mobile +358 40 771 2098 (only sms) jussi.hirvi@greenspot.fi * http://www.greenspot.fi