Gentoo Archives: gentoo-user

From: Andrew Lowe <agl@×××××××.au>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Machine not booting properly: profile.env cannot execute binary file
Date: Wed, 25 Oct 2017 18:45:35
Message-Id: a5d9b92d-ff56-582b-debc-29d716644332@wht.com.au
In Reply to: [gentoo-user] Machine not booting properly: profile.env cannot execute binary file by Andrew Lowe
1 On 25/10/17 11:28, Andrew Lowe wrote:
2 > Hi all,
3 >     My machine went feral which resulted in me having to kill the power
4 > to kill it. Upon reboot everything looked good, fsck did it's job,
5 > [ok]'s scrolled up the screen etc and then I got the login prompt. I
6 > entered my username & password and then the fun began.
7 >
8 >     I got:
9 >
10 > -bash: .: /etc/profile.env: cannot execute binary file
11 >
12 > If I tried any command, say ls, I got:
13 >
14 > -bash: ls: no such file or dir
15 >
16 >     I've now rebooted the machine using a relatively recent sysrescueCD
17 > and had a look at profile.env and it's binary but I thought it should
18 > have been text!!!! In the top line or so it mentions "ld" for some
19 > reason. I checked the same file on the boot disk and it's text. One or
20 > two I found on line are also text.
21 >
22 >     Does anyone have any idea as to what's going on here? Should I just
23 > grab the profile.env from the boot disk and drop it into the /etc dir?
24 > Or should I go through the whole process of chroot off a gentoo disc and
25 > then run env-update as it says in the header of the text versions I'v seen?
26 >
27 >     Thoughts greatly appreciated,
28 >
29 >         Andrew
30 >
31 >
32
33 Well, I managed to work this out. I grabbed profile.env from a laptop
34 running gentoo and using sysrescuecd booted the desktop and dropped
35 profile.env into it's /etc dir. Fiddled the permissions and rebooted.
36 This time after the reboot, it only told me that it couldn't find
37 commands, ls, cd etc. Obviously pathing wasn't working. I found out
38 where env-update lived, /usr/sbin/env-update, providing the full path to
39 it, ran it then kicked over into another terminal, logged in and hey
40 presto, things are good. A reboot and this was confirmed.
41
42 The cause - I have no idea. It now works so I'm happy. Thanks for the
43 suggestions people provided,
44
45 Andrew

Replies

Subject Author
Re: [gentoo-user] Machine not booting properly: profile.env cannot execute binary file Alexander Kapshuk <alexander.kapshuk@×××××.com>