「シリアルコンソール」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(カテゴリ修正)
(→‎Boot loader: 一部飜訳)
(同じ利用者による、間の10版が非表示)
3行目: 3行目:
 
Arch Linux マシンを設定してシリアルコンソールポート (com ポート) でマシンを接続することができます。キーボードやマウス、モニター、ネットワークが接続されていなくても (ヘッドレスサーバー)、マシンを管理することが可能です。
 
Arch Linux マシンを設定してシリアルコンソールポート (com ポート) でマシンを接続することができます。キーボードやマウス、モニター、ネットワークが接続されていなくても (ヘッドレスサーバー)、マシンを管理することが可能です。
   
Arch Linux 2007.x 現在、Arch Linux をシリアルコンソールでインストールすることもできます。
+
Arch Linux をシリアルコンソールでインストールすることもできます。
   
 
シリアルケーブル (9ピンの接続ケーブル) を使ってマシンを接続されていることが基本条件とします。管理用のマシンはターミナルエミュレータプログラム ([[PuTTY]] や Minicom など) が動作するのであれば Unix/Linux あるいは Windows のどちらでもかまいません。
 
シリアルケーブル (9ピンの接続ケーブル) を使ってマシンを接続されていることが基本条件とします。管理用のマシンはターミナルエミュレータプログラム ([[PuTTY]] や Minicom など) が動作するのであれば Unix/Linux あるいは Windows のどちらでもかまいません。
9行目: 9行目:
 
以下の設定では GRUB のメニュー選択とブートメッセージを有効にしてシリアルコンソールに端末を転送します。
 
以下の設定では GRUB のメニュー選択とブートメッセージを有効にしてシリアルコンソールに端末を転送します。
   
==設定==
 
   
===接続先のマシンのコンソールを設定===
+
==接続先のマシンのコンソールを設定==
   
  +
=== ブートローダー ===
====GRUB2 と systemd====
 
   
  +
==== GRUB ====
GRUB2 でシリアルコンソールを設定する場合、systemd によってデフォルトで getty リスナーが同一のシリアルデバイスに作成されます。grub からシリアルコンソールが使えるようにするには {{ic|/etc/default/grub}} をエディタで開いてください。{{ic|GRUB_CMDLINE_DEFAULT}} 行を変更して {{ic|/dev/ttyS0}} でコンソールを起動してください。tty0 とシリアルポートでコンソールを立ち上げる例:
 
GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,38400n8"
 
   
  +
