Re: chroot: can't execute command "/bin/bash": No such file or directory

2023-06-18 Thread Jeffrey Walton
On Sun, Jun 18, 2023 at 5:03 AM Mario Marietto  wrote:
>
> [...]
> I've debootstrapped jessie on Ubuntu 14.04 with this command :
>
> debootstrap --foreign --arch=armhf jessie jessie-armhf 
> http://archive.debian.org/debian
>
> and it worked ok,but when I try to chroot within it :
>
> root@marietto-Z87-HD3:/home/marietto/Scrivania/Chromebook/linux-distros# 
> chroot ./jessie-armhf /bin/bash
>
> it gives the following error :
>
> chroot: can't execute command "/bin/bash": No such file or directory

Omit the interpreter:

# cd /home/marietto/Scrivania/Chromebook/linux-distros
# chroot jessie-armhf

Also see https://www.cryptopp.com/wiki/Debian_Chroot#Entering_a_Guest .

I seem to recall SPARC or SPARC64 will give problems. It crashes
immediately in /bin/sh or /bin/bash.

Jeff



Re: chroot: can't execute command "/bin/bash": No such file or directory

2023-06-18 Thread Tim Woodall

On Sun, 18 Jun 2023, Mario Marietto wrote:


Hello.

with qemu works,but I thought that it was better to avoid the usage of
qemu.


I'm a bit puzzled what you're trying to do.

if you want to chroot on an amd64 machine then you have to use something
like qemu to emulate the armhf processor.

If you're using debootstrap --foreign then you have to take the half
installed os to an armhf architecture.




Re: chroot: can't execute command "/bin/bash": No such file or directory

2023-06-18 Thread Tim Woodall

On Sun, 18 Jun 2023, Mario Marietto wrote:


Hello.

Maybe a little problem for you,but a bigger problem for me. I've
debootstrapped jessie on Ubuntu 14.04 with this command :

debootstrap --foreign --arch=armhf jessie jessie-armhf
http://archive.debian.org/debian

and it worked ok,but when I try to chroot within it :

root@marietto-Z87-HD3:/home/marietto/Scrivania/Chromebook/linux-distros#
chroot ./jessie-armhf /bin/bash


it gives the following error :


chroot: can't execute command "/bin/bash": No such file or directory


but I see the file bash within the directory /bin of the debootstrapped
directory called "jessie-armhf". What could be the problem ? thanks.



I'm not familiar with debootstrap and --foreign, but don't you have to
run stage2 install on the foreign architecture?

Try chroot with a dash shell - that should work. I'm not sure if bash needs
some configure scripts running before it's usable

FWIW, I have my own installer and I do weekly installs of jessie armel
on amd64 without problems - but I use qemu to emulate the processor.


No idea if this is of any use but below is my log of the install. There are a
handful of "~tjw" packages, these are almost identical to the real packages,
just have some dependencies and tweaks so that apt can work out an unpack and
configure order for the entire system and to a very large extent the install
uses only apt and dpkg. By the time the log below gets to:
Phase 1 UNTAR bootstrap-essential_1686529226.0+bootstrap_*.deb
there's enough system setup that I can chroot (using dash at this point)
(bootstrap-essential is just a package that depends on the other packages that
need to be installed to get to this point.)


$ cat build-deb-tarfile-jessie-armel.log
Get:1 http://aptmirror17.home.woodall.me.uk/clean jessie InRelease [6994 B]
Ign:2 http://archive.debian.org/debian jessie InRelease
Get:3 http://aptmirror17.home.woodall.me.uk/clean jessie/bootstrap armel 
Packages [4180 B]
Get:4 http://archive.debian.org/debian-security jessie/updates InRelease [44.9 
kB]
Get:5 http://archive.debian.org/debian jessie Release [148 kB]
Get:6 http://archive.debian.org/debian jessie Release.gpg [2420 B]
Get:7 http://archive.debian.org/debian-security jessie/updates/main Sources 
[366 kB]
Get:8 http://archive.debian.org/debian-security jessie/updates/main armel 
Packages [763 kB]
Get:9 http://archive.debian.org/debian-security jessie/updates/main 
Translation-en [401 kB]
Ign:6 http://archive.debian.org/debian jessie Release.gpg
Get:10 http://archive.debian.org/debian jessie/main Sources [7063 kB]
Get:11 http://archive.debian.org/debian jessie/main armel Packages [6676 kB]
Get:12 http://archive.debian.org/debian jessie/main Translation-en [4581 kB]
Fetched 20.1 MB in 9s (2198 kB/s)
Reading package lists...
W: GPG error: http://archive.debian.org/debian jessie Release: The following signatures were 
invalid: EXPKEYSIG 8B48AD6246925553 Debian Archive Automatic Signing Key (7.0/wheezy) 
 EXPKEYSIG 7638D0442B90D010 Debian Archive Automatic Signing Key 
