シリアルコンソールで、ターミナルサイズを変更する方法

シリアルコンソールを使うとデフォルトでは、ターミナルサイズが80x25になっていることが多い。
# stty size
25 80
これを実際の仮想端末のサイズにフィットするには以下のコマンドを実行する
# setterm --resize
すると、ターミナルサイズが変更される
# stty size
51 204

Ubuntu上で新しいバージョンのDebianのLXCコンテナを作る方法

例えば、Ubuntu 20.04上でDebian12のLXCコンテナを作成すると、'signed by unknown key'(知らない鍵で署名されている)と表示されエラーとなる。
# lxc-create -t debian -n deb12 -- -r bookworm
debootstrap is /usr/sbin/debootstrap
Checking cache download in /var/cache/lxc/debian/rootfs-bookworm-amd64 ...
gpg: key 7638D0442B90D010: 4 signatures not checked due to missing keys
gpg: key 7638D0442B90D010: "Debian Archive Automatic Signing Key (8/jessie) " not changed
gpg: Total number processed: 1
gpg:              unchanged: 1
Downloading debian minimal ...
I: Retrieving InRelease
I: Checking Release signature
E: Release signed by unknown key (key id F8D2585B8783D481)
   The specified keyring /var/cache/lxc/debian/archive-key.gpg may be incorrect or out of date.
   You can find the latest Debian release key at https://ftp-master.debian.org/keys.html
Failed to download the rootfs, aborting.
Failed to download 'debian base'
failed to install debian
lxc-create: deb12: lxccontainer.c: create_run_template: 1627 Failed to create container from template
lxc-create: deb12: tools/lxc_create.c: main: 317 Failed to create container deb12
次のように鍵をダウンロードして、ホストOSに登録してから、再度lxc-createを実行すればよい。
wget https://ftp-master.debian.org/keys/archive-key-12.asc -O - --quiet \
| gpg --import --no-default-keyring --keyring=/usr/share/keyrings/debian-archive-keyring.gpg
青字の部分は使用するDebianのバージョンに適宜変更する。鍵の一覧は以下のサイトにある。 https://ftp-master.debian.org/keys.html