1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Raspberry Pi Imagerで32bitOSを書き込んだのに64bitOSが起動する場合の対処方法

Last updated at Posted at 2023-06-12

32bitOSを書き込んだはずなのに64bitで起動する

現時点(2023.6.12)では32bit版で書き込んでも

起動後に確認すると64bit版が立ち上がっています。

$ uname -a
Linux test1 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux

二ヶ月前は問題なく32bitで起動できましたが久々に32bitイメージを作成してパッケージをインストールしたらエラー出まくりで気づきました。

対策

/boot/config.txtで64bit起動を無効にします。

/boot/config.txt
          ・
          ・
          ・
[all]
arm_64bit=0

一手間省くのにshellscriptにしました。

64bit-disable.sh
#!/bin/bash

if [ $(cat /boot/config.txt | grep arm_64bit=1) ]; then
  sudo sed -i "s/arm_64bit=1/arm_64bit=0/g" /boot/config.txt
elif [ -z $(cat /boot/config.txt | grep arm_64bit=) ]; then
  echo "arm_64bit=0" | sudo tee -a /boot/config.txt
fi
1
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?