When I do the following on every debian distribution from jessie to trixie I get the following:
/sbin/chroot . /bin/bash -il
root@dirac:~# tty
tty
not a tty
but everything works. Bash history (up arrow), vim editing.
In a sid chroot arrow keys don't work and:
root@dirac:/# vi x.x
Vim: Warning: Output is not to a terminal
Vim: Warning: Input is not from a terminal
There's some complications:
I'm using unshare to fake root:
This backgrounds the namespace:
unshare --user --mount --pid --fork --map-users=auto --map-groups=auto --setuid 0 --setgid 0 -- /bin/bash --rcfile /mnt/build/.bashrc.lxc -c "/usr/sbin/init" &
And this enters it.
nsenter --user --mount --pid -t $enterpid /bin/bash --rcfile ~/.bashrc.lxc
and the sid chroot is a s390x image where I'm using qemu emulation.
| Sysop: | Jacob Catayoc |
|---|---|
| Location: | Pasay City, Metro Manila, Philippines |
| Users: | 5 |
| Nodes: | 4 (0 / 4) |
| Uptime: | 121:23:57 |
| Calls: | 125 |
| Calls today: | 125 |
| Files: | 489 |
| D/L today: |
859 files (365M bytes) |
| Messages: | 76,611 |
| Posted today: | 26 |