• controlling tty when chroot into a sid chroot (from bookworm)

    From Tim Woodall@3:633/10 to All on Thursday, March 12, 2026 20:00:01
    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.


    Anybody know how I can get sid to behave like everything since jessie?
    Or even what is missing in the chroot to get things to work?

    Tim.

    --- PyGate Linux v1.5.12
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Tim Woodall@3:633/10 to All on Thursday, March 12, 2026 20:30:01
    On Thu, 12 Mar 2026, Tim Woodall wrote:

    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.

    This seems to be the problem. I setup the same sid chroot but on amd64
    and everything works as I expect.

    This seems to be a regression somewhere between bookworm and sid on
    s390x.

    Tim.

    --- PyGate Linux v1.5.12
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)