Just done a fresh install on a Pi2 to test a new Pi cam.
Was working well on wired connection.
I setup a WiFi connection and that was working fine for a while and then I started to get this error on login using WinSCP and then PuTTY:
-bash: /DietPi/dietpi/login: cannot execute binary file: Exec format error.
This happens with wired and wireless connections.
Reflashed the SD and did and set it all up again - all working for a while and then same error ocurred.
Couldn't find a solution with Google - any ideas?
Pi2 error on login
Re: Pi2 error on login
Hi John,johnvick wrote: -bash: /DietPi/dietpi/login: cannot execute binary file: Exec format error.
This could indicate either a incorrect architecture for the bash binary (would be very strange), or, a corrupt filesystem.
Can you try running the following and paste results if it fails:
Code: Select all
/bin/bash /DietPi/dietpi/dietpi-cpuinfo
and please paste results of:
Code: Select all
echo -e "$PATH"
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Re: Pi2 error on login
Hi Fourdee,
/bin/bash /DietPi/dietpi/dietpi-cpuinfo - gives:
/DietPi/dietpi/dietpi-cpuinfo: /DietPi/dietpi/dietpi-cpuinfo: cannot execute binary file
echo -e "$PATH" - gives:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binecho -e /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binls
It's looking like the system is stuffed - I cannot run dietpi-software or the other utils on the home page.
I am wondering about an inadequate power supply - it was good enough for the Pi on its own but add a camera and wifi dongle maybe not so.
I'll get a better one today and try again.
/bin/bash /DietPi/dietpi/dietpi-cpuinfo - gives:
/DietPi/dietpi/dietpi-cpuinfo: /DietPi/dietpi/dietpi-cpuinfo: cannot execute binary file
echo -e "$PATH" - gives:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binecho -e /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binls
It's looking like the system is stuffed - I cannot run dietpi-software or the other utils on the home page.
I am wondering about an inadequate power supply - it was good enough for the Pi on its own but add a camera and wifi dongle maybe not so.
I'll get a better one today and try again.
Re: Pi2 error on login
Hi John,johnvick wrote:Hi Fourdee,
/bin/bash /DietPi/dietpi/dietpi-cpuinfo - gives:
/DietPi/dietpi/dietpi-cpuinfo: /DietPi/dietpi/dietpi-cpuinfo: cannot execute binary file
echo -e "$PATH" - gives:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binecho -e /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binls
It's looking like the system is stuffed - I cannot run dietpi-software or the other utils on the home page.
I am wondering about an inadequate power supply - it was good enough for the Pi on its own but add a camera and wifi dongle maybe not so.
I'll get a better one today and try again.
Looks like the PATH is broken in /etc/profile. Please backup the current file
Code: Select all
/bin/mv /etc/profile /etc/profile.bak
Code: Select all
/bin/cat << _EOF_ > /etc/profile
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
if [ "`id -u`" -eq 0 ]; then
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
else
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games"
fi
export PATH
if [ "\$PS1" ]; then
if [ "\$BASH" ] && [ "\$BASH" != "/bin/sh" ]; then
# The file bash.bashrc already sets the default PS1.
# PS1='\h:\w\\$ '
if [ -f /etc/bash.bashrc ]; then
. /etc/bash.bashrc
fi
else
if [ "`id -u`" -eq 0 ]; then
PS1='# '
else
PS1='\$ '
fi
fi
fi
if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.sh; do
if [ -r \$i ]; then
. \$i
fi
done
unset i
fi
_EOF_
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Re: Pi2 error on login
Also, can you paste output of:
Code: Select all
/bin/cat /etc/bash.bashrc
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Re: Pi2 error on login
Hi Fourdee,
Jumped the gun a bit and decided to reflash and start again - sorry if this has not helped your debugging exercise.
I've borrowed a better power supply from another device and so far so good - wifi and cam working.
And the shell login is back as it should be.
Thanks again for your help.
John
Jumped the gun a bit and decided to reflash and start again - sorry if this has not helped your debugging exercise.
I've borrowed a better power supply from another device and so far so good - wifi and cam working.
And the shell login is back as it should be.
Thanks again for your help.
John
Re: Pi2 error on login
Hi John,johnvick wrote:Hi Fourdee,
Jumped the gun a bit and decided to reflash and start again - sorry if this has not helped your debugging exercise.
I've borrowed a better power supply from another device and so far so good - wifi and cam working.
And the shell login is back as it should be.
Thanks again for your help.
John
No worries, reinstall never fails


If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Re: Pi2 error on login
Hi Fourdee,
After a few days of trouble free use a similar problem has arisen and now when I login I get:
-bash: /DietPi/dietpi/login: No such file or directory
The dietpi folder is empty.
Any ideas? There is not much on the system so I plan to rebuild on a new SD card - I'll keep the existing one as is if you want to debug.
John
After a few days of trouble free use a similar problem has arisen and now when I login I get:
-bash: /DietPi/dietpi/login: No such file or directory
The dietpi folder is empty.
Any ideas? There is not much on the system so I plan to rebuild on a new SD card - I'll keep the existing one as is if you want to debug.
John
Re: Pi2 error on login
Hi John,johnvick wrote:Any ideas? There is not much on the system so I plan to rebuild on a new SD card - I'll keep the existing one as is if you want to debug.
John
Very strange. It could be a filesystem corruption (PSU/SD issue).
Yes, worth trying a new card and stable PSU if possible. If you dont have one already, the official RPI PSU's are extremely good, I use them for all microUSB powered boards and i've never had an issue with them. Worth every penny for that peice of mind and stability.
Did you manually install/config any programs on the device? Or solely using dietpi-software?
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Re: Pi2 error on login
Hi Fourdee,
All I did was install PHPMyAdmin, MySQL - through your interface.
I suspect the SD card as dietpi has worked very reliably on a Pi 1 and XU4 here.
The PSU is an Apple 10W which I would have thought good enough for a Pi 2 with USB wifi and Pi Cam?
John
All I did was install PHPMyAdmin, MySQL - through your interface.
I suspect the SD card as dietpi has worked very reliably on a Pi 1 and XU4 here.
The PSU is an Apple 10W which I would have thought good enough for a Pi 2 with USB wifi and Pi Cam?
John