Learnt some new Fedora packaging commands

So posting, for if nothing else my later reference. I will probably need them again.

The issue was that in the last ‘yum update’ I did (it included a kernel update) it worked perfectly on three machines. On my fourth, the one I use as my main desktop it was unable to boot into the new kernel (some strange error like unable to find fs at (0,0) message).
Booting off the DVD in rescue mode had no problems finding and mounting the filesystem.

It would also still boot perfectly using the previous kernel menu option. So did that and used yum to downgrade that kernel, them yum to install that kernel. Reboot, same problem.

A yum check showed lots of packages flagged as duplicates. Also some missing pre-requisites for two packages ????.
A “package-cleanup –dupes” warned that yum transactions were outstanding.
So at some point I must have accidentally rebooted the server (or it crashed, this one has overheating probs) in the middle of a yum update.

So
(1) yum-complete-transaction
(2) package-cleanup –dupes (to display) then package-cleanup –cleandups to fix
(3) yum check
(4) rpm -e all packages with missing prerequisites
(5) yum check (any probs go to 4 or 2 as appropriate)

only when no problems left in yum-check

(optional, I did it anyway to make sure no new probs)
yum update
yum check

And then the biggie
(6) yum distro-sync

The distro-sync option will update from the repositories as does a yum update, but more importantly it will also downgrade as needed any packages that have been backed out of the repositories for some reason (ie: if they had problems).
On the machine I has booting problems on it modified 62 packages.

Then rebooted.
It now reboots of the new kernel

Phew, saved by being able to boot of the old kernel and run fixups, would have been a pain in rescue mode from the dvd boot.

So this post was made, so when I need to do it all again I have a reference.

About mark

At work, been working on Tandems for around 30yrs (programming + sysadmin), plus AIX and Solaris sysadmin also thrown in during the last 20yrs; also about 5yrs on MVS (mainly operations and automation but also smp/e work). At home I have been using linux for decades. Programming background is commercially in TAL/COBOL/SCOBOL/C(Tandem); 370 assembler(MVS); C, perl and shell scripting in *nix; and Microsoft Macro Assembler(windows).
This entry was posted in Unix. Bookmark the permalink.