[SOLVED] Chroot fails

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
User avatar
Atip
Posts: 539
Joined: 5. Jun 2011, 04:27

[SOLVED] Chroot fails

Post by Atip »

Untill not long ago I could use chroot. Now suddenly it fails
giving error

Code: Select all

]# chroot /hd
chroot: failed to run command '/bin/bash': Exec format error
Booted into Slackel and got same error.

I assume it has something to do with one of the latest upgrades,
of what file I wouldnot know..
Last edited by Atip on 24. Nov 2016, 03:10, edited 1 time in total.
User avatar
gapan
Salix Wizard
Posts: 6361
Joined: 6. Jun 2009, 17:40

Re: Chroot fails

Post by gapan »

What is inside that /hd directory? Are you sure it worked before? With the same directory? My guess is it never worked before and you are confused.
Image
Image
User avatar
Atip
Posts: 539
Joined: 5. Jun 2011, 04:27

Re: Chroot fails

Post by Atip »

Have no Internet connection at the house at the moment.

Inside the /hd directory is the the entire directory
I want to chroot to.

Yes it worked before when I followed your instruction.

It does not work in Slackel.

It does work in SalixLive.
DidierSpaier
Posts: 539
Joined: 20. Jun 2016, 20:15

Re: Chroot fails

Post by DidierSpaier »

Two things to check:
1) Is there a file /hd/bin/bash?
2) Does the system in /hd have the same architecture (32-bit or 64-bit ) as the one from where you type the chroot command?

To check, compare the results of these commands:

Code: Select all

file /bin/bash
file /hd/bin/bash
User avatar
Atip
Posts: 539
Joined: 5. Jun 2011, 04:27

Re: [SOLVED] Chroot fails

Post by Atip »

Thanks! That was the problem, the architecture. I forgot that
the directory I wanted to chroot is on 64-bit and mine on 32-bit. ;)

Got my Internet back after one week w/o. Problem was at base station
something blew-up they said. :evil:
Post Reply