Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Whenever I issue the command

./fwupd /dev/sda 

I get the following:

bash: ./fwupd: cannot execute binary file

I'm trying to update my SSD's firmware using Ubuntu 11.04 LiveCD.

How do I successfully issue the command?

share|improve this question
    
Likely you are in the wrong directory. Try running sudo updatedb && locate fwupd to find where that app is –  Marco Ceppi Sep 28 '11 at 18:51

4 Answers 4

Looks like you are sourcing the file, instead of running it.

Try executing it using the full path, something like

sudo /home/user/fwupd /dev/sda
share|improve this answer
    
The full path is unnecessary. However, you're true on the sourcing part for which +1 –  Lekensteyn Sep 28 '11 at 19:10
    
@Lekensteyn: What do you suggest then? The error message suggests sourcing, but the command itself looks OK, not something like . ./fwud. Confusing. –  arrange Sep 28 '11 at 19:12
    
You're right, it shows something else like bash: .: ./fwupd: cannot execute binary file. It looks like an arch issue, see my answer. –  Lekensteyn Sep 28 '11 at 19:35

I've just tried some things and it looks like you're trying to execute the 64-bit fwupd binary on a 32-bit Live CD.

Grab the .zip file (which is in fact a tarball, shame on them) from http://www.ocztechnology.com/ssd_tools/ and extract it using tar. E.g. if the file is named fwupd_v2.12.05.zip, run:

tar xf fwupd_v2.12.05.zip

Then jump into the directory containing the 32-bit fwupd binary and run it with superuser privileges:

cd fwupd_v2.12.05/linux32
sudo ./fwupd /dev/sda

Note that if the reverse happens (e.g. you're running a 32-bit binary on a 64-bit machine without compatibility libraries), the error is different:

bash: ./fwupd: No such file or directory

This can be solved by installing ia32-libs (for Ubuntu 11.04 Natty and before) or libc6:i386 (for Ubuntu 11.10 Oneiric and up).

Finally, if the file was not executable, the error would be:

bash: ./fwupd: Permission denied

This would be solved by making it executable:

chmod +x fwupd
share|improve this answer
    
That must be it ;) –  arrange Sep 28 '11 at 19:37
    
Interesting. I've done some more research (execute_cmd.c) and it seems bash tries to execve() the command, but execve returns with ENOEXEC because of the arch error. Unfortunately bash does not return this error directly, but tries to give a smarter error message by testing if the file is a bash script or a binary file. In this case it would be better if we got the original Exec format error message from execve. –  arrange Sep 28 '11 at 20:29

Have you updated the permissions on the file? It should be chmod 0755 fwupd

share|improve this answer

I had a file named 'env' and was getting the same error:

. env
bash: .: /usr/bin/env: cannot execute binary file

It turned out that env was some kind of reserved name, which was causing problems. Changing the name to something more obscure solved it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.