LoginSignup
0
0

More than 1 year has passed since last update.

chroot環境内でターミナルエミュレータを起動すると"Failed to open PTY: そのようなデバイスはありません"と表示されるときの対処法

Posted at

debootstrapコマンドでDebian環境をセットアップし、chrootて起動させた簡易Debian環境でも、tightvncパッケージをインストールし、vncserverコマンドを実行することで、VNC経由でGUI環境にすることができる。

しかしながら、そのままの状態ではXtermが起動せず、試しにxfce4-terminalをインストールして試すと、"Failed to open PTY: そのようなデバイスはありません"と表示され、ターミナルが起動しなかった。

環境

ホスト : Ubuntu 20.04.3
chroot環境 : Debian GNU/Linux 11

対処法

この問題は、/dev/ptsデバイスがマウントされていないと発生するらしい。

/etc/fstabの編集

root権限で、適当なテキストエディタで/etc/fstabを開き、末尾に以下の行を挿入する。

none /dev/pts devpts gid=5,mode=620 0 0

/dev/ptsのマウント

root権限で、以下のコマンドを実行する。

mount /dev/pts

これにより、chroot環境内でもXtermなどのターミナルエミュレータが利用可能となる。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0