[SOLVED] "cannot activate network device eth0"

Issues related to configuring your network
pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: "cannot activate network device eth0"

Postby pschaff » 2011/01/14 02:34:42

Apparently another artifact of the disk corruption mentioned earlier. Try reinstalling module-init-tools but a look at full rpm verify output is in order. The forum attachment function is broken. You can post it to http://pastebin.centos.org and provide a link, or post in-line if not too long; however, about all that would tell us is how many packages you need to reinstall. The real answer may be a disk replacement and reinstall if it is a hardware problem.

It is rather mystifying why "the company" should charge that much or take that long for a CentOS reinstall. It should only take a matter of a few hours, worst case, for a competent administrator. If they are now using RHEL then that kind of cost should cover both the license and the installation.

captainentropy
Posts: 16
Joined: 2010/12/27 23:22:31

Re: "cannot activate network device eth0"

Postby captainentropy » 2011/01/15 00:34:08

Thanks for the reply pschaff. I posted the RPM verify output as suggested. Here's the link http://pastebin.centos.org/36672
I reinstalled module-init-tools and that didn't make a difference, at least as far as the kernel panic or the ethernet problem goes.

I haver three kernels installed, is that a problem?

It's definietely not a hardware issue preventing the ethernet from working. If I boot into a liveCD I can access the interenet no problem. If I go into rescue mode with the CentOS install DVD and mount the sysimage I can ping google.com for example.

As for the company - we are flummoxed by that as well. They used to use RedHat, now it's all CentOS.

Is there anything I can do with the rescue mode on the install DVD?

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: "cannot activate network device eth0"

Postby pschaff » 2011/01/15 02:29:41

Was the pastebin the entire output of

Code: Select all

rpm -qa --verify
?

I'm not sure what to make if it, but the results do not seem sufficiently random to be the result of disk problems, and some of the files showing different size, md5sum, and time could be targets for a cracker. Nothing is obviously related to a network issue except possibly dbus. No sign of kernel module issues that I can spot. Perhaps this should be on the Security forum.

captainentropy
Posts: 16
Joined: 2010/12/27 23:22:31

Re: "cannot activate network device eth0"

Postby captainentropy » 2011/01/15 02:39:44

ok, I reinstalled the kernel, and kernel devel, (somewhere suggested I be root for that) and I got past the kernel panic for booting to that kernel. But the ethernet is still down. Same errors as before. I posted the rpm -qa verify output as before here http://pastebin.centos.org/36673

So you're thinking the machine was attacked? I'm not sure, how would that explain my other drive conking out at the same time I had all the filesystem errors? I can access the network when booted into the sysimage or other OS liveCD.

User avatar
toracat
Forum Moderator
Posts: 7261
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: "cannot activate network device eth0"

Postby toracat » 2011/01/15 10:18:07

In other words, networking (and everything else) works fine if you boot from a LiveCD and run 'chroot /mnt/sysimage' ? But if you boot from the hard drive, networking fails? Is this the case?

A typical run of 'rpm -qa --verify' on a healthy system does not return much (most of them are changes in config files). Your output shows modification of a number of files (corrupt?) probably caused by the drive failure you experienced.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: "cannot activate network device eth0"

Postby pschaff » 2011/01/15 13:04:41

Interesting that the two pastebin samples are so different. I suspect both may be incomplete. You could try a "yum reinstall" from installation media of all packages that fail to verify, but the only clean solution seems to be a clean reinstall.

User avatar
AlanBartlett
Forum Moderator
Posts: 9317
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: "cannot activate network device eth0"

Postby AlanBartlett » 2011/01/15 19:02:38

I've reviewed all that has occurred in my absence and can see that both toracat & Phil have continued down the path that I started to tread.

Time, I think, for a practical example. Please note that I am performing this example from my laptop which is running RHEL 6.0 and not CentOS 4 but the logic should be identical.

Obtain a sorted list of suspect file names --

Code: Select all

[b]rpm -qa --verify 2>/dev/null | awk -F" /" '{ print "/"$2 }' | sort | uniq > suspect-files.txt[/b]

From that list, create a list of packages that may need to be re-installed --

Code: Select all

[b]for E in $(cat suspect-files.txt); do rpm -qf $E --qf "%{N}\n"; done | sort | uniq > suspect-packages.txt[/b]

Now review that list by eye. Remove from it any obviously silly packages for the next step (e.g. the kernel).

Code: Select all

[b][i]eyeballs+brain[/i] < suspect-packages.txt > packages-to-replace.txt[/b]

Copy each of those packages from the installation medium into an empty temporary directory on the hard disk.
Make that directory your current working directory. Re-install those packages --

Code: Select all

[b]yum --disablerepo \* reinstall $(cat packages-to-replace.txt)[/b]

captainentropy
Posts: 16
Joined: 2010/12/27 23:22:31

Re: "cannot activate network device eth0"

Postby captainentropy » 2011/01/15 21:28:19

@toracat. Yes, that is exactly right. That was the first thing I did to rule out a hardware issue.

As soon as I get the system back to a normal operational state (if, that is) I'm going to clone the drive onto a new disk.

@Phil. Is the "yum reinstall" done from the mounted sysimage in the rescue mode?

I agree the reinstall would be the preferred route but the reason I can't is that would erase the special software I need to use our microscope. The company won't provide the install media so I'd have to send the computer back to them and pay $500 plus shipping and wait 4-6 weeks for them to return it or pay them $1500 and get a new computer with the software in 2-4 weeks. If I can't repair this by the end of the week my hand will be forced - we've lost too much time as it is :(

@Alan. Thanks! I'll give that a try tomorrow or Monday.

cheers

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: "cannot activate network device eth0"

Postby pschaff » 2011/01/15 21:58:22

captainentropy wrote:
...
@Phil. Is the "yum reinstall" done from the mounted sysimage in the rescue mode?

Alan's detailed method supersedes my comment.

User avatar
AlanBartlett
Forum Moderator
Posts: 9317
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: "cannot activate network device eth0"

Postby AlanBartlett » 2011/01/15 22:19:34

Alan's detailed method supersedes my comment.

But, thinking about it, I wonder if, having booted from the install medium via linux rescue and having a working network connection, one could then chroot and use the packages-to-replace.txt file as input to yum, thus reinstalling using the current packages from the local mirror site?

Further thoughts . . . perhaps -- hmm . . . Phil, toracat? :-o