LINUX GAZETTE
...making Linux just a little more fun!
(?) The Answer Gang (!)
By Jim Dennis, Ben Okopnik, Dan Wilder, Breen, Chris, and... (meet the Gang) ... the Editors of Linux Gazette... and You!


We have guidelines for asking and answering questions. Linux questions only, please.
We make no guarantees about answers, but you can be anonymous on request.
See also: The Answer Gang's Knowledge Base and the LG Search Engine



(?) I blew out Fedora with yum and 2.62

From Jack Sprat

Answered By: Benjamin A. Okopnik, Thomas Adam

I will try and balance brevity with information.

(!) [Thomas] Always a good thing :)

(?) I was on dial-up with kppp on an old 266MHz PC with Fedora running 2.6.2 kernel and running yum for the first time. I did not like the large number of not small files being downloaded to my machine and did a "kill -9" on the process. Bad bad bad. "ls" produced "Segmentation fault" as did several other commands. Machine would not reboot. Booted from rescue CDROM and "chroot" gave Segmentation fault".

(!) [Thomas] This is indicative that glibc had yet to upgrade. You should never halt the system in an upgrade if you can help it. Debian does a good job of recovery, but the point is that if you do, you'll have damaged and incomplete packages which will invariably break your system. Then you have to go down the route of rescue CDs and the like.

(?) Read up on chroot and created a static linked bash on a second machine and was able to chroot once this was in place. "ls" failed as did "vi"; pwd worked. On a good machine I compiled a static linked "ls"

(!) [Ben] *Ouch.*
ben@Fenrir:~$ ldd `which ls`
                librt.so.1 => /lib/tls/librt.so.1 (0x4002a000)
        libacl.so.1 => /lib/libacl.so.1 (0x40030000)
        libc.so.6 => /lib/tls/libc.so.6 (0x40038000)
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0x40171000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
        libattr.so.1 => /lib/libattr.so.1 (0x40180000)

When any one of those libs isn't happy, ain't *nobody* happy; almost
all of them are critical core libraries from the "libc6" kit.
(!) [Thomas] pwd worked because you were using the bash builtin as opposed to the ELF version.

(?) (I had to add -static to linker and it complained about one function not being linked in, but seems to work. Should not one be able to make static linked copies of utilities/programs such as are in Fedora coreutils?).

(!) [Thomas] No, the whole point of having dynamically linked files is that their size is reduced, making them easy to put onto floppy diskettes, etc. Not only that it allows for greater portability.

(?) With "ls" in place on the damaged machine, I was able to see what I was doing and recovered /lib from a two week old backup after "chroot"ing to the damaged file system. I have cowardly retreated to Fedora kernels and the system boots and I have discovered no problems with one exception.

(!) [Thomas] Usually something like:
mount /dev/abc /mnt && chroot /mnt /bin/bash
where /dev/abc is your damaged partition, is sufficient.

(?) On my good machine the route table when on dial up had a route to the server I am hooked up to and the name is resolved. On my damaged machine "host" and "dig" work in resolving names or IPs but the server name is not resolved in the route table. The real problem is neither Konqueror non Mozilla will go to any Internet site regardless of whether IPs or names are used. If an IP is used, such as 000.00.00.0 the name is resolved in the error message stating that "www.aaaaaaa.aaaaa.com not resolved.". Text browser lynx does work, although I am worse than a

(!) [Thomas] Sounds like you're missing:
/etc/resolv.conf
and valid entries in there.
Hint: man resolv.conf

(?) newbie with it. I have checked network files in /etc and its subdirectories and compared to my good machine until I am blue. I have turned off the firewall and commented out hosts.<deny allow>. I have done "rpm -V" on all installed rpms. Although the listing is not perfectly clean, neither is it on my good machine. I suspect something in the /usr/lib directory. I do not believe I have been hacked but of course who knows? How would you proceed?

(!) [Thomas] This is not a /usr/lib issue, but more a question of configuration. As well as checking for /etc/resolv.conf, ensure that in the file:
/etc/nsswitch.conf
you have the line:
hosts:          files dns
That, is, make sure that dns is listed after files, as above.
(!) [Ben] I'm amazed at your persistence and quite tickled by yet another demonstration of how tough Linux is. In my experience and in the stories that I've heard from others, Linux systems can be rescued from all sorts of incredible damage - and you've (mostly) managed to pull it off.
I would back up all my data, clear out the partition, do a fresh install, and put the data back on. Yeah, you could be macho about it and try to trace everything down by function... which would leave you open to problems with subsystems you're currently not using (this will, of course, happen long after you've forgotten that this damage even occurred.) Since you don't know exactly what you broke, you'll never know everything you need to fix; this is one of the situations where I'd apply my mechanic friend Ken's dictum of "keep removing stuff until you get to something you know is good and build up from there." It's also the most efficient approach at this point, IMO.

(?) I hate to clog your mailbox, but I wanted to thank Ben O. and Thomas A. for their rapid response to my 2/20 question and their insights.

I have decided to restore my backups (only two weeks old) and if that fails, reinstall from scratch and reload my data.


This page edited and maintained by the Editors of Linux Gazette
Copyright © its authors, 2004
Published in issue 101 of Linux Gazette April 2004
HTML script maintained by Heather Stern of Starshine Technical Services, http://www.starshine.org/


[ Table Of Contents ][ Answer Guy Current Index ] greetings   Meet the Gang   1   2   3   4   5   6   7 [ Index of Past Answers ]