termux / proot

An chroot-like implementation using ptrace.
https://wiki.termux.com/wiki/PRoot
Other
761 stars 160 forks source link

debootstrap won't work #127

Closed ZhymabekRoman closed 3 years ago

ZhymabekRoman commented 3 years ago

Hello. I use proot-distro, Ubuntu 20. And debootstrap won't work : Screenshot_20201031-085923_Termux

$ debootstrap focal /home
mknod: /home/test-dev-null: Function not implemented
E: Cannot install into target '/home' mounted with noexec or nodev

What data do I need to provide so that you can solve the problem ?

ghost commented 3 years ago

@ZhymabekRoman It seems Debootstrap attempts to create device nodes. normally creating device nodes requires root access nor not supported in android (even inside the /data directory). and i think android mounts /data directory as nodev mount, so that's most likely that mknod command won't work. debootstrap needs to be fixed here (further reading)

Try using linux deploy then use Debootstrap there (well I'm not sure it that works also).

And it seems proot-distro cannot be run as root user. so you can't Debootstrap inside proot

michalbednarski commented 3 years ago

Debootstrap here tried to use mknod to create device nodes (which is not allowed for unprivileged processes nor usable within /data. There probably won't be emulation of that in proot, use Termux's patched debootstrap (available from Termux apt) instead of installing debootstrap inside proot-distro.

(If you want you might use debootstrap to create rootfs in home of proot-distro ($PREFIX/var/lib/proot-distro/installed-rootfs/ubuntu/home), although I'm not sure if that would be usable)

ZhymabekRoman commented 3 years ago

Ohhh, OK, thanks !