termux / proot

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

hostname: Function not implemented #181

Open zxq432 opened 2 years ago

zxq432 commented 2 years ago

Problem description

localhost ~ # hostname gentoo
hostname: Function not implemented

script-PROOT_VERBOSE9.log.txt

Steps to reproduce

$ pkg install proot-distro
$ proot-distro install gentoo
$ proot-distro login gentoo
$ hostname gentoo

Expected behavior

# hostname
localhost
# hostname gentoo
# hostname
gentoo

Additional information

~ $ term-info
Application version:
0.117
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://termux.librehat.com/apt/termux-main/ stable main
# science-repo (sources.list.d/science.list)
deb https://packages.termux.org/apt/termux-science science stable
# game-repo (sources.list.d/game.list)
deb https://packages.termux.org/apt/termux-games games stable
Updatable packages:
openssh/stable 8.6p1-3 aarch64 [upgradable from: 8.6p1-1]
termux-keyring/stable 2.2 all [upgradable from: 2.0]
Android version:
10
Kernel build information:
Linux localhost 4.14.116 #1 SMP PREEMPT Fri Aug 6 19:16:39 CST 2021 aarch64 Android
Device manufacturer:
HUAWEI
Device model:
SPN-AL00
~ $ 
michalbednarski commented 2 years ago

While proot doesn't currently handle sethostname syscall, hostname can be configured in command line, see #80.

GSLMXK commented 2 weeks ago

what should i do when the service need to execute that command localhost:~# service docker start -Z

sylirre commented 2 weeks ago

@GSLMXK Docker doesn't work under proot. It needs rooted device (i.e. real root privileges, not emulated root username) and custom kernel with additional features enabled.