NanoBSD: Current/NANO_ARCH=aarch64: chroot: : No such file or directory
Hartmann, O.
ohartmann at walstatt.org
Thu Oct 12 13:39:36 UTC 2017
On Wed, 11 Oct 2017 16:53:46 -0600
Ian Lepore <ian at freebsd.org> wrote:
> On Wed, 2017-10-11 at 20:47 +0200, O. Hartmann wrote:
> > Trying to install a successfully cross compiled FreeBSD
> > (TARGET=arm64) as NanoBSD. NanoBSD is configure using
> > NANO_ARCH="aarch64".
> >
> > Port emulators/qemu-user-static is installed and loaded:
> >
> > 8 1 0xffffffff8243f000 1564 imgact_binmisc.ko
> >
> > When installing NanoBSD's world and then running mtree, the nanobsd
> > script runs into this error:
> >
> > /pool/nanobsd/aarch64/NANO_aarch64/_.w/./boot/loader.conf.local
> > 283 blocks
> > + [ -n /home/user/Projects/router/nanobsd/mtree/Files.mtree -a \
> > -f /home/user/Projects/router/nanobsd/mtree/Files.mtree
> > ]
> > + CR 'mtree -eiU -p /'
> > + chroot /pool/nanobsd/aarch64/NANO_aarch64/_.w '' /bin/sh -exc
> > 'mtree -eiU -p /' chroot: : No such file or directory
Oops, I confused the output.
The correct one is:
[ from _.cust.cust_install_files ]
...
+ chroot /pool/nanobsd/aarch64/NANO_aarch64/_.w /bin/sh -exc 'mtree
-eiU -p /' chroot: /bin/sh: No such file or directory
The empty '' is due to my (hopeless helpless) attempt to fit-in another
variable which was set to an empty string.
The error looks to me as chroot does't find the proper shell, /bin/sh,
but it has been properly installed:
# file _.w/bin/sh
_.w/bin/sh: ELF 64-bit LSB executable, ARM aarch64, version 1
(FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for
FreeBSD 12.0 (1200051), FreeBSD-style, stripped
# ll _.w/bin/sh
839832 -r-xr-xr-x 1 root wheel uarch 261K 12 Okt. 15:32 _.w/bin/sh
NanoBSD works on the native host when building on host arch amd64 for
host arch amd64 and I guess it is due to the properly installed OS of
the host.
I do not get the problem here. qemu_user_static should catch up with
the alien binary here - I suppose it does. The absolute path should
ensure the use of the right binary ...
Regards,
Oliver
> >
>
> I'm not sure how or why it's happening (I've never used nanobsd), but
> the complaint is about those empty quotes ('') between the pathname
> and the /bin/sh in the chroot command. It's trying to run a program
> named '' and chroot is complaining that it can't find anything named
> that.
>
> -- Ian
>
> > Is there anything I miss here with the QEMU emulator catching up?
> >
> > Thanks in advance,
> >
> > Oliver
> >
More information about the freebsd-arm
mailing list