LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 03-14-2010, 02:23 PM   #1
maas187
Member
 
Registered: Aug 2008
Location: Yemen
Distribution: Fedora, CentOS, RedHat , OpenFiler, ESXI
Posts: 225

Rep: Reputation: 32
Question Bash- :cannot execute binary file (Ubuntu VM on ESXI server)


Hi to all,

I have installed Ubuntu on one of my ESXI servers as a web server.

Yesterday i have been getting all errors on my system on boot.


and most of my commands do not work, such as "ls,chmod,netstat" and so on . the error is:

bash: /bin/ls cannot execute binary file.

FYI:
Kernel = 2.6.24-24-server #1 SMP Fri Sep 18 16:41:05 UTC 2009 x86_64 GNU/Linux

Thank you for your help.

Last edited by GrapefruiTgirl; 03-14-2010 at 05:16 PM. Reason: title fixup
 
Old 03-14-2010, 02:37 PM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Bash always produces errors when you try to use it like that. It is intended to be used on the command-line like that, to execute SHELL SCRIPTS, not binaries. Binaries do not run in the shell.

If this is not a fresh clean installation, I would be investigating if perhaps the previous installation may have had a lot of wrapper-scripts and/or shell aliases configured for some of these common commands you indicate are failing, and the aliases or wrappers are now broken with this new installation. Specifically, it looks like shell aliases were set up to run scripts, which subsequently ran the actual binary command.