(8/jessie)  EXPKEYSIG CBF8D6FD518E17E1 Jessie Stable Release Key 
 75DDC3C4A499F1A18CB5F3C8CBF8D6FD518E17E1
W: The repository 'http://archive.debian.org/debian jessie Release' is not 
signed.
Check rebuild minimal.tar.xz
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  apt base-files base-passwd bash bsdutils coreutils dash debconf debconf-i18n
  debian-archive-keyring debianutils diffutils dpkg e2fslibs e2fsprogs
  findutils gcc-4.8-base gcc-4.9-base gnupg gpgv grep gzip hostname init
  init-system-helpers initscripts insserv libacl1 libapt-pkg4.12 libattr1
  libaudit-common libaudit1 libblkid1 libbz2-1.0 libc-bin libc6 libcomerr2
  libdb5.3 libdebconfclient0 libgcc1 libgcrypt20 libgpg-error0
  liblocale-gettext-perl liblzma5 libmount1 libncurses5 libpam-modules
  libpam-modules-bin libpam-runtime libpam0g libpcre3 libreadline6 libselinux1
  libsemanage-common libsemanage1 libsepol1 libslang2 libsmartcols1 libss2
  libstdc++6 libsystemd0 libtext-charwidth-perl libtext-iconv-perl
  libtext-wrapi18n-perl libtinfo5 libusb-0.1-4 libustr-1.0-1 libuuid1 login
  lsb-base mawk mount multiarch-support ncurses-base ncurses-bin passwd
  perl-base readline-common sed sensible-utils startpar sysv-rc sysvinit-core
  sysvinit-utils tar tzdata util-linux zlib1g
Suggested packages:
  aptitude | synaptic | wajig dpkg-dev apt-doc python-apt bash-doc debconf-doc
  debconf-utils whiptail | dialog | gnome-utils libterm-readline-gnu-perl
  libgtk2-perl libnet-ldap-perl perl libqtgui4-perl libqtcore4-perl
  diffutils-doc wdiff gpart parted e2fsck-static mlocate | locate gnupg-doc
  libpcsclite1 parcimonie xloadimage | imagemagick | eog less bootchart2
  glibc-doc locales rng-tools libpam-doc nfs-common readline-doc bum bootlogd
  sash bzip2 ncompress xz-utils tar-scripts dosfstools kbd | console-tools
  util-linux-locales
Recommend

Re: chroot: can't execute command "/bin/bash": No such file or directory

2023-06-18 Thread Mario Marietto
lt)

On Sun, Jun 18, 2023 at 1:19 PM Mario Marietto 
wrote:

> ---> Just to be sure: is your Ubuntu (and your system) armhf?
>
> As host I've installed ubuntu 14.04 (for amd64) and I've installed ubuntu
> 14.04 for arm-hf on the arm chromebook (the variant armel version does not
> exist for the 14.04).
>
> ---> If not, you'll need something like qemu-user to emulate armhf.
>
> yes,I've fixed the error by using qemu-debootstrap,but I tried to use
> debootstrap because qemu-debootstrap gives some errors when I update the
> chroot environment.
>
> On Sun, Jun 18, 2023 at 1:01 PM Eduardo M KALINOWSKI <
> edua...@kalinowski.com.br> wrote:
>
>> On 18/06/2023 06:02, Mario Marietto wrote:
>> > Hello.
>> >
>> > Maybe a little problem for you,but a bigger problem for me. I've
>> > debootstrapped jessie on Ubuntu 14.04 with this command :
>> >
>> > debootstrap --foreign --arch=armhf jessie jessie-armhf
>> > http://archive.debian.org/debian <http://archive.debian.org/debian>
>> >
>> > and it worked ok,but when I try to chroot within it :
>> >
>> > root@marietto-Z87-HD3:/home/marietto/Scrivania/Chromebook/linux-distros#
>>
>> > chroot ./jessie-armhf /bin/bash
>> >
>> >
>> > it gives the following error :
>> >
>> >
>> > chroot: can't execute command "/bin/bash": No such file or directory
>> >
>> >
>> > but I see the file bash within the directory /bin of the debootstrapped
>> > directory called "jessie-armhf". What could be the problem ? thanks.
>>
>> Just to be sure: is your Ubuntu (and your system) armhf?
>>
>> If not, you'll need something like qemu-user to emulate armhf.
>>
>> (I'd expect I different error message in case of trying to run a binary
>> for another architecture, but one never knows...)
>>
>> --
>>Goes (Went) over like a lead balloon.
>>
>> Eduardo M KALINOWSKI
>> edua...@kalinowski.com.br
>>
>>
>
> --
> Mario.
>


-- 
Mario.


Re: chroot: can't execute command "/bin/bash": No such file or directory

2023-06-18 Thread Mario Marietto
---> Just to be sure: is your Ubuntu (and your system) armhf?

