SliTaz SliTaz Forum

You are not logged in.

#1 2019-03-28 19:18:45

Ceel
Administrator
Registered: 2011-04-02
Posts: 1,424

Cannot create a chroot environment

Hello,

Not familiar with chroot but I have already create one a few years ago without any particular problem. This evening:[c]

# mount -t proc proc /home/ceel/CHROOT/proc

# mount -t sysfs sysfs /home/ceel/CHROOT/sys

# mount -t devpts devpts /home/ceel/CHROOT/dev/pts

# mount -t tmpfs shm /home/ceel/CHROOT/dev/shm[/c]

and[c]

# chroot /home/ceel/CHROOT

chroot: can't execute '/bin/bash': No such file or directory[/c]

OK, maybe it's because bash is installed[c]

# bash chroot /home/ceel/CHROOT

/usr/sbin/chroot: /usr/sbin/chroot: cannot execute binary file

# sh chroot /home/ceel/CHROOT

sh: can't open 'chroot': No such file or directory[/c]

After removing bash[c]

# chroot /home/ceel/CHROOT

chroot: can't execute '/bin/sh': No such file or directory[/c]

sad

What am I doing wrong or missing?!

Offline

#2 2019-03-28 21:59:56

Ceel
Administrator
Registered: 2011-04-02
Posts: 1,424

Re: Cannot create a chroot environment

Ok. The answer tomorrow, go to bed smile

Offline

#3 2019-03-29 06:03:10

mojo
Administrator
Registered: 2011-03-29
Posts: 2,174

Re: Cannot create a chroot environment

I saw this error when I was booted into slitaz and tried to chroot into amd64(64bit)debian:

/usr/sbin/chroot: /usr/sbin/chroot: cannot execute binary file

Both slitaz and slitaz64 have 32-bit binaries and can only chroot into a file system with 32-bit binaries.

Offline

#4 2019-03-29 21:57:10

Ceel
Administrator
Registered: 2011-04-02
Posts: 1,424

Re: Cannot create a chroot environment

Hi mojo,

The problem was me. The bigger the trap, the less I see it.

[c]No such file or directory[/c]. I didn't understand because stupidly I was looking in the host not in the chroot... and I didn't finished to install it, /bin (and others directories) was missing.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.018 seconds, 7 queries executed - Memory usage: 1.53 MiB (Peak: 1.77 MiB) ]