If I had RedHat 5.4 on disk I would use that to just reinstall.
However, for some reason I cannot fathom, the people who are in
charge of KU's satellite server for RedHat iso files don't stay up
to date, so I don't got no 5.4 disk.
Anyway, I engineered an almost super human feat. First, I booted the
system, and ran the yum-complete-transaction thing, and I watched in
horror as the system methodically removed about 200 rpms. Something
had gone wrong so that the new rpm were not installed and the old
were removed, including rpm, basically everything. Then the super
human part came into play. In the system's
/var/cache/yum/rhel-i386-client folder, the new 5.4 upgrade rpms
were available, and I had the disk with the 5.3 rpms. I tell you it
was a mighty flurry of commands. Mighty!
I worked it back to the place where the system will start. The
kernel is found, all the services start, and it comes to a login
prompt.
But no users can log in. It lets you type in a user name, but it
does not ask for a password. It just pops back saying username:
again. Some rpm package that controls the login process must not
have gotten installed. Or else a post-install script did not complete.
If you could help me figure out which rpms might need to be
re-installed, then I could go back at this tomorrow morning and succeed.
pj
--
Paul E. Johnson email: paul...@ku.edu
Professor, Political Science http://pj.freefaculty.org
1541 Lilac Lane, Rm 504
University of Kansas Office: (785) 864-9086
Lawrence, Kansas 66044-3177 FAX: (785) 864-5700
It would probably take you less time to back up the user's data and
reinstall the machine. You *do* do installs via kickstart, I hope...
-Dario
--
**************************************************************
Dario Landazuri Triangle Fraternity Minn97Ok
da...@landazuri.net
http://www.landazuri.net
**************************************************************
Put 30 kids in a room with an easel, a computer, and a guitar.
You'll get one Van Gogh, one Von Neumann, and one Van Halen
(or Van Morrison). And 27 burger flippers.
-Dr. Damian Conway
However, there is another way.
In theory, you should be able to find a file in /root called
anaconda-ks.cfg This is a file that you could pass to a kickstart to
rebuild the machine in the future. Towards the bottom it lists all the
RPMs that were put on the machine at install time. You can feed those
scripts to yum and rebuild the machine. If you see a name that starts
with a @, that is a group. You need to feed that to "yum groupinstall /
yum groupupdate". I recommend you use update as much as you can to
prevent duplicates.
Of course, all packages installed after the fact - won't be listed.
Jeffrey Watts wrote:
> Yeah, yum-complete-transaction can be dangerous if you've aborted an
> install at an inappropriate time. Basically it loses state and does the
> cleanup (remove) but doesn't finish the install.
>
> To be honest you're wasting your time. I'd boot off of a live USB
> stick, back up the user data, and do a fresh install. You've lost state
> on that machine and you won't know what's missing. Most likely little
> weird problems are going to pop up again and again as you discover more
> missing packages.
>
> A backup and reinstall will only take an hour or two.
>
> Jeffrey.
>
> On Thu, Sep 24, 2009 at 9:45 PM, Paul Johnson <paul...@ku.edu
--
========================================================
D. Hageman <dhag...@dracken.com>
Dracken Technology, Inc. http://www.dracken.com/
========================================================
I do agree with Dario and Jeffrey on this. A re-install would probably
be the optimal way to get the machine back up and running.
However, there is another way.
In theory, you should be able to find a file in /root called
anaconda-ks.cfg This is a file that you could pass to a kickstart to
rebuild the machine in the future. Towards the bottom it lists all the
RPMs that were put on the machine at install time. You can feed those
scripts to yum and rebuild the machine. If you see a name that starts
with a @, that is a group. You need to feed that to "yum groupinstall /
yum groupupdate". I recommend you use update as much as you can to
prevent duplicates.
Of course, all packages installed after the fact - won't be listed.
The process is no different from doing a "yum update" with an already
installed machine.
Yum wouldn't be a very good tool if it didn't work that way.
I might have mis-interpreted your e-mail though.
--
I don't see how obsoletes would be a concern. The yum process would
acquire the most recent information and install all the appropriate
packages based on the current dependency tree in the repository at that
time. Packages that are obsolete should be skipped and the replacement
should be installed.
The process is no different from doing a "yum update" with an already
installed machine.
Yum wouldn't be a very good tool if it didn't work that way.
I might have mis-interpreted your e-mail though.
I think you're overgeneralizing that statement - it's just an ongoing
evaluation of the trade-off between how much time spent trying to
debug/fix a problem vs. nuking it. Nuking it is not always the right
answer.
-Dario
--
************************************************************
Dario Landazuri Triangle Fraternity Minn97Ok
da...@landazuri.net
http://www.landazuri.net
************************************************************
"It don't mean a thing if it ain't got that certain
je ne sais quoi."
-Peter Schickele
I think you're overgeneralizing that statement - it's just an ongoing evaluation of the trade-off between how much time spent trying to debug/fix a problem vs. nuking it. Nuking it is not always the right answer.But all y'all are right - back-up user data, install anew. That's the right answer for just about any "It's broken" problem these days. (eSATA drive frames recommended)
I think I understand what you are trying to convey, but I think you
might be over analyzing the issue.
a) obsolete processing is the default. So upgrade and update work the same.
b) If during an update, the person kills off the process and the update
wasn't completed - the old packages were removed and the new packages
weren't installed - you essentially have a bare bones system.
Using the original anaconda-ks.cfg shouldn't be an issue as *most* of
the packages listed are in groups. The group names really don't change,
but what is included in them might. So, you are pointed at the new
repository because this all started because you were doing an
update/upgrade. When you do an update/upgrade on a bare bones systems
... you shouldn't really have to worry about obsoletes.
I guess if you are overly concerned and want to be pedantic, use upgrade
or "updates --obsoletes" to ensure you get the results you want.
At any rate, as I said before - I would just do a clean install.
Quoth the man page in the *update* section taken from a RHEL box:
"If the main obsoletes configure option is true (default) or the
--obsoletes flag is present yum will include package obsoletes
in its calculations - this makes it better for distro-version
changes, for example: upgrading from somelinux 8.0 to somelinux
9."
As I said in my last message, the *default* is that obsoletes option is
true. Thus, upgrade and update is essentially the same out of the box.
Yes, you can change the behavior to match what you describe, but that
is not the *default*.
You can verify this by looking at your /etc/yum.conf and looking for:
obsoletes=1
Sorry man, I do know how run a Linux box. ;-)
Never trust the documentation:
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.4 (Tikanga)
# grep obsoletes /etc/yum.conf
obsoletes=1
Justin
[root@mail ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.4 (Tikanga)[root@mail ~]# rpm -q yum
yum-3.2.22-20.el5It doesn't paste well, but here is other relevant information about yum:
Build Date: Tue 07 Jul 2009 02:15:42 PM CDT
Build Host: ls20-bc2-14.build.redhat.com
Signature : DSA/SHA1, Wed 29 Jul 2009 06:37:48 AM CDT, Key ID
5326810137017186
And I did a verify on the RPM to ensure it hadn't been modified and it
came back clean.
Sorry man, I can't tell you why your system is different from mine.
FYI - the Fedora page reads the same as the RedHat.
Just out of curiosity, even though your man page doesn't say it - what
does your yum.conf say?
"Rebuild, don't repair."
Bloody courtesy.
> Regardless, we both agree that a reinstall is the best approach.
>
I agree. If I had RedHat 5.4, I would install a clean system.
But the KU guy that is supposed to download the updates is slow, and
I don't want to install 5.3 again only to have to wrestle with
updates to 5.4.
In the meanwhile, I've used my super cow powers to make the system
work again.
In case you are ever stubborn like me, here is a neat trick you can
do if you boot from the rescue disk.
The Rescue mounts the existing installed system on
/mnt/sysimage
and it invites you to chroot to access it. But if you have no vitals
like "ls" or "mount" or "MAKEDEV", that's a bad idea.
However, while running from the CD, you can do commands like
rpm -Uvh fileutils.XXX,XXX.rpm --relocate=/=/mnt/sysimage
and the rpm system will install all of the files onto /mnt/sysimage
as if it were /.
This works even for packages that are not relocatable!
I expect I will make a fresh install of 5.4 once I get the disk, and
I'll make a system image for all our systems from it. Until then,
that guy's system is running in boy scout mode.
I have had a problem like that, you need to boot from a live cd and
restore or recreate the /etc/shadow file.
mike