Let me say it: you, the CentOS and RHEL teams SHOULDN'T let something like this happen. I think you realise how many machines got screwed and don't have snapshots or something like this, not with CentOS 6.x. More: why did this happened in 17th january, when you know about this since 14th, was that hard just to pull down that stupid update?
Yeap. I did it
I didn't do any particular thing, just a yum update; there were 3 updates, 2 nss related and the wbm-server by the Webmin team. It updated just one of the nss stuff and the server went berserk. Founding merely no info about this at that time, I started to search the web about how to solve it. And I might got into a worse situation. I take pride in my backups, I have all the critical data in all kind of safe places - but I usually don't backup the whole filesystem as the backups/restores never get it quite right so it is better to go with a fresh OS; and I didn't knew that something like this might happen of course, else I would have added the /var/lib directory... For me it was about the confs, the databases, the user data and so on. So I don't have a backup of that directory.
All the posts were going with rpm -vv --rebuilddb. Which apparently did nothing but really destroying the rpm database:
Code: Select all
[root@ns1 ~]# yum update
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Update Process
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. $releasever is not a valid release or hasnt been released yet/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/$releasever/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base
[root@ns1 ~]# less /var/cache/yum/x86_64/$releasever/base/mirrorlist.txt
/var/cache/yum/x86_64//base/mirrorlist.txt: No such file or directory
Code: Select all
[root@ns1 rpm]# cd /var/lib/rpm/
[root@ns1 rpm]# rm -f /var/lib/rpm/__db*
[root@ns1 rpm]# db_dump Packages-BAKUP | db_load Packages
[root@ns1 rpm]# rpm --rebuilddb
[root@ns1 rpm]# yum update
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Update Process
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. $releasever is not a valid release or hasnt been released yet/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/$releasever/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base
[root@ns1 rpm]#
Code: Select all
[root@ns1 rpm]# rpm -q httpd
package httpd is not installed
[root@ns1 rpm]# yum install httpd
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. $releasever is not a valid release or hasnt been released yet/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/$releasever/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base
Code: Select all
[root@ns1 rpm]# uname -a
Linux ns1.mumu.ro 2.6.32-504.3.3.el6.x86_64 #1 SMP Wed Dec 17 01:55:02 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@ns1 rpm]# cat /etc/redhat-release
CentOS release 6.6 (Final)
And are there any other dangers besides the rpm and yum not working? Think not but I really don't know, just asking? I am hoping to get over this week and install a CentOS 7 the next week-end...