RedHat crash during glibc2.0.7 installation.

My RedHat 5.2 installation has crashed after an aborted installation of glibc2.0.7. This was done with the shell script "soprep" delivered with StarOffice 5.0. I made a mistake and did not start the script in a new shell, as I should, but ran it from the root login shell. (By the way; is this a mortal sin?)

Now LILO stops quite soon, and the last message is:
VFS:Mounted root (ext2 filesystem) read only.

I have not made an image disk for rescue purposes. Now I wonder: How can I save this installation?
Who is Participating?

Improve company productivity with a Business Account.Sign Up

zblaxellConnect With a Mentor Commented:
Depending on what you trashed, it might be difficult to rescue the system at all.  glibc is critical to the operation of almost every single system program in Linux, including /sbin/init, /bin/sh, and others.  Even if you manage to boot your system with a trashed glibc, it might not do very much.

If you have the CD-ROM version of Red Hat and you can boot it (either a floppy or the CD-ROM), then go into the installation utility as far as the disk partitioning, then STOP and use Alt-F2 to switch consoles.  There should be a bash prompt, from which you can mount the hard disk you trashed and finish the installation of glibc with 'rpm -Uvh --force --root=/path/to/your/root/filesystem /path/to/the/cdrom/glibc-...i386.rpm'.

If you need to find out where things are mounted, use 'cat /etc/mtab' if 'df' doesn't work.
try to boot in single user mode: append  single  as parameter to the image name at the LILO prompt.
Run fsck and check in your lib directory if the library was installed, and if there is the old one. Probably you just have have to change the link .
Not shure if RedHat has an ldconfig, if so start it (after reading man-pages ;-)
einarbeAuthor Commented:
Do you mean the prompt I get when booting from the installation "Boot.img"-disk from red hat? (Because as I wrote I did _not_ make a rescue img disk.)
Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

If this is the "LILO:" prompt, yes.
einarbeAuthor Commented:
Booting from the boot.img-disk only gets me into installation mode, as this disk, from version 5.2 does not serve as a rescue disk.
I have also tried to boot in single user mode from the harddisk, but I end up with the same line as mentioned earlier.

The booting goes very fast, and I can not read all the messages, but among what I can read there are three lines that may point to what is wrong (including the before mentioned last line):

ide0: buggy cmd 640 b interface on PCI (type1), config=0x5e

hda: hda1 hda2 < hda5 hda6 hda7 hda8 hda9 hda10 >
VFS: Mounted root (ext2 filesystem) readonly.

Does any of this ring any bells? (Apart from the Christmas bells :-))
Also: everything up to the message "VFS:Mounted root (ext2 filesystem) read only." comes from the Linux kernel (the kernel package), not from any files on the disk.  The "buggy cmd 640 b interface" warning indicates you have buggy hardware but workarounds are enabled and the message is otherwise irrelevant.  The 'hda: hda1...' line is just reading out a summary of your partition table.

The thing that normally comes after "mounted root" is the start of /sbin/init.  That won't work if your glibc is trashed because /sbin/init needs glibc to run.

You could also try 'linux init=/bin/ash' or 'linux init=/bin/sh' at your LILO prompt.  Probably neither would work, but if they do, hey, that's a pleasant surprise...
some Linuxs have static executables in /sbin, so booting
  linux init=/sbin/sh
meight help.
/sbin/sh might help (except in Red Hat 5.2 which doesn't have it, but does have /sbin/ash.static instead).  However, once you have the system running there are still problems:

- If you want to change a symlink to point to an older version of libc, 'ln', 'mv', and 'cp' all rely on libc.
- ls relies on libc, so you can't see where you're going.
- mount relies on libc.

/bin/rpm does not rely on libc, so it might actually work if you could mount the CD.  But you can't, because you can't use mount or the automounter.
einarbeAuthor Commented:
I have installed from a redhat mirror site, so all I have is a boot disk and a supp. disk. Booting from the boot disk I have done what you suggested about the virtual consoles, and have fixed errors on the disk by using e2fsck. The result is still the same, and I would like to do what you suggested:
 'rpm -Uvh --force --root=/path/to/your/root/filesystem path/to/the/cdrom/glibc-...i386.rpm' - only I don't have a CD, and the package is too big for a floppy. Is it possible to use a path to a ftp server instead?
Select "FTP install" from the boot disk, load the supp disk, get to the shell prompt, then type:

rpm --Uvh --force --root=/path/to/your/root/filesystem

This is more or less what the install program on the Red Hat floppies does anyway.
einarbeAuthor Commented:
Hello again,
I still have a problem, and now maybe the core of it:

Trying to force the installation of glibc.2-0.7, as you suggested, in short this happens:

Retrieving ftp://... etc
Skipping ftp://... etc - transfer failed - IO error to local file.
error: cannot open file //var/tmp/rpm-ftp-0-50.tmp

The directories /var/tmp are present. What strikes me as odd is that there are two slashes (//) before "var", can this be significent?
einarbeAuthor Commented:
Thank you for your kind help, I ended up installing the whole thing over again.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.