As host I've installed ubuntu 14.04 (for amd64) and I've installed ubuntu
14.04 for arm-hf on the arm chromebook (the variant armel version does not
exist for the 14.04).

---> If not, you'll need something like qemu-user to emulate armhf.

yes,I've fixed the error by using qemu-debootstrap,but I tried to use
debootstrap because qemu-debootstrap gives some errors when I update the
chroot environment.

On Sun, Jun 18, 2023 at 1:01 PM Eduardo M KALINOWSKI <
edua...@kalinowski.com.br> wrote:

> On 18/06/2023 06:02, Mario Marietto wrote:
> > Hello.
> >
> > Maybe a little problem for you,but a bigger problem for me. I've
> > debootstrapped jessie on Ubuntu 14.04 with this command :
> >
> > debootstrap --foreign --arch=armhf jessie jessie-armhf
> > http://archive.debian.org/debian <http://archive.debian.org/debian>
> >
> > and it worked ok,but when I try to chroot within it :
> >
> > root@marietto-Z87-HD3:/home/marietto/Scrivania/Chromebook/linux-distros#
>
> > chroot ./jessie-armhf /bin/bash
> >
> >
> > it gives the following error :
> >
> >
> > chroot: can't execute command "/bin/bash": No such file or directory
> >
> >
> > but I see the file bash within the directory /bin of the debootstrapped
> > directory called "jessie-armhf". What could be the problem ? thanks.
>
> Just to be sure: is your Ubuntu (and your system) armhf?
>
> If not, you'll need something like qemu-user to emulate armhf.
>
> (I'd expect I different error message in case of trying to run a binary
> for another architecture, but one never knows...)
>
> --
>Goes (Went) over like a lead balloon.
>
> Eduardo M KALINOWSKI
> edua...@kalinowski.com.br
>
>

-- 
Mario.


Re: chroot: can't execute command "/bin/bash": No such file or directory

2023-06-18 Thread Eduardo M KALINOWSKI

On 18/06/2023 06:02, Mario Marietto wrote:

Hello.

Maybe a little problem for you,but a bigger problem for me. I've 
debootstrapped jessie on Ubuntu 14.04 with this command :


debootstrap --foreign --arch=armhf jessie jessie-armhf 
http://archive.debian.org/debian <http://archive.debian.org/debian>


and it worked ok,but when I try to chroot within it :

root@marietto-Z87-HD3:/home/marietto/Scrivania/Chromebook/linux-distros# 
chroot ./jessie-armhf /bin/bash



it gives the following error :


chroot: can't execute command "/bin/bash": No such file or directory


but I see the file bash within the directory /bin of the debootstrapped 
directory called "jessie-armhf". What could be the problem ? thanks.


Just to be sure: is your Ubuntu (and your system) armhf?

If not, you'll need something like qemu-user to emulate armhf.

(I'd expect I different error message in case of trying to run a binary 
for another architecture, but one never knows...)


--
  Goes (Went) over like a lead balloon.

Eduardo M KALINOWSKI
edua...@kalinowski.com.br



Re: chroot: can't execute command "/bin/bash": No such file or directory

2023-06-18 Thread Darac Marjal


On 18/06/2023 10:02, Mario Marietto wrote:

Hello.

Maybe a little problem for you,but a bigger problem for me. I've 
debootstrapped jessie on Ubuntu 14.04 with this command :


debootstrap --foreign --arch=armhf jessie jessie-armhf 
http://archive.debian.org/debian <http://archive.debian.org/debian>


and it worked ok,but when I try to chroot within it :

root@marietto-Z87-HD3:/home/marietto/Scrivania/Chromebook/linux-distros# 
chroot ./jessie-armhf /bin/bash



it gives the following error :


chroot: can't execute command "/bin/bash": No such file or directory


but I see the file bash within the directory /bin of the 
debootstrapped directory called "jessie-armhf". What could be the 
problem ? thanks.


I believe that one of the causes for this message can be that one of the 
dynamic libraries needed to run the program is not found.


You could try "chroof ./jessie-armhf /usr/bin/ldd /bin/bash" to see 
which libraries bash depends on, and whether they can be found.




--
Mario.


OpenPGP_signature
Description: OpenPGP digital signature


chroot: can't execute command "/bin/bash": No such file or directory

2023-06-18 Thread Mario Marietto
Hello.

Maybe a little problem for you,but a bigger problem for me. I've
debootstrapped jessie on Ubuntu 14.04 with this command :

debootstrap --foreign --arch=armhf jessie jessie-armhf
http://archive.debian.org/debian

and it worked ok,but when I try to chroot within it :

root@marietto-Z87-HD3:/home/marietto/Scrivania/Chromebook/linux-distros#
chroot ./jessie-armhf /bin/bash


it gives the following error :


chroot: can't execute command "/bin/bash": No such file or directory


but I see the file bash within the directory /bin of the debootstrapped
directory called "jessie-armhf". What could be the problem ? thanks.

-- 
Mario.