生成された {{ic|grub.cfg}} で [[GRUB]] を使用する場合、{{ic|/etc/default/grub}} を編集し、シリアル入出力サポートを有効にします。
シリアルコンソールを有効にするにはコンソールのコマンドを指定する必要があります (Linux カーネルと同じように、grub ではターミナルの入出力を複数記述できます。例: {{ic|<nowiki>GRUB_TERMINAL="console serial"</nowiki>}}:
 
   
  +
{{hc|/etc/default/grub|2=
## Serial console
 
  +
...
GRUB_TERMINAL=serial
 
  +
GRUB_TERMINAL_INPUT="console serial"
GRUB_SERIAL_COMMAND="serial --speed=38400 --unit=0 --word=8 --parity=no --stop=1"
 
  +
...
  +
GRUB_TERMINAL_OUTPUT="gfxterm serial"
  +
...
  +
}}
   
  +
次に {{ic|GRUB_SERIAL_COMMAND}} 変数を追加し、シリアル接続のオプションを設定します。 COM1 ({{ic|/dev/ttyS0}}) のボーレートが 115200 ビット/秒の場合:
以下のコマンドで {{ic|grub.cfg}} ファイルを再生成してください:
 
# grub-mkconfig -o /boot/grub/grub.cfg
 
   
  +
{{hc|/etc/default/grub|2=
再起動後、getty は {{ic|/dev/ttyS0}} を listen するようになります。38400 ボーで、パリティビットを使わずストップビットを1個使用する、8 データビットで接続します。Arch が起動すると systemd が自動的に getty セッションを同一設定の同一デバイスで起動します。
 
  +
...
  +
GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200"
  +
}}
   
  +
利用可能なオプションの詳細な説明については、[https://www.gnu.org/software/grub/manual/grub/grub.html#Serial-terminal Using GRUB via a serial line] および [https://www.gnu.org/software/grub/manual/grub/grub.html#serial serial command] を参照してください。
=====GRUB2 を使わず systemd だけを使用=====
 
GRUB2 を設定してシリアルコンソールを使う場合にはこのセクションは無視してください。起動後に getty だけ listen させたい場合に以下の手順に従ってください。
 
   
  +
==== GRUB Legacy ====
systemctl を使って getty を {{ic|/dev/ttyS0}} で起動:
 
   
  +
Edit the [[GRUB Legacy]] configuration file {{ic|/boot/grub/menu.lst}} and add these lines to the general area of the configuration:
# systemctl start getty@ttyS0.service
 
   
  +
serial --unit=0 --speed=9600
systemctl を使って getty の速度を確認できます (38400 8N1 になるはずです):
 
  +
terminal --timeout=5 serial console
   
  +
{{Note|When the {{ic|1=terminal --timeout=5 serial console}} line is added to your {{ic|menu.lst}}, your boot sequence will now show a series of {{ic|Press any key to continue}} messages. If no key is pressed, the boot menu will appear on whichever (serial or console) appears first in the {{ic|terminal}} configuration line.}}
# systemctl status serial-getty@ttyS0.service
 
   
  +
==== rEFInd ====
起動時に毎回 getty で {{ic|/dev/ttyS0}} を listen するには、サービスを有効化します:
 
   
  +
[[rEFInd]] supports serial console only in text mode. Edit {{ic|refind.conf}} and uncomment {{ic|textonly}}.
# systemctl enable serial-getty@ttyS0.service
 
   
  +
==== Syslinux ====
====GRUB v1 だけを使って systemd を使用しない====
 
GRUB の設定ファイル {{ic|/boot/grub/menu.lst}} を編集して以下の行を追加してください:
 
   
  +
To enable serial console in [[Syslinux]], edit {{ic|syslinux.cfg}} and add {{ic|SERIAL}} as the first directive in the configuration file.
serial --unit=0 --speed=9600
 
terminal --timeout=5 serial console
 
   
  +
For COM1 ({{ic|/dev/ttyS0}}) with baud rate of 115200 bit/s:
kernel 行の末尾に適切なコンソールパラメータを追加 (必要であればシリアルデバイスの名前やボーレートを変更してください):
 
   
  +
SERIAL 0 115200
console=tty0 console=ttyS0,9600
 
   
  +
The serial parameters are hardcoded to 8 bits, no parity and 1 stop bit.[https://wiki.syslinux.org/wiki/index.php/SYSLINUX#SERIAL_port_.5Bbaudrate_.5Bflowcontrol.5D.5D]. Read [https://wiki.syslinux.org/wiki/index.php?title=Config#SERIAL Syslinux Wiki:Config#SERIAL] for the directive's options.
編集すると kernel 行は以下のようになります:
 
   
  +
=== Kernel ===
kernel /vmlinuz-linux root=/dev/md0 ro md=0,/dev/sda3,/dev/sdb3 vga=773 console=tty0 console=ttyS0,9600
 
   
  +
Kernel's output can be sent to serial console by setting the {{ic|1=console=}} [[kernel parameter]]. The last specified {{ic|1=console=}} will be set as {{ic|/dev/console}}.
{{ic|<nowiki>terminal --timeout=5 serial console</nowiki>}} 行を {{ic|menu.lst}} に追加すると、起動画面で "Press any key to continue" メッセージが表示されるようになります。何もキーを押さないと、ブートメニューは 'terminal' 行に先に設定したほう (serial または console) に表示されます。以下のようにメッセージが表示されます:
 
   
  +
console=tty0 console=ttyS0,115200
Press any key to continue.
 
Press any key to continue.
 
Press any key to continue.
 
Press any key to continue.
 
Press any key to continue.
 
Press any key to continue.
 
Press any key to continue.
 
   
  +
See https://docs.kernel.org/admin-guide/serial-console.html.
そして {{ic|/etc/inittab}} を編集して末尾に新しく agetty の行を追加します:
 
   
  +
=== getty ===
c0:2345:respawn:/sbin/agetty 9600 ttyS0 linux
 
   
  +
At boot, {{man|8|systemd-getty-generator}} will start a [[getty]] instance for each console specified in the kernel command line.
{{ic|/etc/securetty}} を編集して既存のエントリの下にシリアルコンソールのエントリを追加してください:
 
   
  +
If you have not configured {{ic|1=console=}} in kernel command line [[start]] {{ic|serial-getty@''device''.service}}. For {{ic|/dev/ttyS0}} (COM1) that would be {{ic|serial-getty@ttyS0.service}}. [[Enable]] the service to start it at boot.
ttyS0
 
   
  +
Unless specified otherwise in the kernel command line, getty will be expecting 38400 bit/s baud rate, 8 data bits, no parity and one stop bit-times.
設定できたら再起動してください。
 
 
{{note|シリアルポートが複数ある場合、上記の設定の代わりに ttyS1 を使うこともできます。}}
 
   
 
==接続==
 
==接続==
85行目: 79行目:
 
{{note|接続を行う前に、ユーザーを {{ic|uucp}} グループに追加することを推奨します。グループに追加されていない場合、接続するのに root 権限が必要になります。詳しくは[[ユーザーとグループ#ユーザーグループ]]を参照。}}
 
{{note|接続を行う前に、ユーザーを {{ic|uucp}} グループに追加することを推奨します。グループに追加されていない場合、接続するのに root 権限が必要になります。詳しくは[[ユーザーとグループ#ユーザーグループ]]を参照。}}
   
==== コマンドライン ====
+
==== dterm ====
===== dterm =====
 
   
 
{{aur|dterm}} は小さなシリアル接続プログラムです。パラメータを付けずに起動した場合、デフォルトでは {{ic|/dev/ttyS0}} に 9600 ボーで接続します。以下の例は {{ic|/dev/ttyS0}} に 115200 ボーで、パリティビットを使わずストップビットを1個使用する、8 データビットで接続します:
 
{{aur|dterm}} は小さなシリアル接続プログラムです。パラメータを付けずに起動した場合、デフォルトでは {{ic|/dev/ttyS0}} に 9600 ボーで接続します。以下の例は {{ic|/dev/ttyS0}} に 115200 ボーで、パリティビットを使わずストップビットを1個使用する、8 データビットで接続します:
94行目: 87行目:
 
詳しくは [http://www.knossos.net.nz/resources/free-software/dterm/ ホームページ] を見てください。
 
詳しくは [http://www.knossos.net.nz/resources/free-software/dterm/ ホームページ] を見てください。
   
===== Minicom =====
+
==== Minicom ====
   
 
{{Pkg|minicom}} は公式リポジトリからインストールできます。セットアップモードで Minicom を起動:
 
{{Pkg|minicom}} は公式リポジトリからインストールできます。セットアップモードで Minicom を起動:
107行目: 100行目:
 
Enter を押してメニューを終了してください (Esc を押した場合、変更が保存されません)。モデムには接続しないため、モデムの Init と Reset の文字列は削除します。{{ic|Modem and Dialing}} メニューで Init と Reset 文字列を削除してください。メインメニューから {{ic|save setup as dfl}} を選択することで設定が保存されます。マシンにシリアルケーブルを接続したまま minicom を再起動してください。セッションを終了するには {{ic|Ctrl+A}} を押してから {{ic|Ctrl+X}} を押します。
 
Enter を押してメニューを終了してください (Esc を押した場合、変更が保存されません)。モデムには接続しないため、モデムの Init と Reset の文字列は削除します。{{ic|Modem and Dialing}} メニューで Init と Reset 文字列を削除してください。メインメニューから {{ic|save setup as dfl}} を選択することで設定が保存されます。マシンにシリアルケーブルを接続したまま minicom を再起動してください。セッションを終了するには {{ic|Ctrl+A}} を押してから {{ic|Ctrl+X}} を押します。
   
===== picocom =====
+
==== picocom ====
   
 
{{pkg|picocom}} は minicom とよく似ている小さなダム端末エミュレーションプログラムです。以下の例は {{ic|ttyS0}} に 9600 bps で接続します:
 
{{pkg|picocom}} は minicom とよく似ている小さなダム端末エミュレーションプログラムです。以下の例は {{ic|ttyS0}} に 9600 bps で接続します:
117行目: 110行目:
 
詳しい使い方はマニュアルを見てください。
 
詳しい使い方はマニュアルを見てください。
   
===== Screen =====
+
==== Screen ====
   
 
{{Pkg|screen}} はシリアルポートに接続することができます。デフォルトでは 9600 ボーで接続します:
 
{{Pkg|screen}} はシリアルポートに接続することができます。デフォルトでは 9600 ボーで接続します:
127行目: 120行目:
 
$ screen /dev/ttyS0 115200
 
$ screen /dev/ttyS0 115200
   
===== Serialclient =====
+
==== Serialclient ====
   
 
Serialclient は [[Ruby]] で書かれたシリアル接続 CLI クライアントです [https://github.com/flagos/serialclient]。[[Ruby#RubyGems|Gem]] を使ってインストールしてください。
 
Serialclient は [[Ruby]] で書かれたシリアル接続 CLI クライアントです [https://github.com/flagos/serialclient]。[[Ruby#RubyGems|Gem]] を使ってインストールしてください。
134行目: 127行目:
 
$ serialclient -p /dev/ttyS0
 
$ serialclient -p /dev/ttyS0
   
==== Windows ====
+
==== tinyserial ====
   
  +
{{pkg|tinyserial}} is a {{pkg|minicom}} replacement for accessing serial ports on Linux inspired by FreeBSD 'tip'.
Windows マシンでは [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuTTY] や [https://sites.google.com/site/terminalbpp/ Terminalbpp] などのプログラムを使ってシリアルポートに接続してください。
 
  +
  +
$ com /dev/ttyS0 9600
   
==== グラフィカルフロントエンド ====
+
=== グラフィカルフロントエンド ===
   
 
* {{AUR|cutecom}} は gui で使えるシリアルモニターです。
 
* {{AUR|cutecom}} は gui で使えるシリアルモニターです。
145行目: 140行目:
   
 
* {{Pkg|moserial}} は gtk ベースのシリアルターミナルです。組み込み環境や試験装置、シリアルコンソールを使う必要がある技術者やハードウェアハッカー用に作られています。
 
* {{Pkg|moserial}} は gtk ベースのシリアルターミナルです。組み込み環境や試験装置、シリアルコンソールを使う必要がある技術者やハードウェアハッカー用に作られています。
  +
  +
=== Windows ===
  +
  +
Windows マシンでは [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuTTY] や [https://sites.google.com/site/terminalbpp/ Terminalbpp] などのプログラムを使ってシリアルポートに接続してください。
   
 
==シリアルコンソールを使って Arch Linux をインストール==
 
==シリアルコンソールを使って Arch Linux をインストール==
158行目: 157行目:
 
* セットアップが完了しても、マシンのコンソール設定は保存されません。キーボードとモニターを毎回接続しなくても良いように、再起動する前にマシンの中でコンソールアクセスの設定を行ってください。
 
* セットアップが完了しても、マシンのコンソール設定は保存されません。キーボードとモニターを毎回接続しなくても良いように、再起動する前にマシンの中でコンソールアクセスの設定を行ってください。
 
* このガイドでは例としてポート速度を 9600 としていますが、もっと高い値を使うことが推奨されます (Minicom で 'Ctrl-A' を押してから 'P' を押すことで利用可能な速度を確認できます)。}}
 
* このガイドでは例としてポート速度を 9600 としていますが、もっと高い値を使うことが推奨されます (Minicom で 'Ctrl-A' を押してから 'P' を押すことで利用可能な速度を確認できます)。}}
  +
  +
== Debugging an unresponsive machine using a serial console ==
  +
  +
Even though [https://lists.archlinux.org/archives/list/arch-general@lists.archlinux.org/message/R3B32YF5EBKZCYF3TGKG6WTDONQ6RFS4/] has only raw and terse instructions, it presents the full scene. It is important to note that here, the machine under test got unresponsive in a reproducible manner. And that it happened during normal operation. So it could be accessed normally before it needed debugging. However, in general, the serial console is also useful for debugging boot issues. Perhaps by configuring the boot loader by hand at machine startup time. Also note the mentioned [[netconsole]] within the P.S paragraph of the external link from this section.
   
 
==トラブルシューティング==
 
==トラブルシューティング==
191行目: 194行目:
 
fi
 
fi
 
}</nowiki>}}
 
}</nowiki>}}
  +
  +
=== Missing ports on multi-port expansion cards ===
  +
  +
{{Expansion|Can the kernel module option be set in {{man|5|modprobe.d}}?}}
  +
  +
The number of serial ports using the generic 8250 driver on the default kernel configuration is set to 4 at runtime with a maximum of 32. This will prevent the creation of {{ic|/dev/ttyS4}} and above. Counting the typical built in serial port on the motherboard this prevents the use of the 4th serial port on a 4 port expansion card.
  +
  +
This can be overridden with the [[kernel parameter]] {{ic|8250.nr_uarts}}. E.g.:
  +
  +
8250.nr_uarts=5

2023年2月4日 (土) 10:22時点における版

Arch Linux マシンを設定してシリアルコンソールポート (com ポート) でマシンを接続することができます。キーボードやマウス、モニター、ネットワークが接続されていなくても (ヘッドレスサーバー)、マシンを管理することが可能です。

Arch Linux をシリアルコンソールでインストールすることもできます。

シリアルケーブル (9ピンの接続ケーブル) を使ってマシンを接続されていることが基本条件とします。管理用のマシンはターミナルエミュレータプログラム (PuTTY や Minicom など) が動作するのであれば Unix/Linux あるいは Windows のどちらでもかまいません。

以下の設定では GRUB のメニュー選択とブートメッセージを有効にしてシリアルコンソールに端末を転送します。


接続先のマシンのコンソールを設定

ブートローダー

GRUB

生成された grub.cfgGRUB を使用する場合、/etc/default/grub を編集し、シリアル入出力サポートを有効にします。

/etc/default/grub
...
GRUB_TERMINAL_INPUT="console serial"
...
GRUB_TERMINAL_OUTPUT="gfxterm serial"
...

次に GRUB_SERIAL_COMMAND 変数を追加し、シリアル接続のオプションを設定します。 COM1 (/dev/ttyS0) のボーレートが 115200 ビット/秒の場合:

/etc/default/grub
...
GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200"

利用可能なオプションの詳細な説明については、Using GRUB via a serial line および serial command を参照してください。

GRUB Legacy

Edit the GRUB Legacy configuration file /boot/grub/menu.lst and add these lines to the general area of the configuration:

serial --unit=0 --speed=9600
terminal --timeout=5 serial console
ノート: When the terminal --timeout=5 serial console line is added to your menu.lst, your boot sequence will now show a series of Press any key to continue messages. If no key is pressed, the boot menu will appear on whichever (serial or console) appears first in the terminal configuration line.

rEFInd

rEFInd supports serial console only in text mode. Edit refind.conf and uncomment textonly.

Syslinux

To enable serial console in Syslinux, edit syslinux.cfg and add SERIAL as the first directive in the configuration file.

For COM1 (/dev/ttyS0) with baud rate of 115200 bit/s:

SERIAL 0 115200

The serial parameters are hardcoded to 8 bits, no parity and 1 stop bit.[1]. Read Syslinux Wiki:Config#SERIAL for the directive's options.

Kernel

Kernel's output can be sent to serial console by setting the console= kernel parameter. The last specified console= will be set as /dev/console.

console=tty0 console=ttyS0,115200

See https://docs.kernel.org/admin-guide/serial-console.html.

getty

At boot, systemd-getty-generator(8) will start a getty instance for each console specified in the kernel command line.

If you have not configured console= in kernel command line start serial-getty@device.service. For /dev/ttyS0 (COM1) that would be serial-getty@ttyS0.service. Enable the service to start it at boot.

Unless specified otherwise in the kernel command line, getty will be expecting 38400 bit/s baud rate, 8 data bits, no parity and one stop bit-times.

接続

ターミナルエミュレータプログラムを使って接続

ノート: 接続を行う前に、ユーザーを uucp グループに追加することを推奨します。グループに追加されていない場合、接続するのに root 権限が必要になります。詳しくはユーザーとグループ#ユーザーグループを参照。

dterm

dtermAUR は小さなシリアル接続プログラムです。パラメータを付けずに起動した場合、デフォルトでは /dev/ttyS0 に 9600 ボーで接続します。以下の例は /dev/ttyS0 に 115200 ボーで、パリティビットを使わずストップビットを1個使用する、8 データビットで接続します:

$ dterm 115200 8 n 1

詳しくは ホームページ を見てください。

Minicom

minicom は公式リポジトリからインストールできます。セットアップモードで Minicom を起動:

$ minicom -s

テキストのナビゲーションメニューを使って、以下のようにシリアルポートの設定を変更:

Serial Device: /dev/ttyS0
Bps/Par/Bits: 9600 8N1

Enter を押してメニューを終了してください (Esc を押した場合、変更が保存されません)。モデムには接続しないため、モデムの Init と Reset の文字列は削除します。Modem and Dialing メニューで Init と Reset 文字列を削除してください。メインメニューから save setup as dfl を選択することで設定が保存されます。マシンにシリアルケーブルを接続したまま minicom を再起動してください。セッションを終了するには Ctrl+A を押してから Ctrl+X を押します。

picocom

picocom は minicom とよく似ている小さなダム端末エミュレーションプログラムです。以下の例は ttyS0 に 9600 bps で接続します:

$ picocom -b 9600 /dev/ttyS0
ノート: バックスペースキーが上手く動作しない場合、次のオプションを試してみてください: '--omap delbs'。

詳しい使い方はマニュアルを見てください。

Screen

screen はシリアルポートに接続することができます。デフォルトでは 9600 ボーで接続します:

$ screen /dev/ttyS0

コマンドラインからボーレート (例: 115200) を指定できます:

$ screen /dev/ttyS0 115200

Serialclient

Serialclient は Ruby で書かれたシリアル接続 CLI クライアントです [2]Gem を使ってインストールしてください。

以下のようにして使うことが可能です:

$ serialclient -p /dev/ttyS0

tinyserial

tinyserial is a minicom replacement for accessing serial ports on Linux inspired by FreeBSD 'tip'.

$ com /dev/ttyS0 9600

グラフィカルフロントエンド

  • cutecomAUR は gui で使えるシリアルモニターです。
  • putty は Linux からでも使うことができます。
  • moserial は gtk ベースのシリアルターミナルです。組み込み環境や試験装置、シリアルコンソールを使う必要がある技術者やハードウェアハッカー用に作られています。

Windows

Windows マシンでは PuTTYTerminalbpp などのプログラムを使ってシリアルポートに接続してください。

シリアルコンソールを使って Arch Linux をインストール

ノート: Arch Linux の月次リリースのインストール CD のブートローダーは 0 ポート (ttyS0/COM1) を 38400 bps、パリティビットを使わずストップビットを1個使用する、8 データビットで listen するように設定されています [3]
  1. 上に書かれている方法でインストールを行うマシンに接続。
  2. Arch Linux インストール CD を使ってマシンを起動。
  3. ブートローダーが表示されたら Boot Arch Linux (<arch>) を選択して Tab を押してエントリを編集。
  4. console=ttyS0,38400 を追加して Enter を押す。
  5. systemd によって ttyS0 が認識されシリアル getty が起動します。root でログインして通常通りにインストールを行ってください。
ノート:
  • セットアップが完了しても、マシンのコンソール設定は保存されません。キーボードとモニターを毎回接続しなくても良いように、再起動する前にマシンの中でコンソールアクセスの設定を行ってください。
  • このガイドでは例としてポート速度を 9600 としていますが、もっと高い値を使うことが推奨されます (Minicom で 'Ctrl-A' を押してから 'P' を押すことで利用可能な速度を確認できます)。

Debugging an unresponsive machine using a serial console

Even though [4] has only raw and terse instructions, it presents the full scene. It is important to note that here, the machine under test got unresponsive in a reproducible manner. And that it happened during normal operation. So it could be accessed normally before it needed debugging. However, in general, the serial console is also useful for debugging boot issues. Perhaps by configuring the boot loader by hand at machine startup time. Also note the mentioned netconsole within the P.S paragraph of the external link from this section.

トラブルシューティング

Ctrl-C と Minicom

minicom で Control-C コマンドを送ったときに問題が起こる場合、デバイス設定 (minicom -s) でハードウェアフロー制御をオフにしてください。ブレークが有効になります。

ターミナルのサイズ変更

ssh と異なり、シリアル接続にはターミナルのサイズを変更したときに SIGWINCH を転送する機能がありません。そのため、ターミナルウィンドウのサイズを変更したときにフルスクリーンプログラム (例: less) で表示が崩れてしまいます。

解決方法として stty でターミナルのサイズを変えることができます:

$ stty rows lines cols columns

ただし上記の方法ではサイズを手動で入力する必要があります。以下の方法でサイズ変更を簡単にすることができます。

1. xterm に付属している知名度の低いユーティリティ resize で問題を解決できます。ターミナルエミュレータのウィンドウのサイズを変更した後にパラメータを付けずに起動してください:

$ resize

2. xterm をインストールしたくない場合、シンプルなシェル関数で同じことができます。以下の関数をシェルの設定ファイルに記述して、パラメータを付けずに実行してください:

rsz() {
	if [[ -t 0 && $# -eq 0 ]];then
		local IFS='[;' escape geometry x y
		print -n '\e7\e[r\e[999;999H\e[6n\e8'
		read -sd R escape geometry
		x=${geometry##*;} y=${geometry%%;*}
		if [[ ${COLUMNS} -eq ${x} && ${LINES} -eq ${y} ]];then
			print "${TERM} ${x}x${y}"
		else
			print "${COLUMNS}x${LINES} -> ${x}x${y}"
			stty cols ${x} rows ${y}
		fi
	else
		[[ -n ${commands[repo-elephant]} ]] && repo-elephant || print 'Usage: rsz'  ## Easter egg here :)
	fi
}

Missing ports on multi-port expansion cards

この記事またはセクションは加筆を必要としています。
理由: Can the kernel module option be set in modprobe.d(5)? (議論: トーク:シリアルコンソール#)

The number of serial ports using the generic 8250 driver on the default kernel configuration is set to 4 at runtime with a maximum of 32. This will prevent the creation of /dev/ttyS4 and above. Counting the typical built in serial port on the motherboard this prevents the use of the 4th serial port on a 4 port expansion card.

This can be overridden with the kernel parameter 8250.nr_uarts. E.g.:

8250.nr_uarts=5