TL;DR: copy the /root
folder outside chroot into the chroot directory
The <(...)
operator is known as process substitution and is a way to run command, output of which goes into anonymous pipe. That's what /dev/fd/63 is. The idea is to allow external command ( here it's bash
) to treat another commands output as if it was a file. Generally the form would be to use <
to redirect that pseudo-file object into bash
's input stream.
bash < <(wget -q0 https://raw.githubusercontent.com/ubports/unity8-desktop-install-tools/master/install.sh)
This is generally no different from wget https://stuff.com/blah | bash
. In both cases, it's generally not recommended to use such commands unless you're hundred percent sure the script you're downloading isn't from sketchy source and isn't malware.
However, since you've mentioned running command in chroot
and the script outputs No such file or directory root
, and because bash allows running scripts as bash script.sh
here your script is being executed, but there's no directory named root
in your chroot. You could just fix it via sudo cp -R /root chrootdir
. For better results I'd suggest just reading the script first, see what it needs, and copy that to the chroot folder, and only then run the script locally within the folder. No need to run wget multiple times
So the script works. Errors in shell scripting generally in form <shell>: <command user typed>: error message
so the script being temporarily stored as /dev/fd/63 and runs, it just doesn't find what it needs.
See also,