LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 04-03-2013, 03:19 AM   #1
mr_aliagha
LQ Newbie
 
Registered: Dec 2008
Posts: 25

Rep: Reputation: 0
Centos refuse to boot with elf header error!


Recently, after a power supply crash problem, my linux machine (Centos 5.8 X64) did not boot neither gnome nor shell. On gnome startup it shows this error: /etc/X11/prefdm: line 16: :/etc/sysconfig/desktop: cannot execute binary file /usr/bin/rhgb-client: error while loading shared libraries: /usr/lib64/libpopt.so.0 invalid ELF header

I tried rescue disk, but it couldnt recognize my OS! I am pretty sure that the hard disk is healthy. could somebody please help me for booting this machine? i have some important services running on this machine which i need it fast.
Best Regards.
 
Old 04-03-2013, 06:20 PM   #2
rnturn
Member
 
Registered: Jan 2003
Location: Illinois (Chicago area)
Distribution: Red Hat (8.0), SuSE (10.x, 11.x, 12.2, 13.2), Solaris (8-10), Tru64
Posts: 982

Rep: Reputation: 53
Quote:
Originally Posted by mr_aliagha View Post
/etc/X11/prefdm: line 16: :/etc/sysconfig/desktop: cannot execute binary file /usr/bin/rhgb-client: error while loading shared libraries: /usr/lib64/libpopt.so.0 invalid ELF header
Corrupted file, perhaps? I can easily see a power supply failure causing a file corruption. (I had such a failure manage to corrupt "init" some years ago. Fixing that was, um, interesting.) The hard disk may be physically fine. Corrupted files are definitely a possibility. Even if you are able to fix the corrupted library file, there could be others that got scribbled on when the PS failed.

BTW, the file referenced in the error message, is actually a symbolic link to the file libpopt.so.0.0.0. (I'll refer to that file from hereon as it's the file that you'll need to be looking at.)

Quote:
I tried rescue disk, but it couldnt recognize my OS! I am pretty sure that the hard disk is healthy.
What do you mean that you tried the rescue disk? What do you mean by "it couldnt recognize my OS"?

Surely you have a bootable CD that you can use to boot the system. The CD that was used to install Linux on the system nearly always has a "repair" option. If so, use/select the "rescue" option. NOTE: Stay far, far away from the "Installation" option. If it's a "live" CD that allowed you to preview Linux before installing, that should be fine, too. (I've never seen a Live CentOS CD but I would be surprised if one didn't exist.) If you have neither one, you may be sunk until you find one or the other.

Let's assume, though, that you are able to get a Linux booted from the CD. Once you get that system booted, perform an "fsck" on the affected filesystem. This is the one containing the /usr/lib64 directory where the "libpopt.so.0" is located. It'll likely be on "sda". In fact, I would run "fdisk -l /dev/sda" to list all the Linux partitions on the disk and then run "fsck" on each Linux filesystem (for example, "e2fsck /dev/sda1"). You should verify that you have uncorrupted filesystems before doing any further recovery. (If you have multiple disks, it would be a good idea to verify all the Linux filesystems on those disks as well.)

Hope this helps get you started on recovery. Please post your results and we can move on to figuring out what can be done about the probably-corrupted library file.

--
Rick
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Invalid ELF header? Am I screwed? MythN00b Linux - Software 2 01-25-2008 06:52 AM
Transcode invalid ELF header DragonM15 Linux - Software 8 05-13-2007 11:09 PM
Invalid ELF Header Error when Compiling - Dell Inspiron 600m rudane Linux - Desktop 0 10-03-2006 06:12 PM
Wine: Invalid ELF Header stevesk Linux - Software 1 07-17-2006 10:50 PM
libpcre invalid ELF header error. geoffd4 Linux - Software 0 05-10-2004 10:30 PM


All times are GMT -5. The time now is 05:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration