packages
packages copied to clipboard
schroot: Chroot setup failed: stage=setup-start
Maintainer: @jmarcet @ptpt52 @neheb Environment: OpenWrt 23.05.2 on Arm64 (Raspberry Pi 4B)
Description: Unable to start schroot environment: Chroot setup failed: stage=setup-start
- Create chroot with debootstrap --no-check-gpg --arch=arm64 bullseye /srv/chroot/debian
- Create file in /etc/schroot/chroot.d
[debian]
description=Debian environment
directory=/srv/chroot/debian
aliases=bullseye
type=directory
users=root
groups=root
root-groups=root
- Start with schroot -c debian
E: 20copyfiles: /etc/schroot/setup.d/20copyfiles: line 42: /bin/stat: not found
E: 70services: /etc/schroot/setup.d/70services: line 48: tac: not found
E: debian-1711263744-18335: Chroot setup failed: stage=setup-start
Install coreutils-stat and coreutils-tac as hinted by those messages.
@alex9434 Can you confirm it works well with both coreutils-stat
& coreutils-tac
packages installed? I'm the maintainer of schroot
but I've always tested the package in a box where I have all of coreutils
installed.
@jmarcet Apologies for the delay in getting back. Yes, installing coreutils-stat
& coreutils-tac
solved the issue. Since I am building from source I was thinking about just using stat and tac from busybox. Would that also work?
I only now get an error message because ash is not included in the debian setup.
W: Shell ‘/bin/ash’ not available: /bin/ash: Failed to stat file: No such file or directory
W: Falling back to shell ‘/bin/bash’
shell=/bin/bash
in the config solved the issue. You might want to include that in the package.
There is an additional dependency on coreutils-realpath when exiting the schroot:
E: 15killprocs: /etc/schroot/setup.d/15killprocs: line 42: realpath: not found
E: android-1712316017-2771: Chroot setup failed: stage=setup-stop
Installing coreutils-realpath
solved the issue.
The only question would be whether to include in the Makefile the dependency on Busybox or coreutils. I think we can close the issue now.
@jmarcet Apologies for the delay in getting back. Yes, installing
coreutils-stat
&coreutils-tac
solved the issue. Since I am building from source I was thinking about just using stat and tac from busybox. Would that also work?
@alex9434 See the PR I've opened, it includes an updated 01-openwrt.patch
which brings compatibility with busybox's stat (built with BUSYBOX_CONFIG_FEATURE_STAT_FORMAT
option).
I only now get an error message because ash is not included in the debian setup.
W: Shell ‘/bin/ash’ not available: /bin/ash: Failed to stat file: No such file or directory W: Falling back to shell ‘/bin/bash’
shell=/bin/bash
in the config solved the issue. You might want to include that in the package.
Where does that ash
come from? I can't find it within /etc/schroot
or any other of the files in the schroot
ipk package, which is what I could check now.
There is an additional dependency on coreutils-realpath when exiting the schroot:
E: 15killprocs: /etc/schroot/setup.d/15killprocs: line 42: realpath: not found E: android-1712316017-2771: Chroot setup failed: stage=setup-stop
Installing
coreutils-realpath
solved the issue.
Great! Thanks for the feedback :) I had missed that one.
The only question would be whether to include in the Makefile the dependency on Busybox or coreutils. I think we can close the issue now.
In the PR I've added both as options, it is missing realpath
ATM though.
Where does that
ash
come from? I can't find it within/etc/schroot
or any other of the files in theschroot
ipk package, which is what I could check now.
ash is the default shell in OpenWrt. I think schroot tries to call the same shell. However, debootstrap installs only bash by default hence the error message.
BTW: realpath is also available in Busybox
SHELL=/bin/sh chroot bootstrap
Where does that
ash
come from? I can't find it within/etc/schroot
or any other of the files in theschroot
ipk package, which is what I could check now.ash is the default shell in OpenWrt. I think schroot tries to call the same shell. However, debootstrap installs only bash by default hence the error message.
I'm used to specify which command I want to execute with schroot
, be it a shell or any other command. I was not remembering it defaults to the host's $SHELL
.
BTW: realpath is also available in Busybox
I've updated the PR to also include realpath
, whether from busybox
or from coreutils
.