public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Andrew Lowe <agl@wht.com.au>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Machine not booting properly: profile.env cannot execute binary file
Date: Thu, 26 Oct 2017 02:45:25 +0800	[thread overview]
Message-ID: <a5d9b92d-ff56-582b-debc-29d716644332@wht.com.au> (raw)
In-Reply-To: <13632be0-a3a3-2395-567e-7d67ff7cfd28@wht.com.au>

On 25/10/17 11:28, Andrew Lowe wrote:
> Hi all,
>     My machine went feral which resulted in me having to kill the power
> to kill it. Upon reboot everything looked good, fsck did it's job,
> [ok]'s scrolled up the screen etc and then I got the login prompt. I
> entered my username & password and then the fun began.
> 
>     I got:
> 
> -bash: .: /etc/profile.env: cannot execute binary file
> 
> If I tried any command, say ls, I got:
> 
> -bash: ls: no such file or dir
> 
>     I've now rebooted the machine using a relatively recent sysrescueCD
> and had a look at profile.env and it's binary but I thought it should
> have been text!!!! In the top line or so it mentions "ld" for some
> reason. I checked the same file on the boot disk and it's text. One or
> two I found on line are also text.
> 
>     Does anyone have any idea as to what's going on here? Should I just
> grab the profile.env from the boot disk and drop it into the /etc dir?
> Or should I go through the whole process of chroot off a gentoo disc and
> then run env-update as it says in the header of the text versions I'v seen?
> 
>     Thoughts greatly appreciated,
> 
>         Andrew
> 
> 

	Well, I managed to work this out. I grabbed profile.env from a laptop
running gentoo and using sysrescuecd booted the desktop and dropped
profile.env into it's /etc dir. Fiddled the permissions and rebooted.
This time after the reboot, it only told me that it couldn't find
commands, ls, cd etc. Obviously pathing wasn't working. I found out
where env-update lived, /usr/sbin/env-update, providing the full path to
it, ran it then kicked over into another terminal, logged in and hey
presto, things are good. A reboot and this was confirmed.

	The cause - I have no idea. It now works so I'm happy. Thanks for the
suggestions people provided,

	Andrew


  parent reply	other threads:[~2017-10-25 18:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-25  3:28 [gentoo-user] Machine not booting properly: profile.env cannot execute binary file Andrew Lowe
2017-10-25  3:50 ` Dale
2017-10-25  5:37 ` Alexander Kapshuk
2017-10-25 18:45 ` Andrew Lowe [this message]
2017-10-25 19:25   ` Alexander Kapshuk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a5d9b92d-ff56-582b-debc-29d716644332@wht.com.au \
    --to=agl@wht.com.au \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox