Solved

RedHat crash during glibc2.0.7 installation.

Posted on 1998-12-14
12
298 Views
Last Modified: 2013-12-15
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?
0
Comment
Question by:einarbe
  • 5
  • 4
  • 3
12 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1631899
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 glibc.so .
Not shure if RedHat has an ldconfig, if so start it (after reading man-pages ;-)
Reboot.
0
 

Author Comment

by:einarbe
ID: 1631900
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.)
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1631901
If this is the "LILO:" prompt, yes.
0
 

Author Comment

by:einarbe
ID: 1631902
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 :-))
0
 
LVL 1

Accepted Solution

by:
zblaxell earned 300 total points
ID: 1631903
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.
0
 
LVL 1

Expert Comment

by:zblaxell
ID: 1631904
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...
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 51

Expert Comment

by:ahoffmann
ID: 1631905
some Linuxs have static executables in /sbin, so booting
  linux init=/sbin/sh
meight help.
0
 
LVL 1

Expert Comment

by:zblaxell
ID: 1631906
/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.
0
 

Author Comment

by:einarbe
ID: 1631907
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?
0
 
LVL 1

Expert Comment

by:zblaxell
ID: 1631908
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 ftp://ftp.redhat.com/pub/redhat/redhat-5.2/i386/RedHat/RPMS/glibc-2.0.7-29.i386.rpm

This is more or less what the install program on the Red Hat floppies does anyway.
0
 

Author Comment

by:einarbe
ID: 1631909
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?
0
 

Author Comment

by:einarbe
ID: 1631910
Thank you for your kind help, I ended up installing the whole thing over again.
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
How to use Video memory as swap or ramdrive ? 1 63
Linux operating system 12 66
change time in cron 4 41
Sendmail STARTTLS error 37 44
Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now