Check /etc/profile and/or /etc/profile.d/* and/or ~/.profile and check for shell aliases that do not work. Try the command:
Code:
shell# alias -p

or

shell# alias
to look at any configured aliases.

Sasha
 
Old 03-14-2010, 02:51 PM   #3
maas187
Member
 
Registered: Aug 2008
Location: Yemen
Distribution: Fedora, CentOS, RedHat , OpenFiler, ESXI
Posts: 225

Original Poster
Rep: Reputation: 32
Check /etc/profile and/or /etc/profile.d/* and/or ~/.profile and check for shell aliases that do not work. Try the command:
Code:
shell# alias -p

or

shell# alias
to look at any configured aliases.

Sasha[/QUOTE]

SHELL#: alias -p ,,,, and alias outputs this ?

alias ls='ls --color=auto'

?? dose that make any sense to you .

Thank you for your help.
 
Old 03-14-2010, 03:09 PM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by maas187 View Post
alias ls='ls --color=auto'

?? dose that make any sense to you .
It makes sense -- when you use the ls "command" it runs ls --color=auto instead of simply ls but that does not explain why it results in "cannot execute binary file".

You could check whether aliases are the problem as Sasha suggested by running unalias -a. That would remove all your aliases so using the ls "command" should use the standard /bin/ls executable. You can always find out what ls actually is by type ls or which ls.
 
Old 03-14-2010, 03:10 PM   #5
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Yes, that's a common alias for `ls` -- it makes the ls listings colored, like for different filetypes, folders, etc. so that's OK.

Please show us the output of:
Code:
shell# which ls

and

shell# file /bin/ls
and from some directory, please show exactly the output of trying to use the ls command (copy and paste the exact output to your next post). And yes, what catkin wrote too -- `type /bin/ls`

Thanks Charles.

Sasha

Last edited by GrapefruiTgirl; 03-14-2010 at 03:12 PM.
 
Old 03-14-2010, 03:16 PM   #6
maas187
Member
 
Registered: Aug 2008
Location: Yemen
Distribution: Fedora, CentOS, RedHat , OpenFiler, ESXI
Posts: 225

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by GrapefruiTgirl View Post
Yes, that's a common alias for `ls` -- it makes the ls listings colored, like for different filetypes, folders, etc. so that's OK.

Please show us the output of:
Code:
shell# which ls

and

shell# file /bin/ls
and from some directory, please show exactly the output of trying to use the ls command (copy and paste the exact output to your next post). And yes, what catkin wrote too -- `type /bin/ls`

Thanks Charles.

Sasha
Thank you for your reply guys .

here are the results.

# which ls
/bin/ls
# file /bin/ls
bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), corrupted program header size, corrupted section header size.



To be honest it seems like the system it self is locked, when i boot up is shows some errors in rc.d/ nothing is really running.
 
Old 03-14-2010, 03:22 PM   #7
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
I don't like that part about "corrupted program header size, corrupted section header size" -- doesn't sound healthy.

I believe there is a larger problem going on here, since you now mention:
Quote:
To be honest it seems like the system it self is locked,
when i boot up is shows some errors in rc.d/ nothing is really running..
I suggest you start at the very beginning:

Tell us about this EXSI server. Did it ever work right, such as before Ubuntu? What was it running before Ubuntu, if anything, and how did you go about putting Ubuntu on it.

Please post for us the contents of /var/log/dmesg and /var/log/messages from on the server, after booting it.

Sasha
 
Old 03-14-2010, 03:41 PM   #8
maas187
Member
 
Registered: Aug 2008
Location: Yemen
Distribution: Fedora, CentOS, RedHat , OpenFiler, ESXI
Posts: 225

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by GrapefruiTgirl View Post
I don't like that part about "corrupted program header size, corrupted section header size" -- doesn't sound healthy.

I believe there is a larger problem going on here, since you now mention:


I suggest you start at the very beginning:

Tell us about this EXSI server. Did it ever work right, such as before Ubuntu? What was it running before Ubuntu, if anything, and how did you go about putting Ubuntu on it.

Please post for us the contents of /var/log/dmesg and /var/log/messages from on the server, after booting it.

Sasha
Well,
I have an ESXI server running multiple system. and i installed a new Virtual Machine Ubuntu on it to run as a webserver, its been a week since iam running this system and it was fine until yesterday.

So Ubuntu is a Webserver running as a VM on ESXI .

dmesg .
Same binary issue .

cat /var/log/messages
Cant really post anything since my SSH is not even on and cant really export anything but , i have this.
all i see in the past 7 days is
"Mar 11 06:27:15 titan -- MARK --"
and thelist goes on .....
 
Old 03-14-2010, 03:53 PM   #9
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
I'm now wondering if this thread would be better served in the "Virtualization" area of LQ -- what do you think? If you agree, I'll move it there for you.

Sasha
 
Old 03-14-2010, 04:06 PM   #10
maas187
Member
 
Registered: Aug 2008
Location: Yemen
Distribution: Fedora, CentOS, RedHat , OpenFiler, ESXI
Posts: 225

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by GrapefruiTgirl View Post
I'm now wondering if this thread would be better served in the "Virtualization" area of LQ -- what do you think? If you agree, I'll move it there for you.

Sasha
Go crazy do what ever you feel like. '

 
Old 03-14-2010, 04:26 PM   #11
maas187
Member
 
Registered: Aug 2008
Location: Yemen
Distribution: Fedora, CentOS, RedHat , OpenFiler, ESXI
Posts: 225

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by maas187 View Post
Go crazy do what ever you feel like. '

Has it been moved yet ?

and thankx
 
Old 03-14-2010, 05:15 PM   #12
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Yes, it has now been moved to "Virtualization" -- I hope this helps some as I myself am not experienced with VM stuff.

I also edited the title a little bit, to give a bit more insight into the thread.

Best of success!

Sasha

Last edited by GrapefruiTgirl; 03-14-2010 at 05:16 PM.
 
Old 03-14-2010, 05:40 PM   #13
fbsduser
Member
 
Registered: Oct 2009
Distribution: Hackintosh, SlackWare
Posts: 267

Rep: Reputation: 30
Is the OS you're having problems with in a VM? OR is it the host one? If it's one VM. Have you checked to see if your server was improperly shut down. Disk corruption can do serious damage to virtual HD image files and their contents.
 
Old 03-14-2010, 10:20 PM   #14
maas187
Member
 
Registered: Aug 2008
Location: Yemen
Distribution: Fedora, CentOS, RedHat , OpenFiler, ESXI
Posts: 225

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by fbsduser View Post
Is the OS you're having problems with in a VM? OR is it the host one? If it's one VM. Have you checked to see if your server was improperly shut down. Disk corruption can do serious damage to virtual HD image files and their contents.

Its the VM that is causing this error, other VM's is just fine.

I dont why most of my commands are not running.

Its either someone installed some buggy program or the VMDK file is just locked.

????
FYI >
its an Ubuntu Server. running as a VM on ESXI server.
 
Old 03-15-2010, 01:34 AM   #15
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
What I'd do is decouple the guests VMDK, mount it and then check the system logs (maybe that will show clues), then verify hashes to see which utilities have been hit by corruption. If you made backups you could try and restore one but until you've got a fix on what causes the corruption reliability remains zero.
 
  


Reply



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
bash: ./plain2snt.out: cannot execute binary file stuuns Linux - Software 3 08-07-2007 02:33 AM
bash: ./runcbl: cannot execute binary file message Earla Harding Linux - Enterprise 0 07-27-2005 02:39 PM
Mandrake9.2, bash: /cannot execute binary file premier_la Linux - Software 10 01-23-2004 02:53 AM
Mendrake9.2, bash: cannot execute binary file premier_la Mandriva 4 01-22-2004 05:16 PM
bash: /bin/cat: cannot execute binary file inTUXicated Linux - General 9 08-06-2003 07:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 05:03 PM.

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
Open Source Consulting | Domain Registration