LoginSignup
0
0

More than 1 year has passed since last update.

arm64 向け Debian11 Root File System を amd64+QEMU で作成する時は qemu-user-static のバージョンを 6.1 以降にしてください

Last updated at Posted at 2021-11-06

はじめに

次のようにして Ubuntu (18.04等) 上で QEMU を使って arm64 向けの Debian11(bullseye) Root File System を ビルドする場合

shell$ mkdir debian11-rootfs
shell$ sudo chown root debian11-rootfs
shell$ sudo debootstrap --arch=arm64 --foreign bullseye debian11-rootfs
     :
     :
shell$ sudo cp /usr/bin/qemu-aarch64-static debian11-rootfs/usr/bin
shell$ sudo cp /etc/resolv.conf             debian11-rootfs/etc                 

以下のようなエラーが発生する場合があります。

現象1

debootstrap の second-stage で次のようなエラーが発生する。

shell$ sudo chroot debian11-rootfs
I have no name!@ubuntu:/# distro=bullseye
I have no name!@ubuntu:/# export LANG=C
I have no name!@ubuntu:/# /debootstrap/debootstrap --second-stage
W: Failure trying to run:  /sbin/ldconfig
W: See //debootstrap/debootstrap.log for details

現象2

python3-minimal をインストールする時、segmentation error が起きる。

原因と対策

いずれの場合も、qemu-user-static のバージョンが古い場合に起きます。

現象1を避けるためには buster-backports 以降で提供されている 5.2 以降が必要です。
現象2を避けるためには 6.1 以降が必要です。

どちらも避けたい場合は、6.1 以降を使ってください。私は qemu-user-static_6.1+dfsg-8_amd64.deb を探してきて、dpkg -i でインストールして使いました。

参考資料

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